Previous Topic: Overview of API Plug-ins

Next Topic: Configure Pagination Parameters for Select Fields

How to Write and Use API Plug-ins

To write and use an API plug-in, follow this process:

  1. Define the purpose of the plug-in, for example, to populate a select field with meeting rooms that a user can reserve for a specifed time period. Other examples include options for the meeting room, such as projectors, video conferencing units, and microphones.
  2. Meet the prequisites. Be able to do the following proficiently:
  3. Review the API Plug-in documentation, as follows:
    1. Log in to CA Service Catalog and select Administration, Tools.
    2. In the left menu, select Links.
    3. Scroll down to the Documentation section and click Plug-in Documentation.

    The API documentation is automatically generated Java documentation based on the Java class methods for the plug-ins. You use the interfaces, classes, methods, and so forth to implement your plug-in.

  4. Create a Java class for the type of Form Designer field for which the plug-in applies, as follows:

    Both interfaces and sample Java classes appear in the API Plug-in documentation. You can use the samples in the API Plug-in documentation as models for your Java classes.

  5. (Optional) If you use content configuration forms, retrieve values from fields on these forms and use them as needed.
  6. Create a properties file for the plug-in. You can use the samples in the API Plug-in documentation as models for your properties files.
  7. If applicable, do one of the following:
  8. Create a folder to store the following:
  9. Do the following to activate the plug-in:
    1. Stop the Windows service for Service View. The service is named CA Service View.
    2. Copy your folder (including all subfolders, if any) to the %USM_HOME%\filestore\plug-in folder.
    3. Restart the Windows service for Service View.
  10. Do the following to verify that the plug-in was successfully adopted:
    1. Log in to CA Service Catalog and select Administration, Tools.
    2. In the left menu, select Plug-ins.
    3. Verify that the plug-in is listed and that its details appear properly.

You are ready to test this API for use in a form field.