com.ptc.windchill.uwgm.common.util
Class ObjectIdentifierHelper

java.lang.Object
  extended bycom.ptc.windchill.uwgm.common.util.ObjectIdentifierHelper

public final class ObjectIdentifierHelper
extends Object

Convert OIDs to String form and back in consideration of OR/VR prefixes.


Field Summary
private static String FAKE_REFERENCE
          Prefix for fake (non-persistable) object references
private static Log log
           
private  ReferenceFactory referenceFactory
          reusable ReferenceFactory
 
Constructor Summary
ObjectIdentifierHelper()
           
 
Method Summary
 ObjectIdentifier getFakeOid(String oidAsString)
          Create Fake ObjectIdentifier from its String representation
static String getFakeOidAsString(ObjectIdentifier oid)
          Convert Fake ObjectIdentifier to its String representation
 String getFakeOidString(ObjectIdentifier oid)
          Convert Fake ObjectIdentifier to its String representation
 ObjectIdentifier getOid(String oidAsString)
          Create ObjectIdentifier from its String representation
 String getOidString(ObjectIdentifier oid)
          Convert ObjectIdentifier to its String representation
 String getOidString(Persistable persistable)
          Convert ObjectIdentifier of a Persistable object to its String representation
 String getOidString(WTReference ref)
          Convert ObjectIdentifier of a WTReference to its String representation
static boolean isFakeOidString(String oidAsString)
          returns true if the parameter is "fake" (non-WT) OID
static String newNonPersistentOid()
          Create unique OID for non-persistent objects to report them as part of an error message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static final Log log

FAKE_REFERENCE

private static final String FAKE_REFERENCE
Prefix for fake (non-persistable) object references

See Also:
Constant Field Values

referenceFactory

private final ReferenceFactory referenceFactory
reusable ReferenceFactory

Constructor Detail

ObjectIdentifierHelper

public ObjectIdentifierHelper()
Method Detail

getOidString

public String getOidString(ObjectIdentifier oid)
                    throws WTException
Convert ObjectIdentifier to its String representation

Parameters:
oid - ObjectIdentifier
Returns:
String
Throws:
WTException

getOidString

public String getOidString(WTReference ref)
                    throws WTException
Convert ObjectIdentifier of a WTReference to its String representation

Parameters:
ref - WTReference
Returns:
String
Throws:
WTException

getOidString

public String getOidString(Persistable persistable)
                    throws WTException
Convert ObjectIdentifier of a Persistable object to its String representation

Parameters:
persistable - Persistable
Returns:
String
Throws:
WTException

getOid

public ObjectIdentifier getOid(String oidAsString)
                        throws WTException
Create ObjectIdentifier from its String representation

Parameters:
oidAsString - String
Returns:
ObjectIdentifier
Throws:
WTException

isFakeOidString

public static boolean isFakeOidString(String oidAsString)
returns true if the parameter is "fake" (non-WT) OID

Parameters:
oidAsString - String
Returns:
boolean

getFakeOid

public ObjectIdentifier getFakeOid(String oidAsString)
                            throws WTException
Create Fake ObjectIdentifier from its String representation

Throws:
WTException

getFakeOidString

public String getFakeOidString(ObjectIdentifier oid)
                        throws WTException
Convert Fake ObjectIdentifier to its String representation

Parameters:
oid - ObjectIdentifier
Returns:
String
Throws:
WTException

getFakeOidAsString

public static String getFakeOidAsString(ObjectIdentifier oid)
                                 throws WTException
Convert Fake ObjectIdentifier to its String representation

Parameters:
oid - ObjectIdentifier
Returns:
String
Throws:
WTException

newNonPersistentOid

public static String newNonPersistentOid()
Create unique OID for non-persistent objects to report them as part of an error message.

Returns:
String