A DatabasePermission is defined by two string attributes, similar to a java.io.FilePermission:
DatabasePermission#DatabasePermission(String, String), SystemPermission, java.io.FilePermission
| Modifier and Type | Field and Description |
|---|---|
| private String | actions
The actions of this permission, as returned by |
| public static final String | CREATE
The create database permission. |
| protected static final List | LEGAL_ACTIONS
The legal database permission action names. |
| private transient String | parentPath
The parent directory of this permission's canonical directory path, or null if this permission's path does not have a parent directory. |
| private transient String | path
This permission's canonical directory path. |
| private transient char | pathType
Indicates whether the path denotes an inclusive, recursive, wildcard, or single location. |
| public static final char | URL_PATH_INCLUSIVE_CHAR
The path type character matching any database anywhere. |
| public static final String | URL_PATH_INCLUSIVE_STRING
The location text matching any database anywhere. |
| public static final char | URL_PATH_RECURSIVE_CHAR
The wildcard character matching any database under a directory or its subdirectories. |
| public static final String | |
| public static final String | |
| public static final char | URL_PATH_RELATIVE_CHAR
The relative path character. |
| public static final String | |
| public static final String | |
| public static final char | URL_PATH_SEPARATOR_CHAR
The URL file path separator character. |
| public static final String | |
| public static final char | URL_PATH_WILDCARD_CHAR
The wildcard character matching any database in a directory. |
| public static final String | |
| public static final String | |
| public static final String | URL_PROTOCOL_DIRECTORY
The URL protocol scheme specifying a directory location. |
| Access | Constructor and Description |
|---|---|
| public | DatabasePermission(String
the database URL url, String the action string actions)Creates a new DatabasePermission with the specified URL and actions. |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if obj is a DatabasePermission, and has the same URL and actions as this DatabasePermission object, false if notthe object we are testing for equality with this object obj)Implements abstract java. Checks two DatabasePermission objects for equality. |
| public String | Returns: the canonical string representation of the actionsImplements abstract java. Returns the "canonical string representation" of the actions. |
| public int | Returns: a hash code value for this objectImplements abstract java. Returns the hash code value for this object. |
| public boolean | Returns: true if the specified permission is implied by this object, false if notthe permission to check against p)Implements abstract java. Checks if this DatabasePermission implies a specified permission. |
| protected void | |
| protected void | |
| private void | readObject(ObjectInputStream s)
Called upon Deserialization for restoring the state of this DatabasePermission from a stream. |
| private void | writeObject(ObjectOutputStream s)
Called upon Serialization for saving the state of this DatabasePermission to a stream. |
| actions | back to summary |
|---|---|
| private String actions The actions of this permission, as returned by | |
| CREATE | back to summary |
|---|---|
| public static final String CREATE The create database permission. | |
| LEGAL_ACTIONS | back to summary |
|---|---|
| protected static final List<String> LEGAL_ACTIONS The legal database permission action names. | |
| parentPath | back to summary |
|---|---|
| private transient String parentPath The parent directory of this permission's canonical directory path, or null if this permission's path does not have a parent directory. Because canonical file paths are platform dependent, this field must not be serialized (hence transient) but be recomputed from the original URL upon deserialization. | |
| path | back to summary |
|---|---|
| private transient String path This permission's canonical directory path.
The path consists of a canonicalized form of the user-specified URL,
stripped off the protocol specification and any recursive/wildcard
characters, or | |
| pathType | back to summary |
|---|---|
| private transient char pathType Indicates whether the path denotes an inclusive, recursive, wildcard, or single location. If the path denotes an inclusive, recursive or wildcard location, this field's value is URL_PATH_INCLUSIVE_CHAR, URL_PATH_RECURSIVE_CHAR, or URL_PATH_WILDCARD_CHAR, respectively; otherwise, it's URL_PATH_SEPARATOR_CHAR denoting a single location. This field gets recomputed upon deserialization. | |
| URL_PATH_INCLUSIVE_CHAR | back to summary |
|---|---|
| public static final char URL_PATH_INCLUSIVE_CHAR The path type character matching any database anywhere. | |
| URL_PATH_INCLUSIVE_STRING | back to summary |
|---|---|
| public static final String URL_PATH_INCLUSIVE_STRING The location text matching any database anywhere. | |
| URL_PATH_RECURSIVE_CHAR | back to summary |
|---|---|
| public static final char URL_PATH_RECURSIVE_CHAR The wildcard character matching any database under a directory or its subdirectories. | |
| URL_PATH_RECURSIVE_STRING | back to summary |
|---|---|
| public static final String URL_PATH_RECURSIVE_STRING | |
| URL_PATH_RECURSIVE_SUFFIX | back to summary |
|---|---|
| public static final String URL_PATH_RECURSIVE_SUFFIX | |
| URL_PATH_RELATIVE_CHAR | back to summary |
|---|---|
| public static final char URL_PATH_RELATIVE_CHAR The relative path character. | |
| URL_PATH_RELATIVE_PREFIX | back to summary |
|---|---|
| public static final String URL_PATH_RELATIVE_PREFIX | |
| URL_PATH_RELATIVE_STRING | back to summary |
|---|---|
| public static final String URL_PATH_RELATIVE_STRING | |
| URL_PATH_SEPARATOR_CHAR | back to summary |
|---|---|
| public static final char URL_PATH_SEPARATOR_CHAR The URL file path separator character. | |
| URL_PATH_SEPARATOR_STRING | back to summary |
|---|---|
| public static final String URL_PATH_SEPARATOR_STRING | |
| URL_PATH_WILDCARD_CHAR | back to summary |
|---|---|
| public static final char URL_PATH_WILDCARD_CHAR The wildcard character matching any database in a directory. | |
| URL_PATH_WILDCARD_STRING | back to summary |
|---|---|
| public static final String URL_PATH_WILDCARD_STRING | |
| URL_PATH_WILDCARD_SUFFIX | back to summary |
|---|---|
| public static final String URL_PATH_WILDCARD_SUFFIX | |
| URL_PROTOCOL_DIRECTORY | back to summary |
|---|---|
| public static final String URL_PROTOCOL_DIRECTORY The URL protocol scheme specifying a directory location. | |
| DatabasePermission | back to summary |
|---|---|
| public DatabasePermission(String url, String actions) throws IOException Creates a new DatabasePermission with the specified URL and actions.
actions contains a comma-separated list of the desired actions
granted on a database. Currently, the only supported action is
URL denotes a database location URL, which, at this time, must
start with
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Implements abstract java. Checks two DatabasePermission objects for equality. Checks that obj is a DatabasePermission and has the same canonizalized URL and actions as this object.
| |
| getActions | back to summary |
|---|---|
| public String getActions() Implements abstract java. Returns the "canonical string representation" of the actions.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Implements abstract java. Returns the hash code value for this object.
| |
| implies | back to summary |
|---|---|
| public boolean implies(Permission p) Implements abstract java. Checks if this DatabasePermission implies a specified permission. This method returns true if:
| |
| initActions | back to summary |
|---|---|
| protected void initActions(String actions) Parses the list of database actions.
| |
| initLocation | back to summary |
|---|---|
| protected void initLocation(String url) throws IOException Parses the database location URL.
| |
| readObject | back to summary |
|---|---|
| private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException Called upon Deserialization for restoring the state of this DatabasePermission from a stream. | |
| writeObject | back to summary |
|---|---|
| private void writeObject(ObjectOutputStream s) throws IOException Called upon Serialization for saving the state of this DatabasePermission to a stream. | |