Class Authorizations

  • All Implemented Interfaces:
    java.lang.Iterable<Authorizations.Entry>

    public class Authorizations
    extends java.lang.Object
    implements java.lang.Iterable<Authorizations.Entry>
    Authorizations of Agents.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static interface  Authorizations.Entry
      Represents a single authorization for a client.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected Authorizations​(com.uc4.util.XMLDocument doc, java.lang.String haclElementName, boolean isAssignment)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clear()
      Sets the Read, Write and Execute permission for each client to false.
      java.util.Iterator<Authorizations.Entry> iterator()
      Returns an iterator over AuthorizationItem.
      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 store​(com.uc4.util.XMLDocument doc, org.w3c.dom.Element request)  
      • 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 Detail

      • Authorizations

        protected Authorizations​(com.uc4.util.XMLDocument doc,
                                 java.lang.String haclElementName,
                                 boolean isAssignment)
    • Method Detail

      • size

        public int size()
        Returns:
        Number of authorization entries encapsulated by this class
      • store

        protected void store​(com.uc4.util.XMLDocument doc,
                             org.w3c.dom.Element request)
      • setHostAuthorization

        public boolean setHostAuthorization​(int client,
                                            boolean read,
                                            boolean write,
                                            boolean execute)
        Sets the authorizations for a client.
        Parameters:
        client - Number of the client
        read - Read permission
        write - Write permission
        execute - 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 client
        read - Read permission
        write - Write permission
        execute - Execute permission
        selection - Selection
        Returns:
        true if the modification was successful, false if the client was not found
      • iterator

        public java.util.Iterator<Authorizations.Entry> iterator()
        Returns an iterator over AuthorizationItem.
        Specified by:
        iterator in interface java.lang.Iterable<Authorizations.Entry>
        Returns:
        Iterator
      • clear

        public void clear()
        Sets the Read, Write and Execute permission for each client to false.