Class ResourceGuardFactory
java.lang.Object
ch.tocco.nice2.dms.impl.security.guard.AbstractEntityDocsGuardFactory
ch.tocco.nice2.dms.impl.security.guard.ResourceGuardFactory
- All Implemented Interfaces:
GuardFactory
- Direct Known Subclasses:
ConceptionResourceGuardFactory
GuardFactory
for entity document resources (Resource entities which are attached to another entity (or field)).
There are no ACL rules for these entities. In general, if a user may read or write the related entity (and field) he can
also read or write (and delete) the attached resource.
Some additional conditions are checked as well (like mail_box).
This handles both entities and EntityPath
of entitydoc resources.-
Nested Class Summary
Nested classes/interfaces inherited from class ch.tocco.nice2.dms.impl.security.guard.AbstractEntityDocsGuardFactory
AbstractEntityDocsGuardFactory.AbstractEntityDocsGuard
-
Field Summary
Fields inherited from class ch.tocco.nice2.dms.impl.security.guard.AbstractEntityDocsGuardFactory
businessUnitManager, dataModel, persistenceService, securityManager
-
Constructor Summary
ConstructorDescriptionResourceGuardFactory
(org.slf4j.Logger logger, SecurityManager securityManager, BusinessUnitManager businessUnitManager, DataModel dataModel, PersistenceService persistenceService) -
Method Summary
Modifier and TypeMethodDescriptioncreateGuard
(List<?> secured, GuardContext guardContext) protected ResourceGuardFactory.ResourcesData
getResourceData
(List<EntityReference> resources) protected List
<EntityReference> supportedEntities
(List<EntityReference> entityReferences) Methods inherited from class ch.tocco.nice2.dms.impl.security.guard.AbstractEntityDocsGuardFactory
getEntitiesFromSecuredObjects, getPrivilegedInvoker, isMailBoxFolder, loadRelatedEntityKeys, priority, supports
-
Constructor Details
-
ResourceGuardFactory
public ResourceGuardFactory(org.slf4j.Logger logger, SecurityManager securityManager, BusinessUnitManager businessUnitManager, DataModel dataModel, PersistenceService persistenceService)
-
-
Method Details
-
supportedEntities
- Specified by:
supportedEntities
in classAbstractEntityDocsGuardFactory
- Returns:
- the number of given
EntityReference
that are supported by this guard.
-
createGuard
- Returns:
- a
Guard
for the given secured object
-
getResourceData
-