Sun N1 Service Provisioning System 5.1 XML Schema Reference Guide

<resourceRef> Element

The <resourceRef> element is an optional child of the <component> element. This element specifies the resource that is managed by the component. This element can only be used by a simple component. This element cannot be used in conjunction with the <componentRefList> element, which can only be used by a composite component. The configurable attributes of this element and its children can reference component substitution variables. Resources have implicit PUBLIC access mode. If used, this element can only appear one time.

A component is a simple component if it is derived from a simple component or if it is a nonderived component that contains a <resourceRef> element. A derived component can only contain a <resourceRef> element if it is derived from a simple component.

The <resourceRef> element has child elements, which must appear in the following order:

By default, a derived component inherits the <resourceRef> element of its base component.

A derived component can override the modifier and the <resource> element of a nonfinal inherited <resourceRef> element by re-declaring the <resourceRef> element. When a <resourceRef> element is overridden, the <installSpec> element is omitted, as its contents cannot be overridden. The <resource> element is specified only if the overriding <resourceRef> is nonabstract.

When a <resourceRef> is overridden, all uses of the resource (including <deployResource> and <addResource>) resolve to the overridden value, even uses in the base component.

If the derived component is declared as nonabstract and the <resourceRef> element of the base component is abstract, the derived component must override the <resourceRef> element.

Attributes for the <resourceRef> Element

The <resourceRef> element has one optional attribute, modifier, which has a value of type modifierEnum. The modifier attribute specifies the following override requirements for the resource:

If this attribute is omitted, derived components can choose whether to override the <resourceRef>.

<installSpec> Element

The <installSpec> element is a child of the <resourceRef> element. This element specifies the way in which the associated resource is to be installed. This element is inherited by derived components and cannot be overridden. However, the base component can use component variables to specify values for <installSpec> attributes. The values of these variables can also be overridden.

Attributes for the <installSpec> Element

The <installSpec> element has the following attributes. These attributes can reference component-scoped substitution variables.

<resource> Element

The <resource> element is a child of the <resourceRef> element. This element identifies the resource to be deployed by the component.

If the referenced resource is a configurable resource, it can contain substitution variable references to any component-scoped variable that is accessible to the containing component.

Attributes for the <resource> Element

The <resource> element has the following attributes: