Package com.tietoenator.trip.jxp.users

# Class TdbGroup

java.lang.Object
com.tietoenator.trip.jxp.session.TdbSessionObject
com.tietoenator.trip.jxp.TdbMessageProvider
com.tietoenator.trip.jxp.session.TdbSerializableObject
com.tietoenator.trip.jxp.users.TdbGroup

All Implemented Interfaces:
  `TdbControlObjectProvider`

public class TdbGroup extends TdbSerializableObject
Manipulator class for TRIP user groups

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `TdbGroup(TdbSession session)`
  Constructor, creates a blank instance
  `TdbGroup(TdbSession session, TdbControlObject ob)`
  Constructor, creates a group instance associated with the group referenced by the provided object
  `TdbGroup(TdbSession session, String groupName)`
  Constructor, creates a group instance associated with the named group

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `add(String username)`
  Add a user to this group.
  `void`
  `add(String username, String groupname)`
  Add a user to a group.
  `void`
  `changeMgr(String newmgr)`
  Changes ownership of all items owned by the calling user to that defined by 'newmgr'.
  `void`
  `changeMgr(String newmgr, String oldmgr)`
  Changes ownership of all items owned by 'oldmgr' to 'newmgr'.
  `void`
  `changeMgr(String newmgr, String oldmgr, String name)`
  Move objects owned by one user to another user.
  `void`
  `copy(String newname, TdbControlObject ob)`
  Copy the membership list of this group to a new group, creating the new group in the process.
  `void`
  `create()`
  Create a new user group -- the name of the group is taken from the Control object provided when this TdbGroup instance was constructed.
  `void`
  `create(String groupname)`
  Create a new user group.
  `void`
  `delete()`
  Remove a group from the system -- the name of the group is taken from the Control object provided when this TdbGroup instance was constructed.
  `void`
  `delete(String groupname)`
  Remove a group from the system.
  `void`
  `exportGroup(String filename, boolean members, boolean procedures)`
  Export the group's definition to a named file.
  `void`
  `importGroup(String filename, String name)`
  Create a new group by importing a definition from a file.
  `void`
  `importUpdate(String filename)`
  Update the group's definition with a saved definition read from a file.
  `void`
  `remove(String username)`
  Remove a user from this group.
  `void`
  `remove(String username, String groupname)`
  Remove a user from a group.
  `void`
  `rename(String newname)`
  Rename the group.

  ### Methods inherited from class com.tietoenator.trip.jxp.session.TdbSerializableObject

  `getControlObject`

  ### Methods inherited from class com.tietoenator.trip.jxp.TdbMessageProvider

  `codeList, getLastCode, getLastMessage, hasMessages, messageList, resetMessages`

  ### Methods inherited from class com.tietoenator.trip.jxp.session.TdbSessionObject

  `cancel, getSession, isCancelable, setCancelable`

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### TdbGroup

    public TdbGroup(TdbSession session, TdbControlObject ob) throws TdbException
    Constructor, creates a group instance associated with the group referenced by the provided object
    Parameters:
      `session` - Active session
      `ob` - Control object reference for the group
    Throws:
      `TdbException`

  - ### TdbGroup

    public TdbGroup(TdbSession session, String groupName) throws TdbException
    Constructor, creates a group instance associated with the named group
    Parameters:
      `session` - Active session
      `groupName` - Group name
    Throws:
      `TdbException`

  - ### TdbGroup

    public TdbGroup(TdbSession session) throws TdbException
    Constructor, creates a blank instance
    Parameters:
      `session` - Active session
    Throws:
      `TdbException`

- ## Method Details

  - ### create

    public void create(String groupname) throws TdbException
    Create a new user group.

    This method causes network I/O.

    Parameters:
      `groupname` - The name of the group to create
    Throws:
      `TdbException`

  - ### create

    public void create() throws TdbException
    Create a new user group -- the name of the group is taken from the Control object provided when this TdbGroup instance was constructed.

    This method causes network I/O.

    Throws:
      `TdbException`

  - ### delete

    public void delete(String groupname) throws TdbException
    Remove a group from the system.

    This method causes network I/O.

    Parameters:
      `groupname` - The name of the group to remove
    Throws:
      `TdbException`

  - ### delete

    public void delete() throws TdbException
    Remove a group from the system -- the name of the group is taken from the Control object provided when this TdbGroup instance was constructed.

    This method causes network I/O.

    Throws:
      `TdbException`

  - ### add

    public void add(String username, String groupname) throws TdbException
    Add a user to a group.

    This method causes network I/O.

    Parameters:
      `username` - The name of the user to add
      `groupname` - The name of the group to which the user is to be added
    Throws:
      `TdbException`

  - ### add

    public void add(String username) throws TdbException
    Add a user to this group. The group defined by the Control object passed into the constructor will be used as the container for the new user provided.

    This method causes network I/O.

    Parameters:
      `username` - The name of the user to add to the current group
    Throws:
      `TdbException`

  - ### remove

    public void remove(String username, String groupname) throws TdbException
    Remove a user from a group.

    This method causes network I/O.

    Parameters:
      `username` - The name of the user
      `groupname` - The name of the group from which to remove the user.
    Throws:
      `TdbException`

  - ### remove

    public void remove(String username) throws TdbException
    Remove a user from this group. The group defined by the Control object passed into the constructor will be used as the container from which the user should be removed.

    This method causes network I/O.

    Parameters:
      `username` - The name of the user to remove from the current group
    Throws:
      `TdbException`

  - ### rename

    public void rename(String newname) throws TdbException
    Rename the group.

    This method causes network I/O.

    Parameters:
      `newname` - The new name of the group
    Throws:
      `TdbException`

  - ### changeMgr

    public void changeMgr(String newmgr, String oldmgr, String name) throws TdbException
    Move objects owned by one user to another user.

    This method causes network I/O.

    Parameters:
      `newmgr` - Name of planned new owner of objects
      `oldmgr` - Name of the existing owner of objects.
      `name` - The name of the object to move.
    Throws:
      `TdbException`

  - ### changeMgr

    public void changeMgr(String newmgr, String oldmgr) throws TdbException
    Changes ownership of all items owned by 'oldmgr' to 'newmgr'.

    This method causes network I/O.

    Parameters:
      `newmgr` - The name of the new manager
      `oldmgr` - The name of the old manager
    Throws:
      `TdbException`

  - ### changeMgr

    public void changeMgr(String newmgr) throws TdbException
    Changes ownership of all items owned by the calling user to that defined by 'newmgr'.

    This method causes network I/O.

    Parameters:
      `newmgr` - The name of the new manager
    Throws:
      `TdbException`

  - ### copy

    public void copy(String newname, TdbControlObject ob) throws TdbException
    Copy the membership list of this group to a new group, creating the new group in the process. Note that this fails if the new group already exists.

    This method causes network I/O.

    Parameters:
      `newname` - The name of the new group to create and then populate
      `ob` - If not null, this will contain Control information for the new group on return
    Throws:
      `TdbException`

  - ### exportGroup

    public void exportGroup(String filename, boolean members, boolean procedures) throws TdbException
    Export the group's definition to a named file.

    This method causes network I/O.

    Parameters:
      `filename` - The name of the file to which the group's definition is to be written
      `members` - If set true, the export file will contain the membership list of the group
      `procedures` - If set true, the export file will contain the procedures owned by the group
    Throws:
      `TdbException`

  - ### importUpdate

    public void importUpdate(String filename) throws TdbException
    Update the group's definition with a saved definition read from a file.

    This method causes network I/O.

    Parameters:
      `filename` - The name of the file from which to read the saved definition
    Throws:
      `TdbException`

  - ### importGroup

    public void importGroup(String filename, String name) throws TdbException
    Create a new group by importing a definition from a file.

    This method causes network I/O.

    Parameters:
      `filename` - The name of the file from which to read the saved definition
      `name` - The name of the group to create with this operation
    Throws:
      `TdbException`