wt.projmgmt.resource
Class InformationResource

java.lang.Object
  extended bywt.fc.WTObject
      extended bywt.fc.Item
          extended bywt.projmgmt.resource.ProjectResource
              extended bywt.projmgmt.resource.InformationResource
All Implemented Interfaces:
AccessControlled, DisplayIdentification, DomainAdministered, Externalizable, Indexable, NetFactor, ObjectMappable, Persistable, RecentlyVisited, Serializable, WTContained

public class InformationResource
extends ProjectResource
implements Externalizable

InformationResource represents resources used or produced by activities that can be accessed on-line. Typically these resources are documents (such as specifications, requirements, plans). The utilization of these resources doesn't occur in costs so, if costs are involved, this has to be represented using cost resources.

Use the newInformationResource static factory method(s), not the InformationResource constructor, to construct instances of this class. Instances must be constructed using the static factory(s), in order to ensure proper initialization of the instance.



Supported API: false

Extendable: false

See Also:
CostResource, Serialized Form

Field Summary
private static String CLASSNAME
           
static long EXTERNALIZATION_VERSION_UID
           
protected static String INFO_OBJECT_REF
          Label for the attribute; Reference to the actual Windchill object that is associated to the resource.
private  Object infoObject
           
private  ObjectReference infoObjectRef
           
protected static long OLD_FORMAT_VERSION_UID
           
private static String RESOURCE
           
(package private) static long serialVersionUID
           
 
Fields inherited from class wt.projmgmt.resource.ProjectResource
CATEGORY, CONTAINER, DESCRIPTION, ENABLED, NAME, PLAN, PLAN_REFERENCE, R60_EXTERNALIZATION_VERSION_UID
 
Fields inherited from class wt.fc.Item
VERSION_40_UID, VERSION_51_UID
 
Fields inherited from class wt.fc.WTObject
CREATE_TIMESTAMP, MODIFY_TIMESTAMP
 
Fields inherited from interface wt.inf.container.WTContained
CONTAINER_ID, CONTAINER_NAME, CONTAINER_REFERENCE
 
Fields inherited from interface wt.fc.Persistable
IDENTITY, PERSIST_INFO, TYPE
 
Fields inherited from interface wt.index.Indexable
INDEXER_SET
 
Fields inherited from interface wt.admin.DomainAdministered
DOMAIN_REF, INHERITED_DOMAIN
 
Fields inherited from interface wt.identity.DisplayIdentification
DISPLAY_IDENTIFIER, DISPLAY_IDENTITY, DISPLAY_TYPE
 
Constructor Summary
InformationResource()
           
 
Method Summary
 boolean equals(Object obj)
          Indicates whether the given object is equal to this object from a persistence perspective, by comparing the two objects ObjectIdentifiers.
 String getConceptualClassname()
          Deprecated.  
protected  ObjectReference getInfoObjectRef()
          Gets the value of the attribute: INFO_OBJECT_REF.
 Persistable getObject()
          Returns the Windchill object that is the target of the resource.
 int hashCode()
          Returns a hash code for this object based upon its ObjectIdentifier.
private  void infoObjectRefValidate(ObjectReference a_InfoObjectRef)
           
 boolean matches(WTStringMap attr_value_map)
          Returns 'true' if the attribute values of target object is consistent with the attribute-value pair mapping passed as argument.
static InformationResource newInformationResource(ProjectPlan plan)
          Constructor that takes the host plan as argument.
 void readExternal(ObjectInput input)
          Reads the non-transient fields of this class from an external source.
 void readExternal(PersistentRetrieveIfc input)
          Used by Persistent Data Service to populate the persistent attributes of this class from a persistent store.
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(InformationResource thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
protected  void setInfoObjectRef(ObjectReference a_InfoObjectRef)
          Sets the value of the attribute: INFO_OBJECT_REF.
 void setObject(Persistable object, boolean latest)
          Sets the Windchill object that is the target of the resource.
 String toString()
          Produces string representation of information resource.
 void writeExternal(ObjectOutput output)
          Writes the non-transient fields of this class to an external source.
 void writeExternal(PersistentStoreIfc output)
          Used by Persistent Data Service to obtain the values of the persistent attributes of this class, so they can be written to a persistent store.
 
Methods inherited from class wt.projmgmt.resource.ProjectResource
getCategory, getContainer, getContainerName, getContainerReference, getDescription, getIndexerSet, getName, getPlan, getPlanReference, initialize, isEnabled, readVersion, setCategory, setContainer, setContainerReference, setDescription, setEnabled, setIndexerSet, setName, setPlan, setPlanReference
 
Methods inherited from class wt.fc.Item
getDomainRef, initialize, isInheritedDomain, readVersion, setDomainRef, setInheritedDomain
 
Methods inherited from class wt.fc.WTObject
checkAttributes, duplicate, finalize, getClassInfo, getCreateTimestamp, getDisplayIdentifier, getDisplayIdentity, getDisplayType, getIdentity, getModifyTimestamp, getPersistInfo, getType, readVersion, setPersistInfo
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface wt.fc.Persistable
checkAttributes, getIdentity, getPersistInfo, getType, setPersistInfo
 
Methods inherited from interface wt.fc.NetFactor
getClassInfo
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

INFO_OBJECT_REF

protected static final String INFO_OBJECT_REF
Label for the attribute; Reference to the actual Windchill object that is associated to the resource.

Supported API: false

See Also:
Constant Field Values

infoObjectRef

private ObjectReference infoObjectRef

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

infoObject

private transient Object infoObject
Constructor Detail

InformationResource

public InformationResource()
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
Overrides:
writeExternal in class ProjectResource
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
Overrides:
readExternal in class ProjectResource
Parameters:
input -
Throws:
IOException
ClassNotFoundException

readVersion

protected boolean readVersion(InformationResource 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

writeExternal

public void writeExternal(PersistentStoreIfc output)
                   throws SQLException,
                          DatastoreException
Used by Persistent Data Service to obtain the values of the persistent attributes of this class, so they can be written to a persistent store.

(Not intended for general use.)

Supported API: false

Specified by:
writeExternal in interface ObjectMappable
Overrides:
writeExternal in class ProjectResource
Parameters:
output -
Throws:
SQLException
DatastoreException

readExternal

public void readExternal(PersistentRetrieveIfc input)
                  throws SQLException,
                         DatastoreException
Used by Persistent Data Service to populate the persistent attributes of this class from a persistent store.

(Not intended for general use.)

Supported API: false

Specified by:
readExternal in interface ObjectMappable
Overrides:
readExternal in class ProjectResource
Parameters:
input -
Throws:
SQLException
DatastoreException

getConceptualClassname

public String getConceptualClassname()
Deprecated.  

Returns the conceptual (modeled) name for the class.

Supported API: false

Specified by:
getConceptualClassname in interface NetFactor
Returns:
String

getInfoObjectRef

protected ObjectReference getInfoObjectRef()
Gets the value of the attribute: INFO_OBJECT_REF. Reference to the actual Windchill object that is associated to the resource.

Supported API: false

Returns:
ObjectReference

setInfoObjectRef

protected void setInfoObjectRef(ObjectReference a_InfoObjectRef)
                         throws WTPropertyVetoException
Sets the value of the attribute: INFO_OBJECT_REF. Reference to the actual Windchill object that is associated to the resource.

Supported API: false

Parameters:
a_InfoObjectRef -
Throws:
WTPropertyVetoException

infoObjectRefValidate

private void infoObjectRefValidate(ObjectReference a_InfoObjectRef)
                            throws WTPropertyVetoException
Parameters:
a_InfoObjectRef -
Throws:
WTPropertyVetoException

newInformationResource

public static InformationResource newInformationResource(ProjectPlan plan)
                                                  throws WTException
Constructor that takes the host plan as argument.

Supported API: false

Parameters:
plan -
Returns:
InformationResource
Throws:
WTException

getObject

public Persistable getObject()
                      throws WTException
Returns the Windchill object that is the target of the resource. Returns 'null' if there is no target.

Supported API: false

Returns:
Persistable
Throws:
WTException

setObject

public void setObject(Persistable object,
                      boolean latest)
               throws WTException
Sets the Windchill object that is the target of the resource. If the 'latest' argument is 'true', the resource refers to the latest iteration of the object; otherwise the resource refers to the actual object. If the target is not iterated, the resource always refers to the actual object.

Supported API: false

Parameters:
object -
latest -
Throws:
WTException

matches

public boolean matches(WTStringMap attr_value_map)
                throws WTException
Returns 'true' if the attribute values of target object is consistent with the attribute-value pair mapping passed as argument. Returns 'false' if this is not the case.

The attributes are consistent if for every attribute name in the mapping, the attribute value of the object is the same as the value as specified in the mapping.

Supported API: false

Parameters:
attr_value_map -
Returns:
boolean
Throws:
WTException

toString

public String toString()
Produces string representation of information resource.

Supported API: false

Overrides:
toString in class WTObject
Returns:
String

equals

public boolean equals(Object obj)
Indicates whether the given object is equal to this object from a persistence perspective, by comparing the two objects ObjectIdentifiers. Changed or stale copies are still considered equal by this method. Delegates to PersistenceHelper.equals(Persistable,Object).

Warning: Certain core Windchill operations may depend upon equals being ObjectIdentifier-based. Changes to the default implementation should be done with care, if at all.

Supported API: false

Overrides:
equals in class ProjectResource
Parameters:
obj -
Returns:
boolean

hashCode

public int hashCode()
Returns a hash code for this object based upon its ObjectIdentifier. Delegates to PersistenceHelper.hashCode(Persistable).

Warning: Certain core Windchill operations may depend upon hashCode being ObjectIdentifier-based. Changes to the default implementation should be done with care, if at all.

Supported API: false

Overrides:
hashCode in class ProjectResource
Returns:
int