Class TdbDatabaseAccess
java.lang.Object
com.tietoenator.trip.jxp.session.TdbSessionObject
com.tietoenator.trip.jxp.TdbMessageProvider
com.tietoenator.trip.jxp.database.TdbDatabaseAccess
- All Implemented Interfaces:
com.tietoenator.trip.jxp.internal.utils.DOMSink
,TdbControlObjectProvider
public class TdbDatabaseAccess
extends TdbMessageProvider
implements com.tietoenator.trip.jxp.internal.utils.DOMSink, TdbControlObjectProvider
Container and manipulation logic for database access rights to a particular
database, thesaurus or database cluster.
-
Constructor Summary
ConstructorsConstructorDescriptionTdbDatabaseAccess
(TdbSession session) Constructor, creates a blank container with no specific associationTdbDatabaseAccess
(TdbSession session, TdbControlObject ob) Constructor, creates a blank container associated with a particular database, thesaurus or cluster, as identified by the Control object providedTdbDatabaseAccess
(TdbSession session, TdbControlObjectProvider prv) Constructor, creates a blank container associated with a particular database, thesaurus or cluster as identified by the object that provides a Control reference. -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Initialize the object, removing any existing statevoid
Retrieve the named user's (or group's) access rights for the current database, i.e.void
Retrieve the named user's (or group's) access rights for the named database, thesaurus or cluster.Retrieve the Control object reference passed into the constructor, if anyRetrieve read access levelRetrieve the read scope statementRetrieve write access levelRetrieve the write scope statementvoid
put()
Store the accumulated access rights; this call can only follow a successful call to theget
method, as the database and user name established during that call are used here.void
Store the accumulated access rights as the named user's (or group's) access privileges for the named database, thesaurus or clusterRetrieve the collection of fields (identified by their field number) to which the user has selected read access.void
setReadAccess
(TdbAccessRights rights) Establish read access levelvoid
setReadFields
(Collection<Integer> fields) Establish the collection of fields (identified by their field number) to which the user has selected read access.void
setReadScope
(String scope) Establish the read scope statementvoid
setWriteAccess
(TdbAccessRights rights) Establish write access levelvoid
setWriteFields
(Collection<Integer> fields) Establish the collection of fields (identified by their field number) to which the user has selected write access.void
setWriteScope
(String scope) Establish the write scope statementRetrieve the collection of fields (identified by their field number) to which the user has selected write access.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 Details
-
TdbDatabaseAccess
Constructor, creates a blank container associated with a particular database, thesaurus or cluster, as identified by the Control object provided- Parameters:
session
- Active sessionob
- Control object referencing the database, thesaurus or cluster for which access rights are to be processed- Throws:
TdbException
-
TdbDatabaseAccess
Constructor, creates a blank container associated with a particular database, thesaurus or cluster as identified by the object that provides a Control reference.- Parameters:
session
- Active sessionprv
- Control object reference provider, i.e. a database design- Throws:
TdbException
-
TdbDatabaseAccess
Constructor, creates a blank container with no specific association- Parameters:
session
- Active session- Throws:
TdbException
-
-
Method Details
-
getControlObject
Retrieve the Control object reference passed into the constructor, if any- Specified by:
getControlObject
in interfaceTdbControlObjectProvider
- Returns:
- Control object reference with which the instance was created
-
getReadAccess
Retrieve read access level- Returns:
- Read access
-
setReadAccess
Establish read access level- Parameters:
rights
- Read access
-
getReadScope
Retrieve the read scope statement- Returns:
- Read scope, if any
-
setReadScope
Establish the read scope statement- Parameters:
scope
- Read scope statement
-
readFields
Retrieve the collection of fields (identified by their field number) to which the user has selected read access. Note that this is only valid if the user's access isselected
.- Returns:
- Collection of field numbers
-
setReadFields
Establish the collection of fields (identified by their field number) to which the user has selected read access. Note this is only valid if the user's access isselected
.- Parameters:
fields
- Collection of field numbers to which the user is to be granted read access
-
getWriteAccess
Retrieve write access level- Returns:
- Write access
-
setWriteAccess
Establish write access level- Parameters:
rights
- Write access
-
getWriteScope
Retrieve the write scope statement- Returns:
- Write scope statement, if any
-
setWriteScope
Establish the write scope statement- Parameters:
scope
- Write scope statement
-
writeFields
Retrieve the collection of fields (identified by their field number) to which the user has selected write access. Note that this is only valid if the user's access isselected
.- Returns:
- Collection of field numbers
-
setWriteFields
Establish the collection of fields (identified by their field number) to which the user has selected write access. Note this is only valid if the user's access isselected
.- Parameters:
fields
- Collection of field numbers to which the user is to be granted read access
-
clear
public void clear()Initialize the object, removing any existing state -
get
Retrieve the named user's (or group's) access rights for the named database, thesaurus or cluster.This method causes network I/O.
- Parameters:
db
- Name of database for which rights are to be retrievedug
- Name of user or group for whom rights are to be retrieved- Throws:
TdbException
-
get
Retrieve the named user's (or group's) access rights for the current database, i.e. the database identified by the Control object passed into the constructor of this objectThis method causes network I/O.
- Parameters:
ug
- Name of user or group for whom access rights are to be retrieved- Throws:
TdbException
-
put
Store the accumulated access rights as the named user's (or group's) access privileges for the named database, thesaurus or clusterThis method causes network I/O.
- Parameters:
db
- Name of database, thesaurus or cluster for which these rights are validug
- Name of user or group who's rights are being affected- Throws:
TdbException
-
put
Store the accumulated access rights; this call can only follow a successful call to theget
method, as the database and user name established during that call are used here.- Throws:
TdbException
-