The <component> element is a child of the <memberList> element and is used to declare a component in the plug-in JAR file. All objects referenced by this component must have been previously defined either in this plug-in or in a plug-in on which this plug-in directly depends.
The <component> element contains three optional child elements:
<systemService>
<componentType>
<resource>
The <component> element has two attributes:
jarPath – The location of the component XML file, relative to the root of the plug-in JAR (leading / or . characters are not permitted). The format of the component XML is specified by the Plan and Component Language specification. See Chapter 3, Component Schema for more information.
majorVersion – An optional attribute that determines whether to check in the component as a new major version. The default is false.
The <systemService> element is a child of the <component> element and is used to declare a system service backed by the containing component. This element may not be used with the <componentType> element. When the <systemService> element is used in a <component> element, a component is loaded and a <systemServiceRef> that references that component is created. The name of the system service is prefixed with the plug-in name when the system service is created in the system.
The <systemService> element has two attributes:
name – The name of the system service
A 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.
The <componentType> element is a child of the <component> element and is used to declare a component type backed by the containing component. The <componentType> element may not be used with the <systemService> element. When the <componentType> element used in a <component> element, a component is loaded and a component type that is backed by that component is created. The name of the component type is prefixed with the plug-in name when the component type is created in the system.
Component types are grouped by plug-in, and ordered by the component type order within these groupings. Groupings are ordered according to the plug-in order. Within a particular plug-in, the component types are indented under distinct group names as defined by the component types.
The <componentType> element has five attributes:
name – The name of the component type.
A 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.
description – An optional description of the component type.
group – The group name of the component type, if this component type is part of a hierarchy of component types.
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 displaying in the component type drop down list on the component list page.
order – A number that identifies where to put this component type in the drop-down list of component types in the browser interface.
The 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.
indentLevel – A number between 0 and 10 that identifies the level to which to indent this component type in a hierarchy of component types in the browser interface.
The <resource> element is a child of the <component> element. It specifies a resource file name and location in the JAR file. A resource is always checked in as a simple file-typed resource. The component that contains the <resource> element must be a simple component whose <resourceRef> element refers to the resource created by the <resource> element.
The <resource> element has three attributes:
jarPath – The location of the resource file, relative to the root of the plug-in JAR file. Leading / or . characters are not permitted. For directory-type resources, this path is assumed to be a directory, and is expected to end with a /. Everything in this directory defines the contents of this resource.
majorVersion – An optional attribute that determines whether to check in the resource as a new major version. The default is false.
name – An optional attribute that is the name of the resource. If not specified, the name will default to the absolute jarPath, which is converted to absolute if specified as relative.
config – An optional attribute that specifies whether this resource is a configuration template. The default is false.
type – An optional attribute that specifies whether the resource is a file or a directory. Use FILE for a file resource. Use DIRECTORY for a directory resource. The default is FILE.
checkInMode – An optional attribute that specifies whether a directory-type resource should be replaced or appended. Use REPLACE if the check in of this resource should replace an existing version. Use ADD_TO if the check in should add to the resource. The default is REPLACE. This attribute only applies to a resource that has a type of DIRECTORY.
descriptorPath – An optional attribute that specifies the path to a resource descriptor file, relative to the root of the plug-in JAR file. Leading / or . characters are not permitted. The format of the resource descriptor file follows the Resource Descriptor schema, as described in Chapter 5, Resource Descriptor Schema.
If no resource descriptor file is specified, permissions information is used from the default file system settings of the N1 SPS master server. In this case, owner and group are not stored. This is also the case for settings that are omitted from a descriptor (either no entry or a partial entry for a file within the resource).