Package com.uc4.api.objects
Class Authorizations
java.lang.Object
com.uc4.api.objects.Authorizations
- All Implemented Interfaces:
Iterable<Authorizations.Entry>
Authorizations of Agents.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
Represents a single authorization for a client. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Authorizations
(com.uc4.util.XMLDocument doc, String haclElementName, boolean isAssignment) -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Sets the Read, Write and Execute permission for each client tofalse
.iterator()
Returns an iterator overAuthorizationItem
.boolean
setHostAuthorization
(int client, boolean read, boolean write, boolean execute) Sets the authorizations for a client.boolean
setHostAuthorization
(int client, boolean read, boolean write, boolean execute, boolean selection) Sets the authorizations in case of Agent assignments.int
size()
protected void
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
Authorizations
protected Authorizations(com.uc4.util.XMLDocument doc, String haclElementName, boolean isAssignment)
-
-
Method Details
-
size
public int size()- Returns:
- Number of authorization entries encapsulated by this class
-
store
-
setHostAuthorization
public boolean setHostAuthorization(int client, boolean read, boolean write, boolean execute) Sets the authorizations for a client.- Parameters:
client
- Number of the clientread
- Read permissionwrite
- Write permissionexecute
- Execute permission- Returns:
- true if the modification was successful, false if the client was not found
-
setHostAuthorization
public boolean setHostAuthorization(int client, boolean read, boolean write, boolean execute, boolean selection) Sets the authorizations in case of Agent assignments. This method has an additional parameter for the selection field.- Parameters:
client
- Number of the clientread
- Read permissionwrite
- Write permissionexecute
- Execute permissionselection
- Selection- Returns:
- true if the modification was successful, false if the client was not found
-
iterator
Returns an iterator overAuthorizationItem
.- Specified by:
iterator
in interfaceIterable<Authorizations.Entry>
- Returns:
- Iterator
-
clear
public void clear()Sets the Read, Write and Execute permission for each client tofalse
.
-