Class RMCaveatConfigServiceImpl
java.lang.Object
org.alfresco.module.org_alfresco_module_rm.caveat.RMCaveatConfigServiceImpl
- All Implemented Interfaces:
RMCaveatConfigService
RM Caveat Config Service impl
- Author:
- janv
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddRMConstraint
(String listName, String title, String[] values) add RM constraint listaddRMConstraint
(String listName, String title, String[] values, RMListOfValuesConstraint.MatchLogic matchLogic) void
addRMConstraintListValue
(String listName, String authorityName, String value) Add a single value to an authority in a list.void
deleteRMConstraint
(String listName) delete RM Constraint ListGet all Constraint ListsgetListDetails
(String listName) Get the details of the specified listgetRMAllowedValues
(String constraintName) Get allowed values for given caveat list (for current user)getRMConstraint
(String listName) Get RM Constraint detail.getRMConstraint
(QName listQName) Get an RMConstraintInfoboolean
Check whether access to 'record component' node is vetoed for current user due to caveat(s)void
init()
void
removeRMConstraintListAuthority
(String listName, String authorityName) Remove an authority from a listvoid
removeRMConstraintListValue
(String listName, String valueName) Remove a value from a list and cascade delete.void
setCaveatConfigComponent
(RMCaveatConfigComponent rmCaveatConfigComponent) void
setDictionaryService
(DictionaryService dictionaryService) void
setNamespaceService
(NamespaceService namespaceService) void
setRecordsManagementAdminService
(RecordsManagementAdminService recordsManagementAdminService) updateOrCreateCaveatConfig
(File jsonFile) updateOrCreateCaveatConfig
(String jsonString) updateRMConstraintAllowedValues
(String listName, String[] allowedValues) Update The allowed values for an RM Constraint.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 listupdateRMConstraintTitle
(String listName, String newTitle) Update the title of this RM Constraint.
-
Constructor Details
-
RMCaveatConfigServiceImpl
public RMCaveatConfigServiceImpl()
-
-
Method Details
-
setNamespaceService
-
setDictionaryService
-
setCaveatConfigComponent
-
setRecordsManagementAdminService
public void setRecordsManagementAdminService(RecordsManagementAdminService recordsManagementAdminService) -
getRecordsManagementAdminService
-
init
public void init()- Specified by:
init
in interfaceRMCaveatConfigService
-
updateOrCreateCaveatConfig
- Specified by:
updateOrCreateCaveatConfig
in interfaceRMCaveatConfigService
-
updateOrCreateCaveatConfig
- Specified by:
updateOrCreateCaveatConfig
in interfaceRMCaveatConfigService
-
updateOrCreateCaveatConfig
- Specified by:
updateOrCreateCaveatConfig
in interfaceRMCaveatConfigService
-
getRMAllowedValues
Description copied from interface:RMCaveatConfigService
Get allowed values for given caveat list (for current user)- Specified by:
getRMAllowedValues
in interfaceRMCaveatConfigService
- Returns:
-
hasAccess
Check whether access to 'record component' node is vetoed for current user due to caveat(s)- Specified by:
hasAccess
in interfaceRMCaveatConfigService
- Parameters:
nodeRef
-- Returns:
- false, if caveat(s) veto access otherwise return true
-
addRMConstraint
add RM constraint list- Specified by:
addRMConstraint
in interfaceRMCaveatConfigService
- Parameters:
listName
- the name of the RMConstraintList
-
addRMConstraint
public RMConstraintInfo addRMConstraint(String listName, String title, String[] values, RMListOfValuesConstraint.MatchLogic matchLogic) -
deleteRMConstraint
delete RM Constraint List- Specified by:
deleteRMConstraint
in interfaceRMCaveatConfigService
- Parameters:
listName
- the name of the RMConstraintList
-
addRMConstraintListValue
Add a single value to an authority in a list. The existing values of the list remain.- Specified by:
addRMConstraintListValue
in interfaceRMCaveatConfigService
- Parameters:
listName
- the name of the RMConstraintListauthorityName
-value
-- Throws:
org.alfresco.error.AlfrescoRuntimeException
- if either the list or the authority do not already exist.
-
getListDetails
Get the details of the specified list- Specified by:
getListDetails
in interfaceRMCaveatConfigService
- Parameters:
listName
-- Returns:
- the details of the specified list
-
updateRMConstraintListAuthority
public void updateRMConstraintListAuthority(String listName, String authorityName, List<String> values) Replace the values for an authority in a list. The existing values are removed. If the authority does not already exist in the list, it will be added- Specified by:
updateRMConstraintListAuthority
in interfaceRMCaveatConfigService
- Parameters:
listName
- the name of the RMConstraintListauthorityName
-values
-
-
updateRMConstraintListValue
public void updateRMConstraintListValue(String listName, String valueName, List<String> authorities) Replace the authorities for a value in a list- Specified by:
updateRMConstraintListValue
in interfaceRMCaveatConfigService
- Parameters:
listName
-valueName
-authorities
-
-
removeRMConstraintListAuthority
Remove an authority from a list- Specified by:
removeRMConstraintListAuthority
in interfaceRMCaveatConfigService
- Parameters:
listName
- the name of the RMConstraintListauthorityName
-
-
getAllRMConstraints
Get all Constraint Lists- Specified by:
getAllRMConstraints
in interfaceRMCaveatConfigService
-
getRMConstraint
Get an RMConstraintInfo- Parameters:
listQName
-- Returns:
- the constraint or null if it does not exist
-
getRMConstraint
Get RM Constraint detail.- Specified by:
getRMConstraint
in interfaceRMCaveatConfigService
- Returns:
- the constraintInfo or null
-
updateRMConstraintAllowedValues
Update The allowed values for an RM Constraint.- Specified by:
updateRMConstraintAllowedValues
in interfaceRMCaveatConfigService
- Parameters:
listName
- The name of the list.allowedValues
- the new alowed values
-
removeRMConstraintListValue
Remove a value from a list and cascade delete.- Specified by:
removeRMConstraintListValue
in interfaceRMCaveatConfigService
- Parameters:
listName
- the name of the RMConstraintList
-
updateRMConstraintTitle
Update the title of this RM Constraint.- Specified by:
updateRMConstraintTitle
in interfaceRMCaveatConfigService
- Parameters:
listName
- the name of the RMConstraintList - can not be changednewTitle
- the new value for the title constraint
-