Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jasig.portal.groups
Interface IEntityGroup

All Superinterfaces:
  IBasicEntity, IGroupMember

All Known Subinterfaces:
  ILockableEntityGroup

All Known Implementing Classes:
  EntityGroupImpl, EntityTestingGroupImpl, LockableEntityGroupImpl, SearchResultsGroupImpl

    public interface IEntityGroup

extends IGroupMember

An `IEntityGroup` is a composite, or non-leaf `IGroupMember`. It contains `IEntities` and other `IEntityGroups`.

The api defines methods for adding a member to, and removing it from, a group, though not vice versa. (Although there is nothing to prevent a given `IGroupMember` implementation from storing references to its containing groups.) These methods only change the group structure in memory.

`addMember(IGroupMember gm)`
`removeMember(IGroupMember gm)`

The following methods commit changes in the group structure to the persistent store:

`delete()` - delete the group and its memberships
`update()` - insert or update the group, as appropriate
`updateMembers()` - insert/update/delete group memberships as appropriate

The following methods were added to permit an `IEntityGroup` to function within a composite group service:

`getLocalKey()` - returns the key within the service of origin.
`getServiceName()` - returns the Name of the group service of origin.
`setLocalGroupService()` - sets the group service of origin.

Version:
  $Revision: 1.9 $
Author:
  Dan Ellentuck

Method Summary
`void` | `addMember(IGroupMember gm)` Adds `IGroupMember` gm to this group, but does not commit it to the data store.
`void` | `delete()` Deletes the `IEntityGroup` from the data store.
`java.lang.String` | `getCreatorID()` Returns the name of the group creator.
`java.lang.String` | `getDescription()` Returns the group description, which may be null.
`java.lang.String` | `getLocalKey()` Returns the key from the group service of origin.
`java.lang.String` | `getName()` Returns the group name.
`javax.naming.Name` | `getServiceName()` Returns the Name of the group service of origin.
`boolean` | `isEditable()` Answers if this `IEntityGroup` can be changed or deleted.
`void` | `removeMember(IGroupMember gm)` Removes the `IGroupMember` from this group, but does not remove the membership from the data store.
`void` | `setCreatorID(java.lang.String userID)`
`void` | `setDescription(java.lang.String name)`
`void` | `setLocalGroupService(IIndividualGroupService groupService)` Sets the group service of origin.
`void` | `setName(java.lang.String name)` Sets the group name which must be unique within any of its containing groups.
`void` | `update()` Commit the `IEntityGroup` AND ITS MEMBERSHIPS to the data store.
`void` | `updateMembers()` Commit this `IEntityGroup's` memberships to the data store.

Methods inherited from interface org.jasig.portal.groups.IGroupMember
`contains, deepContains, equals, getAllContainingGroups, getAllEntities, getAllMembers, getContainingGroups, getEntities, getEntityType, getKey, getLeafType, getMemberGroupNamed, getMembers, getType, getUnderlyingEntityIdentifier, hashCode, hasMembers, isDeepMemberOf, isEntity, isGroup, isMemberOf`

Methods inherited from interface org.jasig.portal.IBasicEntity
`getEntityIdentifier`

Method Detail

### addMember

    void addMember(IGroupMember gm)
                   throws GroupsException

  Adds `IGroupMember` gm to this group, but does not commit it to the data store. Use `updateMembers()` to commit memberships to the data store.

  Parameters:
    `gm` - org.jasig.portal.groups.IGroupMember
  Throws:
    `GroupsException` - is thrown if the member is a group and this group already has a group with the same name or if the addition of the group creates a circular reference.

### delete

    void delete()
                throws GroupsException

  Deletes the `IEntityGroup` from the data store.

  Throws:
    `GroupsException` - if the delete cannot be performed.

### getCreatorID

    java.lang.String getCreatorID()

  Returns the name of the group creator. May be null.

  Returns:
    String

### getDescription

    java.lang.String getDescription()

  Returns the group description, which may be null.

  Returns:
    String

### getLocalKey

    java.lang.String getLocalKey()

  Returns the key from the group service of origin.

  Returns:
    String

### getName

    java.lang.String getName()

  Returns the group name.

  Returns:
    String

### getServiceName

    javax.naming.Name getServiceName()

  Returns the Name of the group service of origin.

  Returns:
    String

### isEditable

    boolean isEditable()
                       throws GroupsException

  Answers if this `IEntityGroup` can be changed or deleted.

  Returns:
    boolean
  Throws:
    `GroupsException`

### removeMember

    void removeMember(IGroupMember gm)
                      throws GroupsException

  Removes the `IGroupMember` from this group, but does not remove the membership from the data store.

  Parameters:
    `gm` - org.jasig.portal.groups.IGroupMember
  Throws:
    `GroupsException`

### setCreatorID

    void setCreatorID(java.lang.String userID)

  Parameters:
    `userID` - String (required)

### setDescription

    void setDescription(java.lang.String name)

  Parameters:
    `name` - String (may be null)

### setName

    void setName(java.lang.String name)
                 throws GroupsException

  Sets the group name which must be unique within any of its containing groups.

  Parameters:
    `name` - String
  Throws:
    `GroupsException`

### update

    void update()
                throws GroupsException

  Commit the `IEntityGroup` AND ITS MEMBERSHIPS to the data store.

  Throws:
    `GroupsException` - if the update cannot be performed.

### updateMembers

    void updateMembers()
                       throws GroupsException

  Commit this `IEntityGroup's` memberships to the data store.

  Throws:
    `GroupsException` - if the update cannot be performed.

### setLocalGroupService

    void setLocalGroupService(IIndividualGroupService groupService)
                              throws GroupsException

  Sets the group service of origin.

  Throws:
    `GroupsException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD