Package hec.security

Class ApplicationPermissionCollection

java.lang.Object
hec.security.ApplicationPermissionCollection
All Implemented Interfaces:
PermissionConstants, Serializable

@Deprecated public class ApplicationPermissionCollection extends Object implements Serializable, PermissionConstants
Deprecated.
this class was used in CAVI 2 to control permissions per application. It will be removed in future release
See Also:
  • Constructor Details

    • ApplicationPermissionCollection

      public ApplicationPermissionCollection()
      Deprecated.
      Create an empty BasicPermissions object.
  • Method Details

    • add

      public void add(Permission permission)
      Deprecated.
      Adds a permission to the ApplicationPermissions. The key for the hash is permission.path.
      Parameters:
      permission - the Permission object to add.
      Throws:
      IllegalArgumentException - - if the permission is not an ApplicationPermission
      SecurityException - - if this ApplicationPermissionCollection object has been marked readonly
    • remove

      public void remove(Permission permission)
      Deprecated.
      Removes a permission to the ApplicationPermissions. The key for the hash is permission.path.
      Parameters:
      permission - the Permission object to add.
      Throws:
      IllegalArgumentException - - if the permission is not an ApplicationPermission
      SecurityException - - if this ApplicationPermissionCollection object has been marked readonly
    • get

      public ApplicationPermission get(String name)
      Deprecated.
      return the application permission for name
    • implies

      public int implies(ApplicationPermission ap)
      Deprecated.
      Check and see if this set of permissions implies the permissions expressed in "permission".
      Parameters:
      ap - the Permission object to compare
      Returns:
      true if "permission" is a proper subset of a permission in the set, false if not.
    • getAction

      public int getAction(String permission)
      Deprecated.
    • elements

      public Enumeration elements()
      Deprecated.
      Returns an enumeration of all the BasicPermission objects in the container.
      Returns:
      an enumeration of all the BasicPermission objects.
    • setReadOnly

      public void setReadOnly()
      Deprecated.
      Marks this PermissionCollection object as "readonly". After a PermissionCollection object is marked as readonly, no new Permission objects can be added to it using add.
    • isReadOnly

      public boolean isReadOnly()
      Deprecated.
      Returns true if this PermissionCollection object is marked as readonly. If it is readonly, no new Permission objects can be added to it using add.

      By default, the object is not readonly. It can be set to readonly by a call to setReadOnly.

      Returns:
      true if this PermissionCollection object is marked as readonly, false otherwise.
    • toString

      public String toString()
      Deprecated.
      Returns a string describing this PermissionCollection object, providing information about all the permissions it contains. The format is:
       super.toString() (
         // enumerate all the Permission
         // objects and call toString() on them,
         // one per line..
       )
      super.toString is a call to the toString method of this object's superclass, which is Object. The result is this PermissionCollection's type name followed by this object's hashcode, thus enabling clients to differentiate different PermissionCollections object, even if they contain the same permissions.
      Overrides:
      toString in class Object
      Returns:
      information about this PermissionCollection object, as described above.