|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Attributes
Provides a uniform paradigm to set and query parameters and properties of SAGA objects. Attributes map a key to a value, and have a type. All keys are represented as a String, values are either represented as a String or a list of Strings, depending on whether the attribute is scalar or a vector. Also, attribute values have a type, which determines how the values are interpreted.
Field Summary | |
---|---|
static String |
BOOL
Values of Bool type attributes are expressed as
'True' or 'False', as defined below. |
static String |
ENUM
Values of Enum type attributes are expressed as strings, and
have the literal value of the respective enums as defined in the
attribute type at hand. |
static String |
FALSE
'False' value of a 'Bool' attribute. |
static String |
FLOAT
Values of Float (i.e. floating point) type attributes
are expressed as they would in result of a printf of the format
%Lf as defined by POSIX. |
static String |
INT
Values of Int (i.e. |
static String |
STRING
Values of String type attributes are expressed as-is. |
static String |
TIME
Values of Time type attributes are expressed as they
would in result of a call to ctime(), as defined by POSIX, which is almost
the same as the result SimpleDateFormat ,
when the SimpleDateFormat object is instantiated with
"EEE MMM dd HH:mm:ss yyyy". |
static String |
TRIGGER
Trigger type attributes don't have a value at all. |
static String |
TRUE
'True' value of a 'Bool' attribute. |
Method Summary | |
---|---|
boolean |
existsAttribute(String key)
Checks the existence of an attribute. |
String[] |
findAttributes(String... patterns)
Finds matching attributes. |
String |
getAttribute(String key)
Gets the value of an attribute. |
String[] |
getVectorAttribute(String key)
Gets the array of values associated with an attribute. |
boolean |
isReadOnlyAttribute(String key)
Checks the attribute for being read-only. |
boolean |
isRemovableAttribute(String key)
Checks the attribute for being removable. |
boolean |
isVectorAttribute(String key)
Checks the attribute for being a vector. |
boolean |
isWritableAttribute(String key)
Checks the attribute for being writable. |
String[] |
listAttributes()
Gets the list of attribute keys. |
void |
removeAttribute(String key)
Removes an attribute. |
void |
setAttribute(String key,
String value)
Sets an attribute to a value. |
void |
setVectorAttribute(String key,
String[] values)
Sets an attribute to an array of values. |
Field Detail |
---|
static final String STRING
String
type attributes are expressed as-is.
static final String INT
Int
(i.e. Integer) type attributes are expressed
as they would in result of a printf of the format %lld as defined by
POSIX.
static final String ENUM
Enum
type attributes are expressed as strings, and
have the literal value of the respective enums as defined in the
attribute type at hand.
static final String FLOAT
Float
(i.e. floating point) type attributes
are expressed as they would in result of a printf of the format
%Lf as defined by POSIX.
static final String BOOL
Bool
type attributes are expressed as
'True' or 'False', as defined below.
static final String TIME
Time
type attributes are expressed as they
would in result of a call to ctime(), as defined by POSIX, which is almost
the same as the result SimpleDateFormat
,
when the SimpleDateFormat
object is instantiated with
"EEE MMM dd HH:mm:ss yyyy". The only difference is that the date field should
be space-padded, not zero-padded.
Applications can also specify these attribute values as seconds since epoch
(this formats the string as an Int
type), but all time attributes
set by implementations must be in the format described above.
static final String TRIGGER
Trigger
type attributes don't have a value at all.
They are used in monitoring.
static final String TRUE
static final String FALSE
Method Detail |
---|
void setAttribute(String key, String value) throws NotImplementedException, AuthenticationFailedException, AuthorizationFailedException, PermissionDeniedException, IncorrectStateException, BadParameterException, DoesNotExistException, TimeoutException, NoSuccessException
key
- the attribute key.value
- value to set the attribute to.
NotImplementedException
- is thrown if the implementation does not provide an
implementation of this method.
BadParameterException
- is thrown when the specified value does not conform to the attribute type.
DoesNotExistException
- is thrown when the attribute does not exist.
IncorrectStateException
- is thrown when the attribute is a vector attribute.
PermissionDeniedException
- is thrown when the method failed because the identity used did
not have sufficient permissions to perform the operation
successfully.
AuthorizationFailedException
- is thrown when none of the available contexts of the
used session could be used for successful authorization.
This error indicates that the resource could not be accessed
at all, and not that an operation was not available due to
restricted permissions.
AuthenticationFailedException
- is thrown when operation failed because none of the available
session contexts could successfully be used for authentication.
TimeoutException
- is thrown when a remote operation did not complete successfully
because the network communication or the remote service timed
out.
NoSuccessException
- is thrown when the operation was not successfully performed,
and none of the other exceptions apply.String getAttribute(String key) throws NotImplementedException, AuthenticationFailedException, AuthorizationFailedException, PermissionDeniedException, IncorrectStateException, DoesNotExistException, TimeoutException, NoSuccessException
key
- the attribute key.
NotImplementedException
- is thrown if the implementation does not provide an
implementation of this method.
DoesNotExistException
- is thrown when the attribute does not exist.
IncorrectStateException
- is thrown when the attribute is a vector attribute.
PermissionDeniedException
- is thrown when the method failed because the identity used did
not have sufficient permissions to perform the operation
successfully.
AuthorizationFailedException
- is thrown when none of the available contexts of the
used session could be used for successful authorization.
This error indicates that the resource could not be accessed
at all, and not that an operation was not available due to
restricted permissions.
AuthenticationFailedException
- is thrown when operation failed because none of the available
session contexts could successfully be used for authentication.
TimeoutException
- is thrown when a remote operation did not complete successfully
because the network communication or the remote service timed
out.
NoSuccessException
- is thrown when the operation was not successfully performed,
and none of the other exceptions apply.void setVectorAttribute(String key, String[] values) throws NotImplementedException, AuthenticationFailedException, AuthorizationFailedException, PermissionDeniedException, IncorrectStateException, BadParameterException, DoesNotExistException, TimeoutException, NoSuccessException
key
- the attribute key.values
- values to set the attribute to.
NotImplementedException
- is thrown if the implementation does not provide an
implementation of this method.
BadParameterException
- is thrown when the specified value does not conform to the attribute type.
In particular, this exception is thrown when the specified value is
null
. An array with no elements is allowed, though.
DoesNotExistException
- is thrown when the attribute does not exist.
IncorrectStateException
- is thrown when the attribute is not a vector attribute.
PermissionDeniedException
- is thrown when the method failed because the identity used did
not have sufficient permissions to perform the operation
successfully.
AuthorizationFailedException
- is thrown when none of the available contexts of the
used session could be used for successful authorization.
This error indicates that the resource could not be accessed
at all, and not that an operation was not available due to
restricted permissions.
AuthenticationFailedException
- is thrown when operation failed because none of the available
session contexts could successfully be used for authentication.
TimeoutException
- is thrown when a remote operation did not complete successfully
because the network communication or the remote service timed
out.
NoSuccessException
- is thrown when the operation was not successfully performed,
and none of the other exceptions apply.String[] getVectorAttribute(String key) throws NotImplementedException, AuthenticationFailedException, AuthorizationFailedException, PermissionDeniedException, IncorrectStateException, DoesNotExistException, TimeoutException, NoSuccessException
key
- the attribute key.
null
.
NotImplementedException
- is thrown if the implementation does not provide an
implementation of this method.
DoesNotExistException
- is thrown when the attribute does not exist.
IncorrectStateException
- is thrown when the attribute is not a vector attribute.
PermissionDeniedException
- is thrown when the method failed because the identity used did
not have sufficient permissions to perform the operation
successfully.
AuthorizationFailedException
- is thrown when none of the available contexts of the
used session could be used for successful authorization.
This error indicates that the resource could not be accessed
at all, and not that an operation was not available due to
restricted permissions.
AuthenticationFailedException
- is thrown when operation failed because none of the available
session contexts could successfully be used for authentication.
TimeoutException
- is thrown when a remote operation did not complete successfully
because the network communication or the remote service timed
out.
NoSuccessException
- is thrown when the operation was not successfully performed,
and none of the other exceptions apply.void removeAttribute(String key) throws NotImplementedException, AuthenticationFailedException, AuthorizationFailedException, PermissionDeniedException, DoesNotExistException, TimeoutException, NoSuccessException
key
- the attribute key.
NotImplementedException
- is thrown if the implementation does not provide an
implementation of this method.
DoesNotExistException
- is thrown when the attribute does not exist.
PermissionDeniedException
- is thrown when the method failed because the identity used did
not have sufficient permissions to perform the operation
successfully.
AuthorizationFailedException
- is thrown when none of the available contexts of the
used session could be used for successful authorization.
This error indicates that the resource could not be accessed
at all, and not that an operation was not available due to
restricted permissions.
AuthenticationFailedException
- is thrown when operation failed because none of the available
session contexts could successfully be used for authentication.
TimeoutException
- is thrown when a remote operation did not complete successfully
because the network communication or the remote service timed
out.
NoSuccessException
- is thrown when the operation was not successfully performed,
and none of the other exceptions apply.String[] listAttributes() throws NotImplementedException, AuthenticationFailedException, AuthorizationFailedException, PermissionDeniedException, TimeoutException, NoSuccessException
NotImplementedException
- is thrown if the implementation does not provide an
implementation of this method.
PermissionDeniedException
- is thrown when the method failed because the identity used did
not have sufficient permissions to perform the operation
successfully.
AuthorizationFailedException
- is thrown when none of the available contexts of the
used session could be used for successful authorization.
This error indicates that the resource could not be accessed
at all, and not that an operation was not available due to
restricted permissions.
AuthenticationFailedException
- is thrown when operation failed because none of the available
session contexts could successfully be used for authentication.
TimeoutException
- is thrown when a remote operation did not complete successfully
because the network communication or the remote service timed
out.
NoSuccessException
- is thrown when the operation was not successfully performed,
and none of the other exceptions apply.String[] findAttributes(String... patterns) throws NotImplementedException, BadParameterException, AuthenticationFailedException, AuthorizationFailedException, PermissionDeniedException, TimeoutException, NoSuccessException
key-pattern=value-pattern
. Both the key-pattern
value-pattern
can contain wildcards. The value-pattern
can be empty, and the method will then return all attribute keys which match the
key-pattern
. The equal sign =
can then be omitted
from the pattern.
patterns
- the search patterns.
NotImplementedException
- is thrown if the implementation does not provide an
implementation of this method.
BadParameterException
- is thrown when one ore more of the specified patterns are not correctly
formatted.
PermissionDeniedException
- is thrown when the method failed because the identity used did
not have sufficient permissions to perform the operation
successfully.
AuthorizationFailedException
- is thrown when none of the available contexts of the
used session could be used for successful authorization.
This error indicates that the resource could not be accessed
at all, and not that an operation was not available due to
restricted permissions.
AuthenticationFailedException
- is thrown when operation failed because none of the available
session contexts could successfully be used for authentication.
TimeoutException
- is thrown when a remote operation did not complete successfully
because the network communication or the remote service timed
out.
NoSuccessException
- is thrown when the operation was not successfully performed,
and none of the other exceptions apply.boolean existsAttribute(String key) throws NotImplementedException, AuthenticationFailedException, AuthorizationFailedException, PermissionDeniedException, TimeoutException, NoSuccessException
key
- the attribute key.
true
if the attribute exists.
NotImplementedException
- is thrown if the implementation does not provide an
implementation of this method.
PermissionDeniedException
- is thrown when the method failed because the identity used did
not have sufficient permissions to perform the operation
successfully.
AuthorizationFailedException
- is thrown when none of the available contexts of the
used session could be used for successful authorization.
This error indicates that the resource could not be accessed
at all, and not that an operation was not available due to
restricted permissions.
AuthenticationFailedException
- is thrown when operation failed because none of the available
session contexts could successfully be used for authentication.
TimeoutException
- is thrown when a remote operation did not complete successfully
because the network communication or the remote service timed
out.
NoSuccessException
- is thrown when the operation was not successfully performed,
and none of the other exceptions apply.boolean isReadOnlyAttribute(String key) throws NotImplementedException, AuthenticationFailedException, AuthorizationFailedException, PermissionDeniedException, DoesNotExistException, TimeoutException, NoSuccessException
key
- the attribute key.
true
if the attribute exists and is read-only.
NotImplementedException
- is thrown if the implementation does not provide an
implementation of this method.
DoesNotExistException
- is thrown when the attribute does not exist.
PermissionDeniedException
- is thrown when the method failed because the identity used did
not have sufficient permissions to perform the operation
successfully.
AuthorizationFailedException
- is thrown when none of the available contexts of the
used session could be used for successful authorization.
This error indicates that the resource could not be accessed
at all, and not that an operation was not available due to
restricted permissions.
AuthenticationFailedException
- is thrown when operation failed because none of the available
session contexts could successfully be used for authentication.
TimeoutException
- is thrown when a remote operation did not complete successfully
because the network communication or the remote service timed
out.
NoSuccessException
- is thrown when the operation was not successfully performed,
and none of the other exceptions apply.boolean isWritableAttribute(String key) throws NotImplementedException, AuthenticationFailedException, AuthorizationFailedException, PermissionDeniedException, DoesNotExistException, TimeoutException, NoSuccessException
key
- the attribute key.
true
if the attribute exists and is writable.
NotImplementedException
- is thrown if the implementation does not provide an
implementation of this method.
DoesNotExistException
- is thrown when the attribute does not exist.
PermissionDeniedException
- is thrown when the method failed because the identity used did
not have sufficient permissions to perform the operation
successfully.
AuthorizationFailedException
- is thrown when none of the available contexts of the
used session could be used for successful authorization.
This error indicates that the resource could not be accessed
at all, and not that an operation was not available due to
restricted permissions.
AuthenticationFailedException
- is thrown when operation failed because none of the available
session contexts could successfully be used for authentication.
TimeoutException
- is thrown when a remote operation did not complete successfully
because the network communication or the remote service timed
out.
NoSuccessException
- is thrown when the operation was not successfully performed,
and none of the other exceptions apply.boolean isRemovableAttribute(String key) throws NotImplementedException, AuthenticationFailedException, AuthorizationFailedException, PermissionDeniedException, DoesNotExistException, TimeoutException, NoSuccessException
key
- the attribute key.
true
if the attribute exists and is removable.
NotImplementedException
- is thrown if the implementation does not provide an
implementation of this method.
DoesNotExistException
- is thrown when the attribute does not exist.
PermissionDeniedException
- is thrown when the method failed because the identity used did
not have sufficient permissions to perform the operation
successfully.
AuthorizationFailedException
- is thrown when none of the available contexts of the
used session could be used for successful authorization.
This error indicates that the resource could not be accessed
at all, and not that an operation was not available due to
restricted permissions.
AuthenticationFailedException
- is thrown when operation failed because none of the available
session contexts could successfully be used for authentication.
TimeoutException
- is thrown when a remote operation did not complete successfully
because the network communication or the remote service timed
out.
NoSuccessException
- is thrown when the operation was not successfully performed,
and none of the other exceptions apply.boolean isVectorAttribute(String key) throws NotImplementedException, AuthenticationFailedException, AuthorizationFailedException, PermissionDeniedException, DoesNotExistException, TimeoutException, NoSuccessException
key
- the attribute key.
true
if the attribute is a vector attribute.
NotImplementedException
- is thrown if the implementation does not provide an
implementation of this method.
DoesNotExistException
- is thrown when the attribute does not exist.
PermissionDeniedException
- is thrown when the method failed because the identity used did
not have sufficient permissions to perform the operation
successfully.
AuthorizationFailedException
- is thrown when none of the available contexts of the
used session could be used for successful authorization.
This error indicates that the resource could not be accessed
at all, and not that an operation was not available due to
restricted permissions.
AuthenticationFailedException
- is thrown when operation failed because none of the available
session contexts could successfully be used for authentication.
TimeoutException
- is thrown when a remote operation did not complete successfully
because the network communication or the remote service timed
out.
NoSuccessException
- is thrown when the operation was not successfully performed,
and none of the other exceptions apply.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |