com.ptc.windchill.structconf.properties
Class ServiceOrResourceEntryKey

java.lang.Object
  extended bycom.ptc.windchill.structconf.properties.ServiceOrResourceEntryKey

public final class ServiceOrResourceEntryKey
extends Object

A key class that can be used to uniquely identify a service or resource for which many implementations may be specified in a .properties "service" file.

This will be used during the conversion of .properties to .xconf files to eliminate some of the redundancy found in the .properties files and coalesc the various optional resource or service entries under a common root element in each .xconf file.


Field Summary
private  String contextName_
           
private  String entryType_
           
private  String serviceName_
           
 
Constructor Summary
(package private) ServiceOrResourceEntryKey(StringTokenizer st)
          Constructor to be used only by PropertiesToXconf.
 
Method Summary
 Element createElement(Document doc)
          Create an element for this key using the supplied document as a DOM node factory.
 boolean equals(Object o)
          Equals method for value-wise comparisons.
 String getContextName()
          The context name for this service/resource.
 String getEntryType()
          Returns the .properties string used to distinguish between services and resources.
 String getServiceName()
          The service/resource name (if a service this will be a class or interface name).
 int hashCode()
          Hash code for value-wise comparisons.
 boolean isResourceEntry()
          Whether or not this entry key corresponds to a resource.
 boolean isServiceEntry()
          Whether or not this entry key corresponds to a service.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

entryType_

private String entryType_

contextName_

private String contextName_

serviceName_

private String serviceName_
Constructor Detail

ServiceOrResourceEntryKey

ServiceOrResourceEntryKey(StringTokenizer st)
Constructor to be used only by PropertiesToXconf.

See Also:
PropertiesToXconf
Method Detail

isServiceEntry

public boolean isServiceEntry()
Whether or not this entry key corresponds to a service.


isResourceEntry

public boolean isResourceEntry()
Whether or not this entry key corresponds to a resource.


getEntryType

public String getEntryType()
Returns the .properties string used to distinguish between services and resources.

Returns:
the string "svc" or "rsc"

getContextName

public String getContextName()
The context name for this service/resource.


getServiceName

public String getServiceName()
The service/resource name (if a service this will be a class or interface name).


hashCode

public int hashCode()
Hash code for value-wise comparisons.


toString

public String toString()

equals

public boolean equals(Object o)
Equals method for value-wise comparisons.


createElement

public Element createElement(Document doc)
Create an element for this key using the supplied document as a DOM node factory.