com.centrasite.control
Class AbstractItem

java.lang.Object
  extended by com.centrasite.control.AbstractItem
All Implemented Interfaces:
Item
Direct Known Subclasses:
AbstractAce, AbstractLogItem, AbstractRoleItem, AssertionLogItem, CentraSiteGroupItem, CentraSitePermissionItem, CentraSiteRoleItem, CentraSiteUserItem, FilenameInfoItem, NotificationItem, PolicyLogItem, ReferenceItem, RegistryObjectItem, RegistryObjectProxyItem, RegistryRootItem, RepositoryFileProxyItem, RepositoryObjectItem, SavedSearchItem, SysDefCentraSiteTypeDescItem, TraceItem, URLItem, UserDefinedPropertyItem

public abstract class AbstractItem
extends java.lang.Object
implements Item

Abstract base class of all items showing up in trees or tables


Field Summary
static java.lang.String rcs_id
           
 
Constructor Summary
AbstractItem(Connector connector)
           
 
Method Summary
 void addBulkCommand(com.softwareag.cis.plugin.command.Command cmd)
           
 void addCommand(com.softwareag.cis.plugin.command.Command cmd)
           
 void addDetailViewTab(DetailViewTab tab)
           
 boolean cannotHaveChildren()
          Check whether this node may have children
 void clearCache()
          Clear cache used for items of this type
 void clearProperties()
           
 java.util.Collection<? extends AbstractAce> getAccessControlElements()
          Get access control elements
 java.util.List getBulkCommands()
          Get list of Bulk Action commands available for the current object
 com.softwareag.cis.plugin.command.Command getCommand(java.lang.Class cmdClass)
          Obtain command object implemented by given command class
static com.softwareag.cis.plugin.command.Command getCommand(Item item, java.lang.Class cmdClass)
          Obtain command object implemented by given command class
 java.util.List getCommands()
          Get list of commands available for the current object
 Connector getConnector()
          Get Connector
<T extends AbstractAce>
T
getCurrentUserPermissionItem()
          Get currently logged-in user privilege over this item, wrapped as a InstanceLevelPermissionItem.
 com.softwareag.cis.plugin.command.Command getDefaultCommand()
           
 com.softwareag.cis.plugin.command.Command getDetailsCommand()
           
 java.util.List getDetailViewTabs()
          Obtain List of DetailViewTab objects for this Item (INM 2027)
 Item getItem()
          Returns the Item
 java.lang.String getKey()
          Obtain a unique key for class of icons
 java.util.Locale getLanguage()
          Get Language
 java.util.Locale getLocale()
          Get Locale
 java.lang.String getNameEx()
          Get "extended/alternate name".
 java.util.Collection<? extends AbstractAce> getNonPermissionAccessControlElements()
           
 java.lang.String getPath()
          For some object types (especially for RepositoryObjectItems) this method may return a reasonable path - instances of other classes should return null
 java.util.Locale getPersistanceLocale()
           
 PrivilegeDescriptor getPrivilegeDescriptor()
           
 java.util.ArrayList getProperties()
           
 java.util.List<Item> getRelatedItems()
           
 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!
 boolean hasRequiredAttribute()
           
 boolean isLocked()
           
 boolean isModified()
          Check whether this Item is modified vs. its corresponding persistent version
 boolean isReadOnly()
           
 boolean isStandalone()
          Majorly useful for RegistryObject to check if they are embedded of stand alone
 boolean isSubTabModified()
           
 void removeCommand(java.lang.String commandClassName)
          remove command from the command list.
 void replaceCommand(java.lang.String commandClassName, AbstractCommandExt command)
           
 void save(ActionContext actionContext)
          Save Item
 void setAccessControlElements(java.util.Collection<? extends AbstractAce> accessControlElements)
          Set access control elements
 void setCommandEnabled(java.lang.Class cmdClass, boolean enabled)
           
 void setConnector(Connector connector)
           
 void setDefaultCommand(AbstractCommandExt defaultCommand)
           
 void setDetailsCommand(com.softwareag.cis.plugin.command.Command detailsCommand)
           
 void setLocked(boolean locked)
           
 void setProperties(java.util.ArrayList properties)
           
 void setRelatedItems(java.util.List<Item> relatedItems)
           
 void setRequiredAttribute(boolean hasRequiredAttribute)
           
 void setTabModified(boolean isSubTabModified)
           
 void showDetailView(ActionContext actionContext)
          Show the details for this item
 void showReport(ActionContext actionContext)
          Show a report for this item.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.centrasite.control.Item
getChildren, getChildren, getDescription, getImageURL, getName, hasNoChildren
 

Field Detail

rcs_id

public static final java.lang.String rcs_id
See Also:
Constant Field Values
Constructor Detail

AbstractItem

public AbstractItem(Connector connector)
Method Detail

setDetailsCommand

public void setDetailsCommand(com.softwareag.cis.plugin.command.Command detailsCommand)

getDetailsCommand

public com.softwareag.cis.plugin.command.Command getDetailsCommand()
Specified by:
getDetailsCommand in interface Item
Returns:
Returns the Command that opens the Details

getKey

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

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

getCommands

public java.util.List getCommands()
Get list of commands available for the current object

Specified by:
getCommands in interface Item
Returns:
the list of commands

getBulkCommands

public java.util.List getBulkCommands()
Get list of Bulk Action commands available for the current object

Specified by:
getBulkCommands in interface Item
Returns:
the list of commands

addBulkCommand

public void addBulkCommand(com.softwareag.cis.plugin.command.Command cmd)

addCommand

public void addCommand(com.softwareag.cis.plugin.command.Command cmd)

replaceCommand

public void replaceCommand(java.lang.String commandClassName,
                           AbstractCommandExt command)

removeCommand

public void removeCommand(java.lang.String commandClassName)
remove command from the command list. Used for Suppress command extension

Parameters:
commandClassName - Command Class Name

getCommand

public com.softwareag.cis.plugin.command.Command getCommand(java.lang.Class cmdClass)
Obtain command object implemented by given command class

Parameters:
cmdClass -
Returns:
the command or null, if command not available for this item

getCommand

public static com.softwareag.cis.plugin.command.Command getCommand(Item item,
                                                                   java.lang.Class cmdClass)
Obtain command object implemented by given command class

Parameters:
item - Item whose commands are to be examined
cmdClass -
Returns:
the command or null, if command not available for given item

setCommandEnabled

public void setCommandEnabled(java.lang.Class cmdClass,
                              boolean enabled)

getDetailViewTabs

public java.util.List getDetailViewTabs()
Obtain List of DetailViewTab objects for this Item (INM 2027)

Specified by:
getDetailViewTabs in interface Item
Returns:
the list of DetailViewTab objects

addDetailViewTab

public void addDetailViewTab(DetailViewTab tab)

getReport

public ReportInterface getReport()
Get report to be used when selecting given object in tree.

Specified by:
getReport in interface Item

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

showReport

public void showReport(ActionContext actionContext)
Show a report for this item. Whereas showDetailView() displays the details of this item, showReport() should display tables of "child" objects being contained in or classified with this item.

Specified by:
showReport in interface Item
Parameters:
actionContext -

cannotHaveChildren

public boolean cannotHaveChildren()
Check whether this node may have children

Specified by:
cannotHaveChildren in interface Item
Returns:
true if this node cannot have children

toString

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

showDetailView

public void showDetailView(ActionContext actionContext)
Show the details for this item

Specified by:
showDetailView in interface Item
Parameters:
actionContext -

getProperties

public java.util.ArrayList getProperties()
                                  throws java.lang.Exception
Throws:
java.lang.Exception

setProperties

public void setProperties(java.util.ArrayList properties)
                   throws java.lang.Exception
Throws:
java.lang.Exception

clearProperties

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

getAccessControlElements

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

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

getCurrentUserPermissionItem

public <T extends AbstractAce> T getCurrentUserPermissionItem()
                                                   throws java.lang.Exception
Get currently logged-in user privilege over this item, wrapped as a InstanceLevelPermissionItem.

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

getNonPermissionAccessControlElements

public java.util.Collection<? extends AbstractAce> getNonPermissionAccessControlElements()

setAccessControlElements

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

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

getPrivilegeDescriptor

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

isModified

public boolean isModified()
Description copied from interface: Item
Check whether this Item is modified vs. its corresponding persistent version

Specified by:
isModified in interface Item
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

setDefaultCommand

public void setDefaultCommand(AbstractCommandExt defaultCommand)
Parameters:
defaultCommand - The defaultCommand to set.

getDefaultCommand

public com.softwareag.cis.plugin.command.Command getDefaultCommand()
Specified by:
getDefaultCommand in interface Item
Returns:
Returns the defaultCommand.

getItem

public Item getItem()
Description copied from interface: Item
Returns the Item

Specified by:
getItem in interface Item
Returns:
Returns the item.

save

public void save(ActionContext actionContext)
          throws java.lang.Exception
Save Item

Specified by:
save in interface Item
Parameters:
actionContext -
Throws:
java.lang.Exception

isStandalone

public boolean isStandalone()
                     throws java.lang.Exception
Majorly useful for RegistryObject to check if they are embedded of stand alone

Throws:
java.lang.Exception

getConnector

public Connector getConnector()
Description copied from interface: Item
Get Connector

Specified by:
getConnector in interface Item
Returns:
the Connector referenced by this Item

setConnector

public void setConnector(Connector connector)

getLocale

public java.util.Locale getLocale()
Description copied from interface: Item
Get Locale

Specified by:
getLocale in interface Item
Returns:
the Locale used for this Item

getPersistanceLocale

public java.util.Locale getPersistanceLocale()

getLanguage

public java.util.Locale getLanguage()
Description copied from interface: Item
Get Language

Specified by:
getLanguage in interface Item
Returns:
the language used for this Item

isReadOnly

public boolean isReadOnly()
Specified by:
isReadOnly in interface Item

setLocked

public void setLocked(boolean locked)
Specified by:
setLocked in interface Item

isLocked

public boolean isLocked()
Specified by:
isLocked in interface Item

getNameEx

public java.lang.String getNameEx()
                           throws java.lang.Exception
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
Throws:
java.lang.Exception

getPath

public java.lang.String getPath()
                         throws java.lang.Exception
For some object types (especially for RepositoryObjectItems) this method may return a reasonable path - instances of other classes should return null

Specified by:
getPath in interface Item
Returns:
a path (if reasonable) or null
Throws:
java.lang.Exception

setTabModified

public void setTabModified(boolean isSubTabModified)
Specified by:
setTabModified in interface Item

isSubTabModified

public boolean isSubTabModified()
Specified by:
isSubTabModified in interface Item

hasRequiredAttribute

public boolean hasRequiredAttribute()
Specified by:
hasRequiredAttribute in interface Item

setRequiredAttribute

public void setRequiredAttribute(boolean hasRequiredAttribute)
Specified by:
setRequiredAttribute in interface Item

setRelatedItems

public void setRelatedItems(java.util.List<Item> relatedItems)
Specified by:
setRelatedItems in interface Item

getRelatedItems

public java.util.List<Item> getRelatedItems()
Specified by:
getRelatedItems in interface Item