org.alfresco.repo.security.person
Class TestGroupManager

java.lang.Object
  extended by org.alfresco.repo.security.person.TestGroupManager

public class TestGroupManager
extends java.lang.Object

Since:
3.4.e

Constructor Summary
TestGroupManager(AuthorityService authorityService, org.alfresco.service.cmr.search.SearchService searchService)
           
 
Method Summary
 java.lang.String addGroupToParent(java.lang.String parentGroupShortName, java.lang.String childGroupShortName)
          Adds the child group as a sub-authority of the parent group.
 void addUserToGroup(java.lang.String groupShortName, java.lang.String userName)
          Adds the user as a sub-authroity of the specified group.
 void clearGroups()
           
 java.lang.String createGroupIfNotExist(java.lang.String groupShortName)
          Creates a group with the given name if one does not already exist.
 void deleteGroup(java.lang.String groupShortName)
           
 org.alfresco.service.cmr.repository.NodeRef get(java.lang.String groupShortName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestGroupManager

public TestGroupManager(AuthorityService authorityService,
                        org.alfresco.service.cmr.search.SearchService searchService)
Method Detail

createGroupIfNotExist

public java.lang.String createGroupIfNotExist(java.lang.String groupShortName)
Creates a group with the given name if one does not already exist.

Parameters:
groupShortName -
Returns:
The group's full name.

addGroupToParent

public java.lang.String addGroupToParent(java.lang.String parentGroupShortName,
                                         java.lang.String childGroupShortName)
Adds the child group as a sub-authority of the parent group. Creates the child group and parent group if they do not exist.

Parameters:
parentGroupShortName -
childGroupShortName -
Returns:
The full name of the child group.

addUserToGroup

public void addUserToGroup(java.lang.String groupShortName,
                           java.lang.String userName)
Adds the user as a sub-authroity of the specified group. Creates the group if it doesn't exist.

Parameters:
groupShortName -
userName -

deleteGroup

public void deleteGroup(java.lang.String groupShortName)

clearGroups

public void clearGroups()

get

public org.alfresco.service.cmr.repository.NodeRef get(java.lang.String groupShortName)


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.