Enum Class Authorization
- All Implemented Interfaces:
Serializable, Comparable<Authorization>, Constable
Indication of whether access to a file or URL is granted or denied.
A file may be specified in a
xlink:href attribute of an XML document,
or as a parameter in the definition of a coordinate operation (e.g. a datum shift grid file).
By default, Apache SIS opens these files only if they are relative to a directory
inferred by the context (for example $SIS_DATA/DatumChanges for datum shift grid files),
of if they are in the same directory or a sub-directory of the document referencing the file,
This enumeration can be used for replacing the default policy by an user-specified policy.
See the following methods for more information:
ReferenceResolver.accessControl(URI)— forxlink:hrefattributes in GML document,MathTransformBuilder.getAccessControl()— for datum shift grids or other files used by coordinate operations.
- Since:
- 1.7
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic AuthorizationReturns the enum constant of this class with the specified name.static Authorization[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
GRANTED
Access to the file or URL is authorized. The file may be opened and its content read. -
DENIED
Access to the file or URL is denied. It may result in anAccessDeniedExceptionto be thrown. -
DEFAULT
Access to the file or URL is determined by Apache SIS default policy. The access is granted if the reference is an URL local to the JSON or GML document, or if the URL is a file in the same directory or in a sub-directory of the JSON, GML, WKT, netCDF, etc. document referencing the file. In addition, some other special directories are accepted depending on the context:- For coordinate operations using datum shift grids,
grant access to files inside the
$SIS_DATA/DatumChangesdirectory.
- For coordinate operations using datum shift grids,
grant access to files inside the
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-