com.opensymphony.user
Class Group

java.lang.Object
  extended by com.opensymphony.user.Entity
      extended by com.opensymphony.user.Group
All Implemented Interfaces:
com.atlassian.crowd.embedded.api.Group, Serializable, Comparable<com.atlassian.crowd.embedded.api.Group>, Principal

Deprecated.

@Deprecated
public class Group
extends Entity
implements Group, com.atlassian.crowd.embedded.api.Group

Entity that represents a Group of Users. The group is backed by Crowd's Embedded Service.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.opensymphony.user.Entity
mutable, name
 
Constructor Summary
Group(com.atlassian.crowd.embedded.api.Group crowdGroup)
          Deprecated.  
Group(String name, ProviderAccessor providerAccessor)
          Deprecated. Constructor is only called by UserManager.
 
Method Summary
 boolean addMember(Principal user)
          Deprecated. Adds the specified member to the group.
 boolean addUser(User user)
          Deprecated. Add User to members of this Group.
 int compareTo(com.atlassian.crowd.embedded.api.Group other)
          Deprecated.  
 boolean containsUser(String user)
          Deprecated. Determine whether Group contains supplied User as member.
 boolean containsUser(User user)
          Deprecated. Determine whether Group contains supplied User as member.
 boolean equals(Object o)
          Deprecated. Compare name.
 List<String> getUsers()
          Deprecated. List all Users that Group contains as members.
 int hashCode()
          Deprecated. Hashcode of name.
 boolean isMember(Principal member)
          Deprecated. Returns true if the passed principal is a member of the group.
 Enumeration<? extends Principal> members()
          Deprecated. Returns an enumeration of the members in the group.
 void remove()
          Deprecated. Remove Group from associated AccessProvider.
 boolean removeMember(Principal user)
          Deprecated. Removes the specified member from the group.
 boolean removeUser(User user)
          Deprecated. Remove User from members of this Group.
 
Methods inherited from class com.opensymphony.user.Entity
getAccessProvider, getCredentialsProvider, getName, getProfileProvider, getPropertySet, getUserManager, isMutable, store, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.security.Principal
getName, toString
 
Methods inherited from interface com.atlassian.crowd.embedded.api.Group
getName
 

Constructor Detail

Group

public Group(com.atlassian.crowd.embedded.api.Group crowdGroup)
Deprecated. 

Group

public Group(String name,
             ProviderAccessor providerAccessor)
Deprecated. 
Constructor is only called by UserManager.

Parameters:
name - groupname.
providerAccessor - accessors.
Method Detail

isMember

public boolean isMember(Principal member)
Deprecated. 
Returns true if the passed principal is a member of the group. This method does a recursive search, so if a principal belongs to a group which is a member of this group, true is returned.

Parameters:
member - the principal whose membership is to be checked.
Returns:
true if the principal is a member of this group, false otherwise.

getUsers

public List<String> getUsers()
Deprecated. 
List all Users that Group contains as members. Modifiying this Collection will not add or remove Users.

Returns:
List of usernames (String)

addMember

public boolean addMember(Principal user)
Deprecated. 
Adds the specified member to the group.

Parameters:
user - the principal to add to this group.
Returns:
true if the member was successfully added, false if the principal was already a member.

addUser

public boolean addUser(User user)
Deprecated. 
Add User to members of this Group. Returns whether any modifications were made.

Parameters:
user - the user to add.
Returns:
true if user is added successfully to the group.

containsUser

public boolean containsUser(User user)
Deprecated. 
Determine whether Group contains supplied User as member.

Parameters:
user - the user to check.
Returns:
true if user is a member of the group.

containsUser

public boolean containsUser(String user)
Deprecated. 
Determine whether Group contains supplied User as member.

Parameters:
user - name of the user to check.
Returns:
true if the user is a member of the group.

members

public Enumeration<? extends Principal> members()
Deprecated. 
Returns an enumeration of the members in the group. The returned objects can be instances of either Principal or Group (which is a subclass of Principal).

Returns:
an enumeration of the group members.

remove

public void remove()
            throws ImmutableException
Deprecated. 
Remove Group from associated AccessProvider.

Specified by:
remove in class Entity
Throws:
ImmutableException

removeMember

public boolean removeMember(Principal user)
Deprecated. 
Removes the specified member from the group.

Parameters:
user - the principal to remove from this group.
Returns:
true if the principal was removed, or false if the principal was not a member.

removeUser

public boolean removeUser(User user)
Deprecated. 
Remove User from members of this Group. Returns whether any modifications were made.

Parameters:
user - the user to remove from the group.
Returns:
true if user is successfully removed from the group.

equals

public boolean equals(Object o)
Deprecated. 
Description copied from class: Entity
Compare name.

Specified by:
equals in interface com.atlassian.crowd.embedded.api.Group
Specified by:
equals in interface Principal
Overrides:
equals in class Entity

hashCode

public int hashCode()
Deprecated. 
Description copied from class: Entity
Hashcode of name.

Specified by:
hashCode in interface com.atlassian.crowd.embedded.api.Group
Specified by:
hashCode in interface Principal
Overrides:
hashCode in class Entity

compareTo

public int compareTo(com.atlassian.crowd.embedded.api.Group other)
Deprecated. 
Specified by:
compareTo in interface com.atlassian.crowd.embedded.api.Group
Specified by:
compareTo in interface Comparable<com.atlassian.crowd.embedded.api.Group>


Copyright © 2002-2011 Atlassian. All Rights Reserved.