public class ItemDescriptorImpl extends java.lang.Object implements RepositoryItemDescriptor
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
protected java.util.ArrayList<PropertiesChangedListener> |
mPropertiesChangedListeners |
protected DynamicPropertyDescriptor[] |
mPropertyDescriptors
An Array of all the DynamicPropertyDescriptors
|
protected atg.core.util.UnsyncCaseInsensitiveHashtable |
mPropertyDescriptorTable
Table of all the DynamicPropertyDescriptors hashed by property name.
|
protected java.lang.String[] |
mPropertyNames
An Array of all the property names
|
Constructor and Description |
---|
ItemDescriptorImpl()
Constructs an instanceof ItemDescriptorImpl
|
ItemDescriptorImpl(Repository pRepository)
Constructs an instanceof ItemDescriptorImpl for a given repository.
|
Modifier and Type | Method and Description |
---|---|
void |
addPropertiesChangedListener(PropertiesChangedListener pListener)
Adds a properties changed event listener from this item descriptor.
|
void |
addPropertyDescriptor(RepositoryPropertyDescriptor pPropertyDescriptor)
Adds the given property descriptor to the internal table of known descriptors
|
boolean |
areInstances(DynamicBeanInfo pDynamicBeanInfo)
Returns true if all objects described by some DynamicBeanInfo
are also described by this one.
|
java.lang.String |
encodeCompositeKey(java.lang.String[] pIdValues)
Encode an array of ID values to be used as a Repository ID
|
boolean |
equals(java.lang.Object pObj)
Returns true if this RepositoryItemDescriptor
and the supplied object (which should also be a
RepositoryItemDescriptor) have the exact same set of
properties (as defined by their name).
|
DynamicBeanDescriptor |
getBeanDescriptor()
Returns the DynamicBeanDescriptor for this DynamicBeanInfo.
|
RepositoryPropertyDescriptor |
getContextMembershipProperty()
Gets the property descriptor corresponding to the context membership property.
|
java.lang.String |
getCreateDisplayName()
Get the create display name label using the
create-asset-name-resource key from the resource bundle.
|
java.util.List<atg.repository.query.QueryDependency> |
getDependencies(Query pQuery)
Generate query dependency list for this query used for query invalidation.
|
RepositoryPropertyDescriptor |
getDisplayNameProperty()
Gets the name of the display name property.
|
java.lang.String |
getItemDescriptorName()
Returns property ItemDescriptorName
|
java.lang.String |
getItemDisplayNameProperty() |
java.lang.String |
getMoveToDisplayName()
Get the move display label when the asset name is in plural form
using the plural-asset-name-resource key from the resource bundle.
|
java.lang.String |
getNewDisplayName()
Get the new display name using the
new-asset-name-resource key from the resource bundle.
|
java.lang.String |
getPluralDisplayName()
Get the plural display name.
|
java.util.List<PropertiesChangedListener> |
getPropertiesChangedListeners()
Returns the list of properties changed listeners that are registered
on this item descriptor.
|
DynamicPropertyDescriptor |
getPropertyDescriptor(java.lang.String pPropertyName)
Returns the DynamicPropertyDescriptor for the specified property
|
DynamicPropertyDescriptor[] |
getPropertyDescriptors()
Returns the all PropertyDescriptors
|
java.lang.String[] |
getPropertyNames()
Returns the list of the names of the known properties
|
Repository |
getRepository()
Returns the repository for this item descriptor.
|
RepositoryImpl |
getRepositoryImpl() |
RepositoryPropertyDescriptor |
getRepositoryPropertyDescriptor(java.lang.String pPropertyName)
Returns the RepositoryPropertyDescriptor for the specified property.
|
RepositoryView |
getRepositoryView()
Get property RepositoryView
|
RepositoryView |
getRepositoryViewImpl()
Get property RepositoryViewImpl
|
java.lang.String |
getSelectDisplayName()
Get the select display label when the asset name is in plural form
using the plural-asset-name-resource key from the resource bundle.
|
java.lang.String |
getSelectPluralDisplayName()
Get the select display label when the asset name is in plural form
using the plural-asset-name-resource key from the resource bundle.
|
java.lang.Object |
getValue(java.lang.String pName)
Get the value associated with a named attribute.
|
boolean |
hasCompositeKey()
Determine if this item type has a composite ID.
|
int |
hashCode() |
boolean |
hasProperty(java.lang.String pPropertyName)
Returns true if the Repository supports the given property
|
void |
invalidateCaches()
Invalidates both the item and query caches for this item descriptor.
|
void |
invalidateCaches(boolean pGlobal)
Invalidates both the item and query caches for this item descriptor.
|
void |
invalidateItemCache()
Invalidates the item caches for this item descriptor.
|
void |
invalidateItemCache(boolean pGlobal)
Invalidates the item caches for this item descriptor.
|
boolean |
isContextMembershipEnabled()
If context membership support is enabled for this item descriptor
|
boolean |
isInstance(java.lang.Object pObj)
Returns true if the given object belongs to the set of dynamic beans
described by this DynamicBeanInfo.
|
boolean |
isLoggingDebug() |
void |
removeItemFromCache(java.lang.String pId)
Removes the specified item from any repository caches.
|
void |
removeItemFromCache(java.lang.String pId,
boolean pGlobal)
Removes the specified item from any repository caches.
|
void |
removeItemFromCache(java.lang.String pId,
boolean pGlobal,
boolean pRemoveTransientProperties)
Removes the specified item from any repository caches.
|
void |
removePropertiesChangedListener(PropertiesChangedListener pListener)
Removes a properties changed event listener from this item descriptor.
|
void |
removePropertyDescriptor(java.lang.String pPropertyName)
Removes the given property descriptor from the internal table of known descriptors
|
void |
sendPropertiesChangedEvent(atg.repository.RepositoryChangedItem pItem,
int pType,
java.util.Map<RepositoryPropertyDescriptor,java.lang.Object> pProperties)
Sends a propertiesChangedEvent given the item itself that changed
|
void |
sendPropertiesChangedEvent(java.lang.String pId,
int pType,
java.util.Map<RepositoryPropertyDescriptor,java.lang.Object> pProperties)
Sends a propertiesChangedEvent given the id of the item that changed
|
void |
sendQueryDependencyPropertiesChangedEvent(atg.repository.RepositoryChangedItem pItem,
int pType,
java.util.Map<RepositoryPropertyDescriptor,java.lang.Object> pProperties)
Sends a propertiesChangedEvent to QueryDependencies
|
void |
sendQueryDependencyPropertiesChangedEvent(java.lang.String pId,
int pType,
java.util.Map<RepositoryPropertyDescriptor,java.lang.Object> pProperties)
Sends a propertiesChangedEvent given the id of the item that changed to QueryDependencies
|
void |
setBeanDescriptor(DynamicBeanDescriptor pBeanDescriptor)
Sets property BeanDescriptor
|
void |
setContextMembershipProperty(RepositoryPropertyDescriptor pContextMembershipProperty)
Sets the property when ContextMembershipProperty.
|
void |
setItemDescriptorName(java.lang.String pItemDescriptorName)
Sets property ItemDescriptorName
|
void |
setItemDisplayNameProperty(java.lang.String pItemDisplayNameProperty)
Sets the property ItemDisplayNameProperty.
|
void |
setLoggingDebug(boolean pLoggingDebug)
Sets the property LoggingDebug.
|
void |
setRepository(Repository pRepository)
Sets the property Repository.
|
void |
setRepositoryView(RepositoryView pRepositoryView)
Set property RepositoryView
|
void |
setValue(java.lang.String pName,
java.lang.Object pValue)
Associate an attribute value with a name for this descriptor.
|
protected void |
updateDataStructures()
Updates the internal data structures which perform
property name-<property descriptor mapping, building the arrays of
property names and DynamicPropertyDescriptors.
|
void |
updatePropertyDescriptor(RepositoryPropertyDescriptor pPropertyDescriptor)
Throws RepositoryException because this is an unsupported feature in this
implementation
|
public static java.lang.String CLASS_VERSION
protected atg.core.util.UnsyncCaseInsensitiveHashtable mPropertyDescriptorTable
protected java.lang.String[] mPropertyNames
protected DynamicPropertyDescriptor[] mPropertyDescriptors
protected transient java.util.ArrayList<PropertiesChangedListener> mPropertiesChangedListeners
public ItemDescriptorImpl()
public ItemDescriptorImpl(Repository pRepository)
public void setBeanDescriptor(DynamicBeanDescriptor pBeanDescriptor)
public DynamicBeanDescriptor getBeanDescriptor()
getBeanDescriptor
in interface DynamicBeanInfo
public DynamicPropertyDescriptor[] getPropertyDescriptors()
getPropertyDescriptors
in interface DynamicBeanInfo
public boolean hasProperty(java.lang.String pPropertyName)
hasProperty
in interface DynamicBeanInfo
pPropertyName
- the name of the propertypublic java.lang.String[] getPropertyNames()
getPropertyNames
in interface DynamicBeanInfo
public DynamicPropertyDescriptor getPropertyDescriptor(java.lang.String pPropertyName)
getPropertyDescriptor
in interface DynamicBeanInfo
pPropertyName
- the name of the propertypublic RepositoryPropertyDescriptor getRepositoryPropertyDescriptor(java.lang.String pPropertyName)
public void setContextMembershipProperty(RepositoryPropertyDescriptor pContextMembershipProperty)
pContextMembershipProperty
- new value to setpublic RepositoryPropertyDescriptor getContextMembershipProperty()
RepositoryItemDescriptor
getContextMembershipProperty
in interface RepositoryItemDescriptor
public boolean isContextMembershipEnabled()
isContextMembershipEnabled
in interface RepositoryItemDescriptor
public boolean isInstance(java.lang.Object pObj)
isInstance
in interface DynamicBeanInfo
public boolean areInstances(DynamicBeanInfo pDynamicBeanInfo)
areInstances
in interface DynamicBeanInfo
public void setItemDescriptorName(java.lang.String pItemDescriptorName)
public java.lang.String getItemDescriptorName()
getItemDescriptorName
in interface RepositoryItemDescriptor
public void addPropertyDescriptor(RepositoryPropertyDescriptor pPropertyDescriptor) throws RepositoryException
addPropertyDescriptor
in interface RepositoryItemDescriptor
pPropertyDescriptor
- the descriptor for the new property to add to the
RepositoryRepositoryException
- if there was an errorpublic void updatePropertyDescriptor(RepositoryPropertyDescriptor pPropertyDescriptor) throws RepositoryException
updatePropertyDescriptor
in interface RepositoryItemDescriptor
pPropertyDescriptor
- the descriptor for the property to updateRepositoryException
- unsupported featurepublic void removePropertyDescriptor(java.lang.String pPropertyName) throws RepositoryException
removePropertyDescriptor
in interface RepositoryItemDescriptor
pPropertyName
- the name of the propertyRepositoryException
- if there was an errorpublic void setItemDisplayNameProperty(java.lang.String pItemDisplayNameProperty)
pItemDisplayNameProperty
- new value to setpublic java.lang.String getItemDisplayNameProperty()
public RepositoryPropertyDescriptor getDisplayNameProperty()
getDisplayNameProperty
in interface RepositoryItemDescriptor
public boolean equals(java.lang.Object pObj)
equals
in class java.lang.Object
public void setRepositoryView(RepositoryView pRepositoryView)
pRepositoryView
- new value to setpublic RepositoryView getRepositoryView()
getRepositoryView
in interface RepositoryItemDescriptor
public RepositoryView getRepositoryViewImpl()
protected void updateDataStructures()
public void setRepository(Repository pRepository)
pRepository
- new value to setpublic final Repository getRepository()
RepositoryItemDescriptor
getRepository
in interface RepositoryItemDescriptor
public final RepositoryImpl getRepositoryImpl()
public void addPropertiesChangedListener(PropertiesChangedListener pListener)
public void removePropertiesChangedListener(PropertiesChangedListener pListener)
public java.util.List<PropertiesChangedListener> getPropertiesChangedListeners()
public void sendPropertiesChangedEvent(atg.repository.RepositoryChangedItem pItem, int pType, java.util.Map<RepositoryPropertyDescriptor,java.lang.Object> pProperties)
public void sendQueryDependencyPropertiesChangedEvent(atg.repository.RepositoryChangedItem pItem, int pType, java.util.Map<RepositoryPropertyDescriptor,java.lang.Object> pProperties)
public void sendPropertiesChangedEvent(java.lang.String pId, int pType, java.util.Map<RepositoryPropertyDescriptor,java.lang.Object> pProperties)
public void sendQueryDependencyPropertiesChangedEvent(java.lang.String pId, int pType, java.util.Map<RepositoryPropertyDescriptor,java.lang.Object> pProperties)
public void invalidateItemCache()
public void invalidateItemCache(boolean pGlobal)
pGlobal
- if true, the item caches are invalidated in all servers in
the cluster. Use of this option may require additional configuration in
which case, the local cache is invalidated and a warning is issued.public void invalidateCaches()
public void invalidateCaches(boolean pGlobal)
pGlobal
- if true, the caches are invalidated in all servers in
the cluster. Use of this option may require additional configuration in
which case, the local cache is invalidated and a warning is issued.public void removeItemFromCache(java.lang.String pId) throws RepositoryException
pId
- item id of item to removeRepositoryException
- if the id is null or there is a problem
removing the item from cachepublic void removeItemFromCache(java.lang.String pId, boolean pGlobal) throws RepositoryException
pId
- item id of item to removepGlobal
- if true, the item is removed from all servers in the
cluster. This option may require additional configuration so that the
cluster members can find each other.
A warning is logged if this is not option is not supported and a true
value is given.RepositoryException
- if the id is null or there is a problem
removing the item from cachepublic void removeItemFromCache(java.lang.String pId, boolean pGlobal, boolean pRemoveTransientProperties) throws RepositoryException
pId
- item id of item to removepGlobal
- if true, the item is removed from all servers in the
cluster. This option may require additional configuration so that the
cluster members can find each other.
A warning is logged if this is not option is not supported and a true
value is given.pRemoveTransientProperties
- if true, transient properties for the
item will also be remove from the cache.RepositoryException
- if the id is null or there is a problem
removing the item from cachepublic java.util.List<atg.repository.query.QueryDependency> getDependencies(Query pQuery)
pQuery
- Query to generate dependency list for.public void setValue(java.lang.String pName, java.lang.Object pValue)
pName
- name of attributepValue
- value of attributepublic java.lang.Object getValue(java.lang.String pName)
pName
- name of attributepublic boolean hasCompositeKey()
hasCompositeKey
in interface RepositoryItemDescriptor
public java.lang.String encodeCompositeKey(java.lang.String[] pIdValues) throws RepositoryException
encodeCompositeKey
in interface RepositoryItemDescriptor
pIdValues
- Array of ID valuesRepositoryException
- unsupported featurepublic java.lang.String getPluralDisplayName()
public void setLoggingDebug(boolean pLoggingDebug)
pLoggingDebug
- new value to setpublic boolean isLoggingDebug()
public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
public java.lang.String getNewDisplayName()
public java.lang.String getSelectPluralDisplayName()
public java.lang.String getCreateDisplayName()
public java.lang.String getSelectDisplayName()
public java.lang.String getMoveToDisplayName()