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 getGroupNames()
          Gets the names of all groups in the registry.
 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.Set getPersonMappedProperties()
          Gets the set of property names that are auto-mapped by this user registry.
 java.util.Collection getPersonNames()
          Gets the names of all persons in the registry.
 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 updateState(java.util.Collection persons, java.util.Collection groups)
          Modifies the state to match the arguments.
 
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

updateState

public void updateState(java.util.Collection persons,
                        java.util.Collection groups)
Modifies the state to match the arguments. Compares new with old and records new modification dates only for changes.

Parameters:
persons - the persons
groups - the groups

getZoneId

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

Returns:
the zoneId

getGroupNames

public java.util.Collection getGroupNames()
Description copied from interface: UserRegistry
Gets the names of all groups in the registry. Used to detect local groups to be deleted.

Specified by:
getGroupNames in interface UserRegistry
Returns:
the person names

getPersonNames

public java.util.Collection getPersonNames()
Description copied from interface: UserRegistry
Gets the names of all persons in the registry. Used to detect local persons to be deleted. Note that the treatment of these names will depend on Alfresco's username case-sensitivity setting.

Specified by:
getPersonNames in interface UserRegistry
Returns:
the person names

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.

getPersonMappedProperties

public java.util.Set getPersonMappedProperties()
Description copied from interface: UserRegistry
Gets the set of property names that are auto-mapped by this user registry. These should remain read-only for this registry's users in the UI.

Specified by:
getPersonMappedProperties in interface UserRegistry
Returns:
the person mapped properties


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