Creating a RAM Custom Policy with checkboxes and/or drop down list parameters
Hello All!
I'm writing some custom policies in RAM and have a question.
I've successfully made a simple policy that has a single text parameter, but I'd like to have a drop-down list on my custom policy to let the admin choose from a list when they are configuring the policy. I've seen some policies use checkboxes, so I know those are possible.
I assume I must do something special when I set the ConfigurationDetails object, but beyond that I don't know what to do.
Here is my code snippet for creating my text parameter on my current custom policy:
public static final ConfigurationDetails[] CONFIG_DETAILS = {
new ConfigurationDetails(REGEX, "Asset Name Validation Regex", "This regular expression will be used to validate the asset name", false, false)
};
How do I make drop down lists and checkboxes parameters on my custom policy?
Thanks!
Accepted answer
Go to here in the help:
http://pic.dhe.ibm.com/infocenter/ramhelp/v7r5m1/topic/com.ibm.ram.api.doc/topics/com/ibm/ram/extension/ConfigurationDetails.html
This shows you the javadoc for the different styles of configuration details.
http://pic.dhe.ibm.com/infocenter/ramhelp/v7r5m1/topic/com.ibm.ram.api.doc/topics/com/ibm/ram/extension/ConfigurationDetails.html
This shows you the javadoc for the different styles of configuration details.
Javadoc for a checkbox
http://pic.dhe.ibm.com/infocenter/ramhelp/v7r5m1/topic/com.ibm.ram.api.doc/topics/com/ibm/ram/extension/MultiValuesConfigurationDetails.html
Javadoc for a drop down list
http://pic.dhe.ibm.com/infocenter/ramhelp/v7r5m1/topic/com.ibm.ram.api.doc/topics/com/ibm/ram/extension/SelectBoxConfigurationDetails.html
http://pic.dhe.ibm.com/infocenter/ramhelp/v7r5m1/topic/com.ibm.ram.api.doc/topics/com/ibm/ram/extension/MultiValuesConfigurationDetails.html
Javadoc for a drop down list
http://pic.dhe.ibm.com/infocenter/ramhelp/v7r5m1/topic/com.ibm.ram.api.doc/topics/com/ibm/ram/extension/SelectBoxConfigurationDetails.html