com.centrasite.control.registry.items
Class RegistryObjectItem

java.lang.Object
  extended by com.centrasite.control.AbstractItem
      extended by com.centrasite.control.registry.items.RegistryObjectItem
All Implemented Interfaces:
Item
Direct Known Subclasses:
ActionCategoryItem, ActionTemplateItem, AssociationItem, AssociationTypeConceptItem, AuditableEventItem, CentraSiteFilterItem, CentraSiteTypeDescItem, ClassificationItem, ConceptItem, EventTypeItem, ExternalIdentifierItem, ExternalLinkItem, OrganizationItem, PolicyInstanceItem, PolicyObjectItem, RegistryEntryItem, RegistryGroupItem, RegistryUserItem, RTPolicyInstanceItem, ServiceBindingItem, SpecificationLinkItem, TargetItem, TargetTypeItem

public class RegistryObjectItem
extends AbstractItem


Nested Class Summary
 class RegistryObjectItem.ProfileVisibilityBean
           
static class RegistryObjectItem.ReferencingDescriptor
           
 
Field Summary
 boolean profilePermissionUpdated
           
static int REFERENCING_LIST_AS_ITEMS
           
static int REFERENCING_LIST_AS_REFOBJECTS
           
 
Fields inherited from class com.centrasite.control.AbstractItem
rcs_id
 
Constructor Summary
RegistryObjectItem(javax.xml.registry.infomodel.RegistryObject ro, Connector con)
           
 
Method Summary
 void addAuditComment(java.lang.String comment)
          Add audit comments
 void addClassification(javax.xml.registry.infomodel.ClassificationScheme classificationScheme, java.lang.String name, java.lang.String value)
          This function creates the classification based external classificationscheme , value and name
 void addClassification(javax.xml.registry.infomodel.Concept concept)
           
 javax.xml.registry.infomodel.Classification addExternalClassification(javax.xml.registry.infomodel.ClassificationScheme classificationScheme, java.lang.String name, java.lang.String value)
          Creates external classification based on external classificationscheme, value and name and adds it to this registry object item.
 javax.xml.registry.infomodel.Classification addInternelClassification(javax.xml.registry.infomodel.Concept concept)
          Creates new internal classification with the given concept and adds it to this registry object item.
 void clearCache()
          Clear cache used for items of this type
 void clearProperties()
           
 void delete()
           
 void delete(java.util.Collection keys)
           
 boolean equals(java.lang.Object other)
           
 boolean equals(RegistryObjectProxyItem other)
           
 RegistryObjectItem freeze()
           
 java.util.Collection<AbstractAce> getAccessControlElements()
          Get access control elements
 javax.xml.registry.infomodel.RegistryObject getCachedRegistryObject()
          Get the potentially stale registry object from the cache.
 com.centrasite.jaxr.infomodel.CentraSiteRegistryObject getCentraSiteRegistryObject()
           
 com.centrasite.jaxr.infomodel.CentraSiteConcept getCentraSiteVirtualTypeConcept(com.centrasite.jaxr.infomodel.CentraSiteRegistryObject centraSiteRegistryObject)
           
 java.util.Iterator getChildren()
           
 java.util.Iterator getChildren(boolean refresh)
           
 java.util.Collection<java.lang.String> getCollectRestServiceAssociatedObjects()
           
 java.util.Collection<javax.xml.registry.infomodel.RegistryObject> getCollectVirtualServiceAssociatedObjects()
           
 InstanceLevelPermissionItem getCurrentUserPermissionItem()
          Get currently logged-in user privilege over this item, wrapped as a InstanceLevelPermissionItem.
 java.util.Collection getDefinedSlotNames()
          Get collection of names of slots defined for type
 java.lang.String getDescription()
           
 java.lang.String getImageURL()
           
 java.lang.String getKey()
          Obtain a unique key for class of icons
 java.lang.String getLabel()
          Obtain label to be used when representing this object e.g. within association navigator
 java.lang.String getLargeImageURL()
           
 javax.xml.registry.infomodel.AuditableEvent getLastAuditableEvent()
           
 java.lang.String getName()
           
static java.lang.String getName(javax.xml.registry.infomodel.RegistryObject registryObject, java.util.Locale lc)
           
 java.lang.String getNameEx()
          Get "extended/alternate name".
 java.util.Collection<AbstractAce> getNonPermissionAccessControlElements()
          Get access control elements without including permission level permissions.
 java.lang.String getPermissionForNonPermissionACL()
          Get top permission id for getting the non permission access control elements.
 PrivilegeDescriptor getPrivilegeDescriptor()
           
 java.util.ArrayList getProperties()
          Return list of object specific properties (i.e. not described by schema)
 java.util.Collection getReferencingItems()
           
 java.util.Collection getReferencingObjects()
           
 javax.xml.registry.infomodel.RegistryObject getRegistryObject()
           
 ReportInterface getReport()
          Get report to be used when selecting given object in tree.
 ReportInterface getReportForDetailView()
          Get report to be used for data access in detail view of THIS Item - not for child nodes!
 java.util.Collection getSlotDescriptions()
          Get the slot descriptions of the underlying object type
 java.lang.String getTooltip()
          Obtain tooltip to be used when representing this object e.g. within association navigator
 int hashCode()
          Provide hash function for being able to use RegistryObjectItems as key for hashing
 boolean hasNoChildren()
           
static boolean hasObjectType(Item item, java.lang.String objectTypeName)
          Test whether given item is a RegistryObjectItem with given object type
static boolean hasObjectType(RegistryObjectItem roi, java.lang.String objectTypeName)
          Test whether given item is a RegistryObjectItem with given object type
static boolean hasObjectType(javax.xml.registry.infomodel.RegistryObject registryObject, java.lang.String objectTypeName)
          Test whether given RegistryObject is a RegistryObjectItem with given object type
 boolean isCanPropagateACL()
           
 boolean isCentraSiteVirtualTypeConcept(javax.xml.registry.infomodel.Concept concept)
           
 boolean isEnabledForVersioning()
           
 boolean isModified()
          Is the registry object behind this item modified
 boolean isNewItem()
           
 boolean isPredefined()
          Is the registry object behind this item Predefined
 boolean isPropagateProfileEnabled()
           
 boolean isRevisionObject()
           
 boolean isStandalone()
          Check if Registry object is Standalone or embedded
 void save(ActionContext actionContext)
          Save Item
 void setAccessControlElements(java.util.Collection<? extends AbstractAce> accessControlElements)
          Set access control elements
 void setAccessControlElements(javax.xml.registry.infomodel.RegistryObject registryObject)
          Set access control elements
 void setCanPropagateACL(boolean canPropagateACL)
           
 void setCollectRestServiceAssociatedObjects(java.util.Collection<java.lang.String> collectRestServiceAssociatedObjects)
           
 void setCollectVirtualServiceAssociatedObjects(java.util.Collection<javax.xml.registry.infomodel.RegistryObject> collectVirtualServiceAssociatedObjects)
           
 void setNewItem(boolean newObj)
           
 void setPropagateProfileEnabled(boolean propagateProfileEnabled)
           
 void setProperties(java.util.ArrayList properties)
           
 java.lang.String toString()
           
 
Methods inherited from class com.centrasite.control.AbstractItem
addBulkCommand, addCommand, addDetailViewTab, cannotHaveChildren, getBulkCommands, getCommand, getCommand, getCommands, getConnector, getDefaultCommand, getDetailsCommand, getDetailViewTabs, getItem, getLanguage, getLocale, getPath, getPersistanceLocale, getRelatedItems, hasRequiredAttribute, isLocked, isReadOnly, isSubTabModified, removeCommand, replaceCommand, setCommandEnabled, setConnector, setDefaultCommand, setDetailsCommand, setLocked, setRelatedItems, setRequiredAttribute, setTabModified, showDetailView, showReport
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

REFERENCING_LIST_AS_ITEMS

public static final int REFERENCING_LIST_AS_ITEMS
See Also:
Constant Field Values

REFERENCING_LIST_AS_REFOBJECTS

public static final int REFERENCING_LIST_AS_REFOBJECTS
See Also:
Constant Field Values

profilePermissionUpdated

public boolean profilePermissionUpdated
Constructor Detail

RegistryObjectItem

public RegistryObjectItem(javax.xml.registry.infomodel.RegistryObject ro,
                          Connector con)
                   throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

isCanPropagateACL

public boolean isCanPropagateACL()

setCanPropagateACL

public void setCanPropagateACL(boolean canPropagateACL)

isPropagateProfileEnabled

public boolean isPropagateProfileEnabled()

setPropagateProfileEnabled

public void setPropagateProfileEnabled(boolean propagateProfileEnabled)

getKey

public java.lang.String getKey()
                        throws java.lang.Exception
Obtain a unique key for class of icons

Specified by:
getKey in interface Item
Overrides:
getKey in class AbstractItem
Returns:
the key or null, if none available
Throws:
java.lang.Exception

isEnabledForVersioning

public boolean isEnabledForVersioning()

toString

public java.lang.String toString()
Overrides:
toString in class AbstractItem

hashCode

public int hashCode()
Provide hash function for being able to use RegistryObjectItems as key for hashing

Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class java.lang.Object

equals

public boolean equals(RegistryObjectProxyItem other)

isRevisionObject

public boolean isRevisionObject()

getRegistryObject

public javax.xml.registry.infomodel.RegistryObject getRegistryObject()

getCachedRegistryObject

public javax.xml.registry.infomodel.RegistryObject getCachedRegistryObject()
Get the potentially stale registry object from the cache.

Returns:
potentially stale registry object

getCentraSiteRegistryObject

public com.centrasite.jaxr.infomodel.CentraSiteRegistryObject getCentraSiteRegistryObject()

getName

public java.lang.String getName()
                         throws java.lang.Exception
Throws:
java.lang.Exception

getName

public static java.lang.String getName(javax.xml.registry.infomodel.RegistryObject registryObject,
                                       java.util.Locale lc)
                                throws java.lang.Exception
Throws:
java.lang.Exception

getNameEx

public java.lang.String getNameEx()
                           throws java.lang.Exception
Description copied from class: AbstractItem
Get "extended/alternate name". This method is only used in some rare locations e.g. currently when obtaining the label of an item in the tree. Its usage is discouraged in general. This default implementation returns same as getName().

Specified by:
getNameEx in interface Item
Overrides:
getNameEx in class AbstractItem
Throws:
java.lang.Exception

getDescription

public java.lang.String getDescription()
                                throws java.lang.Exception
Throws:
java.lang.Exception

delete

public void delete()
            throws java.lang.Exception
Throws:
java.lang.Exception

delete

public void delete(java.util.Collection keys)
            throws java.lang.Exception
Throws:
java.lang.Exception

getChildren

public java.util.Iterator getChildren()
                               throws java.lang.Exception
Throws:
java.lang.Exception

getChildren

public java.util.Iterator getChildren(boolean refresh)
                               throws java.lang.Exception
Throws:
java.lang.Exception

hasNoChildren

public boolean hasNoChildren()
                      throws java.lang.Exception
Throws:
java.lang.Exception

getLargeImageURL

public java.lang.String getLargeImageURL()
                                  throws java.lang.Exception
Throws:
java.lang.Exception

getImageURL

public java.lang.String getImageURL()
                             throws java.lang.Exception
Throws:
java.lang.Exception

getCentraSiteVirtualTypeConcept

public com.centrasite.jaxr.infomodel.CentraSiteConcept getCentraSiteVirtualTypeConcept(com.centrasite.jaxr.infomodel.CentraSiteRegistryObject centraSiteRegistryObject)
                                                                                throws javax.xml.registry.JAXRException
Throws:
javax.xml.registry.JAXRException

isCentraSiteVirtualTypeConcept

public boolean isCentraSiteVirtualTypeConcept(javax.xml.registry.infomodel.Concept concept)
                                       throws javax.xml.registry.JAXRException
Throws:
javax.xml.registry.JAXRException

getReport

public ReportInterface getReport()
Description copied from class: AbstractItem
Get report to be used when selecting given object in tree.

Specified by:
getReport in interface Item
Overrides:
getReport in class AbstractItem

getReportForDetailView

public ReportInterface getReportForDetailView()
Get report to be used for data access in detail view of THIS Item - not for child nodes!

Specified by:
getReportForDetailView in interface Item
Overrides:
getReportForDetailView in class AbstractItem

getReferencingItems

public java.util.Collection getReferencingItems()
                                         throws java.lang.Exception
Throws:
java.lang.Exception

getReferencingObjects

public java.util.Collection getReferencingObjects()
                                           throws java.lang.Exception
Throws:
java.lang.Exception

getLastAuditableEvent

public javax.xml.registry.infomodel.AuditableEvent getLastAuditableEvent()
                                                                  throws javax.xml.registry.JAXRException
Throws:
javax.xml.registry.JAXRException

addClassification

public void addClassification(javax.xml.registry.infomodel.Concept concept)
                       throws javax.xml.registry.InvalidRequestException,
                              javax.xml.registry.JAXRException
Throws:
javax.xml.registry.InvalidRequestException
javax.xml.registry.JAXRException

addInternelClassification

public javax.xml.registry.infomodel.Classification addInternelClassification(javax.xml.registry.infomodel.Concept concept)
                                                                      throws javax.xml.registry.JAXRException
Creates new internal classification with the given concept and adds it to this registry object item.

Parameters:
concept -
Returns:
The newly created classification.
Throws:
javax.xml.registry.JAXRException

addClassification

public void addClassification(javax.xml.registry.infomodel.ClassificationScheme classificationScheme,
                              java.lang.String name,
                              java.lang.String value)
                       throws javax.xml.registry.InvalidRequestException,
                              javax.xml.registry.JAXRException
This function creates the classification based external classificationscheme , value and name

Parameters:
classificationScheme -
name -
value -
Throws:
javax.xml.registry.InvalidRequestException
javax.xml.registry.JAXRException

addExternalClassification

public javax.xml.registry.infomodel.Classification addExternalClassification(javax.xml.registry.infomodel.ClassificationScheme classificationScheme,
                                                                             java.lang.String name,
                                                                             java.lang.String value)
                                                                      throws javax.xml.registry.JAXRException
Creates external classification based on external classificationscheme, value and name and adds it to this registry object item.

Parameters:
classificationScheme -
name -
value -
Throws:
javax.xml.registry.InvalidRequestException
javax.xml.registry.JAXRException

getProperties

public java.util.ArrayList getProperties()
                                  throws java.lang.Exception
Return list of object specific properties (i.e. not described by schema)

Overrides:
getProperties in class AbstractItem
Throws:
java.lang.Exception

setProperties

public void setProperties(java.util.ArrayList properties)
                   throws java.lang.Exception
Overrides:
setProperties in class AbstractItem
Throws:
java.lang.Exception

clearProperties

public void clearProperties()
                     throws java.lang.Exception
Overrides:
clearProperties in class AbstractItem
Throws:
java.lang.Exception

getSlotDescriptions

public java.util.Collection getSlotDescriptions()
                                         throws javax.xml.registry.JAXRException
Get the slot descriptions of the underlying object type

Returns:
the collection of CentraSiteSlotDescription objects
Throws:
javax.xml.registry.JAXRException

getDefinedSlotNames

public java.util.Collection getDefinedSlotNames()
                                         throws javax.xml.registry.JAXRException
Get collection of names of slots defined for type

Returns:
the collection of slot names
Throws:
javax.xml.registry.JAXRException

isNewItem

public boolean isNewItem()

setNewItem

public void setNewItem(boolean newObj)

getAccessControlElements

public java.util.Collection<AbstractAce> getAccessControlElements()
                                                           throws java.lang.Exception
Get access control elements

Specified by:
getAccessControlElements in interface Item
Overrides:
getAccessControlElements in class AbstractItem
Returns:
List of Access Control elements
Throws:
java.lang.Exception

getPermissionForNonPermissionACL

public java.lang.String getPermissionForNonPermissionACL()
Get top permission id for getting the non permission access control elements.

Returns:
Top permission id used to filter default permissions.

getNonPermissionAccessControlElements

public java.util.Collection<AbstractAce> getNonPermissionAccessControlElements()
Get access control elements without including permission level permissions.

NOTE: The existence of instance level permissions granted to principals which have been already deleted is quite possible and expected.

Overrides:
getNonPermissionAccessControlElements in class AbstractItem
Returns:
List of Access Control elements
Throws:
java.lang.Exception

getCurrentUserPermissionItem

public InstanceLevelPermissionItem getCurrentUserPermissionItem()
                                                         throws java.lang.Exception
Description copied from class: AbstractItem
Get currently logged-in user privilege over this item, wrapped as a InstanceLevelPermissionItem.

Specified by:
getCurrentUserPermissionItem in interface Item
Overrides:
getCurrentUserPermissionItem in class AbstractItem
Returns:
InstanceLevelPermissionItem or null.
Throws:
java.lang.Exception

setAccessControlElements

public void setAccessControlElements(java.util.Collection<? extends AbstractAce> accessControlElements)
                              throws java.lang.Exception
Set access control elements

Specified by:
setAccessControlElements in interface Item
Overrides:
setAccessControlElements in class AbstractItem
Parameters:
accessControlElements - List of Access Control elements
Throws:
java.lang.Exception

setAccessControlElements

public void setAccessControlElements(javax.xml.registry.infomodel.RegistryObject registryObject)
                              throws java.lang.Exception
Set access control elements

Parameters:
accessControlElements - List of Access Control elements
Throws:
java.lang.Exception

getPrivilegeDescriptor

public PrivilegeDescriptor getPrivilegeDescriptor()
Specified by:
getPrivilegeDescriptor in interface Item
Overrides:
getPrivilegeDescriptor in class AbstractItem
Returns:
returns the privilage descritptor interface

isPredefined

public boolean isPredefined()
Is the registry object behind this item Predefined


isModified

public boolean isModified()
Is the registry object behind this item modified

Specified by:
isModified in interface Item
Overrides:
isModified in class AbstractItem
Returns:
true if modified, false if not modified

clearCache

public void clearCache()
Clear cache used for items of this type

Specified by:
clearCache in interface Item
Overrides:
clearCache in class AbstractItem

save

public void save(ActionContext actionContext)
          throws java.lang.Exception
Description copied from class: AbstractItem
Save Item

Specified by:
save in interface Item
Overrides:
save in class AbstractItem
Throws:
java.lang.Exception

isStandalone

public boolean isStandalone()
Check if Registry object is Standalone or embedded

Overrides:
isStandalone in class AbstractItem
Returns:
true iff objects of this type are standalone, i.e. not stored as embedded objects.

addAuditComment

public void addAuditComment(java.lang.String comment)
                     throws java.lang.Exception
Add audit comments

Parameters:
comment -
Throws:
java.lang.Exception

getLabel

public java.lang.String getLabel()
                          throws java.lang.Exception
Obtain label to be used when representing this object e.g. within association navigator

Returns:
the label - must be localized as far as applicable
Throws:
java.lang.Exception

getTooltip

public java.lang.String getTooltip()
                            throws java.lang.Exception
Obtain tooltip to be used when representing this object e.g. within association navigator

Returns:
the tooltip - must be localized as far as applicable
Throws:
java.lang.Exception

freeze

public RegistryObjectItem freeze()

hasObjectType

public static boolean hasObjectType(Item item,
                                    java.lang.String objectTypeName)
Test whether given item is a RegistryObjectItem with given object type

Parameters:
item -
objectTypeName -
Returns:
true if item has object type

hasObjectType

public static boolean hasObjectType(RegistryObjectItem roi,
                                    java.lang.String objectTypeName)
Test whether given item is a RegistryObjectItem with given object type

Parameters:
roi -
objectTypeName -
Returns:
true if item has object type

hasObjectType

public static boolean hasObjectType(javax.xml.registry.infomodel.RegistryObject registryObject,
                                    java.lang.String objectTypeName)
Test whether given RegistryObject is a RegistryObjectItem with given object type

Parameters:
registryObject -
objectTypeName -
Returns:
true if item has object type

setCollectVirtualServiceAssociatedObjects

public void setCollectVirtualServiceAssociatedObjects(java.util.Collection<javax.xml.registry.infomodel.RegistryObject> collectVirtualServiceAssociatedObjects)

getCollectVirtualServiceAssociatedObjects

public java.util.Collection<javax.xml.registry.infomodel.RegistryObject> getCollectVirtualServiceAssociatedObjects()

getCollectRestServiceAssociatedObjects

public java.util.Collection<java.lang.String> getCollectRestServiceAssociatedObjects()

setCollectRestServiceAssociatedObjects

public void setCollectRestServiceAssociatedObjects(java.util.Collection<java.lang.String> collectRestServiceAssociatedObjects)