All components created within an Aspire installation have a name. Further, like files in a directory, a component name can be a simple name or a full path name.
This method for naming and referencing components provides enormous flexibility when creating your Aspire configurations and reusing components in multiple places.
The simple name for a component is specified when it is configured. For example, the simple name of the following component is simply "FetchUrl":
<component name="FetchUrl" subType="default" factoryName="aspire-fetch-url" />
Note: The new standard is for all component names to start with a capital letter. This helps distinguish them from pipeline names, factory names, and subType names.
The name of the top-level application is specified at the top of its Application Configuration file. For example, the name of the following configuration manager would be "FeedOneExample" :
<?xml version="1.0" encoding="UTF-8"?> <application name="FeedOneExample"> <components> . . . </components> </application>
Since every component lives within some other, larger unit (either a component manager, a pipeline manager, or the Aspire application as a whole), all components can be uniquely referenced throughout the Aspire system with their full path name.
In the following example, the full path name for the "MyComponentManager" component manager is "/MyComponentManager" (note the leading slash).
Similarly, the full path name for the "FeedOne" component is "/MyComponentManager/FeedOne", since the "FeedOne" component lives within the scope of the "MyComponentManager" component manager.
<?xml version="1.0" encoding="UTF-8"?> <application name="MyComponentManager"> <components> <component name="FeedOne" subType="feedOne" factoryName="aspire-tools"> . . . </component> . . . </components> </application>
As a more complex example, consider a component manager which contains a nested pipeline manager, as below:
<?xml version="1.0" encoding="UTF-8"?> <application name="MyComponentManager"> <components> <component name="FeedOne" subType="feedOne" factoryName="aspire-tools"> <branches> <branch event="onPublish" pipelineManager="MyPipeMgr" /> </branches> </component> . . . <component name="MyPipeMgr" subType="pipeline" factoryName="aspire-application"> <components> <component name="FetchUrl" subType="default" factoryName="aspire-fetch-url" /> <component name="GetCCDMeta" subType="default" factoryName="aspire-getccdmeta"> <ccdName>/SystemCommon/CCD</ccdName> <metadataMap> . . . </metadataMap> </component> . . . </components> <pipelines> <pipeline name="doc-process" default="true"> <stages> <stage component="FetchUrl" /> . . . </stages> </pipeline> </pipelines> </component> </components> </appication>
The full path names for all of the components in the above example are as follows:
In the above example, there are two situations where components reference other components.
The first reference, also shown below, is a relative reference. Relative references (without the leading "/" slash) will reference components that exist within the same configuration manager or pipeline manager (i.e., within the same <components> tag).
In the case below, the feedOne component is referencing the pipeline manager using the relative reference "MyPipeMgr":
<component name="FeedOne" subType="feedOne" factoryName="aspire-tools"> <branches> <branch event="onPublish" pipelineManager="MyPipeMgr" /> </branches> </component>
Note that relative references can also use "." and "..", just like with Unix file-path names.
Components can also reference each other by absolute, full-path references. In the above example (also shown below), the "GetCCDMeta" component references the Content Control Database component by full path name.
<component name="GetCCDMeta" subType="default" factoryName="aspire-getccdmeta"> <ccdName>/SystemCommon/CCD</ccdName> <metadataMap> . . . </metadataMap> </component>
This example shows how a component can reference another component from some other configuration manager.
The methods for naming and referencing components within Aspire have many and various implications on the Aspire system.