Class ServicePermissionCollection

  • All Implemented Interfaces:
    java.io.Serializable

    final class ServicePermissionCollection
    extends java.security.PermissionCollection
    Stores a set of ServicePermission permissions.
    See Also:
    Permission, Permissions, PermissionCollection
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private boolean all_allowed
      Boolean saying if "*" is in the collection.
      private java.util.Map filterPermissions
      Table of permissions with filter expressions.
      private java.util.Map permissions
      Table of permissions.
      private static java.io.ObjectStreamField[] serialPersistentFields  
      (package private) static long serialVersionUID  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(java.security.Permission permission)
      Adds a permission to this permission collection.
      private int effective​(java.lang.String requestedName, int desired, int effective)
      Consult permissions map to compute the effective permission for the requested permission name.
      java.util.Enumeration elements()
      Returns an enumeration of all the ServicePermission objects in the container.
      boolean implies​(java.security.Permission permission)
      Determines if a set of permissions implies the permissions expressed in permission.
      private void readObject​(java.io.ObjectInputStream in)  
      private void writeObject​(java.io.ObjectOutputStream out)  
      • Methods inherited from class java.security.PermissionCollection

        elementsAsStream, isReadOnly, setReadOnly, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • permissions

        private transient java.util.Map permissions
        Table of permissions.
      • all_allowed

        private boolean all_allowed
        Boolean saying if "*" is in the collection.
      • filterPermissions

        private java.util.Map filterPermissions
        Table of permissions with filter expressions.
      • serialPersistentFields

        private static final java.io.ObjectStreamField[] serialPersistentFields
    • Constructor Detail

      • ServicePermissionCollection

        public ServicePermissionCollection()
        Creates an empty ServicePermissions object.
    • Method Detail

      • add

        public void add​(java.security.Permission permission)
        Adds a permission to this permission collection.
        Specified by:
        add in class java.security.PermissionCollection
        Parameters:
        permission - The Permission object to add.
        Throws:
        java.lang.IllegalArgumentException - If the specified permission is not a ServicePermission object.
        java.lang.SecurityException - If this ServicePermissionCollection object has been marked read-only.
      • implies

        public boolean implies​(java.security.Permission permission)
        Determines if a set of permissions implies the permissions expressed in permission.
        Specified by:
        implies in class java.security.PermissionCollection
        Parameters:
        permission - The Permission object to compare.
        Returns:
        true if permission is a proper subset of a permission in the set; false otherwise.
      • effective

        private int effective​(java.lang.String requestedName,
                              int desired,
                              int effective)
        Consult permissions map to compute the effective permission for the requested permission name.
        Parameters:
        requestedName - The requested service name.
        desired - The desired actions.
        effective - The effective actions.
        Returns:
        The new effective actions.
      • elements

        public java.util.Enumeration elements()
        Returns an enumeration of all the ServicePermission objects in the container.
        Specified by:
        elements in class java.security.PermissionCollection
        Returns:
        Enumeration of all the ServicePermission objects.
      • writeObject

        private void writeObject​(java.io.ObjectOutputStream out)
                          throws java.io.IOException
        Throws:
        java.io.IOException
      • readObject

        private void readObject​(java.io.ObjectInputStream in)
                         throws java.io.IOException,
                                java.lang.ClassNotFoundException
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException