org.alfresco.repo.security.sync
Class ChainingUserRegistrySynchronizerTest.MockUserRegistry

java.lang.Object
  extended by org.alfresco.repo.security.sync.ChainingUserRegistrySynchronizerTest.MockUserRegistry
All Implemented Interfaces:
UserRegistry
Enclosing class:
ChainingUserRegistrySynchronizerTest

public static class ChainingUserRegistrySynchronizerTest.MockUserRegistry
extends java.lang.Object
implements UserRegistry

A Mock UserRegistry that returns a fixed set of users and groups.


Constructor Summary
ChainingUserRegistrySynchronizerTest.MockUserRegistry(java.lang.String zoneId, java.util.Collection persons, java.util.Collection groups)
          Instantiates a new mock user registry.
ChainingUserRegistrySynchronizerTest.MockUserRegistry(java.lang.String zoneId, NodeDescription[] persons, NodeDescription[] groups)
          Instantiates a new mock user registry.
 
Method Summary
 java.util.Collection getGroups(java.util.Date modifiedSince)
          Gets descriptions of all the groups in the user registry or all those changed since a certain date.
 java.util.Collection getPersons(java.util.Date modifiedSince)
          Gets descriptions of all the persons (users) in the user registry or all those changed since a certain date.
 java.lang.String getZoneId()
          Gets the zone id.
 void processDeletions(java.util.Set candidateAuthoritiesForDeletion)
          Retrieves the complete set of known users and groups from the user registry and removes them from the set of candidate local authorities to be deleted.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChainingUserRegistrySynchronizerTest.MockUserRegistry

public ChainingUserRegistrySynchronizerTest.MockUserRegistry(java.lang.String zoneId,
                                                             java.util.Collection persons,
                                                             java.util.Collection groups)
Instantiates a new mock user registry.

Parameters:
zoneId - the zone id
persons - the persons
groups - the groups

ChainingUserRegistrySynchronizerTest.MockUserRegistry

public ChainingUserRegistrySynchronizerTest.MockUserRegistry(java.lang.String zoneId,
                                                             NodeDescription[] persons,
                                                             NodeDescription[] groups)
Instantiates a new mock user registry.

Parameters:
zoneId - the zone id
persons - the persons
groups - the groups
Method Detail

getZoneId

public java.lang.String getZoneId()
Gets the zone id.

Returns:
the zoneId

processDeletions

public void processDeletions(java.util.Set candidateAuthoritiesForDeletion)
Description copied from interface: UserRegistry
Retrieves the complete set of known users and groups from the user registry and removes them from the set of candidate local authorities to be deleted.

Specified by:
processDeletions in interface UserRegistry
Parameters:
candidateAuthoritiesForDeletion - the candidate authorities for deletion

getGroups

public java.util.Collection getGroups(java.util.Date modifiedSince)
Description copied from interface: UserRegistry
Gets descriptions of all the groups in the user registry or all those changed since a certain date.

Specified by:
getGroups in interface UserRegistry
Parameters:
modifiedSince - if non-null, then only descriptions of groups modified since this date should be returned; if null then descriptions of all groups should be returned.
Returns:
a Collection of NodeDescriptions of all the groups in the user registry or all those changed since a certain date. The description properties should correspond to those of an Alfresco authority node.

getPersons

public java.util.Collection getPersons(java.util.Date modifiedSince)
Description copied from interface: UserRegistry
Gets descriptions of all the persons (users) in the user registry or all those changed since a certain date.

Specified by:
getPersons in interface UserRegistry
Parameters:
modifiedSince - if non-null, then only descriptions of users modified since this date should be returned; if null then descriptions of all users should be returned.
Returns:
a Collection of NodeDescriptions of all the persons (users) in the user registry or all those changed since a certain date. The description properties should correspond to those of an Alfresco person node.


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