public interface AttributeService extends OpssServiceInstance
Attribute keys will be used to perform operations to attributes, and will be unique within a JVM in attribute service.
Each key can be associated with at most one attribute.
Methods are protected by AttributeAccessPermission.
Methods are thread-safe.
OpssServiceInstance.StateJpsPersistable.Mode| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
getAttribute(java.lang.String key)
Returns the attribute associated with the specified key.
|
void |
removeAttribute(java.lang.String key)
Removes the attribute object associated with the key.
|
void |
setAttribute(java.lang.String key, java.lang.Object attribute)
Sets the attribute given the specified key.
|
getStateaccept, getName, getServiceProviderpersist, refresh
void setAttribute(java.lang.String key,
java.lang.Object attribute)
throws AttributeServiceException,
java.security.AccessControlException
If the attribute passed in is null, the effect is the same as calling AttributeService.removeAttribute(String key).
If the attribute doesn't exists, it is added. Otherwise, the old attribute is updated.
oracle.security.jps.service.attribute.AttributeAccessPermission is required.
key - the key whose associated attribute is to be added or updatedattribute - the attribute to be associated with the specified keyAttributeServiceExceptionjava.security.AccessControlException - thrown if a requested access to attribute was denied
java.lang.Object getAttribute(java.lang.String key)
throws AttributeServiceException,
java.security.AccessControlException
If the attribute doesn't exists, return null.
oracle.security.jps.service.attribute.AttributeAccessPermission is required.
key - the key whose associated attribute is to be returnednull if the attribute doesn't existsAttributeServiceExceptionjava.security.AccessControlException - thrown if a requested access to attribute was denied
void removeAttribute(java.lang.String key)
throws AttributeServiceException,
java.security.AccessControlException
If the attribute doesn't exists, nothing happens.
oracle.security.jps.service.attribute.AttributeAccessPermission is required.
key - the key whose associated attribute is to be removedAttributeServiceExceptionjava.security.AccessControlException - thrown if a requested access to attribute was denied