| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectatg.repository.ItemDescriptorImpl
public class ItemDescriptorImpl
A simple implementation of RepositoryItemDescriptor which supports adding and removing DynamicPropertyDescriptors.
| Field Summary | |
|---|---|
| static java.lang.String | CLASS_VERSIONClass version string | 
| protected  DynamicPropertyDescriptor[] | mPropertyDescriptorsAn Array of all the DynamicPropertyDescriptors | 
| protected  java.util.Dictionary | mPropertyDescriptorTableTable of all the DynamicPropertyDescriptors hashed by property name | 
| protected  java.lang.String[] | mPropertyNamesAn Array of all the property names | 
| Constructor Summary | |
|---|---|
| ItemDescriptorImpl()Constructs an instanceof ItemDescriptorImpl | |
| ItemDescriptorImpl(Repository pRepository)Constructs an instanceof ItemDescriptorImpl for a given repository. | |
| Method Summary | |
|---|---|
|  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. | 
|  java.util.List | getDependencies(Query pQuery)Generate query dependency list for this query used for query invalidation. | 
|  java.lang.String | getItemDescriptorName()Returns property ItemDescriptorName | 
|  java.lang.String | getItemDisplayNameProperty() | 
|  java.util.List | 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.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 | 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 pProperties)Sends a propertiesChangedEvent given the item itself that changed | 
|  void | sendPropertiesChangedEvent(java.lang.String pId,
                           int pType,
                           java.util.Map pProperties)Sends a propertiesChangedEvent given the id of the item that changed | 
|  void | setBeanDescriptor(DynamicBeanDescriptor pBeanDescriptor)Sets property BeanDescriptor | 
|  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 | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static java.lang.String CLASS_VERSION
protected java.util.Dictionary mPropertyDescriptorTable
protected java.lang.String[] mPropertyNames
protected DynamicPropertyDescriptor[] mPropertyDescriptors
| Constructor Detail | 
|---|
public ItemDescriptorImpl()
public ItemDescriptorImpl(Repository pRepository)
| Method Detail | 
|---|
public void setBeanDescriptor(DynamicBeanDescriptor pBeanDescriptor)
public DynamicBeanDescriptor getBeanDescriptor()
getBeanDescriptor in interface DynamicBeanInfopublic DynamicPropertyDescriptor[] getPropertyDescriptors()
getPropertyDescriptors in interface DynamicBeanInfopublic boolean hasProperty(java.lang.String pPropertyName)
hasProperty in interface DynamicBeanInfopPropertyName - the name of the propertypublic java.lang.String[] getPropertyNames()
getPropertyNames in interface DynamicBeanInfopublic DynamicPropertyDescriptor getPropertyDescriptor(java.lang.String pPropertyName)
getPropertyDescriptor in interface DynamicBeanInfopPropertyName - the name of the property
public RepositoryPropertyDescriptor getRepositoryPropertyDescriptor(java.lang.String pPropertyName)
public boolean isInstance(java.lang.Object pObj)
isInstance in interface DynamicBeanInfopublic boolean areInstances(DynamicBeanInfo pDynamicBeanInfo)
areInstances in interface DynamicBeanInfopublic 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 RepositoryItemDescriptorpPropertyDescriptor - the descriptor for the new property to add to the
 Repository
RepositoryException - if there was an error
public void updatePropertyDescriptor(RepositoryPropertyDescriptor pPropertyDescriptor)
                              throws RepositoryException
updatePropertyDescriptor in interface RepositoryItemDescriptorpPropertyDescriptor - the descriptor for the property to update
RepositoryException - unsupported feature
public void removePropertyDescriptor(java.lang.String pPropertyName)
                              throws RepositoryException
removePropertyDescriptor in interface RepositoryItemDescriptorpPropertyName - the name of the property
RepositoryException - if there was an errorpublic void setItemDisplayNameProperty(java.lang.String pItemDisplayNameProperty)
pItemDisplayNameProperty - new value to setpublic java.lang.String getItemDisplayNameProperty()
public boolean equals(java.lang.Object pObj)
equals in class java.lang.Objectpublic void setRepositoryView(RepositoryView pRepositoryView)
pRepositoryView - new value to setpublic RepositoryView getRepositoryView()
getRepositoryView in interface RepositoryItemDescriptorpublic RepositoryView getRepositoryViewImpl()
protected void updateDataStructures()
public void setRepository(Repository pRepository)
pRepository - new value to setpublic final Repository getRepository()
RepositoryItemDescriptor
getRepository in interface RepositoryItemDescriptorpublic final RepositoryImpl getRepositoryImpl()
public void addPropertiesChangedListener(PropertiesChangedListener pListener)
public void removePropertiesChangedListener(PropertiesChangedListener pListener)
public java.util.List getPropertiesChangedListeners()
public void sendPropertiesChangedEvent(atg.repository.RepositoryChangedItem pItem,
                                       int pType,
                                       java.util.Map pProperties)
public void sendPropertiesChangedEvent(java.lang.String pId,
                                       int pType,
                                       java.util.Map 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 remove
RepositoryException - if the id is null or there is a problem
 removing the item from cache
public 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 cache
public 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 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 attribute
public boolean hasCompositeKey()
hasCompositeKey in interface RepositoryItemDescriptor
public java.lang.String encodeCompositeKey(java.lang.String[] pIdValues)
                                    throws RepositoryException
encodeCompositeKey in interface RepositoryItemDescriptorpIdValues - Array of ID values
RepositoryException - unsupported featurepublic void setLoggingDebug(boolean pLoggingDebug)
pLoggingDebug - new value to setpublic boolean isLoggingDebug()
public int hashCode()
hashCode in class java.lang.ObjectObject.hashCode()| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||