CentraSite 10.11 | CentraSite Developer's Guide | Custom Policy Actions | Custom Policy Actions | Sample Java Action: Enforce Unique Asset Names
 
Sample Java Action: Enforce Unique Asset Names
You can use the sample Java class action rule uniquenamechecker that is present in the CentraSite installation to create a custom action, Unique Name Checker. This action ensures that the name and version combination of a newly-created asset is unique within the CentraSite catalog.
Note:
If the name and version combination of a newly-created asset is not unique, then the action returns a Failure message, and does not create the new asset in CentraSite registry.
To create the custom action, you have to:
1. Create a custom action category.
2. Create a custom action template, to which you upload the sample Java rule.
3. Create a Design/Change-Time policy and add the custom action template to it.