public class TdbDatabaseAccess extends TdbMessageProvider implements com.tietoenator.trip.jxp.internal.utils.DOMSink, TdbControlObjectProvider
Constructor and Description |
---|
TdbDatabaseAccess(TdbSession session)
Constructor, creates a blank container with no specific association
|
TdbDatabaseAccess(TdbSession session,
TdbControlObject ob)
Constructor, creates a blank container associated with a particular
database, thesaurus or cluster, as identified by the Control object
provided
|
TdbDatabaseAccess(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.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Initialize the object, removing any existing state
|
void |
get(java.lang.String ug)
Retrieve the named user's (or group's) access rights for the current database, i.e.
|
void |
get(java.lang.String db,
java.lang.String ug)
Retrieve the named user's (or group's) access rights for the named
database, thesaurus or cluster.
|
TdbControlObject |
getControlObject()
Retrieve the Control object reference passed into the constructor, if any
|
TdbAccessRights |
getReadAccess()
Retrieve read access level
|
java.lang.String |
getReadScope()
Retrieve the read scope statement
|
TdbAccessRights |
getWriteAccess()
Retrieve write access level
|
java.lang.String |
getWriteScope()
Retrieve the write scope statement
|
void |
put()
Store the accumulated access rights; this call can only follow a successful call
to the
get method, as the database and user name established
during that call are used here. |
void |
put(java.lang.String db,
java.lang.String ug)
Store the accumulated access rights as the named user's (or group's) access privileges
for the named database, thesaurus or cluster
This method causes network I/O. |
java.util.List<java.lang.Integer> |
readFields()
Retrieve the collection of fields (identified by their field number) to
which the user has selected read access.
|
void |
setReadAccess(TdbAccessRights rights)
Establish read access level
|
void |
setReadFields(java.util.Collection<java.lang.Integer> fields)
Establish the collection of fields (identified by their field number) to
which the user has selected read access.
|
void |
setReadScope(java.lang.String scope)
Establish the read scope statement
|
void |
setWriteAccess(TdbAccessRights rights)
Establish write access level
|
void |
setWriteFields(java.util.Collection<java.lang.Integer> fields)
Establish the collection of fields (identified by their field number) to
which the user has selected write access.
|
void |
setWriteScope(java.lang.String scope)
Establish the write scope statement
|
java.util.List<java.lang.Integer> |
writeFields()
Retrieve the collection of fields (identified by their field number) to
which the user has selected write access.
|
codeList, getLastCode, getLastMessage, hasMessages, messageList, resetMessages
cancel, getSession, isCancelable, setCancelable
public TdbDatabaseAccess(TdbSession session, TdbControlObject ob) throws TdbException
session
- Active sessionob
- Control object referencing the database, thesaurus or cluster
for which access rights are to be processedTdbException
public TdbDatabaseAccess(TdbSession session, TdbControlObjectProvider prv) throws TdbException
session
- Active sessionprv
- Control object reference provider, i.e. a database designTdbException
public TdbDatabaseAccess(TdbSession session) throws TdbException
session
- Active sessionTdbException
public TdbControlObject getControlObject()
getControlObject
in interface TdbControlObjectProvider
public TdbAccessRights getReadAccess()
public void setReadAccess(TdbAccessRights rights)
rights
- Read accesspublic java.lang.String getReadScope()
public void setReadScope(java.lang.String scope)
scope
- Read scope statementpublic java.util.List<java.lang.Integer> readFields()
selected
.public void setReadFields(java.util.Collection<java.lang.Integer> fields)
selected
.fields
- Collection of field numbers to which the user is to be granted
read accesspublic TdbAccessRights getWriteAccess()
public void setWriteAccess(TdbAccessRights rights)
rights
- Write accesspublic java.lang.String getWriteScope()
public void setWriteScope(java.lang.String scope)
scope
- Write scope statementpublic java.util.List<java.lang.Integer> writeFields()
selected
.public void setWriteFields(java.util.Collection<java.lang.Integer> fields)
selected
.fields
- Collection of field numbers to which the user is to be granted
read accesspublic void clear()
public void get(java.lang.String db, java.lang.String ug) throws TdbException
db
- Name of database for which rights are to be retrievedug
- Name of user or group for whom rights are to be retrievedTdbException
public void get(java.lang.String ug) throws TdbException
ug
- Name of user or group for whom access rights are to be retrievedTdbException
public void put(java.lang.String db, java.lang.String ug) throws TdbException
db
- Name of database, thesaurus or cluster for which these rights are validug
- Name of user or group who's rights are being affectedTdbException
public void put() throws TdbException
get
method, as the database and user name established
during that call are used here.TdbException