| java.lang.Object com.sun.servicetag.ServiceTag
ServiceTag | public class ServiceTag (Code) | | A service tag is an XML-based data structure that identifies a product or
a component on a system. The service tag schema is defined by the
Service Tags Technology. The location of the DTD file is platform dependent.
On Solaris, see /usr/share/lib/xml/dtd/servicetag.dtd.
A valid
ServiceTag instance must comply to the service tag schema
and contain the following fields:
The instance_urn can be specified when a
ServiceTag
object is created, or it can be generated when it is added to
a
RegistrationData object, or
Registrysystem service tag registry . The installer_uid and
timestamp are set when a
ServiceTag object
is added to a
RegistrationData object, or
Registrysystem service tag registry .
See Also: Service Tags FAQ |
Constructor Summary | |
| ServiceTag(String instanceURN, String productName, String productVersion, String productURN, String productParent, String productParentURN, String productDefinedInstanceID, String productVendor, String platformArch, String container, String source, int installerUID, Date timestamp) |
Method Summary | |
public boolean | equals(Object obj) Compares this service tag to the specified object. | public static String | generateInstanceURN() | public String | getContainer() Returns the container of the product. | public int | getInstallerUID() Returns the UID. | public String | getInstanceURN() Returns the uniform resource name of this service tag instance. | public static ServiceTag | getJavaServiceTag(String source) Returns the
ServiceTag instance for the running Java
platform. | public String | getPlatformArch() Returns the platform architecture on which the product
is running on. | public String | getProductDefinedInstanceID() Returns the identifier defined for this product instance.
the identifier defined for this product instance. | public String | getProductName() Returns the name of the product.
the product name. | public String | getProductParent() Returns the name of the product's parent.
the product's parent name. | public String | getProductParentURN() Returns the uniform resource name of the product's parent. | public String | getProductURN() Returns the uniform resource name of the product.
the product URN. | public String | getProductVendor() Returns the vendor of the product. | public String | getProductVersion() Returns the version of the product.
the product version. | public String | getSource() Returns the source of this service tag. | public Date | getTimestamp() Returns the timestamp. | public int | hashCode() Returns the hash code value for this service tag. | public static ServiceTag | newInstance(String productName, String productVersion, String productURN, String productParent, String productParentURN, String productDefinedInstanceID, String productVendor, String platformArch, String container, String source) Creates a service tag object with no instance_urn.
Parameters: productName - the name of the product. Parameters: productVersion - the version of the product. Parameters: productURN - the uniform resource name of the product Parameters: productParent - the name of the product's parent. Parameters: productParentURN - the uniform resource name of the product's parent. Parameters: productDefinedInstanceID - the instance identifier. Parameters: productVendor - the vendor of the product. Parameters: platformArch - the operating system architecture. Parameters: container - the container of the product. Parameters: source - the source of the product. throws: IllegalArgumentException - if any value of the input fieldsdoes not conform to the service tag XML schema. | public static ServiceTag | newInstance(String instanceURN, String productName, String productVersion, String productURN, String productParent, String productParentURN, String productDefinedInstanceID, String productVendor, String platformArch, String container, String source) Creates a service tag object with a specified instance_urn.
Parameters: instanceURN - the uniform resource name of this instance. Parameters: productName - the name of the product. Parameters: productVersion - the version of the product. Parameters: productURN - the uniform resource name of the product Parameters: productParent - the name of the product's parent. Parameters: productParentURN - the uniform resource name of the product's parent. Parameters: productDefinedInstanceID - the instance identifier. Parameters: productVendor - the vendor of the product. Parameters: platformArch - the operating system architecture. Parameters: container - the container of the product. Parameters: source - the source of the product. throws: IllegalArgumentException - if any value of the input fields does not conform to the service tag XML schema. | static ServiceTag | newInstanceWithUrnTimestamp(ServiceTag st) | void | setProductDefinedInstanceID(String productDefinedInstanceID) | public String | toString() Returns the string representation of this service tag. |
ServiceTag | ServiceTag(String instanceURN, String productName, String productVersion, String productURN, String productParent, String productParentURN, String productDefinedInstanceID, String productVendor, String platformArch, String container, String source, int installerUID, Date timestamp)(Code) | | |
equals | public boolean equals(Object obj)(Code) | | Compares this service tag to the specified object.
The result is
true if and only if the argument is
not
null and is a
ServiceTag object whose
instance_urn is the same as the
instance_urn of this service tag.
true if this service tag is the same as the specified object. |
generateInstanceURN | public static String generateInstanceURN()(Code) | | Returns a uniform resource name (URN) in this format:
"urn:st:<32-char
java.util.UUID uuid >"
a URN. |
getContainer | public String getContainer()(Code) | | Returns the container of the product.
the container of the product. |
getInstallerUID | public int getInstallerUID()(Code) | | Returns the UID. The UID is set when this service tag
is added to or updated in the system service tag registry.
This is platform dependent whose default value is
-1 .
When this service tag is added to a
RegistrationData ,
the UID is not set.
the UID of whom this service tagis added to or updated in the system service tag registry,or -1 . |
getInstanceURN | public String getInstanceURN()(Code) | | Returns the uniform resource name of this service tag instance.
the instance_urn of this service tag. |
getJavaServiceTag | public static ServiceTag getJavaServiceTag(String source) throws IOException(Code) | | Returns the
ServiceTag instance for the running Java
platform. The
ServiceTag.setSource source field
of the
ServiceTag will be set to the given
source .
This method will return
null if there is no service tag
for the running Java platform.
This method is designed for Sun software that bundles the JDK
or the JRE to use. It is recommended that the
source string contains information about the bundling software
such as the name and the version of the software bundle,
for example,
NetBeans IDE 6.0 with JDK 6 Update 5 Bundle
in a NetBeans/JDK bundle.
At the first time to call this method the application
is required to have the write permission to the installed
directory of this running JDK or JRE instance.
Parameters: source - the source that bundles the JDK or the JRE. a ServiceTag object for the Java platform,or null if not supported. throws: IOException - if an error occurs in this operation. |
getPlatformArch | public String getPlatformArch()(Code) | | Returns the platform architecture on which the product
is running on.
the platform architecture on which the product is running on. |
getProductDefinedInstanceID | public String getProductDefinedInstanceID()(Code) | | Returns the identifier defined for this product instance.
the identifier defined for this product instance. |
getProductName | public String getProductName()(Code) | | Returns the name of the product.
the product name. |
getProductParent | public String getProductParent()(Code) | | Returns the name of the product's parent.
the product's parent name. |
getProductParentURN | public String getProductParentURN()(Code) | | Returns the uniform resource name of the product's parent.
the product's parent URN. |
getProductURN | public String getProductURN()(Code) | | Returns the uniform resource name of the product.
the product URN. |
getProductVendor | public String getProductVendor()(Code) | | Returns the vendor of the product.
the product vendor. |
getProductVersion | public String getProductVersion()(Code) | | Returns the version of the product.
the product version. |
getSource | public String getSource()(Code) | | Returns the source of this service tag.
source of this service tag. |
getTimestamp | public Date getTimestamp()(Code) | | Returns the timestamp. This timestamp is set when this service tag
is added to or updated in a
RegistrationData object or
the system service tag registry.
This method may return
null .
timestamp when this service tag is added to or updated in a RegistrationData object or the system service tag registry, or null . |
hashCode | public int hashCode()(Code) | | Returns the hash code value for this service tag.
the hash code value for this service tag. |
newInstance | public static ServiceTag newInstance(String productName, String productVersion, String productURN, String productParent, String productParentURN, String productDefinedInstanceID, String productVendor, String platformArch, String container, String source)(Code) | | Creates a service tag object with no instance_urn.
Parameters: productName - the name of the product. Parameters: productVersion - the version of the product. Parameters: productURN - the uniform resource name of the product Parameters: productParent - the name of the product's parent. Parameters: productParentURN - the uniform resource name of the product's parent. Parameters: productDefinedInstanceID - the instance identifier. Parameters: productVendor - the vendor of the product. Parameters: platformArch - the operating system architecture. Parameters: container - the container of the product. Parameters: source - the source of the product. throws: IllegalArgumentException - if any value of the input fieldsdoes not conform to the service tag XML schema. |
newInstance | public static ServiceTag newInstance(String instanceURN, String productName, String productVersion, String productURN, String productParent, String productParentURN, String productDefinedInstanceID, String productVendor, String platformArch, String container, String source)(Code) | | Creates a service tag object with a specified instance_urn.
Parameters: instanceURN - the uniform resource name of this instance. Parameters: productName - the name of the product. Parameters: productVersion - the version of the product. Parameters: productURN - the uniform resource name of the product Parameters: productParent - the name of the product's parent. Parameters: productParentURN - the uniform resource name of the product's parent. Parameters: productDefinedInstanceID - the instance identifier. Parameters: productVendor - the vendor of the product. Parameters: platformArch - the operating system architecture. Parameters: container - the container of the product. Parameters: source - the source of the product. throws: IllegalArgumentException - if any value of the input fields does not conform to the service tag XML schema. |
setProductDefinedInstanceID | void setProductDefinedInstanceID(String productDefinedInstanceID)(Code) | | |
toString | public String toString()(Code) | | Returns the string representation of this service tag.
The format is implementation specific.
the string representation of this service tag. |
|
|