N1 Service Provisioning System 4.1 Reference Guide

The resourceRef Element

The <resourceRef> element is a child of the <component> element and specifies the resource managed by this component. It may not be used in conjunction with the <componentRefList> element. Configurable attributes of this element and its children may reference component substitution variables.


Note –

Resources have implicit PUBLIC access mode.


A component is considered a simple component if it is derived from a simple component, or is a non-derived component that contains a <resourceRef> element. Derived components may only contain a <resourceRef> element if they are derived from a simple component.

resourceRef Element attributes

Name 

Type 

Req, 

Configurable 

Description 

modifier 

modifierEnum 

No 

No 

The modifier of the resource, as described below. 

resourceRef modifier Attribute

The "modifier" attribute of the <resourceRef> element specifies the override requirements for the resource.

If ABSTRACT, the resourceRef <resource> element is omitted and must be specified by non-abstract derived components. ResourceRefs may only be declared abstract if the component is also declared abstract. Non-abstract resourceRefs must declare a <resource> element.

If FINAL, the resourceRef may not be overridden by derived components.

If unspecified, then derived components can choose whether or not to override the resourceRef.

resourceRef Child elements

Name 

How Many 

Description 

installSpec 

1 1 

Specifies how the resource is to be installed. 

resource 

1 2 

Identifies the associated resource. 

1 Only permitted in non-derived components. 2 May not be included in abstract resources.

resourceRef Inheritance and Overriding

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

A derived component may override the modifier and <resource> element of a non-final inherited <resourceRef> element by re-declaring the <resourceRef> element. When a <resourceRef> element is overridden, the <installSpec> element is omitted, as its contents may not be overridden. The <resource> element is specified if and only if the overriding <resourceRef> is non-abstract.

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


Note –

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