N1 Grid Service Provisioning System 5.0 Plug-in Development Guide

Defining Component Types

Many basic component types are included with the N1 Grid Service Provisioning System product. Some of these basic component types include such items as files and directories. You can also define specific component types for use with a specific application or platform. For example, perhaps your application has some specific file types that would always exist for this application. You could then define a new component type for your application that is based on the system#CR Simple Base component type but extends that component type for your specific application.

The component type definition is stored in an XML file like any other component XML file. When you define your plug-in, you provide a path to the file for the backing component in the <component> element in the descriptor file. You use the <componentType> child element of the <component> element to provide additional information, such as its name, description, and so on. For more information, see Example 2–15.

ProcedureHow to Create a Component Type

Steps
  1. Determine what component types you need to create.

  2. From the Administrative section of the browser interface, click Component Types.

  3. From the Component Types page, click Create in the Action column.


    Note –

    You can type a name for the component type before you choose the Create action or you can type or change the name in the Edit window. Once you check in the component type, you cannot change its name.


  4. Accept the name or change it.

    A component type name has a maximum of 64 characters. The name must start with a letter or underscore, followed by any number of letters, digits, or special characters, such as underscore (_), period (.), plus (+), minus (-), and space ( ). Unicode letters and digits are permitted.

  5. (Optional) Type a menu group name.

    Group names follow the same requirements as the component type name . In addition, a group can be declared as hidden, which prevents the type from showing up in the component type drop-down list on the component list page.

  6. Type an alpha-numeric string for the menu order.

    The menu order is a maximum of 18 characters. In addition to Unicode letters and digits, any character that you can type on an ASCII keyboard is permitted. The order should be sufficient to sequence all of the types that are defined within a particular plug-in.

  7. Type a numeric value between 0 and 10 for the indent level.

    The indent level specifies how types should appear within the component type drop-down list on the component list page. Indents are used in conjunction with ordering to imply relationships between component types. For example, a wep app type might have related types web app configuration and web app archive that are indented more to highlight the relationship.

  8. (Optional) Type a description.

    The description must be less than 1024 characters in length. In addition to Unicode letters and digits, any character that you can type on an ASCII keyboard is permitted.

  9. Select a backing component.

    A backing component provides a template for the component type.

  10. Click Save.