wt.enterprise
Class EnterpriseHelper

java.lang.Object
  extended bywt.enterprise.EnterpriseHelper
All Implemented Interfaces:
Externalizable, Serializable

public class EnterpriseHelper
extends Object
implements Externalizable

This is the helper for EnterpriseService allowing static access via EnterpriseHelper.service; it has no helper methods defined.

Supported API: false

Extendable: false

See Also:
Serialized Form

Field Summary
private static WTContainerRef classicRef
           
private static String CLASSNAME
           
private static WTOrganization defaultOrg
           
static long EXTERNALIZATION_VERSION_UID
           
static String NUMBER_LOGICAL_ID
           
protected static long OLD_FORMAT_VERSION_UID
           
private static String RESOURCE
           
(package private) static long serialVersionUID
           
static EnterpriseService service
          

Supported API: false
 
Constructor Summary
EnterpriseHelper()
           
 
Method Summary
static String getNumber(Object[] args)
          Generates a number based on the arguments (as passed by a rule).
static String getNumber(Object obj, WTContainerRef container)
          Return a number that is generated using the number scheme specified in the object initialization rules for the specified container.
static String getNumber(String fmtString)
           
static boolean isAutoNumber(Object obj)
          Return whether or not the rules that are in the system specify that the specified obj should be auto-numbered.
static boolean isAutoNumber(Object obj, WTContainerRef container)
          Return whether or not the rules that are in the system specify that the specified obj should be auto-numbered.
static boolean isAutoNumber(Object obj, WTContainerRef container, WTOrganization org)
          Returns the conjunction of the result of isAutoNumber(obj, container) and the disjunction of obj's neither being nor representing wt.org.OrganizationOwned and org's representing an internal organization.
static boolean isAutoNumber(Object obj, WTOrganization org)
          Returns the result of isAutoNumber(obj, container, org), where container is a reference to the Windchill PDM classic container.
 void readExternal(ObjectInput input)
          Reads the non-transient fields of this class from an external source.
private  boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source, which is not the current version.
protected  boolean readVersion(EnterpriseHelper thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
 void writeExternal(ObjectOutput output)
          Writes the non-transient fields of this class to an external source.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

service

public static final EnterpriseService service


Supported API: false


serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

EXTERNALIZATION_VERSION_UID

public static final long EXTERNALIZATION_VERSION_UID
See Also:
Constant Field Values

OLD_FORMAT_VERSION_UID

protected static final long OLD_FORMAT_VERSION_UID
See Also:
Constant Field Values

classicRef

private static WTContainerRef classicRef

defaultOrg

private static WTOrganization defaultOrg

NUMBER_LOGICAL_ID

public static final String NUMBER_LOGICAL_ID
See Also:
Constant Field Values
Constructor Detail

EnterpriseHelper

public EnterpriseHelper()
Method Detail

writeExternal

public void writeExternal(ObjectOutput output)
                   throws IOException
Writes the non-transient fields of this class to an external source.

Supported API: false

Specified by:
writeExternal in interface Externalizable
Parameters:
output -
Throws:
IOException

readExternal

public void readExternal(ObjectInput input)
                  throws IOException,
                         ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Specified by:
readExternal in interface Externalizable
Parameters:
input -
Throws:
IOException
ClassNotFoundException

readVersion

protected boolean readVersion(EnterpriseHelper thisObject,
                              ObjectInput input,
                              long readSerialVersionUID,
                              boolean passThrough,
                              boolean superDone)
                       throws IOException,
                              ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Parameters:
thisObject -
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

readOldVersion

private boolean readOldVersion(ObjectInput input,
                               long readSerialVersionUID,
                               boolean passThrough,
                               boolean superDone)
                        throws IOException,
                               ClassNotFoundException
Reads the non-transient fields of this class from an external source, which is not the current version.

Parameters:
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

getNumber

public static String getNumber(Object[] args)
                        throws WTException
Generates a number based on the arguments (as passed by a rule).

Throws:
WTException

getNumber

public static String getNumber(Object obj,
                               WTContainerRef container)
                        throws WTException
Return a number that is generated using the number scheme specified in the object initialization rules for the specified container.

obj can be either an object or a type identifier (such as a Class).

Throws:
WTException

getNumber

public static String getNumber(String fmtString)
                        throws WTException
Throws:
WTException

isAutoNumber

public static boolean isAutoNumber(Object obj,
                                   WTOrganization org)
                            throws WTException
Returns the result of isAutoNumber(obj, container, org), where container is a reference to the Windchill PDM classic container. This method will throw an exception if invoked within a product other than Windchill PDM.

Parameters:
obj - determine whether auto-numbering should be used for this obj
org - the organization to be tested as internal
Throws:
WTException

isAutoNumber

public static boolean isAutoNumber(Object obj,
                                   WTContainerRef container,
                                   WTOrganization org)
                            throws WTException
Returns the conjunction of the result of isAutoNumber(obj, container) and the disjunction of obj's neither being nor representing wt.org.OrganizationOwned and org's representing an internal organization. If org is null, the Windchill PDM (classic) container's organization container's organization is assumed.

Parameters:
obj - determine whether auto-numbering should be used for this obj
container - the container whose rules should be queried
org - the organization to be tested as internal
Throws:
WTException

isAutoNumber

public static boolean isAutoNumber(Object obj)
                            throws WTException
Return whether or not the rules that are in the system specify that the specified obj should be auto-numbered. If obj is a type then this method returns whether or not the rules that are in the system specify that instances of the specified objType should be auto-numbered.

The Classic is used as the container for the searching for rules.

Parameters:
obj - determine whether auto-numbering should be used for this obj
Throws:
WTException

isAutoNumber

public static boolean isAutoNumber(Object obj,
                                   WTContainerRef container)
                            throws WTException
Return whether or not the rules that are in the system specify that the specified obj should be auto-numbered. If obj is a type then this method returns whether or not the rules that are in the system specify that instances of the specified objType should be auto-numbered.

Parameters:
obj - determine whether auto-numbering should be used for this obj
container - the container whose rules should be queried
Throws:
WTException