The chapter describes how to extend an existing plug-in. This chapter describes the following topics.
N1 SPS is an object-oriented environment, enabling you to easily extend plug-in objects and reuse their functionality. If your environment requires additional features not included in an existing plug-in, you may want to create a plug-in to extend the existing plug-in to provide these features.
The process for extending a plug-in includes the following tasks.
Verify that the plug-in that you want to extend is extensible.
The plug-in that you want to extend must meet specific criteria to be eligible for extensibility. For more information about this criteria, see Designing Your Plug-In for Extensibility.
Create your extended plug-in.
The tasks involved in extending a plug-in are essentially the same as those for creating a new plug-in, with some restrictions.
For instructions about how to create a plug-in, see Creating a Plug-In: Process Overview.
For information about these restrictions, and guidelines for extending plug-ins, refer to the following sections.
This section provides guidelines for extending an existing plug-in. For examples of extended plug-ins, see the Open Datacenter web site.
For your extended plug-in, you need to create a plugin-descriptor.xml file for your plug-in. If your plug-in extends an existing plug-in, you must indicate that the new plug-in depends on the existing plug-in. In the plugin-descriptor.xml file for the extended plug-in, use the pluginRef child element of the dependencyList element to indicate that your new plug-in depends on the plug-in that your are extending.
For more information about the dependencyList element, see <dependencyList> Element in Sun N1 Service Provisioning System 5.2 XML Schema Reference Guide.
For instructions about how to create the plugin-descriptor.xml file, see Defining the Plug-In.
For any given plug-in, you might need to customize the plug-in for your specific environment by adding to the defined components. For example, you might want to add an additional file to a given component.
Components are not extendable. To include additional components in your extended plug-in, you extend the component types for the plug-in, declaring additional components to use in the plug-in.
In the plugin-descriptor.xml file for your plug-in, modify the componentType child element of the component element to extend the component types that are referenced by your plug-in.
For more information about the componentType element, see Sun N1 Service Provisioning System 5.2 XML Schema Reference Guide.
The N1 SPS software provides a public Java API, located in the /plugin/lib/sps-compSDK.jar file on the product media. For any given plug-in, you might need to customize the Java classes that are called by the plug-in.For more information about the N1 SPS public Java API, see Sun N1 Service Provisioning System JavaDoc.
To enable other users to access your extended plug-in from the N1 SPS browser interface, you need to create a plug-in user interface (UI) descriptor file. You cannot modify the UI descriptor file for the existing plug-in to expose your extensions.
For more information about how to create a UI descriptor file, see Defining a User Interface to the Plug-In.