Package ej.property
Class PropertyPermission
- java.lang.Object
-
- java.security.Permission
-
- ej.property.PropertyPermission
-
- All Implemented Interfaces:
java.io.Serializable,java.security.Guard
public class PropertyPermission extends java.security.PermissionPermission to manipulate services usingPropertyLoader.getProperty(String)orPropertyLoader.getProperty(String, String)orPropertyRegistry.setProperty(String, String)orPropertyRegistry.removeProperty(String).- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringGET_ACTIONAction associated withPropertyLoader.getProperty(String)orPropertyLoader.getProperty(String, String).static java.lang.StringREMOVE_ACTIONAction associated withPropertyRegistry.removeProperty(String).static java.lang.StringSET_ACTIONAction associated withPropertyRegistry.setProperty(String, String).
-
Constructor Summary
Constructors Constructor Description PropertyPermission(java.lang.String parentName, java.lang.String key, java.lang.String action)Creates a permission for the given property.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.lang.StringgetActions()java.lang.StringgetKey()Gets the property key handled by this permission.inthashCode()booleanimplies(java.security.Permission permission)
-
-
-
Field Detail
-
GET_ACTION
public static final java.lang.String GET_ACTION
Action associated withPropertyLoader.getProperty(String)orPropertyLoader.getProperty(String, String).- See Also:
- Constant Field Values
-
SET_ACTION
public static final java.lang.String SET_ACTION
Action associated withPropertyRegistry.setProperty(String, String).- See Also:
- Constant Field Values
-
REMOVE_ACTION
public static final java.lang.String REMOVE_ACTION
Action associated withPropertyRegistry.removeProperty(String).- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PropertyPermission
public PropertyPermission(java.lang.String parentName, java.lang.String key, java.lang.String action)Creates a permission for the given property.The action can be one of
,GET_ACTIONorSET_ACTION.REMOVE_ACTION- Parameters:
parentName- the name of the service loader or service registry.key- the property key.action- the action realized with the service.
-
-
Method Detail
-
getActions
public java.lang.String getActions()
- Specified by:
getActionsin classjava.security.Permission
-
getKey
public java.lang.String getKey()
Gets the property key handled by this permission.- Returns:
- the property key.
-
equals
public boolean equals(@Nullable java.lang.Object obj)- Specified by:
equalsin classjava.security.Permission
-
hashCode
public int hashCode()
- Specified by:
hashCodein classjava.security.Permission
-
implies
public boolean implies(@Nullable java.security.Permission permission)- Specified by:
impliesin classjava.security.Permission
-
-