N1 Grid Service Provisioning System 5.0 Plan and Component Developer's Guide

Chapter 3 Built-in Component Types

You can use built-in component types to quickly model many of the most common WebLogic, Microsoft Windows, and J2EE application components. These component types enable you to automatically associate installation, uninstallation, export, and snapshot behavior with a particular component.

The following component types are available as part of the base product:

Other component types, such as those for WebLogic and Microsoft Windows applications, are available through plug-ins. For more information, see the N1 Grid Service Provisioning System 5.0 Plug-In Collection at http://docs.sun.com/db/coll/1223.1.

Component Type: system#file

The system#file component type represents a single file that is taken from a target server. The provisioning system deploys a file directly with no special postprocessing. The system#file component type includes installation, uninstallation, and snapshot procedures.

The system#file component type defines the following variables:

Browsing

 

UNIX Systems 

Microsoft Windows Systems 

Root Path

/

List of physical drives on the host or network are mapped to a drive letter. Removable media is not shown. 

Delimiter

/

\

Ordering

Alphabetical with directories appearing first 

Selection Type

User can select a file for check-in. Double click a directory to view its contents. 

Sample Path

/foo/foo.txt

C:\foo\foo.txt

Special

Links display their local name and the location pointed to: 

foo->/usr/bar

 

Extended Control Procedures

The following procedures are defined for the system#file component type:

Component Type: system#directory

The system#directory component type represents a collection of files and folders that are taken from a target server. The system#directory component type includes installation, uninstallation, and snapshot procedures.

The system#directory component type defines the following variables:

Browsing

 

UNIX Systems 

Microsoft Windows Systems 

Root Path

List of physical drives on the host or network are mapped to a drive letter. Removable media is not shown. 

Delimiter

Ordering

Alphabetical with directories appearing first 

Selection Type

User can select a directory for check-in. Double click a directory to view its contents. 

Sample Path

/foo/foo

C:\foo\foo

Filters

None 

Special

Links display their local name and the location pointed to: 

foo/->/usr/bar/

 

Extended Control Procedures

The following procedures are defined for the system#directory component type:

Component Type: system#symbolic link

The system#symbolic link component type represents a single symbolic link that is taken from a target server. The provisioning system deploys a symbolic link by creating a new link on the target server. The file that the symbolic link points to is taken from the value of the symlinkTarget variable. Any file that exists in the install location of the link is removed before the new symbolic link is created.

The system#symbolic link component type includes installation, uninstallation, and snapshot procedures. The uninstallation procedure removes the symbolic link, not the file to which it links. The snapshot procedure also captures the name of the file to which the symbolic link points, not to the file itself.

The system#symbolic link component type defines the following variables:

The following procedures are defined for the system#symbolic link component type:

Browsing

 

UNIX Systems 

Microsoft Windows Systems 

Root Path

/

List of physical drives on the host or network are mapped to a drive letter. Removable media is not shown. 

Delimiter

/

\

Ordering

Alphabetical with directories appearing first 

Selection Type

User can select a file for check-in. Double click a directory to view its contents. Only symbolic link type files can be selected for check-in. 

Sample Path

/foo/foo.txt

C:\foo\foo.txt

Special

Links display their local name and the location pointed to: 

foo->/usr/bar

 

Exported/Internal File Format

Symbolic links contain a resource that serves as a symbolic placeholder. Symbolic link data is stored as a set of variables, one for each name and location, in the component.

Component Type: system#container

A system#container component type should be used whenever components must be grouped together and installed as a single component. The container component has an install, uninstall, and snapshot block. These blocks automatically call in to the child components. These calls enable a container to have child components added directly by using the Component Builder user interface, without having to edit the container component's XML.

Browsing

The container component type is a composite component and cannot be browsed.

Model to Install Difference

This comparison optionally takes a snapshot of all child components.

The default snapshot block captures snapshots of all child components with installMode=“NESTED” by using the default snapshot blocks of each child.

Extended Control Procedures

The following procedures are defined for the system#container component type:

Snapshots are not always enabled. If the component is deployed as a nested component of another component, it should be deployed with createSnapshot=“false” because the container component will capture a snapshot of this component after all of its contained components have been deployed. If the component is being deployed as a top-level component, you can enable snapshots by setting createSnapshot=“true”.

Snapshots are not captured when a component is contained in a container component. The deployment of the other contained components after this component might affect the installed state of this component. Thus, the snapshot is captured after the top-level installations have completed.

Component Type: untyped

Components of type untyped extend from no base component and have no default behavior. They are intended for advanced edit use when custom types or XML is being added to the component and none of the default behaviors of the built-in types are relevant.