atg.repository
Class FilePropertyDescriptor

java.lang.Object
  extended by java.beans.FeatureDescriptor
      extended by atg.beans.SerializableFeatureDescriptor
          extended by atg.beans.DynamicPropertyDescriptor
              extended by atg.repository.RepositoryPropertyDescriptor
                  extended by atg.repository.FilePropertyDescriptor
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class FilePropertyDescriptor
extends RepositoryPropertyDescriptor

This is a simple read-only property descriptor which takes a path name and converts this to a java.io.File object. You can optionally prepend a prefix onto the path name.

You can use this property to expose content through the GSA which is stored in the system as a path name. If you define this property in an item-descriptor with the content="true" attribute set, the ItemPath of the content item is used (optionally in conjunction with the pathPrefix value) to determine the file system path of the file for this property.

If this property is not part of a content repository item, you must specify a pathName property feature descriptor attribute. That attribute specifies the name of a property to use to retrieve the path of the file. The path is appended onto the pathPrefix if one is specified.

See Also:
Serialized Form

Field Summary
static java.lang.String CLASS_VERSION
          Class version string
protected  java.lang.String mPathNameProperty
          Values of these attributes for this particular property
protected  java.lang.String mPathPrefix
           
protected static java.lang.String PATH_NAME_PROPERTY
           
protected static java.lang.String PATH_PREFIX
          Attribute names
protected static java.lang.String TYPE_NAME
           
 
Fields inherited from class atg.repository.RepositoryPropertyDescriptor
EMPTY_LIST, EMPTY_MAP, EMPTY_SET, FOREIGN_REPOSITORY_NAME, FOREIGN_REPOSITORY_PATH, mCollectionOrMap
 
Fields inherited from class atg.beans.DynamicPropertyDescriptor
PORTABLE_VALUE_KEY
 
Fields inherited from class atg.beans.SerializableFeatureDescriptor
BUNDLE_ATTRIBUTE_NAME, LOCALE_ATTRIBUTE_NAME
 
Constructor Summary
FilePropertyDescriptor()
          Constructs a new FilePropertyDescriptor
FilePropertyDescriptor(java.lang.String pPropertyName)
          Constructs a new FilePropertyDescriptor for a particular property.
FilePropertyDescriptor(java.lang.String pPropertyName, java.lang.Class pPropertyType, java.lang.String pShortDescription)
          Constructs a new RepositoryPropertyDescriptor with the given property name, property type, and short description.
 
Method Summary
 java.lang.Class getPropertyType()
          The Java type info for the property.
 java.lang.Object getPropertyValue(RepositoryItemImpl pItem, java.lang.Object pValue)
          This method is called to retrieve a read-only value for this property.
 java.lang.String getTypeName()
          Returns the name this type uses in the XML file.
 boolean isQueryable()
          Returns property Queryable
 boolean isWritable()
          Returns property Writable.
 void setComponentItemDescriptor(RepositoryItemDescriptor pDesc)
          Sets the property ComponentItemDescriptor.
 void setComponentPropertyType(java.lang.Class pClass)
          Sets the property ComponentPropertyType.
 void setPropertyItemDescriptor(RepositoryItemDescriptor pDesc)
          Sets the property PropertyItemDescriptor.
 void setPropertyType(java.lang.Class pClass)
          Perform type checking.
 void setValue(java.lang.String pAttributeName, java.lang.Object pValue)
          Catch the attribute values that we care about and store them in member variables.
 
Methods inherited from class atg.repository.RepositoryPropertyDescriptor
clone, createPropertyDescriptorFromType, getCascadeDelete, getCascadeInsert, getCascadeUpdate, getComponentItemDescriptor, getComponentPropertyBeanInfo, getDefaultValue, getDefaultValueString, getItemDescriptor, getPropertyBeanInfo, getPropertyItemDescriptor, getResourceBundle, getResourceBundleName, getUnmodifiableDefaultValue, isAssignableFrom, isCacheable, isCollectionOrMap, isDerived, isIdProperty, isIgnoreNullValue, isLoggingDebug, isMultiValued, isPersistent, isValidValue, isVersionable, isVersionableSet, registerPropertyDescriptorClass, setCacheable, setCascadeDelete, setCascadeInsert, setCascadeUpdate, setDefaultValue, setDefaultValueString, setDerived, setIdProperty, setIgnoreNullValue, setItemDescriptor, setLoggingDebug, setPersistent, setPropertyValue, setQueryable, setResourceBundleName, setVersionable, toString
 
Methods inherited from class atg.beans.DynamicPropertyDescriptor
createLocalePropertyEditor, createLocalePropertyEditor, createPropertyEditor, getComponentPropertyType, getPropertyEditorClass, getUIPropertyEditor, isReadable, isRequired, setPropertyEditorClass, setReadable, setRequired, setWritable
 
Methods inherited from class atg.beans.SerializableFeatureDescriptor
copyFeatureDescriptor, getDisplayName, getDisplayNameResource, getDisplaySortString, getShortDescription, getShortDescriptionResource, getSortString, setDisplayNameResource, setShortDescriptionResource
 
Methods inherited from class java.beans.FeatureDescriptor
attributeNames, getName, getValue, isExpert, isHidden, isPreferred, setDisplayName, setExpert, setHidden, setName, setPreferred, setShortDescription
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string


PATH_PREFIX

protected static final java.lang.String PATH_PREFIX
Attribute names

See Also:
Constant Field Values

PATH_NAME_PROPERTY

protected static final java.lang.String PATH_NAME_PROPERTY
See Also:
Constant Field Values

TYPE_NAME

protected static final java.lang.String TYPE_NAME
See Also:
Constant Field Values

mPathNameProperty

protected java.lang.String mPathNameProperty
Values of these attributes for this particular property


mPathPrefix

protected java.lang.String mPathPrefix
Constructor Detail

FilePropertyDescriptor

public FilePropertyDescriptor()
Constructs a new FilePropertyDescriptor


FilePropertyDescriptor

public FilePropertyDescriptor(java.lang.String pPropertyName)
Constructs a new FilePropertyDescriptor for a particular property.


FilePropertyDescriptor

public FilePropertyDescriptor(java.lang.String pPropertyName,
                              java.lang.Class pPropertyType,
                              java.lang.String pShortDescription)
Constructs a new RepositoryPropertyDescriptor with the given property name, property type, and short description.

Method Detail

isQueryable

public boolean isQueryable()
Returns property Queryable

Overrides:
isQueryable in class RepositoryPropertyDescriptor

isWritable

public boolean isWritable()
Returns property Writable.

Overrides:
isWritable in class DynamicPropertyDescriptor

getPropertyValue

public java.lang.Object getPropertyValue(RepositoryItemImpl pItem,
                                         java.lang.Object pValue)
This method is called to retrieve a read-only value for this property. Once a repository has computed the value it would like to return for this property, this property descriptor gets a chance to modify it based on how the property is defined. For example, if null is to be returned, we return the default value.

Overrides:
getPropertyValue in class RepositoryPropertyDescriptor

setValue

public void setValue(java.lang.String pAttributeName,
                     java.lang.Object pValue)
Catch the attribute values that we care about and store them in member variables.

Overrides:
setValue in class RepositoryPropertyDescriptor

getTypeName

public java.lang.String getTypeName()
Returns the name this type uses in the XML file.

Overrides:
getTypeName in class RepositoryPropertyDescriptor

getPropertyType

public java.lang.Class getPropertyType()
Description copied from class: DynamicPropertyDescriptor
The Java type info for the property. Unlike PropertyDescriptor, this will never describe a built-in Java type such as "int" since the DynamicPropertyMapper interface requires dynamic property values to be instances of java.lang.Object. In cases where the property value is a dynamic type, this method should return a valid static type for the value, using Object.class as a "least common denominator" last resort.

Overrides:
getPropertyType in class DynamicPropertyDescriptor

setPropertyType

public void setPropertyType(java.lang.Class pClass)
Perform type checking.

Overrides:
setPropertyType in class RepositoryPropertyDescriptor

setComponentPropertyType

public void setComponentPropertyType(java.lang.Class pClass)
Description copied from class: DynamicPropertyDescriptor
Sets the property ComponentPropertyType. If this is a multi-valued property, this defines the class of the elements of that property.

Overrides:
setComponentPropertyType in class DynamicPropertyDescriptor
Parameters:
pClass - new value to set

setPropertyItemDescriptor

public void setPropertyItemDescriptor(RepositoryItemDescriptor pDesc)
Description copied from class: RepositoryPropertyDescriptor
Sets the property PropertyItemDescriptor. If this property refers to another item's type, this is the item descriptor for that type.

Overrides:
setPropertyItemDescriptor in class RepositoryPropertyDescriptor
Parameters:
pDesc - new value to set

setComponentItemDescriptor

public void setComponentItemDescriptor(RepositoryItemDescriptor pDesc)
Description copied from class: RepositoryPropertyDescriptor
Sets the property ComponentItemDescriptor. If this is a collection of items, this is the item descriptor of the component type.

Overrides:
setComponentItemDescriptor in class RepositoryPropertyDescriptor
Parameters:
pDesc - new value to set