|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.nucleus.logging.VariableArgumentApplicationLoggingImpl atg.nucleus.GenericService atg.adapter.secure.GenericSecuredRepository atg.adapter.secure.GenericSecuredMutableRepository
public class GenericSecuredMutableRepository
An implementation of SecureMutableRepository that wraps a normal MutableRepository, using properties of its items to store access control information as formatted strings. This is a very basic system whose primary purpose is flexibility rather than performance, although some effort has been given towards providing acceptable performance.
This implementation is not intended to provide absolute security, but rather to allow an application the ability to provide security features without having to implement its own access checking.
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
|
protected atg.adapter.secure.WeakItemCache |
mMutableItemCache
A cache of secured repository items indexed by the repository item. |
Fields inherited from class atg.adapter.secure.GenericSecuredRepository |
---|
mItemCache, mRepository, mSecurityConfiguration, mTransactionManager |
Fields inherited from class atg.nucleus.GenericService |
---|
SERVICE_INFO_KEY |
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging |
---|
DEFAULT_LOG_TRACE_STATUS |
Fields inherited from interface atg.nucleus.logging.ApplicationLogging |
---|
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS |
Constructor Summary | |
---|---|
GenericSecuredMutableRepository()
|
Method Summary | |
---|---|
RepositoryItem |
addItem(MutableRepositoryItem pItem)
Adds the supplied item populated to the repository. |
RepositoryItem |
addItem(RepositoryItem pItem,
java.lang.String pDescriptorName)
Deprecated. |
MutableRepositoryItem |
createItem(java.lang.String pDescriptorName)
Returns a new item using an auto-generated unique id. |
MutableRepositoryItem |
createItem(java.lang.String pId,
java.lang.String pDescriptorName)
Returns a new item populated with the supplied id. |
MutableRepositoryItem[] |
filterMutableItems(MutableRepositoryItem[] pItems,
AccessRight pRight)
Filters out any repository items returned from a query that the user should not be able to access in the indicated mode. |
MutableRepositoryItem |
getItemForUpdate(java.lang.String pId)
Deprecated. |
MutableRepositoryItem |
getItemForUpdate(java.lang.String pId,
java.lang.String pDescriptorName)
If one wants write access to an item it should be retrieved through this method. |
MutableRepositoryItem[] |
getItemsForUpdate(java.lang.String[] pIds)
If one wants write access to a set of items they should be retrieved through this method. |
MutableRepositoryItem[] |
getItemsForUpdate(java.lang.String[] pIds,
java.lang.String pDescriptorName)
If one wants write access to a set of items they should be retrieved through this method. |
void |
removeItem(java.lang.String pId)
Deprecated. |
void |
removeItem(java.lang.String pId,
java.lang.String pDescriptorName)
Removes an item from the Repository permanently. |
void |
setRepository(Repository pRepository)
Makes a copy of the repository reference as a mutable repository. |
void |
updateItem(MutableRepositoryItem pItem)
Updates the item's values into the Repository. |
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl |
---|
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface atg.repository.SecuredRepository |
---|
getSecurityConfiguration, getSecurityPolicy |
Methods inherited from interface atg.repository.Repository |
---|
getDefaultViewName, getItem, getItem, getItemDescriptor, getItemDescriptor, getItemDescriptorNames, getItems, getItems, getRepositoryName, getView, getView, getViewNames |
Field Detail |
---|
public static java.lang.String CLASS_VERSION
protected atg.adapter.secure.WeakItemCache mMutableItemCache
Constructor Detail |
---|
public GenericSecuredMutableRepository()
Method Detail |
---|
public MutableRepositoryItem[] filterMutableItems(MutableRepositoryItem[] pItems, AccessRight pRight)
public void setRepository(Repository pRepository)
setRepository
in class GenericSecuredRepository
public MutableRepositoryItem getItemForUpdate(java.lang.String pId) throws RepositoryException
getItemForUpdate
in interface MutableRepository
pId
- the id of the item to update.
RepositoryException
- if the item could be retreived for updatespublic MutableRepositoryItem getItemForUpdate(java.lang.String pId, java.lang.String pDescriptorName) throws RepositoryException
getItemForUpdate
in interface MutableRepository
pId
- the id of the item to update.pDescriptorName
- the name of the type of item to update.
RepositoryException
- if the item could be retreived for updatespublic MutableRepositoryItem[] getItemsForUpdate(java.lang.String[] pIds) throws RepositoryException
The caller must have LIST access on each item that is requested or that item's slot will be set to null following this query. Note that the ability to actually update the item will be controlled by the item itself and by the item descriptor when the actual call to updateItem() is attempted.
getItemsForUpdate
in interface MutableRepository
RepositoryException
- if the item could be retreived for updatespublic MutableRepositoryItem[] getItemsForUpdate(java.lang.String[] pIds, java.lang.String pDescriptorName) throws RepositoryException
The caller must have LIST access on each item that is requested or that item's slot will be set to null following this query. Note that the ability to actually update the item will be controlled by the item itself and by the item descriptor when the actual call to updateItem() is attempted.
getItemsForUpdate
in interface MutableRepository
pIds
- the list of ids of items to retrieve for updatepDescriptorName
- the name of the item descriptor that contains
these items.
RepositoryException
- if the item could be retreived for updatespublic MutableRepositoryItem createItem(java.lang.String pDescriptorName) throws RepositoryException
The caller must have CREATE access on the item descriptor for this operation to succeed.
createItem
in interface MutableRepository
pDescriptorName
- the name of the RepositoryItemDescriptor
which should be used as the "template" to create the item
RepositoryException
- if the item could not be createdpublic MutableRepositoryItem createItem(java.lang.String pId, java.lang.String pDescriptorName) throws RepositoryException
The new item is not added to the repository; addItem
must be called in order to change the repository.
The caller must have CREATE access on the item descriptor for this operation to succeed.
createItem
in interface MutableRepository
pId
- the id to use in an attempt to create the RepositoryItempDescriptorName
- the name of the RepositoryItemDescriptor
which should be used as the "template" to create the item
RepositoryException
- if the item could not be created
DuplicateIdException
- if the id is already in usepublic RepositoryItem addItem(RepositoryItem pItem, java.lang.String pDescriptorName) throws RepositoryException
The caller must have WRITE access on the item descriptor for this operation to succeed. Note that the attempt to create a new item would already have failed if the caller did not have CREATE access.
addItem
in interface MutableRepository
pItem
- the item to addpDescriptorName
- the name of the RepositoryItemDescriptor
which should be used as the "template" to add the item
RepositoryException
- if the item could not be addedpublic RepositoryItem addItem(MutableRepositoryItem pItem) throws RepositoryException
The caller must have WRITE access on the item descriptor for this operation to succeed. Note that the attempt to create a new item would already have failed if the caller did not have CREATE access.
addItem
in interface MutableRepository
pItem
- the item to add
RepositoryException
- if the item could not be addedpublic void updateItem(MutableRepositoryItem pItem) throws RepositoryException
As of version 5.5p1, the caller need not have any special permission to call this method. Modification access is expected to be controlled by either the per-item ACL or the default ACL provided by the item descriptor.
updateItem
in interface MutableRepository
pItem
- the item to update
RepositoryException
- if the item could not be updated
ConcurrentUpdateException
- if the item has been changed in
another transaction since this transaction started using this item.public void removeItem(java.lang.String pId) throws RepositoryException
The caller must have both DELETE access on the item descriptor and DESTROY access on the item for this operation to succeed.
removeItem
in interface MutableRepository
pItem
- the item to remove
RepositoryException
- if the item could not be deletedpublic void removeItem(java.lang.String pId, java.lang.String pDescriptorName) throws RepositoryException
The caller must have both DELETE access on the item descriptor and DESTROY access on the item for this operation to succeed.
removeItem
in interface MutableRepository
pItem
- the item to removepDescriptorName
- the name of the item descriptor that contains
this item.
RepositoryException
- if the item could not be deleted
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |