public class CheckAuthorizations extends XMLRequest implements java.lang.Iterable<CheckAuthorizations.Candidate>
Example:
CheckAuthorizations.Candidate check1 = new CheckAuthorizations.Candidate(new UC4UserName("JOBS.R3.NEW.26"), UserRight.Type.JOBS, 'R'); CheckAuthorizations.Candidate check2 = new CheckAuthorizations.Candidate(new UC4UserName("JOBS.R3.NEW.26"), UserRight.Type.JOBS, 'C'); CheckAuthorizations checkAuth = new CheckAuthorizations(check1, check2); uc4.sendRequestAndWait(checkAuth); for (CheckAuthorizations.Candidate c : checkAuth) { System.out.println("Access mode "+c.getAccess()+" for object "+c.getName()+ (c.getResult() ? " is allowed" : " has been denied")); }
Modifier and Type | Class and Description |
---|---|
static class |
CheckAuthorizations.Candidate
This class represents a candidate to test.
|
Constructor and Description |
---|
CheckAuthorizations(CheckAuthorizations.Candidate... candidates)
Creates a new
CheckUserAuthorizations request. |
Modifier and Type | Method and Description |
---|---|
protected void |
createRequest(com.uc4.util.XMLDocument doc,
org.w3c.dom.Element request,
ConnectionAttributes sessionInfo)
Creates the XML Document for the request.
|
protected java.lang.String |
getSrc()
Returns the request source.
|
protected void |
handleContent(com.uc4.util.XMLDocument doc,
ConnectionAttributes session) |
protected boolean |
isAllowedInClientZero()
This method is used internally.
|
java.util.Iterator<CheckAuthorizations.Candidate> |
iterator() |
int |
size()
Returns the number of candidates.
|
assertClientZero, assertServerVersion, checkClient, checkID, checkLnr, checkNull, checkSelStatisticsPrivilege, checkSystemOverviewPrivilege, checkUC4ObjectEmptyName, checkUC4ObjectName, createNATFor, createNATRequest, emptyAttributes, getAllMessageBoxes, getMessageBox, getRequestID, handleResponse, ignoreMessageBox, send, setMessageBox, showQuarantineNotification
public CheckAuthorizations(CheckAuthorizations.Candidate... candidates)
CheckUserAuthorizations
request.candidates
- Candidates to testprotected void createRequest(com.uc4.util.XMLDocument doc, org.w3c.dom.Element request, ConnectionAttributes sessionInfo)
XMLRequest
createRequest
in class XMLRequest
doc
- Document, used to create new Elementsrequest
- Request Element - classes append information to this request elementsessionInfo
- Information about the sessionprotected void handleContent(com.uc4.util.XMLDocument doc, ConnectionAttributes session)
handleContent
in class XMLRequest
protected java.lang.String getSrc()
XMLRequest
getSrc
in class XMLRequest
public java.util.Iterator<CheckAuthorizations.Candidate> iterator()
iterator
in interface java.lang.Iterable<CheckAuthorizations.Candidate>
protected boolean isAllowedInClientZero()
XMLRequest
XMLRequest
is allowed in client 0.
The default implementation returns false
, subclasses may override.isAllowedInClientZero
in class XMLRequest
true
if this request is allowed in client 0, false
otherwisepublic int size()