edu.mit.stellar.api.group
Class AbstractSGroupM

java.lang.Object
  extended by edu.mit.stellar.api.group.AbstractSGroupM
All Implemented Interfaces:
SGroup, SGroupM, java.security.acl.Group, java.security.Principal
Direct Known Subclasses:
AbstractPrincipalSGroupM

public abstract class AbstractSGroupM
extends java.lang.Object
implements SGroupM

AbstractSGroupM. Base class for convenient implementations of SGroupMs.

Version:
$Revision: 30001 $, $Date: 2008-02-11 00:20:04 -0500 (Mon, 11 Feb 2008) $
Author:
MIT Stellar team

Constructor Summary
AbstractSGroupM()
           
 
Method Summary
abstract  boolean addMember(java.security.Principal member)
           
 java.security.Principal getAdministrator()
          Get the "Administrator" (user or group) of this group.
 java.lang.String getDescription()
          localized description explaining this group.
 java.lang.String getGroupId()
          Id for this group.
 java.lang.String getGroupManagerId()
          Id of the manager/provider for this group, for system configuration.
 java.lang.String getName()
           
 java.security.Principal getOwner()
          Get the "Owner" (user or group) of this group.
abstract  java.util.Set<java.security.Principal> getPrincipalSet()
          Get the set of Principals in this group.
 java.lang.String getTitle()
          Short, localized, human-readable title or display name for this group.
protected abstract  UserIdentityManager getUserIdentityManager()
          Implementations must provide a UserIdentityManager, usually by injection.
abstract  boolean isMember(java.security.Principal member)
           
abstract  java.util.Enumeration<? extends java.security.Principal> members()
           
abstract  boolean removeMember(java.security.Principal member)
           
 void setAdministrator(java.security.Principal administrator)
           
 void setDescription(java.lang.String description)
           
 void setGroupId(java.lang.String id)
           
 void setGroupManagerId(java.lang.String groupManagerId)
           
 void setName(java.lang.String name)
           
 void setOwner(java.security.Principal owner)
           
 void setTitle(java.lang.String title)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.security.Principal
equals, hashCode, toString
 

Constructor Detail

AbstractSGroupM

public AbstractSGroupM()
Method Detail

getGroupId

public java.lang.String getGroupId()
Description copied from interface: SGroup
Id for this group. Id must uniquely identify the group within the manager/provider. It need not be a UUID.

Specified by:
getGroupId in interface SGroup
Returns:
Id string.

setGroupId

public void setGroupId(java.lang.String id)
Specified by:
setGroupId in interface SGroupM
Parameters:
id - the id to set

getGroupManagerId

public java.lang.String getGroupManagerId()
Description copied from interface: SGroup
Id of the manager/provider for this group, for system configuration. Id should have no spaces or special characters (e.g. &, *, %) and must not have any / , but it need not be a UUID.

Specified by:
getGroupManagerId in interface SGroup

setGroupManagerId

public void setGroupManagerId(java.lang.String groupManagerId)
Specified by:
setGroupManagerId in interface SGroupM
Parameters:
groupManagerId - the groupManagerId to set

getName

public java.lang.String getName()
Specified by:
getName in interface java.security.Principal

setName

public void setName(java.lang.String name)
Specified by:
setName in interface SGroupM
Parameters:
name - the name to set

getTitle

public java.lang.String getTitle()
Description copied from interface: SGroup
Short, localized, human-readable title or display name for this group.

Specified by:
getTitle in interface SGroup
Returns:
localized title.

setTitle

public void setTitle(java.lang.String title)
Specified by:
setTitle in interface SGroupM
Parameters:
title - the title to set

getDescription

public java.lang.String getDescription()
Description copied from interface: SGroup
localized description explaining this group.

Specified by:
getDescription in interface SGroup
Returns:
localized group description.

setDescription

public void setDescription(java.lang.String description)
Specified by:
setDescription in interface SGroupM
Parameters:
description - the description to set

getOwner

public java.security.Principal getOwner()
Description copied from interface: SGroup
Get the "Owner" (user or group) of this group. The Owner is intended to be the Principal which has full rights to modifying the group. Owner may default to the group itself.

Specified by:
getOwner in interface SGroup
Returns:
Owner Principal

setOwner

public void setOwner(java.security.Principal owner)
Specified by:
setOwner in interface SGroupM
Parameters:
owner - the owner to set

getAdministrator

public java.security.Principal getAdministrator()
Description copied from interface: SGroup
Get the "Administrator" (user or group) of this group. The Administrator is intended to be the Principal which has only the ability to add and remove members. Administrator may default to the Owner.

Specified by:
getAdministrator in interface SGroup
Returns:
Administrator Principal

setAdministrator

public void setAdministrator(java.security.Principal administrator)
Specified by:
setAdministrator in interface SGroupM
Parameters:
administrator - the administrator to set

getUserIdentityManager

protected abstract UserIdentityManager getUserIdentityManager()
Implementations must provide a UserIdentityManager, usually by injection.

Returns:
a UserIdentityManager

getPrincipalSet

public abstract java.util.Set<java.security.Principal> getPrincipalSet()
Description copied from interface: SGroup
Get the set of Principals in this group. Use may be more efficient than using the members() method of java.security.acl.Group which returns an Enumeration.

Specified by:
getPrincipalSet in interface SGroup
Returns:
Set of Principals

addMember

public abstract boolean addMember(java.security.Principal member)
Specified by:
addMember in interface SGroup
Specified by:
addMember in interface java.security.acl.Group
See Also:
java.security.act.Group#addMember(java.security.Principal)

isMember

public abstract boolean isMember(java.security.Principal member)
Specified by:
isMember in interface java.security.acl.Group

members

public abstract java.util.Enumeration<? extends java.security.Principal> members()
Specified by:
members in interface java.security.acl.Group

removeMember

public abstract boolean removeMember(java.security.Principal member)
Specified by:
removeMember in interface SGroup
Specified by:
removeMember in interface java.security.acl.Group
See Also:
java.security.act.Group#removeMember(java.security.Principal)


Copyright © 2007-2008 MIT IS&T ISDA. All Rights Reserved.