Interface CapabilityService
-
- All Known Implementing Classes:
CapabilityServiceImpl
@AlfrescoPublicApi public interface CapabilityService
Capability service implementation- Since:
- 2.0
- Author:
- Roy Wetherall
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addGroup(Group group)
Adds a group to the list of groupsSet<Capability>
getCapabilities()
Get a list of all the assignable capabilities.Set<Capability>
getCapabilities(boolean includePrivate)
Get a list of all the capabilities, optionally including those that are non-assignable.Map<Capability,AccessStatus>
getCapabilitiesAccessState(NodeRef nodeRef)
Get all the capabilities access state based on the current user for the assignable capabilities.Map<Capability,AccessStatus>
getCapabilitiesAccessState(NodeRef nodeRef, boolean includePrivate)
Get all the capabilities access state based on the current user.Map<Capability,AccessStatus>
getCapabilitiesAccessState(NodeRef nodeRef, List<String> capabilityNames)
List<Capability>
getCapabilitiesByGroup(Group group)
Get a list of capabilities for the given groupList<Capability>
getCapabilitiesByGroupId(String groupId)
Gets a list of capabilities for the given group idCapability
getCapability(String name)
Get a named capability.AccessStatus
getCapabilityAccessState(NodeRef nodeRef, String capabilityName)
Helper method to get the access state for a single capability.Group
getGroup(String groupId)
Gets a group from it's idList<Group>
getGroups()
Gets 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
-
-
-
Method Detail
-
registerCapability
void registerCapability(Capability capability)
Register a capability- Parameters:
capability
- capability
-
getCapability
Capability getCapability(String name)
Get a named capability.- Parameters:
name
- capability name- Returns:
Capability
capability or null if not found
-
getCapabilities
Set<Capability> getCapabilities()
Get a list of all the assignable capabilities.- Returns:
Set
<Capability
> set of all the assignable capabilities
-
getCapabilities
Set<Capability> getCapabilities(boolean includePrivate)
Get a list of all the capabilities, optionally including those that are non-assignable.- Parameters:
includePrivate
- indicates that the private, or non-assignable capabilities are included in the result- Returns:
Set
<Capability
> set of capabilities
-
getCapabilitiesAccessState
Map<Capability,AccessStatus> getCapabilitiesAccessState(NodeRef nodeRef)
Get all the capabilities access state based on the current user for the assignable capabilities.- Parameters:
nodeRef
- node reference- Returns:
-
getCapabilitiesAccessState
Map<Capability,AccessStatus> getCapabilitiesAccessState(NodeRef nodeRef, boolean includePrivate)
Get all the capabilities access state based on the current user.- Parameters:
nodeRef
- node reference- Returns:
-
getCapabilitiesAccessState
Map<Capability,AccessStatus> getCapabilitiesAccessState(NodeRef nodeRef, List<String> capabilityNames)
- Parameters:
nodeRef
-capabilityNames
-- Returns:
-
getCapabilityAccessState
AccessStatus getCapabilityAccessState(NodeRef nodeRef, String capabilityName)
Helper method to get the access state for a single capability.- Parameters:
nodeRef
-capabilityName
-- Returns:
-
getCapabilitiesByGroupId
List<Capability> getCapabilitiesByGroupId(String groupId)
Gets a list of capabilities for the given group id- 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
-
getCapabilitiesByGroup
List<Capability> getCapabilitiesByGroup(Group group)
Get a list of capabilities for the given group- Parameters:
group
- The group for which the list of capabilities should be retrieved- Returns:
List
<Capability
> List of capabilities for the given group
-
getGroup
Group getGroup(String groupId)
Gets a group from it's id- Parameters:
groupId
- The id of the group which should be retrieved- Returns:
- Group The group with the id groupId
-
addGroup
void addGroup(Group group)
Adds a group to the list of groups- Parameters:
group
- The group which should be added
-
removeGroup
void removeGroup(Group group)
Removes a group from the list of groups- Parameters:
group
- The group which should be removed
-
-