atg.projects.store.repository
Class EncryptionPropertyDescriptor

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.adapter.gsa.GSAPropertyDescriptor
                      extended by atg.projects.store.repository.EncryptionPropertyDescriptor
All Implemented Interfaces:
atg.adapter.gsa.Constants, java.io.Serializable, java.lang.Cloneable, java.lang.Comparable

public class EncryptionPropertyDescriptor
extends atg.adapter.gsa.GSAPropertyDescriptor

A property descriptor to encrypt and decrypt string values.

Adapted from atg.repository.PasswordPropertyDescriptor You can pass in a different Encryptor implementation class by adding an attribute tag to your property definition as follows:


   
 

See Also:
Serialized Form

Field Summary
static java.lang.String CLASS_VERSION
          Class version string
static java.lang.String DECRYPT_KEY
          One way decrypt key constant.
static java.lang.String ENCRYPT_KEY
          One way encrypt key constant.
static java.lang.String ENCRYPTOR_COMPONENT
          Encryptor component name.
static java.lang.String KEY
          Two way key constant.
protected  Encryptor mEncryptor
          Encryptor.
static atg.projects.store.repository.EncryptionPropertyDescriptor.NullObject NULL_OBJECT
          Null object.
static java.lang.String TYPE_NAME
          Type name.
 
Fields inherited from class atg.adapter.gsa.GSAPropertyDescriptor
ARRAY, BIG_STRING, BINARY, BOOLEAN, BYTE, DATE, DOUBLE, ENUMERATED, ENUMERATED_STRING, FLOAT, GSAID, INT, INVALID_DATA_TYPE, LIST, LONG, MAP, mMapSub, mResultSetGetters, SET, SHORT, STRING, TIMESTAMP
 
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
 
Fields inherited from interface atg.adapter.gsa.Constants
ATTR_CASCADE_DELETE_ORDER, ATTR_CSW_PROPERTIES, ATTR_CSW_QUERIES, ATTR_CURRENT_ITEM_CACHE_SIZE, ATTR_CURRENT_ITEM_CACHE_TIMEOUT, ATTR_DEFAULT_UNCACHED_ITEM_QUERIES, ATTR_HEAD_OF_LINE_CACHE_SIZE, ATTR_HEAD_OF_LINE_CACHE_TIMEOUT, ATTR_LOADING_STRATEGY, ATTR_SPLIT_QUERIES, ATTR_TEXT_HANDLE_COLUMN, ATTR_TEXT_INDEX_TABLE, ATTR_UPDATE_LAST_MODIFIED, CASCADE_DELETE_AFTER_AUX_BEFORE_PRI, CASCADE_DELETE_FIRST, CASCADE_DELETE_LAST, CASCADE_DELETE_ORDER_NAMES, DEFAULT_EVENT_SERVER, DEFAULT_GSA_CACHE_CLIENT_MANAGER, DEFAULT_INVALIDATOR_SERVICE, ERR_ADD_MISSING_PROPERTIES, ERR_ADD_NON_TRANSIENT, ERR_ARGS_FOR_NON_PARAMETER_QUERY, ERR_BAD_EVENT_DATA, ERR_BAD_TABLE, ERR_CIRCULAR_REFERENCE, ERR_CLASS_NOT_FOUND, ERR_COMPARE_MULTI, ERR_COMPARE_NONCOMPARABLE, ERR_CONTENT_PROPERTIES_NOT_DEFINED, ERR_COULD_NOT_UNSUBSCRIBE, ERR_DEPENDENT_PROP_NOT_EXISTS, ERR_DEPENDENT_PROP_NULL, ERR_DS_PREPARE, ERR_DS_SWITCH, ERR_DUPLICATES, ERR_FOLDER_PROPERTIES_NOT_DEFINED, ERR_HANDLING_INVALIDATE_CACHE_ENTRY, ERR_ID_SPACE_CONFIGURATION, ERR_ILLEGAL_PARAM_TYPE, ERR_INITIALIZING_ID_GENERATOR, ERR_INVALID_COMPARISON_QUERY, ERR_INVALID_DATA_TYPE_NAME, ERR_INVALID_ITEM, ERR_INVALID_ITEM_DESCRIPTOR_NAME, ERR_INVALID_KEY, ERR_INVALID_KEY_ELEMENT, ERR_INVALID_KEY_ENCODING, ERR_INVALID_KEY_VALUES, ERR_INVALID_LIST_INDEX, ERR_INVALID_PATTERNMATCH_QUERY, ERR_INVALID_PROPERTY, ERR_INVALID_QUERY, ERR_INVALID_QUERY_ELEMENT, ERR_INVALID_TEXT_SEARCH_QUERY, ERR_INVALID_TM_DS_COMBO, ERR_ITEM_NOT_EXIST, ERR_LOAD_COLUMN_INFO, ERR_MISSING_ID_SPACE, ERR_NO_ARGS_FOR_QUERY, ERR_NO_DATABASE_TABLE_INFO, ERR_NO_DATATYPE_FOR_PROPERTY, ERR_NO_DB2_HANDLE, ERR_NO_DEFAULT_SEARCH_PROPERTIES, ERR_NO_EVENT_SERVER, ERR_NO_IDS, ERR_NO_LOWER_FUNCTION, ERR_NO_PARAMETER_EXPRESSION, ERR_NO_PARSER, ERR_NO_PRIMARY_TABLE, ERR_NO_SUB_PROPERTIES, ERR_NO_SUBSCRIBER_ITEM_DESCRIPTOR, ERR_NO_SYB_TEXT_INDEX, ERR_NO_TEMPLATE_FILES, ERR_NO_TRANSACTION, ERR_NO_TRANSIENT_QUERIES, ERR_NOT_DISTRIBUTED_MODE, ERR_NULL_ARGUMENT, ERR_NULL_ID, ERR_NULL_ITEM, ERR_NULL_QUERY_OPTIONS, ERR_PARSING_TEMPLATE, ERR_PROCEDURE_HELPER_INIT, ERR_PROPERTY_NOT_QUERYABLE, ERR_RETURN_PROP_NOT_EXISTS, ERR_RETURN_PROP_NOT_GSA, ERR_RETURN_PROP_NOT_READ, ERR_RETURN_PROP_NULL, ERR_RQL_FILTER, ERR_SQL_STRING_NULL, ERR_SUB_TYPE_PROPERTY_ON_NON_ROOT_TYPE, ERR_TABLE_KEY_UNMATCHED, ERR_TRANSACTION, ERR_TYPE_MATCHING, ERR_UNABLE_TO_READ_TEMPLATE_FILE, ERR_UNKNOWN_EVENT_TYPE, ERR_VERSION_PROPERTY_INVALID_TYPE, ERR_VIEW_IS_TRANSIENT, ERR_WRONG_NUMBER_ARGS_FOR_QUERY, FTS_LANG_DB2, FTS_LANG_MSSQL, FTS_LANG_MSSQL_INLINE, FTS_LANG_ORACLE, FTS_LANG_SYBASE, INFO_STARTUP_BEGIN, INFO_STARTUP_END, ISOLATION_LEVEL_NAMES, LOADING_STRATEGY_DEFAULT, LOADING_STRATEGY_EAGER, LOADING_STRATEGY_LAZY, READ_COMMITTED, REPEATABLE_READ, REPOSITORY_COMPONENT_NAME, RESOURCE_BUNDLE_NAME, SERIALIZABLE, SUBSCRIBER_ADDRESS_PROPERTY, SUBSCRIBER_ITEM_DESCRIPTOR_NAME, SUBSCRIBER_ITEM_DESCRIPTOR_PROPERTY, SUBSCRIBER_PORT_PROPERTY, SUBSCRIBER_REPOSITORY_PROPERTY, WARN_PROBLEM_SENDING_EVENT, WARN_RETURN_PROP_MULTI, WARN_RETURN_PROP_TRANSIENT
 
Constructor Summary
EncryptionPropertyDescriptor()
          Constructor.
 
Method Summary
 java.lang.Class getPropertyType()
           
 java.lang.Object getPropertyValue(atg.repository.RepositoryItemImpl pItem, java.lang.Object pValue)
          Get value of the item.
 java.lang.String getTypeName()
           
 boolean isQueryable()
           
 void logDebug(java.lang.String pMessage)
          Log debug.
 void logError(java.lang.String pError)
          Logs an error for the repository we are part of.
 void setComponentItemDescriptor(atg.repository.RepositoryItemDescriptor pDesc)
          Set component item descriptor.
 void setComponentPropertyType(java.lang.Class pClass)
          Set component property type.
 void setPropertyItemDescriptor(atg.repository.RepositoryItemDescriptor pDesc)
          Set property item description.
 void setPropertyType(java.lang.Class pClass)
           
 void setPropertyValue(atg.repository.RepositoryItemImpl pItem, java.lang.Object pValue)
          Sets the property of this type for the item descriptor provided.
 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.adapter.gsa.GSAPropertyDescriptor
compareTo, compareTo, createDBPropertyEditor, equals, getAllowNullValues, getCacheMode, getCacheReferencesById, getColumnCount, getColumnNames, getComponentPropertyType, getDataTypeByClass, getDataTypeByName, getDataTypeClass, getDataTypeName, getDataTypeNameFromClass, getDataTypes, getErrorCode, getGroup, getGroupProperties, getHandleColumn, getId, getIdPartIndices, getJDBCColumnLengths, getJDBCPrimaryKeyNames, getJDBCTypeByName, getJDBCTypeName, getJDBCTypes, getJDBCTypesKnown, getLoadingStrategy, getManyToOneIdProperty, getManyToOneMultiProperty, getReciprocalProperty, getRemoveNullValues, getRepository, getResourceBundle, getResultSetGetters, getReverseReferenceProperties, getTable, getTextIndexTable, getTypeSQL, getUnmodifiableDefaultValue, getValue, hashCode, hasReciprocalProperty, isComposite, isDefaultProperty, isGSAId, isInherited, isInternallyWritable, isJDBCColumnLengthsKnown, isJDBCPrimaryKey, isJDBCPrimaryKeyNamesKnown, isJDBCTypesKnown, isLoggingDebug, isLoggingError, isLoggingWarning, isMapSub, isMultiValued, isProhibitDuplicates, isValidValue, isVersionable, logDebug, logError, logWarning, rawToReal, rawToReal, rawToReal, realToRaw, setAllowNullValues, setCacheMode, setCacheReferencesById, setCascadeDelete, setCascadeInsert, setCascadeUpdate, setColumnNames, setDataTypes, setGroup, setGroupProperties, setHandleColumn, setId, setIdPartIndices, setInherited, setInternallyWritable, setJDBCColumnLengths, setJDBCColumnLengthsKnown, setJDBCPrimaryKey, setJDBCPrimaryKeyNames, setJDBCPrimaryKeyNamesKnown, setJDBCTypes, setJDBCTypesByName, setJDBCTypesKnown, setLoadingStrategy, setManyToOneIdProperty, setManyToOneMultiProperty, setProhibitDuplicates, setRemoveNullValues, setTable, setTextIndexTable, toGSAId, toGSAId, toString, updatePropertyDescriptor
 
Methods inherited from class atg.repository.RepositoryPropertyDescriptor
clone, createPropertyDescriptorFromType, getCascadeDelete, getCascadeInsert, getCascadeUpdate, getComponentItemDescriptor, getComponentPropertyBeanInfo, getDefaultValue, getDefaultValueString, getItemDescriptor, getPropertyBeanInfo, getPropertyItemDescriptor, getResourceBundleName, isAssignableFrom, isCacheable, isCollectionOrMap, isDerived, isIdProperty, isIgnoreNullValue, isPersistent, isVersionableSet, registerPropertyDescriptorClass, setCacheable, setDefaultValue, setDefaultValueString, setDerived, setIdProperty, setIgnoreNullValue, setItemDescriptor, setLoggingDebug, setPersistent, setQueryable, setResourceBundleName, setVersionable
 
Methods inherited from class atg.beans.DynamicPropertyDescriptor
createLocalePropertyEditor, createLocalePropertyEditor, createPropertyEditor, getPropertyEditorClass, getUIPropertyEditor, isReadable, isRequired, isWritable, 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, isExpert, isHidden, isPreferred, setDisplayName, setExpert, setHidden, setName, setPreferred, setShortDescription
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string


TYPE_NAME

public static final java.lang.String TYPE_NAME
Type name.

See Also:
Constant Field Values

ENCRYPTOR_COMPONENT

public static final java.lang.String ENCRYPTOR_COMPONENT
Encryptor component name.

See Also:
Constant Field Values

ENCRYPT_KEY

public static final java.lang.String ENCRYPT_KEY
One way encrypt key constant.

See Also:
Constant Field Values

DECRYPT_KEY

public static final java.lang.String DECRYPT_KEY
One way decrypt key constant.

See Also:
Constant Field Values

KEY

public static final java.lang.String KEY
Two way key constant.

See Also:
Constant Field Values

NULL_OBJECT

public static final atg.projects.store.repository.EncryptionPropertyDescriptor.NullObject NULL_OBJECT
Null object.


mEncryptor

protected Encryptor mEncryptor
Encryptor.

Constructor Detail

EncryptionPropertyDescriptor

public EncryptionPropertyDescriptor()
Constructor.

Method Detail

isQueryable

public boolean isQueryable()
Overrides:
isQueryable in class atg.repository.RepositoryPropertyDescriptor
Returns:
true if queryable, false - otherwise.

setPropertyValue

public void setPropertyValue(atg.repository.RepositoryItemImpl pItem,
                             java.lang.Object pValue)
Sets the property of this type for the item descriptor provided.

Overrides:
setPropertyValue in class atg.adapter.gsa.GSAPropertyDescriptor
Parameters:
pItem - - item to set value in
pValue - - value to set

getPropertyValue

public java.lang.Object getPropertyValue(atg.repository.RepositoryItemImpl pItem,
                                         java.lang.Object pValue)
Get value of the item.

Overrides:
getPropertyValue in class atg.adapter.gsa.GSAPropertyDescriptor
Parameters:
pItem - - item to get value of
pValue - - value name to get
Returns:
the value of the underlying property.

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 atg.adapter.gsa.GSAPropertyDescriptor
Parameters:
pAttributeName - - attribute name
pValue - - value

logError

public void logError(java.lang.String pError)
Logs an error for the repository we are part of.

Overrides:
logError in class atg.adapter.gsa.GSAPropertyDescriptor
Parameters:
pError - - error text

logDebug

public void logDebug(java.lang.String pMessage)
Log debug.

Overrides:
logDebug in class atg.adapter.gsa.GSAPropertyDescriptor
Parameters:
pMessage - - message

getTypeName

public java.lang.String getTypeName()
Overrides:
getTypeName in class atg.adapter.gsa.GSAPropertyDescriptor
Returns:
the name this type uses in the XML file.

getPropertyType

public java.lang.Class getPropertyType()
Overrides:
getPropertyType in class atg.beans.DynamicPropertyDescriptor
Returns:
property type.

setPropertyType

public void setPropertyType(java.lang.Class pClass)
Overrides:
setPropertyType in class atg.repository.RepositoryPropertyDescriptor
Parameters:
pClass - - property type.

setComponentPropertyType

public void setComponentPropertyType(java.lang.Class pClass)
Set component property type.

Overrides:
setComponentPropertyType in class atg.adapter.gsa.GSAPropertyDescriptor
Parameters:
pClass - - class

setPropertyItemDescriptor

public void setPropertyItemDescriptor(atg.repository.RepositoryItemDescriptor pDesc)
Set property item description.

Overrides:
setPropertyItemDescriptor in class atg.repository.RepositoryPropertyDescriptor
Parameters:
pDesc - - property item description

setComponentItemDescriptor

public void setComponentItemDescriptor(atg.repository.RepositoryItemDescriptor pDesc)
Set component item descriptor.

Overrides:
setComponentItemDescriptor in class atg.repository.RepositoryPropertyDescriptor
Parameters:
pDesc - - component item descriptor