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 instanceTdbGroup(TdbSession session, TdbControlObject ob)
Constructor, creates a group instance associated with the group referenced by the provided objectTdbGroup(TdbSession session, java.lang.String groupName)
Constructor, creates a group instance associated with the named group
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(java.lang.String username)
Add a user to this group.void
add(java.lang.String username, java.lang.String groupname)
Add a user to a group.void
changeMgr(java.lang.String newmgr)
Changes ownership of all items owned by the calling user to that defined by 'newmgr'.void
changeMgr(java.lang.String newmgr, java.lang.String oldmgr)
Changes ownership of all items owned by 'oldmgr' to 'newmgr'.void
changeMgr(java.lang.String newmgr, java.lang.String oldmgr, java.lang.String name)
Move objects owned by one user to another user.void
copy(java.lang.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(java.lang.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(java.lang.String groupname)
Remove a group from the system.void
exportGroup(java.lang.String filename, boolean members, boolean procedures)
Export the group's definition to a named file.void
importGroup(java.lang.String filename, java.lang.String name)
Create a new group by importing a definition from a file.void
importUpdate(java.lang.String filename)
Update the group's definition with a saved definition read from a file.void
remove(java.lang.String username)
Remove a user from this group.void
remove(java.lang.String username, java.lang.String groupname)
Remove a user from a group.void
rename(java.lang.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
-
-
-
-
Constructor Detail
-
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 sessionob
- Control object reference for the group- Throws:
TdbException
-
TdbGroup
public TdbGroup(TdbSession session, java.lang.String groupName) throws TdbException
Constructor, creates a group instance associated with the named group- Parameters:
session
- Active sessiongroupName
- Group name- Throws:
TdbException
-
TdbGroup
public TdbGroup(TdbSession session) throws TdbException
Constructor, creates a blank instance- Parameters:
session
- Active session- Throws:
TdbException
-
-
Method Detail
-
create
public void create(java.lang.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(java.lang.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(java.lang.String username, java.lang.String groupname) throws TdbException
Add a user to a group.This method causes network I/O.
- Parameters:
username
- The name of the user to addgroupname
- The name of the group to which the user is to be added- Throws:
TdbException
-
add
public void add(java.lang.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(java.lang.String username, java.lang.String groupname) throws TdbException
Remove a user from a group.This method causes network I/O.
- Parameters:
username
- The name of the usergroupname
- The name of the group from which to remove the user.- Throws:
TdbException
-
remove
public void remove(java.lang.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(java.lang.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(java.lang.String newmgr, java.lang.String oldmgr, java.lang.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 objectsoldmgr
- Name of the existing owner of objects.name
- The name of the object to move.- Throws:
TdbException
-
changeMgr
public void changeMgr(java.lang.String newmgr, java.lang.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 manageroldmgr
- The name of the old manager- Throws:
TdbException
-
changeMgr
public void changeMgr(java.lang.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(java.lang.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 populateob
- If not null, this will contain Control information for the new group on return- Throws:
TdbException
-
exportGroup
public void exportGroup(java.lang.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 writtenmembers
- If set true, the export file will contain the membership list of the groupprocedures
- If set true, the export file will contain the procedures owned by the group- Throws:
TdbException
-
importUpdate
public void importUpdate(java.lang.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(java.lang.String filename, java.lang.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 definitionname
- The name of the group to create with this operation- Throws:
TdbException
-
-