com.atlassian.configurable
Class ObjectConfigurationImpl

java.lang.Object
  extended by com.atlassian.configurable.ObjectConfigurationImpl
All Implemented Interfaces:
ObjectConfiguration

public class ObjectConfigurationImpl
extends java.lang.Object
implements ObjectConfiguration


Constructor Summary
ObjectConfigurationImpl(java.util.Map configProperties, ObjectDescriptor od)
          Creates a new ObjectConfigurationImpl object.
ObjectConfigurationImpl(java.lang.String id, java.util.Map configProperties, ObjectDescriptor od)
          Deprecated. since 28 August 2007 the ID is never read, use the constructor without the ID instead.
 
Method Summary
 boolean allFieldsHidden()
          Determines if there are any non-hidden fields.
 java.lang.String getDescription(java.util.Map params)
          The Description of this instance of an Object Configuration
 java.lang.String[] getEnabledFieldKeys()
          The enabled property keys for this configuration.
 java.lang.String getFieldDefault(java.lang.String key)
          Retrieves the default value for property with specified key
 java.lang.String getFieldDescription(java.lang.String key)
          Retrieves the description of a property with the specified key
 java.lang.String[] getFieldKeys()
          All the property keys for this configuration
 java.lang.String getFieldName(java.lang.String key)
          Retrieves the name of a property with the specified key
 int getFieldType(java.lang.String key)
          Retrieves the type of the property with the specified key
 java.util.Map getFieldValues(java.lang.String key)
          Retrieves a map of available values for property with the specified key.
 void init(java.util.Map params)
          Initialises the object with some parameters
 boolean isEnabled(java.lang.String key)
          Is a particular property enabled at the moment - may be a runtime check.
 boolean isI18NValues(java.lang.String key)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectConfigurationImpl

public ObjectConfigurationImpl(java.lang.String id,
                               java.util.Map configProperties,
                               ObjectDescriptor od)
Deprecated. since 28 August 2007 the ID is never read, use the constructor without the ID instead.

Creates a new ObjectConfigurationImpl object.

Parameters:
id - Identifier for the Object Configuration
configProperties - A Map of properties that can be configured for this object e.g. name, description.
od - A Class the retrieves the Description of this object based the currently configured properties.

ObjectConfigurationImpl

public ObjectConfigurationImpl(java.util.Map configProperties,
                               ObjectDescriptor od)
Creates a new ObjectConfigurationImpl object.

Parameters:
configProperties - A Map of properties that can be configurerd for this object e.g. name, description.
od - A Class the retrieves the Description of this object based the currently configured properties.
Method Detail

init

public void init(java.util.Map params)
Initialises the object with some parameters

Specified by:
init in interface ObjectConfiguration
Parameters:
params - Map of initialisation params

getFieldName

public java.lang.String getFieldName(java.lang.String key)
                              throws ObjectConfigurationException
Retrieves the name of a property with the specified key

Specified by:
getFieldName in interface ObjectConfiguration
Parameters:
key - Key of the property
Returns:
Name of the specified property
Throws:
ObjectConfigurationException

getFieldDescription

public java.lang.String getFieldDescription(java.lang.String key)
                                     throws ObjectConfigurationException
Retrieves the description of a property with the specified key

Specified by:
getFieldDescription in interface ObjectConfiguration
Parameters:
key - Key of the property
Returns:
Description of the specified property
Throws:
ObjectConfigurationException

getFieldDefault

public java.lang.String getFieldDefault(java.lang.String key)
                                 throws ObjectConfigurationException
Retrieves the default value for property with specified key

Specified by:
getFieldDefault in interface ObjectConfiguration
Parameters:
key - Key of the property
Returns:
Default value of the specified property
Throws:
ObjectConfigurationException

getFieldType

public int getFieldType(java.lang.String key)
                 throws ObjectConfigurationException
Retrieves the type of the property with the specified key

Specified by:
getFieldType in interface ObjectConfiguration
Parameters:
key - Key of the property
Returns:
Type of the specified property
Throws:
ObjectConfigurationException

getFieldValues

public java.util.Map getFieldValues(java.lang.String key)
                             throws ObjectConfigurationException
Retrieves a map of available values for property with the specified key. e.g select list values

Specified by:
getFieldValues in interface ObjectConfiguration
Parameters:
key - Key of the property
Returns:
List valid name/value pairs for the specified property
Throws:
ObjectConfigurationException

getFieldKeys

public java.lang.String[] getFieldKeys()
All the property keys for this configuration

Specified by:
getFieldKeys in interface ObjectConfiguration
Returns:
Property keys

getEnabledFieldKeys

public java.lang.String[] getEnabledFieldKeys()
Description copied from interface: ObjectConfiguration
The enabled property keys for this configuration.

Specified by:
getEnabledFieldKeys in interface ObjectConfiguration
Returns:
Property keys

isEnabled

public boolean isEnabled(java.lang.String key)
Description copied from interface: ObjectConfiguration
Is a particular property enabled at the moment - may be a runtime check.

Specified by:
isEnabled in interface ObjectConfiguration
Parameters:
key - the property's key.
Returns:
true if the property is enabled in the current context

getDescription

public java.lang.String getDescription(java.util.Map params)
The Description of this instance of an Object Configuration

Specified by:
getDescription in interface ObjectConfiguration
Parameters:
params - Params used to derive
Returns:
Description

allFieldsHidden

public boolean allFieldsHidden()
Description copied from interface: ObjectConfiguration
Determines if there are any non-hidden fields.

Specified by:
allFieldsHidden in interface ObjectConfiguration
Returns:
true if there are no fields or all fields are hidden

isI18NValues

public boolean isI18NValues(java.lang.String key)
Specified by:
isI18NValues in interface ObjectConfiguration


Copyright © 2002-2010 Atlassian. All Rights Reserved.