org.codehaus.plexus.component.repository

Class ComponentDescriptor

public class ComponentDescriptor extends Object

Component instantiation description.

Version: $Id: ComponentDescriptor.java 6965 2007-10-21 05:32:27Z jvanzyl $

Author: Jason van Zyl bob mcwhirter Michal Maczka

Field Summary
Stringalias
StringcomponentComposer
StringcomponentConfigurator
StringcomponentFactory
StringcomponentProfile
ComponentSetDescriptorcomponentSetDescriptor
StringcomponentType
PlexusConfigurationconfiguration
Listdependencies
Stringdescription
Stringimplementation
StringinstantiationStrategy
booleanisolatedRealm
StringlifecycleHandler
StringrealmId
Listrequirements
Stringrole
StringroleHint
Stringsource
Stringversion
Method Summary
voidaddRequirement(ComponentRequirement requirement)
Add a project requirement to this component.
voidaddRequirements(List requirements)
Adds a list of requirements to this component.
booleanequals(Object other)
StringgetAlias()
Returns an alias for this component.
StringgetComponentComposer()
Returns the ID of the type of composer this component will use.
StringgetComponentConfigurator()
Returns the type of component configurator for this project.
StringgetComponentFactory()
Returns an id of the factory used to create this component.
StringgetComponentProfile()
ComponentSetDescriptorgetComponentSetDescriptor()
Returns the component set descriptor.
StringgetComponentType()
Returns the type of this component.
PlexusConfigurationgetConfiguration()
Returns configuration values defined for this component.
ListgetDependencies()
Returns a List of dependencies of this component.
StringgetDescription()
Return a human-readable description of this component.
StringgetHumanReadableKey()
Returns a human-friendly key, suitable for display.
StringgetImplementation()
Returns the implementation of this componet.
StringgetInstantiationStrategy()
Returns the type of instantiation strategy for this component.
StringgetLifecycleHandler()
Returns the lifecycle-handler for this component.
StringgetRealmId()
The ClassRealm that this component lives under.
ListgetRequirements()
Returns all project requirements of this component.
StringgetRole()
Returns the role of this component.
StringgetRoleHint()
Returns the role-hint of this component.
StringgetSource()
The location this information came from (descriptor file URI).
StringgetVersion()
Returns a specific point in a components's project timeline. i.e. version 1, or 2.1.4
booleanhasConfiguration()
Returns true if this component has a configuration.
inthashCode()
booleanisIsolatedRealm()
Returns true if this may be in an isolated classrealm.
voidsetAlias(String alias)
Sets the alias for this component.
voidsetComponentComposer(String componentComposer)
Sets a representation of the composer this component uses.
voidsetComponentConfigurator(String componentConfigurator)
Sets the type of component configurator for this project.
voidsetComponentFactory(String componentFactory)
Sets the id of the factory to use to create this component.
voidsetComponentProfile(String componentProfile)
voidsetComponentSetDescriptor(ComponentSetDescriptor componentSetDescriptor)
Sets the component set descriptor of components and dependencies for this component.
voidsetComponentType(String componentType)
Sets this component's type.
voidsetConfiguration(PlexusConfiguration configuration)
Sets the configuration hierarchy for this component.
voidsetDescription(String description)
Sets a description of this component for users to read.
voidsetImplementation(String implementation)
Sets the implementation of this componet.
voidsetInstantiationStrategy(String instantiationStrategy)
Sets the instantiation-strategy for this component.
voidsetIsolatedRealm(boolean isolatedRealm)
Sets that this component may be in an isolated classrealm.
voidsetLifecycleHandler(String lifecycleHandler)
Sets the lifecycle-handler for this component.
voidsetRealmId(String realmId)
Set the id of the ClassRealm that this component lives under.
voidsetRole(String role)
Sets the role of this component.
voidsetRoleHint(String roleHint)
Sets the role-hint of this component.
voidsetSource(String source)
The location this information came from (descriptor file URI).
voidsetVersion(String version)
Sets the point in a components's project development timeline
StringtoString()

Field Detail

alias

private String alias

componentComposer

private String componentComposer

componentConfigurator

private String componentConfigurator

componentFactory

private String componentFactory

componentProfile

private String componentProfile

componentSetDescriptor

private ComponentSetDescriptor componentSetDescriptor

componentType

private String componentType

configuration

private PlexusConfiguration configuration

dependencies

private List dependencies

description

private String description

implementation

private String implementation

instantiationStrategy

private String instantiationStrategy

isolatedRealm

private boolean isolatedRealm

lifecycleHandler

private String lifecycleHandler

realmId

private String realmId

requirements

private List requirements

role

private String role

roleHint

private String roleHint

source

private String source

version

private String version

Method Detail

addRequirement

public void addRequirement(ComponentRequirement requirement)
Add a project requirement to this component.

Parameters: requirement the requirement to add

addRequirements

public void addRequirements(List requirements)
Adds a list of requirements to this component.

Parameters: requirements the requirements to add

equals

public boolean equals(Object other)

getAlias

public String getAlias()
Returns an alias for this component. An alias as an alternate name other than the normal key.

Returns: an alias for this component

getComponentComposer

public String getComponentComposer()
Returns the ID of the type of composer this component will use. For example, "setter" or "field" for the different types of dependency injection.

Returns: the ID of the type of composer this component will use

getComponentConfigurator

public String getComponentConfigurator()
Returns the type of component configurator for this project. For example "basic" for normal, or "map-oriented" for map oriented components.

Returns: the type of component configurator for this project

getComponentFactory

public String getComponentFactory()
Returns an id of the factory used to create this component.

Returns: an id of the factory used to create this component

getComponentProfile

public String getComponentProfile()

getComponentSetDescriptor

public ComponentSetDescriptor getComponentSetDescriptor()
Returns the component set descriptor.

Returns: the component set descriptor

getComponentType

public String getComponentType()
Returns the type of this component.

Returns: the type of this component

getConfiguration

public PlexusConfiguration getConfiguration()
Returns configuration values defined for this component.

Returns: configuration values defined for this component

getDependencies

public List getDependencies()
Returns a List of dependencies of this component.

Returns: a List of dependencies of this component

getDescription

public String getDescription()
Return a human-readable description of this component.

Returns: a human-readable description of this component

getHumanReadableKey

public String getHumanReadableKey()
Returns a human-friendly key, suitable for display.

Returns: a human-friendly key

getImplementation

public String getImplementation()
Returns the implementation of this componet. Implementation is a string denoting a FQCN in normal Java components, or some other name or file for other component factory implementations.

Returns: the implementation of this componet's role.

getInstantiationStrategy

public String getInstantiationStrategy()
Returns the type of instantiation strategy for this component.

Returns: the type of instantiation strategy for this component

getLifecycleHandler

public String getLifecycleHandler()
Returns the lifecycle-handler for this component.

Returns: the lifecycle-handler for this component

getRealmId

public String getRealmId()
The ClassRealm that this component lives under.

Returns: ClassRealm that this component lives under

getRequirements

public List getRequirements()
Returns all project requirements of this component.

Returns: all project requirements of this component

getRole

public String getRole()
Returns the role of this component.

Returns: the role of this component

getRoleHint

public String getRoleHint()
Returns the role-hint of this component.

Returns: the role-hint of this component

getSource

public String getSource()
The location this information came from (descriptor file URI).

getVersion

public String getVersion()
Returns a specific point in a components's project timeline. i.e. version 1, or 2.1.4

Returns: a specific point in a components's project timeline

hasConfiguration

public boolean hasConfiguration()
Returns true if this component has a configuration.

Returns: true if this component has a configuration

hashCode

public int hashCode()

isIsolatedRealm

public boolean isIsolatedRealm()
Returns true if this may be in an isolated classrealm.

Returns: true if this may be in an isolated classrealm

setAlias

public void setAlias(String alias)
Sets the alias for this component.

Parameters: alias alternate name to set

setComponentComposer

public void setComponentComposer(String componentComposer)
Sets a representation of the composer this component uses.

Parameters: componentComposer string representation of the composer to use

setComponentConfigurator

public void setComponentConfigurator(String componentConfigurator)
Sets the type of component configurator for this project.

Parameters: componentConfigurator

setComponentFactory

public void setComponentFactory(String componentFactory)
Sets the id of the factory to use to create this component. For example, "jruby" will use a JRuby factory.

Parameters: componentFactory

setComponentProfile

public void setComponentProfile(String componentProfile)

setComponentSetDescriptor

public void setComponentSetDescriptor(ComponentSetDescriptor componentSetDescriptor)
Sets the component set descriptor of components and dependencies for this component.

Parameters: componentSetDescriptor the component set descriptor of components and dependencies

setComponentType

public void setComponentType(String componentType)
Sets this component's type.

Parameters: componentType the type to set

setConfiguration

public void setConfiguration(PlexusConfiguration configuration)
Sets the configuration hierarchy for this component.

Parameters: configuration the configuration hierarchy to set

setDescription

public void setDescription(String description)
Sets a description of this component for users to read.

Parameters: description a human-readable description of this component

setImplementation

public void setImplementation(String implementation)
Sets the implementation of this componet.

Parameters: implementation string denoting a FQCN in normal Java components, or some other name or file for other component factory implementations

setInstantiationStrategy

public void setInstantiationStrategy(String instantiationStrategy)
Sets the instantiation-strategy for this component. For example, "container".

Parameters: instantiationStrategy

setIsolatedRealm

public void setIsolatedRealm(boolean isolatedRealm)
Sets that this component may be in an isolated classrealm.

Parameters: isolatedRealm true if this component may be in an isolated classrealm

setLifecycleHandler

public void setLifecycleHandler(String lifecycleHandler)
Sets the lifecycle-handler for this component. For example, "basic", "passive", "bootstrap".

Parameters: lifecycleHandler the lifecycle handler string to set

setRealmId

public void setRealmId(String realmId)
Set the id of the ClassRealm that this component lives under.

Parameters: realmId ClassRealm id

setRole

public void setRole(String role)
Sets the role of this component.

Parameters: role this component's role

setRoleHint

public void setRoleHint(String roleHint)
Sets the role-hint of this component. Pasing null will set the hint to the default value.

Parameters: roleHint this component's role-hint

setSource

public void setSource(String source)
The location this information came from (descriptor file URI).

setVersion

public void setVersion(String version)
Sets the point in a components's project development timeline

Parameters: version the components's version

toString

public String toString()