Class CapabilityServiceImpl
java.lang.Object
org.alfresco.module.org_alfresco_module_rm.capability.CapabilityServiceImpl
- All Implemented Interfaces:
CapabilityService
- Since:
- 2.0
- Author:
- Roy Wetherall
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a group to the list of groupsGet a list of all the assignable capabilities.getCapabilities
(boolean includePrivate) Get a list of all the capabilities, optionally including those that are non-assignable.getCapabilitiesAccessState
(NodeRef nodeRef) Get all the capabilities access state based on the current user for the assignable capabilities.getCapabilitiesAccessState
(NodeRef nodeRef, boolean includePrivate) Get all the capabilities access state based on the current user.getCapabilitiesAccessState
(NodeRef nodeRef, List<String> capabilityNames) getCapabilitiesByGroup
(Group group) Get a list of capabilities for the given groupgetCapabilitiesByGroupId
(String groupId) Gets a list of capabilities for the given group idgetCapability
(String name) Get a named capability.getCapabilityAccessState
(NodeRef nodeRef, String capabilityName) Helper method to get the access state for a single capability.Gets a group from it's idGets the list of all the capability groups (in index order)boolean
hasCapability
(NodeRef nodeRef, String capabilityName) Check if the current user has the given capability.void
registerCapability
(Capability capability) Register a capabilityvoid
removeGroup
(Group group) Removes a group from the list of groups
-
Constructor Details
-
CapabilityServiceImpl
public CapabilityServiceImpl()
-
-
Method Details
-
getCapability
Description copied from interface:CapabilityService
Get a named capability.- Specified by:
getCapability
in interfaceCapabilityService
- Parameters:
name
- capability name- Returns:
Capability
capability or null if not found- See Also:
-
registerCapability
Description copied from interface:CapabilityService
Register a capability- Specified by:
registerCapability
in interfaceCapabilityService
- Parameters:
capability
- capability- See Also:
-
getCapabilities
Description copied from interface:CapabilityService
Get a list of all the assignable capabilities.- Specified by:
getCapabilities
in interfaceCapabilityService
- Returns:
Set
<Capability
> set of all the assignable capabilities- See Also:
-
getCapabilities
Description copied from interface:CapabilityService
Get a list of all the capabilities, optionally including those that are non-assignable.- Specified by:
getCapabilities
in interfaceCapabilityService
- Parameters:
includePrivate
- indicates that the private, or non-assignable capabilities are included in the result- Returns:
Set
<Capability
> set of capabilities- See Also:
-
getCapabilitiesAccessState
Description copied from interface:CapabilityService
Get all the capabilities access state based on the current user for the assignable capabilities.- Specified by:
getCapabilitiesAccessState
in interfaceCapabilityService
- Parameters:
nodeRef
- node reference- Returns:
- See Also:
-
getCapabilitiesAccessState
public Map<Capability,AccessStatus> getCapabilitiesAccessState(NodeRef nodeRef, boolean includePrivate) Description copied from interface:CapabilityService
Get all the capabilities access state based on the current user.- Specified by:
getCapabilitiesAccessState
in interfaceCapabilityService
- Parameters:
nodeRef
- node reference- Returns:
- See Also:
-
getCapabilitiesAccessState
public Map<Capability,AccessStatus> getCapabilitiesAccessState(NodeRef nodeRef, List<String> capabilityNames) - Specified by:
getCapabilitiesAccessState
in interfaceCapabilityService
- Returns:
- See Also:
-
getCapabilityAccessState
Description copied from interface:CapabilityService
Helper method to get the access state for a single capability.- Specified by:
getCapabilityAccessState
in interfaceCapabilityService
- Returns:
- See Also:
-
getGroups
Description copied from interface:CapabilityService
Gets the list of all the capability groups (in index order)- Specified by:
getGroups
in interfaceCapabilityService
- Returns:
List
<Group
> List of all the capability groups (in index order)- See Also:
-
getCapabilitiesByGroupId
Description copied from interface:CapabilityService
Gets a list of capabilities for the given group id- Specified by:
getCapabilitiesByGroupId
in interfaceCapabilityService
- Parameters:
groupId
- The id of a group for which the list of capabilities should be retrieved- Returns:
List
<Capability
> List of capabilities for the given group- See Also:
-
getCapabilitiesByGroup
Description copied from interface:CapabilityService
Get a list of capabilities for the given group- Specified by:
getCapabilitiesByGroup
in interfaceCapabilityService
- Parameters:
group
- The group for which the list of capabilities should be retrieved- Returns:
List
<Capability
> List of capabilities for the given group- See Also:
-
getGroup
Description copied from interface:CapabilityService
Gets a group from it's id- Specified by:
getGroup
in interfaceCapabilityService
- Parameters:
groupId
- The id of the group which should be retrieved- Returns:
- Group The group with the id groupId
- See Also:
-
addGroup
Description copied from interface:CapabilityService
Adds a group to the list of groups- Specified by:
addGroup
in interfaceCapabilityService
- Parameters:
group
- The group which should be added- See Also:
-
removeGroup
Description copied from interface:CapabilityService
Removes a group from the list of groups- Specified by:
removeGroup
in interfaceCapabilityService
- Parameters:
group
- The group which should be removed- See Also:
-
hasCapability
Description copied from interface:CapabilityService
Check if the current user has the given capability.- Specified by:
hasCapability
in interfaceCapabilityService
- Returns:
- See Also:
-