atg.rest.filtering
Class ComponentConfiguration

java.lang.Object
  extended by atg.rest.filtering.ComponentConfiguration

public class ComponentConfiguration
extends java.lang.Object

This class represents the configuration for a customized component. It is used internally by the REST subsystem.


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Constructor Summary
protected ComponentConfiguration(java.lang.String pName, boolean pDefaultIncludes)
          Constructor
protected ComponentConfiguration(java.lang.String pName, java.lang.String pItemDescriptorName, boolean pDefaultIncludes)
          Constructor
 
Method Summary
 void addFilteredProperty(java.lang.String pName, boolean pHidden, boolean pWritable, boolean pExpand, java.lang.String pTarget, java.lang.String pComponentName, java.lang.String pPropertyCustomizer)
          Adds property information for a single property to this ComponentFilteringConfiguration
 void addFilteredProperty(java.lang.String pName, boolean pHidden, boolean pWritable, java.lang.String pTarget, java.lang.String pComponentName, java.lang.String pPropertyCustomizer)
          Adds property information for a single property to this ComponentFilteringConfiguration
static ComponentConfiguration create(java.lang.String pName, boolean pDefaultIncludes)
          Factory method for creating ComponentFilteringConfiguration objects
static ComponentConfiguration create(java.lang.String pName, java.lang.String pItemDescriptorName, boolean pDefaultIncludes)
          Factory method for creating ComponentFilteringConfiguration objects
 int getDepth()
          get Depth
 java.util.Map<java.lang.String,PropertyConfiguration> getFilteredProperties()
          A Map of filtered properties.
 PropertyConfiguration getFilteredProperty(java.lang.String pName)
          Returns the property configuration for the given property name.
 java.lang.String getItemDescriptorName()
          Returns the item descriptor this component filtering is for.
 java.lang.String getName()
          The name of the filtered property
 boolean isDefaultIncludes()
          A flag indicating whether or not to include all the "standard" properties when returning values for this component.
 boolean isDepthSet()
          get DepthSet
 boolean isRepository()
          Returns the nucleus path of the repository this component filtering is for.
 void setDefaultIncludes(boolean pDefaultIncludes)
          Sets the flag indicating whether or not to include all the "standard" properties when returning values for this component.
 void setDepth(int pDepth)
          set Depth
 void setDepthSet(boolean pDepthSet)
          set DepthSet
 void setItemDescriptorName(java.lang.String pItemDescriptorName)
          Sets the item descriptor this component filtering is for.
 void setName(java.lang.String pName)
          Sets the name of the filtered property
 void setRepository(boolean pRepository)
          Sets the nucleus path of the repository this component filtering is for.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string

Constructor Detail

ComponentConfiguration

protected ComponentConfiguration(java.lang.String pName,
                                 boolean pDefaultIncludes)
Constructor

Parameters:
pName - the component name
pDefaultIncludes - the defaultIncludes setting

ComponentConfiguration

protected ComponentConfiguration(java.lang.String pName,
                                 java.lang.String pItemDescriptorName,
                                 boolean pDefaultIncludes)
Constructor

Parameters:
pName - the component name
pItemDescriptorName - the item descriptor name
pDefaultIncludes - the defaultIncludes setting
Method Detail

getFilteredProperties

public java.util.Map<java.lang.String,PropertyConfiguration> getFilteredProperties()
A Map of filtered properties.

Returns:
the value of properties

getName

public java.lang.String getName()
The name of the filtered property

Returns:
the value of name

setName

public void setName(java.lang.String pName)
Sets the name of the filtered property

Parameters:
pName - the name to set

isDefaultIncludes

public boolean isDefaultIncludes()
A flag indicating whether or not to include all the "standard" properties when returning values for this component. True indicates all standard and filtered properties should be included, false means only filtered properties should be included.

Returns:
the value of defaultIncludes

setDefaultIncludes

public void setDefaultIncludes(boolean pDefaultIncludes)
Sets the flag indicating whether or not to include all the "standard" properties when returning values for this component. True indicates all standard and filtered properties should be included, false means only filtered properties should be included.

Parameters:
pDefaultIncludes - the defaultIncludes to set

isRepository

public boolean isRepository()
Returns the nucleus path of the repository this component filtering is for. Only used for filtered repository properties.

Returns:
the value of repository

setRepository

public void setRepository(boolean pRepository)
Sets the nucleus path of the repository this component filtering is for. Only used for filtered repository properties.

Parameters:
pRepository - the repository to set

getItemDescriptorName

public java.lang.String getItemDescriptorName()
Returns the item descriptor this component filtering is for. Only used for filtered repository properties. Used in conjunction with the repository property.

Returns:
the value of itemDescriptorName

setItemDescriptorName

public void setItemDescriptorName(java.lang.String pItemDescriptorName)
Sets the item descriptor this component filtering is for. Only used for filtered repository properties. Used in conjunction with the repository property.

Parameters:
pItemDescriptorName - the item descriptor name to set

setDepth

public void setDepth(int pDepth)
set Depth

Parameters:
pDepth - the Depth

getDepth

public int getDepth()
get Depth

Returns:
the Depth

setDepthSet

public void setDepthSet(boolean pDepthSet)
set DepthSet

Parameters:
pDepthSet - the DepthSet

isDepthSet

public boolean isDepthSet()
get DepthSet

Returns:
the DepthSet

create

public static ComponentConfiguration create(java.lang.String pName,
                                            boolean pDefaultIncludes)
Factory method for creating ComponentFilteringConfiguration objects

Parameters:
pName - the component name
pDefaultIncludes - the defaultIncludes setting
Returns:
a new ComponentFilteringConfiguration object

create

public static ComponentConfiguration create(java.lang.String pName,
                                            java.lang.String pItemDescriptorName,
                                            boolean pDefaultIncludes)
Factory method for creating ComponentFilteringConfiguration objects

Parameters:
pName - the repository component name
pItemDescriptorName - the item descriptor name
pDefaultIncludes - the defaultIncludes setting
Returns:
a new ComponentFilteringConfiguration object

addFilteredProperty

public void addFilteredProperty(java.lang.String pName,
                                boolean pHidden,
                                boolean pWritable,
                                java.lang.String pTarget,
                                java.lang.String pComponentName,
                                java.lang.String pPropertyCustomizer)
                         throws RestInitializationException
Adds property information for a single property to this ComponentFilteringConfiguration

Parameters:
pName - the name of the property to filter
pHidden - flag indicating whether the property is hidden from REST GET requests
pWritable - flag indicating whether the property is writable for REST POST or PUT requests
pTarget - the name of a property to return the value for this property
pComponentName - the nucleus path of a component to retrieve the value from
pPropertyCustomizer - the name of a class which implements RestPropertyCustomizer from which to retrieve the value
Throws:
RestInitializationException - if the filtered property cannot be configured because of a misconfiguration

addFilteredProperty

public void addFilteredProperty(java.lang.String pName,
                                boolean pHidden,
                                boolean pWritable,
                                boolean pExpand,
                                java.lang.String pTarget,
                                java.lang.String pComponentName,
                                java.lang.String pPropertyCustomizer)
                         throws RestInitializationException
Adds property information for a single property to this ComponentFilteringConfiguration

Parameters:
pName - the name of the property to filter
pHidden - flag indicating whether the property is hidden from REST GET requests
pWritable - flag indicating whether the property is writable for REST POST or PUT requests
pExpand - flag indicating whether the property is expandable
pTarget - the name of a property to return the value for this property
pComponentName - the nucleus path of a component to retrieve the value from
pPropertyCustomizer - the name of a class which implements RestPropertyCustomizer from which to retrieve the value
Throws:
RestInitializationException - if the filtered property cannot be configured because of a misconfiguration

getFilteredProperty

public PropertyConfiguration getFilteredProperty(java.lang.String pName)
Returns the property configuration for the given property name. Returns null if there is no configuration for the given property

Parameters:
pName - the property name for which to retrieve the property configuration
Returns:
the property configuration for the given property name, null if there is no configuration