Class BaseConfigurationItem
- java.lang.Object
-
- com.xebialabs.deployit.plugin.api.udm.base.BaseConfigurationItem
-
- All Implemented Interfaces:
ConfigurationItem
,java.io.Serializable
,java.lang.Comparable<BaseConfigurationItem>
- Direct Known Subclasses:
AbstractDictionary
,Application
,BaseConfigurationItemWithPolicies
,BaseContainer
,BaseDeployable
,BaseDeployed
,BaseEmbeddedDeployable
,BaseEmbeddedDeployed
,BaseProvisioner
,Configuration
,Environment
,Parameters
,SimpleLookupValueProvider
,Template
,Version
@Metadata(virtual=true, description="Default implementation of a CI that provides ID, name and type information.") public class BaseConfigurationItem extends java.lang.Object implements ConfigurationItem, java.lang.Comparable<BaseConfigurationItem>
Default implementation of aConfigurationItem
that provides id, name and type information.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
id
protected java.util.Map<java.lang.String,java.lang.Object>
syntheticProperties
protected Type
type
-
Fields inherited from interface com.xebialabs.deployit.plugin.api.udm.ConfigurationItem
SYNTHETIC_PROPERTIES_FIELD, TYPE_FIELD
-
-
Constructor Summary
Constructors Constructor Description BaseConfigurationItem()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(BaseConfigurationItem o)
boolean
equals(java.lang.Object thatObject)
CiAttributes
get$ciAttributes()
java.util.Map<java.lang.String,ExternalProperty>
get$externalProperties()
java.lang.Integer
get$internalId()
java.lang.Integer
get$securedCi()
java.lang.String
get$token()
java.util.List<ValidationMessage>
get$validationMessages()
Gets the validation messages set on the ConfigurationItem.java.lang.String
getId()
java.lang.String
getName()
<T> T
getProperty(java.lang.String key)
protected PropertyDescriptor
getPropertyDescriptor(java.lang.String name)
Type
getType()
int
hashCode()
boolean
hasProperty(java.lang.String key)
void
set$ciAttributes(CiAttributes $ciAttributes)
Sets attributes of ci modification.void
set$externalProperties(java.util.Map<java.lang.String,ExternalProperty> externalProperties)
void
set$internalId(java.lang.Integer internalId)
void
set$securedCi(java.lang.Integer securedCi)
void
set$token(java.lang.String $token)
void
set$validationMessages(java.util.List<ValidationMessage> $validationMessages)
void
setId(java.lang.String id)
Sets The id of the CI.<T> void
setProperty(java.lang.String key, T value)
Adds a custom property of a generic type to the CI.void
setType(Type type)
Sets the type metadata for this CI.java.lang.String
toString()
-
-
-
Field Detail
-
id
protected java.lang.String id
-
type
protected Type type
-
syntheticProperties
protected java.util.Map<java.lang.String,java.lang.Object> syntheticProperties
-
-
Method Detail
-
getId
public java.lang.String getId()
- Specified by:
getId
in interfaceConfigurationItem
- Returns:
- The id of the CI.
-
setId
public void setId(java.lang.String id)
Description copied from interface:ConfigurationItem
Sets The id of the CI.- Specified by:
setId
in interfaceConfigurationItem
-
getName
public java.lang.String getName()
- Specified by:
getName
in interfaceConfigurationItem
- Returns:
- The name of the CI.
-
getType
public Type getType()
- Specified by:
getType
in interfaceConfigurationItem
- Returns:
- The type metadata for this CI.
-
setType
public void setType(Type type)
Sets the type metadata for this CI.
-
getProperty
public <T> T getProperty(java.lang.String key)
- Specified by:
getProperty
in interfaceConfigurationItem
- Type Parameters:
T
- The type of the property.- Parameters:
key
- The name of the property.- Returns:
- The value of type T of the property.
-
hasProperty
public boolean hasProperty(java.lang.String key)
- Specified by:
hasProperty
in interfaceConfigurationItem
- Parameters:
key
- The name of the property.- Returns:
- True if the CI has a added property with the given name.
-
setProperty
public <T> void setProperty(java.lang.String key, T value)
Description copied from interface:ConfigurationItem
Adds a custom property of a generic type to the CI.- Specified by:
setProperty
in interfaceConfigurationItem
- Type Parameters:
T
- The type of the property.- Parameters:
key
- The name of the property.value
- The value of type T of the property.
-
get$ciAttributes
public CiAttributes get$ciAttributes()
- Returns:
- attributes of ci modification.
-
set$ciAttributes
public void set$ciAttributes(CiAttributes $ciAttributes)
Sets attributes of ci modification.- Parameters:
$ciAttributes
- attributes of ci modification
-
getPropertyDescriptor
protected PropertyDescriptor getPropertyDescriptor(java.lang.String name)
-
get$token
public java.lang.String get$token()
- Returns:
- The JCR optimistic locking token.
-
set$token
public void set$token(java.lang.String $token)
- Parameters:
$token
- The JCR optimistic locking token.
-
get$validationMessages
public java.util.List<ValidationMessage> get$validationMessages()
Description copied from interface:ConfigurationItem
Gets the validation messages set on the ConfigurationItem.- Specified by:
get$validationMessages
in interfaceConfigurationItem
- Returns:
- a List<ValidationMessage>
-
set$validationMessages
public void set$validationMessages(java.util.List<ValidationMessage> $validationMessages)
-
get$externalProperties
public java.util.Map<java.lang.String,ExternalProperty> get$externalProperties()
-
set$externalProperties
public void set$externalProperties(java.util.Map<java.lang.String,ExternalProperty> externalProperties)
-
get$internalId
public java.lang.Integer get$internalId()
- Specified by:
get$internalId
in interfaceConfigurationItem
- Returns:
- The internal ID of ConfigurationItem.
-
set$internalId
public void set$internalId(java.lang.Integer internalId)
-
get$securedCi
public java.lang.Integer get$securedCi()
- Specified by:
get$securedCi
in interfaceConfigurationItem
- Returns:
- The ID of secured CI which determines ConfigurationItem's permissions.
-
set$securedCi
public void set$securedCi(java.lang.Integer securedCi)
-
equals
public boolean equals(java.lang.Object thatObject)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
compareTo
public int compareTo(BaseConfigurationItem o)
- Specified by:
compareTo
in interfacejava.lang.Comparable<BaseConfigurationItem>
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-