Package org.alfresco.repo.template
Class People
java.lang.Object
org.alfresco.repo.processor.BaseProcessorExtension
org.alfresco.repo.template.BaseTemplateProcessorExtension
org.alfresco.repo.template.People
- All Implemented Interfaces:
org.alfresco.processor.ProcessorExtension,TemplateProcessorExtension,org.springframework.beans.factory.InitializingBean
public class People
extends BaseTemplateProcessorExtension
implements org.springframework.beans.factory.InitializingBean
People and users support in FreeMarker templates.
- Author:
- Kevin Roast
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidgetCapabilities(TemplateNode person) Gets a map of capabilities (boolean assertions) for the given person.getContainerGroups(TemplateNode person) Gets the groups that contain the specified authorityGets the Group given the group namegetMembers(TemplateNode group) Gets the members (people) of a group (including all sub-groups)getMembers(TemplateNode group, boolean recurse) Gets the members (people) of a groupGets the Person given the usernamebooleanisAccountEnabled(TemplateNode person) Return true if the specified user account is enabled.booleanisAdmin(TemplateNode person) Return true if the specified user is an Administrator authority.booleanisGuest(TemplateNode person) Return true if the specified user is an Guest authority.voidsetAuthenticationService(MutableAuthenticationService authenticationService) Sets the authentication service.voidsetAuthorityDAO(AuthorityDAO authorityDAO) Set the authority DAOvoidsetAuthorityService(AuthorityService authorityService) Set the authority servicevoidsetPersonService(PersonService personService) Set the person servicevoidsetServiceRegistry(ServiceRegistry serviceRegistry) Set the service registryvoidsetStoreUrl(String storeRef) Set the default store referenceMethods inherited from class org.alfresco.repo.template.BaseTemplateProcessorExtension
getTemplateImageResolver, setTemplateImageResolverMethods inherited from class org.alfresco.repo.processor.BaseProcessorExtension
getExtensionName, register, setExtensionName, setProcessorMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.alfresco.processor.ProcessorExtension
getExtensionName
-
Constructor Details
-
People
public People()
-
-
Method Details
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-
setStoreUrl
Set the default store reference- Parameters:
storeRef- the default store reference
-
setServiceRegistry
Set the service registry- Parameters:
serviceRegistry- the service registry
-
setAuthorityDAO
Set the authority DAO- Parameters:
authorityDAO- authority dao
-
setAuthorityService
Set the authority service- Parameters:
authorityService- The authorityService to set.
-
setPersonService
Set the person service- Parameters:
personService- The personService to set.
-
setAuthenticationService
Sets the authentication service.- Parameters:
authenticationService- the new authentication service
-
getPerson
Gets the Person given the username- Parameters:
username- the username of the person to get- Returns:
- the person node (type cm:person) or null if no such person exists
-
getGroup
Gets the Group given the group name- Parameters:
groupName- name of group to get- Returns:
- the group node (type usr:authorityContainer) or null if no such group exists
-
getMembers
Gets the members (people) of a group (including all sub-groups)- Parameters:
group- the group to retrieve members for- Returns:
- list of nodes representing the group members
-
getMembers
Gets the members (people) of a group- Parameters:
group- the group to retrieve members forrecurse- recurse into sub-groups- Returns:
- list of nodes representing the group members
-
getContainerGroups
Gets the groups that contain the specified authority- Parameters:
person- the user (cm:person) to get the containing groups for- Returns:
- the containing groups as a List of TemplateNode objects, can be null
-
isAdmin
Return true if the specified user is an Administrator authority.- Parameters:
person- to test- Returns:
- true if an admin, false otherwise
-
isGuest
Return true if the specified user is an Guest authority.- Parameters:
person- to test- Returns:
- true if a guest user, false otherwise
-
getCapabilities
Gets a map of capabilities (boolean assertions) for the given person.- Parameters:
person- the person- Returns:
- the capability map
-
isAccountEnabled
Return true if the specified user account is enabled.- Parameters:
person- to test- Returns:
- true if account enabled, false if disabled
-