com.xebialabs.deployit.reflect
Class ConfigurationItemDescriptor

java.lang.Object
  extended by com.xebialabs.deployit.reflect.ConfigurationItemDescriptor
All Implemented Interfaces:
ConfigurationItemPropertyHolder, java.io.Serializable, java.lang.Comparable<ConfigurationItemDescriptor>

public class ConfigurationItemDescriptor
extends java.lang.Object
implements java.io.Serializable, java.lang.Comparable<ConfigurationItemDescriptor>, ConfigurationItemPropertyHolder

Describes a ConfigurationItem.

See Also:
Serialized Form

Constructor Summary
ConfigurationItemDescriptor()
          Deprecated. Needed for BlazeDS. Do not invoke!
ConfigurationItemDescriptor(java.lang.Class<?> typeClass, java.util.Map<java.lang.String,java.lang.String> configuredDefaults)
          Constructs a ConfigurationItemDescriptor.
 
Method Summary
 int compareTo(ConfigurationItemDescriptor descriptor)
          Compares this ConfigurationItemDescriptor to another and return -1, 0 or 1 depending on the difference.
 java.lang.String getCategory()
          Gets the category of this configuration item type.
 java.lang.String getDefaultDescription()
          Gets the default description for newly created configuration items of this type.
 java.lang.String getDefaultPermissionSchemeLabel()
          Gets the label of the default permission scheme for newly created configuration items of this type.
 java.lang.String getDescription()
          Gets the description of this configuration item type.
 java.lang.reflect.Field getDescriptionPropertyField()
          Gets the Field that has been annotated with ConfigurationItemDescription to hold the description.
 java.lang.String getDescriptionPropertyName()
          Gets the name of the field that has been annotated with ConfigurationItemDescription to hold the description.
 java.lang.String getDescriptionValueFromConfigurationItem(java.lang.Object configurationItem)
          Gets a description from a configuration item.
 java.util.Set<java.lang.String> getInterfaces()
          Gets the names of the interfaces implemented by this configuration item.
 java.lang.reflect.Field getLabelPropertyField()
          Gets the Field that has been annotated with ConfigurationItemLabel to hold the label.
 java.lang.String getLabelPropertyName()
          Gets the name of the field that has been annotated with ConfigurationItemLabel to hold the label.
 java.lang.String getLabelValueFromConfigurationItem(java.lang.Object configurationItem)
          Gets a label from a configuration item.
 java.lang.reflect.Field getPermissionSchemePropertyField()
          Gets the Field that has been annotated with ConfigurationItemPermissionScheme to hold the PermissionScheme.
 java.lang.String getPermissionSchemePropertyName()
          Gets the name of the field that has been annotated with ConfigurationItemPermissionScheme to hold the PermissionScheme.
 PermissionScheme getPermissionSchemeValueFromConfigurationItem(java.lang.Object configurationItem)
          Gets a permission scheme from a configuration item.
 ConfigurationItemPropertyDescriptor getPropertyDescriptor(java.lang.String propertyName)
           
 ConfigurationItemPropertyDescriptor[] getPropertyDescriptors()
          Gets the descriptors of the properties of the configuration item type described by this ConfigurationItem=Descriptor.
 java.lang.String getSimpleName()
          Gets the pretty name of the type this descriptor describes.
 java.lang.String[] getSourceForMappingTypes()
          Gets the source types for this configuration item type if this configuration item type is a Mapping.
 java.util.ArrayList<java.lang.String> getSuperClasses()
          Gets the names of the superclasses of this configuration item.
 java.lang.String[] getTargetForMappingTypes()
          Gets the target types for this configuration item type if this configuration item type is a Mapping.
 java.lang.String getType()
          Gets the type this descriptor describes.
 java.lang.Class<? extends java.lang.Object> getTypeClass()
          Return the class object of the type this descriptor describes.
 boolean isExpandable()
          Returns whether this configuration item type should be shown as expandable in the UI tree.
 java.lang.Object newInstance()
          Creates a new instance of the configuration item type described by this ConfigurationItemDescriptor.
 void setCategory(java.lang.String category)
          Deprecated. Needed for BlazeDS. Do not invoke!
 void setDefaultDescription(java.lang.String defaultDescription)
          Deprecated. Needed for BlazeDS. Do not invoke!
 void setDefaultPermissionSchemeLabel(java.lang.String defaultPermissionSchemeLabel)
          Deprecated. Needed for BlazeDS. Do not invoke!
 void setDescription(java.lang.String description)
          Deprecated. Needed for BlazeDS. Do not invoke!
 void setDescriptionPropertyName(java.lang.String descriptionPropertyName)
          Deprecated. Needed for BlazeDS. Do not invoke!
 void setDescriptionValueInConfigurationItem(java.lang.Object configurationItem, java.lang.String descriptionValue)
          Sets a description on a configuration item.
 void setExpandable(boolean expandable)
          Deprecated. Needed for BlazeDS. Do not invoke!
 void setInterfaces(java.util.Set<java.lang.String> interfaces)
          Deprecated. Needed for BlazeDS. Do not invoke!
 void setLabelPropertyName(java.lang.String labelPropertyName)
          Deprecated. Needed for BlazeDS. Do not invoke!
 void setLabelValueInConfigurationItem(java.lang.Object configurationItem, java.lang.String labelValue)
          Sets a label on a configuration item.
 void setPermissionSchemePropertyName(java.lang.String permissionSchemePropertyName)
          Deprecated. Needed for BlazeDS. Do not invoke!
 void setPermissionSchemeValueInConfigurationItem(java.lang.Object configurationItem, PermissionScheme permissionSchemeValue)
          Sets a PermissionScheme on a configuration item.
 void setPropertyDescriptors(ConfigurationItemPropertyDescriptor[] propertyDescriptors)
          Deprecated. Needed for BlazeDS. Do not invoke!
 void setSimpleName(java.lang.String simpleName)
          Deprecated. Needed for BlazeDS. Do not invoke!
 void setSourceForMappingTypes(java.lang.String[] sourceForMappingTypes)
          Deprecated. Needed for BlazeDS. Do not invoke!
 void setSuperClasses(java.util.ArrayList<java.lang.String> superClasses)
          Deprecated. Needed for BlazeDS. Do not invoke!
 void setTargetForMappingTypes(java.lang.String[] targetForMappingTypes)
          Deprecated. Needed for BlazeDS. Do not invoke!
 void setType(java.lang.String type)
          Deprecated. Needed for BlazeDS. Do not invoke!
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConfigurationItemDescriptor

public ConfigurationItemDescriptor()
Deprecated. Needed for BlazeDS. Do not invoke!


ConfigurationItemDescriptor

public ConfigurationItemDescriptor(java.lang.Class<?> typeClass,
                                   java.util.Map<java.lang.String,java.lang.String> configuredDefaults)
Constructs a ConfigurationItemDescriptor. Do not invoke!

Method Detail

getType

public java.lang.String getType()
Gets the type this descriptor describes.

Returns:
the full class name of the type, e.g. com.xebia.ad.websphere.server.WebSphereServer.

setType

public void setType(java.lang.String type)
Deprecated. Needed for BlazeDS. Do not invoke!


getTypeClass

public java.lang.Class<? extends java.lang.Object> getTypeClass()
Return the class object of the type this descriptor describes.

Returns:
the class object of the type.

getSimpleName

public java.lang.String getSimpleName()
Gets the pretty name of the type this descriptor describes.

Returns:
the pretty name of the type, e.g. WebSphereServer.

setSimpleName

public void setSimpleName(java.lang.String simpleName)
Deprecated. Needed for BlazeDS. Do not invoke!


newInstance

public java.lang.Object newInstance()
Creates a new instance of the configuration item type described by this ConfigurationItemDescriptor.

Returns:
the new instance.

getPropertyDescriptors

public ConfigurationItemPropertyDescriptor[] getPropertyDescriptors()
Gets the descriptors of the properties of the configuration item type described by this ConfigurationItem=Descriptor.

Specified by:
getPropertyDescriptors in interface ConfigurationItemPropertyHolder
Returns:
an array of ConfigurationItemPropertyDescriptors.

getPropertyDescriptor

public ConfigurationItemPropertyDescriptor getPropertyDescriptor(java.lang.String propertyName)
Specified by:
getPropertyDescriptor in interface ConfigurationItemPropertyHolder

setPropertyDescriptors

public void setPropertyDescriptors(ConfigurationItemPropertyDescriptor[] propertyDescriptors)
Deprecated. Needed for BlazeDS. Do not invoke!


getLabelPropertyName

public java.lang.String getLabelPropertyName()
Gets the name of the field that has been annotated with ConfigurationItemLabel to hold the label.

Returns:
the name of the field that holds the label or null if there is no such field.

getLabelPropertyField

public java.lang.reflect.Field getLabelPropertyField()
Gets the Field that has been annotated with ConfigurationItemLabel to hold the label.

Returns:
the field that holds the label or null if there is no such field.

setLabelPropertyName

public void setLabelPropertyName(java.lang.String labelPropertyName)
Deprecated. Needed for BlazeDS. Do not invoke!


getLabelValueFromConfigurationItem

public java.lang.String getLabelValueFromConfigurationItem(java.lang.Object configurationItem)
Gets a label from a configuration item.

Parameters:
configurationItem - the configuration item to get the label from.
Returns:
the label or null if a label has not been set or if there is no label property.

setLabelValueInConfigurationItem

public void setLabelValueInConfigurationItem(java.lang.Object configurationItem,
                                             java.lang.String labelValue)
Sets a label on a configuration item.

Parameters:
configurationItem - the configuration item to set the label on.
labelValue - the label to set

getDescriptionPropertyName

public java.lang.String getDescriptionPropertyName()
Gets the name of the field that has been annotated with ConfigurationItemDescription to hold the description.

Returns:
the name of the field that holds the description or null if there is no such field.

getDescriptionPropertyField

public java.lang.reflect.Field getDescriptionPropertyField()
Gets the Field that has been annotated with ConfigurationItemDescription to hold the description.

Returns:
the field that holds the description or null if there is no such field.

setDescriptionPropertyName

public void setDescriptionPropertyName(java.lang.String descriptionPropertyName)
Deprecated. Needed for BlazeDS. Do not invoke!


getDescriptionValueFromConfigurationItem

public java.lang.String getDescriptionValueFromConfigurationItem(java.lang.Object configurationItem)
Gets a description from a configuration item.

Parameters:
configurationItem - the configuration item to get the description from.
Returns:
the label or null if a description has not been set or if there is no description property.

setDescriptionValueInConfigurationItem

public void setDescriptionValueInConfigurationItem(java.lang.Object configurationItem,
                                                   java.lang.String descriptionValue)
Sets a description on a configuration item.

Parameters:
configurationItem - the configuration item to set the label on.
descriptionValue - the description to set

getDefaultDescription

public java.lang.String getDefaultDescription()
Gets the default description for newly created configuration items of this type.

Returns:
the default description.

setDefaultDescription

public void setDefaultDescription(java.lang.String defaultDescription)
Deprecated. Needed for BlazeDS. Do not invoke!


getPermissionSchemePropertyName

public java.lang.String getPermissionSchemePropertyName()
Gets the name of the field that has been annotated with ConfigurationItemPermissionScheme to hold the PermissionScheme.

Returns:
the name of the field that holds the permission scheme or null if there is no such field.

getPermissionSchemePropertyField

public java.lang.reflect.Field getPermissionSchemePropertyField()
Gets the Field that has been annotated with ConfigurationItemPermissionScheme to hold the PermissionScheme.

Returns:
the field that holds the permission scheme or null if there is no such field.

setPermissionSchemePropertyName

public void setPermissionSchemePropertyName(java.lang.String permissionSchemePropertyName)
Deprecated. Needed for BlazeDS. Do not invoke!


getPermissionSchemeValueFromConfigurationItem

public PermissionScheme getPermissionSchemeValueFromConfigurationItem(java.lang.Object configurationItem)
Gets a permission scheme from a configuration item.

Parameters:
configurationItem - the configuration item to get the description from.
Returns:
the permission scheme or null if a permission scheme has not been set or if there is no permission scheme property.

setPermissionSchemeValueInConfigurationItem

public void setPermissionSchemeValueInConfigurationItem(java.lang.Object configurationItem,
                                                        PermissionScheme permissionSchemeValue)
Sets a PermissionScheme on a configuration item.

Parameters:
configurationItem - the configuration item to set the permission scheme on.
permissionSchemeValue - the permission scheme to set

getDefaultPermissionSchemeLabel

public java.lang.String getDefaultPermissionSchemeLabel()
Gets the label of the default permission scheme for newly created configuration items of this type.

Returns:
the label of the default permission scheme.

setDefaultPermissionSchemeLabel

public void setDefaultPermissionSchemeLabel(java.lang.String defaultPermissionSchemeLabel)
Deprecated. Needed for BlazeDS. Do not invoke!


getInterfaces

public java.util.Set<java.lang.String> getInterfaces()
Gets the names of the interfaces implemented by this configuration item.

Returns:
a set containing the names of the interfaces.

setInterfaces

public void setInterfaces(java.util.Set<java.lang.String> interfaces)
Deprecated. Needed for BlazeDS. Do not invoke!


getSuperClasses

public java.util.ArrayList<java.lang.String> getSuperClasses()
Gets the names of the superclasses of this configuration item.

N.B.: The return type needs to be specified as ArrayList instead of List for BlazeDS.

Returns:
a list of the names of the superclasses.

setSuperClasses

public void setSuperClasses(java.util.ArrayList<java.lang.String> superClasses)
Deprecated. Needed for BlazeDS. Do not invoke!


getDescription

public java.lang.String getDescription()
Gets the description of this configuration item type.

Returns:
the description.

setDescription

public void setDescription(java.lang.String description)
Deprecated. Needed for BlazeDS. Do not invoke!


getCategory

public java.lang.String getCategory()
Gets the category of this configuration item type.

Returns:
the category.

setCategory

public void setCategory(java.lang.String category)
Deprecated. Needed for BlazeDS. Do not invoke!


isExpandable

public boolean isExpandable()
Returns whether this configuration item type should be shown as expandable in the UI tree.

Returns:
true iff this configuration item type should be shown as expandable in the UI tree.

setExpandable

public void setExpandable(boolean expandable)
Deprecated. Needed for BlazeDS. Do not invoke!


getSourceForMappingTypes

public java.lang.String[] getSourceForMappingTypes()
Gets the source types for this configuration item type if this configuration item type is a Mapping.


setSourceForMappingTypes

public void setSourceForMappingTypes(java.lang.String[] sourceForMappingTypes)
Deprecated. Needed for BlazeDS. Do not invoke!


getTargetForMappingTypes

public java.lang.String[] getTargetForMappingTypes()
Gets the target types for this configuration item type if this configuration item type is a Mapping.


setTargetForMappingTypes

public void setTargetForMappingTypes(java.lang.String[] targetForMappingTypes)
Deprecated. Needed for BlazeDS. Do not invoke!


compareTo

public int compareTo(ConfigurationItemDescriptor descriptor)
Compares this ConfigurationItemDescriptor to another and return -1, 0 or 1 depending on the difference.

Specified by:
compareTo in interface java.lang.Comparable<ConfigurationItemDescriptor>

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2010. All Rights Reserved.