Class TdbGroup

All Implemented Interfaces:
TdbControlObjectProvider

public class TdbGroup extends TdbSerializableObject
Manipulator class for TRIP user groups
  • 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