The CMInterface interface contains the following methods:
public int Init(Properties p, String id)
This method is used to initialize the plug-in. Any configuration parameters needed to intialize the plug-in will be passed in with the properties object parameter. The parameters are specified in the servlet's web.xml file. The id parameter is the symbolic name of the plug-in specified in the CMS configuration portion of the web.xml file. This value may be used to qualify the instance of the plug-in in the event multiple instances of the plug-in are running.
public void Destroy()
This method is called when CMS is shutting down.
public CMResponse CMSGetUserCredentials(CMRequest req)
This method is called by the CMS when it has selected the plug-in to respond to a request. If the plug-in is a network security type, it is expected that the plug-in will return the user's network user id. If the plug-in is a host user credential type, then this method will need to return the user's host credentials.
The following methods are needed for plug-in identification and selection.
public String getName();
This method returns a string that identifes the plug-in.
public String getDescription();
This method returns a string that contains information that describes the purpose and function of the plug-in.
public String getAuthor();
This method is needed to identify the originating company or person of the plug-in.
public String[] getParameters();
This method returns a string array containing the parameter tokens that may be used to configure this plug-in. These tokens are the keys specified in the initialization (INIT) parameters section of the web.xml file used to define the CMS servlet. If no tokens are needed for configuration, the method may return null.
public Properties getParameterInfo(String strParm);
Given a parameter token, this method returns a properties object with the list of properties for the given parameter. The current list of possible properties are as follows:
  • cmiDefaultValue: This property contains the default value for the specified parameter.
  • cmiEncrypted: This property determines if the parameter must be encrypted (true or false).
  • cmiRequired: This property identifies whether or not a parameter is required for initialization of the plug-in.