public class RMCaveatConfigComponentImpl extends Object implements org.alfresco.repo.content.ContentServicePolicies.OnContentUpdatePolicy, org.alfresco.repo.node.NodeServicePolicies.BeforeDeleteNodePolicy, org.alfresco.repo.node.NodeServicePolicies.OnCreateNodePolicy, RMCaveatConfigComponent
QNAME| Constructor and Description |
|---|
RMCaveatConfigComponentImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
addRMConstraint(String listName)
Add RM constraint
|
void |
addRMConstraintListValue(String listName,
String authorityName,
String value)
Add a single value to an authority in a list.
|
void |
beforeDeleteNode(org.alfresco.service.cmr.repository.NodeRef nodeRef) |
void |
deleteRMConstraint(String listName)
Delete RM Constraint
|
Map<String,List<String>> |
getListDetails(String listName)
Get the member details of the specified list
|
List<String> |
getRMAllowedValues(String constraintName)
Get allowed values for given caveat list (for current user)
|
List<org.alfresco.service.namespace.QName> |
getRMCaveatModels()
Get custom caveat models
|
RMConstraintInfo |
getRMConstraint(org.alfresco.service.namespace.QName listQName)
Get an RMConstraintInfo
|
RMConstraintInfo |
getRMConstraint(String listName)
Get RM Constraint detail.
|
Collection<String> |
getRMConstraintNames() |
boolean |
hasAccess(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Check whether access to 'record component' node is vetoed for current user due to caveat(s)
|
void |
init()
Initialise behaviours and caveat config cache
|
void |
onContentUpdate(org.alfresco.service.cmr.repository.NodeRef nodeRef,
boolean newContent) |
void |
onCreateNode(org.alfresco.service.cmr.repository.ChildAssociationRef childAssocRef) |
void |
removeRMConstraintListAuthority(String listName,
String authorityName)
Remove an authority from a list
|
void |
removeRMConstraintListValue(String listName,
String valueName)
Remove RM constraint value (all authorities)
|
void |
setAuthorityService(org.alfresco.service.cmr.security.AuthorityService authorityService) |
void |
setCaveatAspects(List<String> caveatAspectNames) |
void |
setCaveatConfig(org.alfresco.repo.cache.SimpleCache<String,Map<String,List<String>>> caveatConfig) |
void |
setCaveatModels(List<String> caveatModelNames) |
void |
setContentService(org.alfresco.service.cmr.repository.ContentService contentService) |
void |
setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService) |
void |
setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService) |
void |
setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService) |
void |
setPersonService(org.alfresco.service.cmr.security.PersonService personService) |
void |
setStoreRef(String storeRef) |
org.alfresco.service.cmr.repository.NodeRef |
updateOrCreateCaveatConfig(File jsonFile) |
org.alfresco.service.cmr.repository.NodeRef |
updateOrCreateCaveatConfig(InputStream is) |
org.alfresco.service.cmr.repository.NodeRef |
updateOrCreateCaveatConfig(String jsonString) |
void |
updateRMConstraintListAuthority(String listName,
String authorityName,
List<String> values)
Replace the values for an authority in a list.
|
void |
updateRMConstraintListValue(String listName,
String valueName,
List<String> authorities)
Replace the authorities for a value in a list
|
protected void |
validateAndReset(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Validate the caveat config and optionally update the cache.
|
public void setCaveatConfig(org.alfresco.repo.cache.SimpleCache<String,Map<String,List<String>>> caveatConfig)
public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
public void setContentService(org.alfresco.service.cmr.repository.ContentService contentService)
public void setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
public void setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService)
public void setAuthorityService(org.alfresco.service.cmr.security.AuthorityService authorityService)
public void setPersonService(org.alfresco.service.cmr.security.PersonService personService)
public void setStoreRef(String storeRef)
public void init()
init in interface RMCaveatConfigComponentpublic void onContentUpdate(org.alfresco.service.cmr.repository.NodeRef nodeRef,
boolean newContent)
onContentUpdate in interface org.alfresco.repo.content.ContentServicePolicies.OnContentUpdatePolicyRM-2770 - this method has to be fired on transaction commit to be able to validate the content when the content store is encryptedpublic void beforeDeleteNode(org.alfresco.service.cmr.repository.NodeRef nodeRef)
beforeDeleteNode in interface org.alfresco.repo.node.NodeServicePolicies.BeforeDeleteNodePolicyNodeServicePolicies.BeforeDeleteNodePolicy.beforeDeleteNode(org.alfresco.service.cmr.repository.NodeRef)public void onCreateNode(org.alfresco.service.cmr.repository.ChildAssociationRef childAssocRef)
onCreateNode in interface org.alfresco.repo.node.NodeServicePolicies.OnCreateNodePolicyNodeServicePolicies.OnCreateNodePolicy.onCreateNode(org.alfresco.service.cmr.repository.ChildAssociationRef)protected void validateAndReset(org.alfresco.service.cmr.repository.NodeRef nodeRef)
nodeRef - The nodeRef of the configupdateCache - Set to true to update the cachepublic org.alfresco.service.cmr.repository.NodeRef updateOrCreateCaveatConfig(InputStream is)
updateOrCreateCaveatConfig in interface RMCaveatConfigComponentpublic org.alfresco.service.cmr.repository.NodeRef updateOrCreateCaveatConfig(File jsonFile)
updateOrCreateCaveatConfig in interface RMCaveatConfigComponentpublic org.alfresco.service.cmr.repository.NodeRef updateOrCreateCaveatConfig(String jsonString)
updateOrCreateCaveatConfig in interface RMCaveatConfigComponentpublic Collection<String> getRMConstraintNames()
public List<String> getRMAllowedValues(String constraintName)
RMCaveatConfigComponentgetRMAllowedValues in interface RMCaveatConfigComponentpublic boolean hasAccess(org.alfresco.service.cmr.repository.NodeRef nodeRef)
hasAccess in interface RMCaveatConfigComponentnodeRef - public void addRMConstraintListValue(String listName, String authorityName, String value)
addRMConstraintListValue in interface RMCaveatConfigComponentlistName - the name of the RMConstraintListauthorityName - value - org.alfresco.error.AlfrescoRuntimeException - if either the list or the authority do not already exist.public Map<String,List<String>> getListDetails(String listName)
getListDetails in interface RMCaveatConfigComponentlistName - public List<org.alfresco.service.namespace.QName> getRMCaveatModels()
RMCaveatConfigComponentgetRMCaveatModels in interface RMCaveatConfigComponentpublic void updateRMConstraintListAuthority(String listName, String authorityName, List<String> values)
updateRMConstraintListAuthority in interface RMCaveatConfigComponentlistName - the name of the RMConstraintListauthorityName - values - public void updateRMConstraintListValue(String listName, String valueName, List<String> authorities)
updateRMConstraintListValue in interface RMCaveatConfigComponentlistName - valueName - authorities - public void removeRMConstraintListValue(String listName, String valueName)
RMCaveatConfigComponentremoveRMConstraintListValue in interface RMCaveatConfigComponentpublic void removeRMConstraintListAuthority(String listName, String authorityName)
removeRMConstraintListAuthority in interface RMCaveatConfigComponentlistName - the name of the RMConstraintListauthorityName - values - public RMConstraintInfo getRMConstraint(org.alfresco.service.namespace.QName listQName)
listQName - public RMConstraintInfo getRMConstraint(String listName)
getRMConstraint in interface RMCaveatConfigComponentlistName - the name of the RMConstraintListpublic void deleteRMConstraint(String listName)
RMCaveatConfigComponentdeleteRMConstraint in interface RMCaveatConfigComponentlistName - the name of the RMConstraintListpublic void addRMConstraint(String listName)
RMCaveatConfigComponentaddRMConstraint in interface RMCaveatConfigComponentCopyright © 2005–2018 Alfresco Software. All rights reserved.