wt.content
Class ContentItem

java.lang.Object
  extended bywt.fc.WTObject
      extended bywt.content.ContentItem
All Implemented Interfaces:
BusinessInformation, DisplayIdentification, Externalizable, NetFactor, ObjectMappable, Persistable, Serializable
Direct Known Subclasses:
ApplicationData, URLData

public abstract class ContentItem
extends WTObject
implements BusinessInformation, Externalizable

This is the abstract class that represents a single piece of content.

Supported API: true

Extendable: false

See Also:
ContentService, ContentHelper, ApplicationData, URLData, Serialized Form

Field Summary
private  String category
           
static String CATEGORY
          Label for the attribute.
private static int CATEGORY_UPPER_LIMIT
           
private static String CLASSNAME
           
static String CREATED_BY
          Label for the attribute.
private  WTPrincipalReference createdBy
           
private  String description
           
static String DESCRIPTION
          Label for the attribute; The descriptive string about this piece of content

Supported API: false
private static int DESCRIPTION_UPPER_LIMIT
           
static long EXTERNALIZATION_VERSION_UID
           
private  DataFormatReference format
           
static String FORMAT
          Label for the attribute.
static String FORMAT_NAME
          Label for the attribute.
static String HOLDER_LINK
          Label for the attribute; Non-persistent reference to the link between the ContentHolder and the ContentItem.l

Supported API: false
private  HolderToContent holderLink
           
static String INTENT_TO_CHANGE
          Label for the attribute; This is a boolean used for display purposes in the client.
private  Boolean intentToChange
           
protected static long OLD_FORMAT_VERSION_UID
           
private static String RESOURCE
           
private  ContentRoleType role
           
static String ROLE
          Label for the attribute.
private static int ROLE_UPPER_LIMIT
           
(package private) static long serialVersionUID
           
private  boolean stale
           
static String STALE
          Label for the attribute.
 
Fields inherited from class wt.fc.WTObject
CREATE_TIMESTAMP, MODIFY_TIMESTAMP
 
Fields inherited from interface wt.fc.BusinessInformation
BUSINESS_TYPE, IDENTITY
 
Fields inherited from interface wt.fc.Persistable
IDENTITY, PERSIST_INFO, TYPE
 
Fields inherited from interface wt.identity.DisplayIdentification
DISPLAY_IDENTIFIER, DISPLAY_IDENTITY, DISPLAY_TYPE
 
Constructor Summary
ContentItem()
           
 
Method Summary
private  void categoryValidate(String a_Category)
           
private  void createdByValidate(WTPrincipalReference a_CreatedBy)
           
private  void descriptionValidate(String a_Description)
           
 boolean equals(Object obj)
          Indicates whether the given object is equal to this object from a persistence perspective, by comparing the two objects ObjectIdentifiers.
private  void formatValidate(DataFormatReference a_Format)
           
 String getBusinessType()
          Deprecated. Replaced by IdentityFactory.getDispayType(object) to return a localizable equivalent of getBusinessType(). Another alternative is ((WTObject)obj).getDisplayType().
 String getCategory()
          Gets the value of the attribute: CATEGORY.
 WTPrincipalReference getCreatedBy()
          Gets the object for the association that plays role: CREATED_BY.
 String getDescription()
          Gets the value of the attribute: DESCRIPTION.
 DataFormatReference getFormat()
          Gets the object for the association that plays role: FORMAT.
 String getFormatName()
          Gets the value of the attribute: FORMAT_NAME.
 HolderToContent getHolderLink()
          Gets the value of the attribute: HOLDER_LINK.
 String getIdentity()
          Deprecated. Replaced by IdentityFactory.getDispayIdentifier(object) to return a localizable equivalent of getIdentity(). To return a localizable value which includes the object type, use IdentityFactory.getDisplayIdentity(object). Other alternatives are ((WTObject)obj).getDisplayIdentifier() and ((WTObject)obj).getDisplayIdentity()
 Boolean getIntentToChange()
          Gets the value of the attribute: INTENT_TO_CHANGE.
 ContentRoleType getRole()
          Gets the object for the association that plays role: ROLE.
 int hashCode()
          Returns a hash code for this object based upon its ObjectIdentifier.
 boolean isStale()
          Gets the value of the attribute: STALE.
 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(ContentItem thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
private  void roleValidate(ContentRoleType a_Role)
           
 void setCategory(String a_Category)
          Sets the value of the attribute: CATEGORY.
 void setCreatedBy(WTPrincipalReference a_CreatedBy)
          Sets the object for the association that plays role: CREATED_BY.
 void setDescription(String a_Description)
          Sets the value of the attribute: DESCRIPTION.
 void setFormat(DataFormatReference a_Format)
          Sets the object for the association that plays role: FORMAT.
 void setFormatName(String a_FormatName)
          Sets the value of the attribute: FORMAT_NAME.
 void setHolderLink(HolderToContent a_HolderLink)
          Sets the value of the attribute: HOLDER_LINK.
 void setIntentToChange(Boolean a_IntentToChange)
          Sets the value of the attribute: INTENT_TO_CHANGE.
 void setRole(ContentRoleType a_Role)
          Sets the object for the association that plays role: ROLE.
 void setStale(boolean a_Stale)
          Sets the value of the attribute: STALE.
 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.fc.WTObject
checkAttributes, duplicate, finalize, getClassInfo, getCreateTimestamp, getDisplayIdentifier, getDisplayIdentity, getDisplayType, getModifyTimestamp, getPersistInfo, getType, initialize, readVersion, setPersistInfo, toString
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface wt.fc.NetFactor
getConceptualClassname
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

DESCRIPTION

public static final String DESCRIPTION
Label for the attribute; The descriptive string about this piece of content

Supported API: false

See Also:
Constant Field Values

DESCRIPTION_UPPER_LIMIT

private static int DESCRIPTION_UPPER_LIMIT

description

private String description

INTENT_TO_CHANGE

public static final String INTENT_TO_CHANGE
Label for the attribute; This is a boolean used for display purposes in the client. It might be used in a check-in/check out situation where files are marked as true on check-out, and then you are given the option to upload these files at check-in.

Supported API: false

See Also:
Constant Field Values

intentToChange

private Boolean intentToChange

FORMAT_NAME

public static final String FORMAT_NAME
Label for the attribute.

Supported API: false

See Also:
Constant Field Values

HOLDER_LINK

public static final String HOLDER_LINK
Label for the attribute; Non-persistent reference to the link between the ContentHolder and the ContentItem.l

Supported API: false

See Also:
Constant Field Values

holderLink

private HolderToContent holderLink

STALE

public static final String STALE
Label for the attribute.

Supported API: false

See Also:
Constant Field Values

stale

private boolean stale

CATEGORY

public static final String CATEGORY
Label for the attribute.

Supported API: false

See Also:
Constant Field Values

CATEGORY_UPPER_LIMIT

private static int CATEGORY_UPPER_LIMIT

category

private String category

CREATED_BY

public static final String CREATED_BY
Label for the attribute.

Supported API: false

See Also:
Constant Field Values

createdBy

private WTPrincipalReference createdBy

FORMAT

public static final String FORMAT
Label for the attribute.

Supported API: false

See Also:
Constant Field Values

format

private DataFormatReference format

ROLE

public static final String ROLE
Label for the attribute.

Supported API: true

See Also:
Constant Field Values

ROLE_UPPER_LIMIT

private static int ROLE_UPPER_LIMIT

role

private ContentRoleType role

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
Constructor Detail

ContentItem

public ContentItem()
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 WTObject
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 WTObject
Parameters:
input -
Throws:
IOException
ClassNotFoundException

readVersion

protected boolean readVersion(ContentItem 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 WTObject
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 WTObject
Parameters:
input -
Throws:
SQLException
DatastoreException

getDescription

public String getDescription()
Gets the value of the attribute: DESCRIPTION. The descriptive string about this piece of content

Supported API: false

Returns:
String

setDescription

public void setDescription(String a_Description)
                    throws WTPropertyVetoException
Sets the value of the attribute: DESCRIPTION. The descriptive string about this piece of content

Supported API: false

Parameters:
a_Description -
Throws:
WTPropertyVetoException

descriptionValidate

private void descriptionValidate(String a_Description)
                          throws WTPropertyVetoException
Parameters:
a_Description -
Throws:
WTPropertyVetoException

getIntentToChange

public Boolean getIntentToChange()
Gets the value of the attribute: INTENT_TO_CHANGE. This is a boolean used for display purposes in the client. It might be used in a check-in/check out situation where files are marked as true on check-out, and then you are given the option to upload these files at check-in.

Supported API: false

Returns:
Boolean

setIntentToChange

public void setIntentToChange(Boolean a_IntentToChange)
                       throws WTPropertyVetoException
Sets the value of the attribute: INTENT_TO_CHANGE. This is a boolean used for display purposes in the client. It might be used in a check-in/check out situation where files are marked as true on check-out, and then you are given the option to upload these files at check-in.

Supported API: false

Parameters:
a_IntentToChange -
Throws:
WTPropertyVetoException

getFormatName

public String getFormatName()
Gets the value of the attribute: FORMAT_NAME.

Supported API: false

Returns:
String

setFormatName

public void setFormatName(String a_FormatName)
                   throws WTPropertyVetoException
Sets the value of the attribute: FORMAT_NAME.

Supported API: false

Parameters:
a_FormatName -
Throws:
WTPropertyVetoException

getHolderLink

public HolderToContent getHolderLink()
Gets the value of the attribute: HOLDER_LINK. Non-persistent reference to the link between the ContentHolder and the ContentItem.l

Supported API: false

Returns:
HolderToContent

setHolderLink

public void setHolderLink(HolderToContent a_HolderLink)
                   throws WTPropertyVetoException
Sets the value of the attribute: HOLDER_LINK. Non-persistent reference to the link between the ContentHolder and the ContentItem.l

Supported API: false

Parameters:
a_HolderLink -
Throws:
WTPropertyVetoException

isStale

public boolean isStale()
Gets the value of the attribute: STALE.

Supported API: false

Returns:
boolean

setStale

public void setStale(boolean a_Stale)
              throws WTPropertyVetoException
Sets the value of the attribute: STALE.

Supported API: false

Parameters:
a_Stale -
Throws:
WTPropertyVetoException

getCategory

public String getCategory()
Gets the value of the attribute: CATEGORY.

Supported API: false

Returns:
String

setCategory

public void setCategory(String a_Category)
                 throws WTPropertyVetoException
Sets the value of the attribute: CATEGORY.

Supported API: false

Parameters:
a_Category -
Throws:
WTPropertyVetoException

categoryValidate

private void categoryValidate(String a_Category)
                       throws WTPropertyVetoException
Parameters:
a_Category -
Throws:
WTPropertyVetoException

getCreatedBy

public WTPrincipalReference getCreatedBy()
Gets the object for the association that plays role: CREATED_BY.

Supported API: false

Returns:
WTPrincipalReference

setCreatedBy

public void setCreatedBy(WTPrincipalReference a_CreatedBy)
                  throws WTPropertyVetoException
Sets the object for the association that plays role: CREATED_BY.

Supported API: false

Parameters:
a_CreatedBy -
Throws:
WTPropertyVetoException

createdByValidate

private void createdByValidate(WTPrincipalReference a_CreatedBy)
                        throws WTPropertyVetoException
Parameters:
a_CreatedBy -
Throws:
WTPropertyVetoException

getFormat

public DataFormatReference getFormat()
Gets the object for the association that plays role: FORMAT.

Supported API: false

Returns:
DataFormatReference

setFormat

public void setFormat(DataFormatReference a_Format)
               throws WTPropertyVetoException
Sets the object for the association that plays role: FORMAT.

Supported API: false

Parameters:
a_Format -
Throws:
WTPropertyVetoException

formatValidate

private void formatValidate(DataFormatReference a_Format)
                     throws WTPropertyVetoException
Parameters:
a_Format -
Throws:
WTPropertyVetoException

getRole

public ContentRoleType getRole()
Gets the object for the association that plays role: ROLE.

Supported API: true

Returns:
ContentRoleType

setRole

public void setRole(ContentRoleType a_Role)
             throws WTPropertyVetoException
Sets the object for the association that plays role: ROLE.

Supported API: true

Parameters:
a_Role -
Throws:
WTPropertyVetoException

roleValidate

private void roleValidate(ContentRoleType a_Role)
                   throws WTPropertyVetoException
Parameters:
a_Role -
Throws:
WTPropertyVetoException

getIdentity

public String getIdentity()
Deprecated. Replaced by IdentityFactory.getDispayIdentifier(object) to return a localizable equivalent of getIdentity(). To return a localizable value which includes the object type, use IdentityFactory.getDisplayIdentity(object). Other alternatives are ((WTObject)obj).getDisplayIdentifier() and ((WTObject)obj).getDisplayIdentity()

Gets the value of the attribute: IDENTITY. Supplies the identity of the object for business purposes. The identity is composed of name, number or possibly other attributes. The identity does not include the type of the object.

Supported API: false

Specified by:
getIdentity in interface BusinessInformation
Overrides:
getIdentity in class WTObject
Returns:
String

getBusinessType

public String getBusinessType()
Deprecated. Replaced by IdentityFactory.getDispayType(object) to return a localizable equivalent of getBusinessType(). Another alternative is ((WTObject)obj).getDisplayType().

Gets the value of the attribute: BUSINESS_TYPE. Identifies the type of the object for business purposes. This is typically the class name of the object but may be derived from some other attribute of the object.

Supported API: false

Specified by:
getBusinessType in interface BusinessInformation
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 WTObject
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 WTObject
Returns:
int