|
||||||||||
| 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 java.lang.String |
BOOL
Values of Bool type attributes are expressed as
'True' or 'False', as defined below. |
static java.lang.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 java.lang.String |
FALSE
'False' value of a 'Bool' attribute. |
static java.lang.String |
FLOAT
Values of Float (i.e. |
static java.lang.String |
INT
Values of Int (i.e. |
static java.lang.String |
STRING
Values of String type attributes are expressed as-is. |
static java.lang.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 java.text.SimpleDateFormat#format(java.util.Date),
when the SimpleDateFormat object is instantiated with
"EEE MMM dd HH:mm:ss yyyy". |
static java.lang.String |
TRIGGER
Trigger type attributes don't have a value at all. |
static java.lang.String |
TRUE
'True' value of a 'Bool' attribute. |
| Method Summary | |
|---|---|
boolean |
existsAttribute(java.lang.String key)
Checks the existence of an attribute. |
java.lang.String[] |
findAttributes(java.lang.String... patterns)
Finds matching attributes. |
java.lang.String |
getAttribute(java.lang.String key)
Gets the value of an attribute. |
java.lang.String[] |
getVectorAttribute(java.lang.String key)
Gets the array of values associated with an attribute. |
boolean |
isReadOnlyAttribute(java.lang.String key)
Checks the attribute for being read-only. |
boolean |
isRemovableAttribute(java.lang.String key)
Checks the attribute for being removable. |
boolean |
isVectorAttribute(java.lang.String key)
Checks the attribute for being a vector. |
boolean |
isWritableAttribute(java.lang.String key)
Checks the attribute for being writable. |
java.lang.String[] |
listAttributes()
Gets the list of attribute keys. |
void |
removeAttribute(java.lang.String key)
Removes an attribute. |
void |
setAttribute(java.lang.String key,
java.lang.String value)
Sets an attribute to a value. |
void |
setVectorAttribute(java.lang.String key,
java.lang.String[] values)
Sets an attribute to an array of values. |
| Field Detail |
|---|
static final java.lang.String STRING
String type attributes are expressed as-is.
static final java.lang.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 java.lang.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 java.lang.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 java.lang.String BOOL
Bool type attributes are expressed as
'True' or 'False', as defined below.
static final java.lang.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 java.text.SimpleDateFormat#format(java.util.Date),
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 java.lang.String TRIGGER
Trigger type attributes don't have a value at all.
They are used in monitoring.
static final java.lang.String TRUE
static final java.lang.String FALSE
| Method Detail |
|---|
void setAttribute(java.lang.String key,
java.lang.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.
java.lang.String getAttribute(java.lang.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(java.lang.String key,
java.lang.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.
java.lang.String[] getVectorAttribute(java.lang.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(java.lang.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.
java.lang.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.
java.lang.String[] findAttributes(java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.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 | |||||||||