| |
|
| java.lang.Object com.sun.servicetag.Registry
Registry | public class Registry (Code) | | A service tag registry is a XML-based registry containing
the list of
ServiceTag service tags installed in the system.
The
Registry class provides interfaces
to add, remove, update, and get a service tag from a service tag
registry.
This
Registry class may not be supported
on all systems. The
Registry.isSupported method
can be called to determine if it is supported.
A registry may implement restrictions to only allow certain users
to
Registry.updateServiceTag update and
to
Registry.removeServiceTag remove a service tag record. Typically,
only the owner of the service tag, the owner of the registry
and superuser are authorized to update or remove a service tag in
the registry.
See Also:
* Service Tag User Guide |
Method Summary | |
public ServiceTag | addServiceTag(ServiceTag st) Adds a service tag to this registry. | public Set<ServiceTag> | findServiceTags(String productURN) Returns the service tags of the specified
product_urn in this registry. | public ServiceTag | getServiceTag(String instanceURN) Returns a
ServiceTag object of the given instance_urn
in this registry. | public static Registry | getSystemRegistry() Returns the system service tag registry. | public static boolean | isSupported() Returns
true if the
Registry class is supported on this system. | public ServiceTag | removeServiceTag(String instanceURN) Removes a service tag of the given instance_urn from this
registry. | public ServiceTag | updateServiceTag(String instanceURN, String productDefinedInstanceID) Updates the product_defined_instance_id in the service tag
of the specified instance_urn in this registry.
Parameters: instanceURN - the instance_urn of the service tag to be updated. Parameters: productDefinedInstanceID - the value of the product_defined_instance_id to be set. |
addServiceTag | public ServiceTag addServiceTag(ServiceTag st) throws IOException(Code) | | Adds a service tag to this registry.
If the given service tag has an empty instance_urn,
this helper class will generate a URN and place it in the
copy of the service tag in this registry.
This method will return the
ServiceTag representing
the service tag entry to this registry.
Parameters: st - ServiceTag object a ServiceTag object representing the service tagentry to this registry. throws: IllegalArgumentException - if a service tag of the sameinstance_urn already exists in this registry. throws: java.io.IOException - if an I/O error occurs in this operation. |
findServiceTags | public Set<ServiceTag> findServiceTags(String productURN) throws IOException(Code) | | Returns the service tags of the specified
product_urn in this registry.
Parameters: productURN - the product_urn to look up a Set of ServiceTag objectsof the specified product_urn in this registry. throws: java.io.IOException - if an I/O error occurs in this operation. |
getServiceTag | public ServiceTag getServiceTag(String instanceURN) throws IOException(Code) | | Returns a
ServiceTag object of the given instance_urn
in this registry.
Parameters: instanceURN - the instance_urn of the service tag a ServiceTag object of the given instance_urnin this registry; or null if not found. throws: java.io.IOException - if an I/O error occurs in this operation. |
getSystemRegistry | public static Registry getSystemRegistry()(Code) | | Returns the system service tag registry. The
Registry class
may not be supported on some platforms; use the
Registry.isSupported method to determine if it is supported.
the Registry object for the system service tag registry. throws: UnsupportedOperationException - if the Registry class is not supported. |
isSupported | public static boolean isSupported()(Code) | | Returns
true if the
Registry class is supported on this system.
true if the Registry class is supported; otherwise, return false . |
removeServiceTag | public ServiceTag removeServiceTag(String instanceURN) throws IOException(Code) | | Removes a service tag of the given instance_urn from this
registry.
Parameters: instanceURN - the instance_urn of the service tag to be removed. the ServiceTag object removed from this registry;or null if the service tag does not exist in this registry. throws: UnauthorizedAccessException - if the user is not authorized to remove the service tag of the given instance_urn from this registry. throws: java.io.IOException - if an I/O error occurs in this operation. |
updateServiceTag | public ServiceTag updateServiceTag(String instanceURN, String productDefinedInstanceID) throws IOException(Code) | | Updates the product_defined_instance_id in the service tag
of the specified instance_urn in this registry.
Parameters: instanceURN - the instance_urn of the service tag to be updated. Parameters: productDefinedInstanceID - the value of the product_defined_instance_id to be set. the updated ServiceTag object;or null if the service tag does not exist in thisregistry. throws: UnauthorizedAccessException - if the user is not authorized to update the service tag from this registry. throws: IOException - if an I/O error occurs in this operation. |
|
|
|