wt.clients.folderexplorer
Class FolderedBusinessObject

java.lang.Object
  extended bywt.clients.beans.explorer.WTBusinessObject
      extended bywt.clients.folderexplorer.FolderedBusinessObject
All Implemented Interfaces:
Explorable, Identifiable, ReferenceHolder, Serializable

public class FolderedBusinessObject
extends WTBusinessObject
implements Serializable

Class FolderedBusinessObject provides a wrapper class for objects that appear in the WindchillExplorer. This class is used as a wrapper for all objects that live inside of a Folder. This class is necessary because the WTExplorer, which is the basis for the WindchillExplorer, manipulates WTBusinessObjects.

Supported API: true

Extendable: false

See Also:
WTBusinessObject, Serialized Form

Field Summary
private  ClassInfo classInfo
           
private  String lifecycleState
           
private  String modifyDate
           
private  IconSelector myIconSelector
           
private  String myName
           
private  String myTeamTemplate
           
private  String mytype
           
private  String number
           
private  ObjectReference objectReference
           
private  String organizationUniqueId
           
private  String uniqueIdentity
           
private  String versionIdentity
           
 
Fields inherited from class wt.clients.beans.explorer.WTBusinessObject
 
Constructor Summary
FolderedBusinessObject(String identity, FolderEntry folder_entry)
          Constructor for class FolderedBusinessObject.
FolderedBusinessObject(String identity, String name, String numr, String vid, String lcs, String type, String modDate, String teamTemplate, IconSelector icon, ObjectReference ref)
          Constructor for class FolderedBusinessObject.
 
Method Summary
private  String formatDate(Timestamp time)
           
static String getAttributeValue(Object aDetail, String anAttributeName)
          Method getAttributeValue is a convenience method for attempting to get a String value of the given attribute from the given object.
 WTBusinessObject[] getDetails()
          Method getDetails is invoked by the WTExplorer in response to a node in the WTTree being selected.
 FolderEntry getFolderEntry()
          Returns the FolderEntry object being wrapped by this object.
 String getFolderPath()
          Returns the String folder path of the FolderEntry object wrapped by this object.
 String getIdentity()
          Returns the identity of the FolderEntry object wrapped by this object.
 String getLCState()
          Returns a String representation of the current Life Cycle State of the FolderEntry object being wrapped by this object.
 String getLocation()
          Gets the String location of the FolderEntry wrapped by this object.
 String getModifyDate()
          Returns a String representation of the date on which the FolderEntry object wrapped by this object was last modified.
 String getName()
          Returns the String name of the FolderEntry object wrapped by this object.
 String getNumber()
          Returns a String representation of the number associated with the FolderEntry object being wrapped by this object.
 ObjectReference getObjectReference()
           
 String getOrganizationId()
          Returns a String which identifies the current organizationUniqueIdentifier of the FolderEntry object wrapped by this object.
 String getTeamName()
          Returns a String representation of the current team name of the FolderEntry object being wrapped by this object.
 String getType()
          Returns the particular type of the FolderEntry object being wrapped by this object.
 String getUniqueIdentity()
          Returns a String that uniquely represents the object instance.
 String getVersionIdentity()
          Returns a String which identifies the current Version of the FolderEntry object wrapped by this object.
 boolean isEqual(FolderEntry folder_entry)
          Method isEqual is a convenience method to determine if a given FolderEntry object is the same object as the FolderEntry object being wrapped by this object.
 void setFolderEntry(FolderEntry folder_entry)
          Sets the FolderEntry object to be wrapped by this object.
 
Methods inherited from class wt.clients.beans.explorer.WTBusinessObject
getAttributeValue, getAttributeValue, getContents, getObject, getOpenIcon, getStandardIcon, getUses, setIdentity, setObject, setObject, setStandardIcon, setStandardIcon
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

classInfo

private ClassInfo classInfo

mytype

private String mytype

uniqueIdentity

private String uniqueIdentity

modifyDate

private String modifyDate

versionIdentity

private String versionIdentity

lifecycleState

private String lifecycleState

number

private String number

myName

private String myName

myTeamTemplate

private String myTeamTemplate

myIconSelector

private IconSelector myIconSelector

objectReference

private ObjectReference objectReference

organizationUniqueId

private String organizationUniqueId
Constructor Detail

FolderedBusinessObject

public FolderedBusinessObject(String identity,
                              FolderEntry folder_entry)
Constructor for class FolderedBusinessObject.

Parameters:
identity - the String used to identify this FolderEntry object
folder_entry - the FolderEntry object this object is wrapping

Supported API: true

FolderedBusinessObject

public FolderedBusinessObject(String identity,
                              String name,
                              String numr,
                              String vid,
                              String lcs,
                              String type,
                              String modDate,
                              String teamTemplate,
                              IconSelector icon,
                              ObjectReference ref)
Constructor for class FolderedBusinessObject.

Parameters:
identity - the String used to identify this FolderEntry object
name - the object's name
numr - the object's number
vid - the object's VersionIdentifier
lcs - the object's LifeCycle State
type - the object's type
modDate - the object's Modification Date
teamTemplate - the object's TeamTemplate
icon - the object's IconSelector
ref - the object's ObjectReference

Supported API: true
Method Detail

getDetails

public WTBusinessObject[] getDetails()
Method getDetails is invoked by the WTExplorer in response to a node in the WTTree being selected. Since FolderedBusinessObjects will never appear in the treeview side of the explorer, and only in the details side of the explorer, this method returns a zero-length array.

Returns:
a zero-length array of WTBusinessObject objects

Supported API: true

getFolderEntry

public FolderEntry getFolderEntry()
Returns the FolderEntry object being wrapped by this object.

Returns:
the FolderEntry object wrapped by this object
See Also:
setFolderEntry(wt.folder.FolderEntry),

Supported API: true

setFolderEntry

public void setFolderEntry(FolderEntry folder_entry)
Sets the FolderEntry object to be wrapped by this object.

Parameters:
folder_entry - the FolderEntry object wrapped by this object
See Also:
getFolderEntry(),

Supported API: true

getLocation

public String getLocation()
Gets the String location of the FolderEntry wrapped by this object. The location describes the path to the Folder in which the FolderEntry of this object lives.

Returns:
the String location of the FolderEntry object wrapped by this object
See Also:


Supported API: true

getName

public String getName()
Returns the String name of the FolderEntry object wrapped by this object.

Returns:
the String name of the FolderEntry object wrapped by this object
See Also:


Supported API: true

getIdentity

public String getIdentity()
Returns the identity of the FolderEntry object wrapped by this object. If the folder entry object is a WTObject, then this method returns the identity retrieved from 'getDisplayIdentity'. Otherwise, the name of the FolderEntry is returned.

Specified by:
getIdentity in interface Identifiable
Overrides:
getIdentity in class WTBusinessObject
Returns:
a String which identifies the FolderEntry object wrapped by this object
See Also:


Supported API: true

getFolderPath

public String getFolderPath()
Returns the String folder path of the FolderEntry object wrapped by this object.

Returns:
the String folder path of the FolderEntry object wrapped by this object
See Also:


Supported API: true

getVersionIdentity

public String getVersionIdentity()
Returns a String which identifies the current Version of the FolderEntry object wrapped by this object. If the given FolderEntry object is not Versioned, then an empty String is returned.

Returns:
if the FolderEntry wrapped by this object is Versioned, a String identifying the current version of that FolderEntry is returned; Otherwise, an empty String is returned
See Also:
FolderEntry,

Supported API: true

getLCState

public String getLCState()
Returns a String representation of the current Life Cycle State of the FolderEntry object being wrapped by this object. If the FolderEntry object is not LifeCycleManaged, then an empty String is returned.

Returns:
if the FolderEntry wrapped by this object is LifeCycleManaged, a String representation of the current Life Cycle State of that FolderEntry is returned; otherwise, an empty String is returned
See Also:
FolderEntry,

Supported API: true

getTeamName

public String getTeamName()
Returns a String representation of the current team name of the FolderEntry object being wrapped by this object. If the FolderEntry object is not LifeCycleManaged, an empty String is returned.

Returns:
if the FolderEntry wrapped by this object is LifeCycleManaged, a String representation of the current team name of that FolderEntry is returned; otherwise, an empty String is returned
See Also:
FolderEntry,

Supported API: true

getType

public String getType()
Returns the particular type of the FolderEntry object being wrapped by this object. If a "displayType" attribute is associated with the FolderEntry object, the value of that type is returned. If no explicit "displayType" attribute is found, and an explicit "type" attribute exists, that value is returned. Otherwise, an empty string is returned.

Returns:
if the FolderEntry object contains an explicit "displayType" attribute, the value of that attribute is returned; otherwise, if the object contains an explicit "type" attribute, the business type is returned; if no explicit type is found, an empty string is returned
See Also:


Supported API: true

getModifyDate

public String getModifyDate()
Returns a String representation of the date on which the FolderEntry object wrapped by this object was last modified.

Returns:
a String representation of the date on which the FolderEntry object wrapped by this object was last modified
See Also:


Supported API: true

getAttributeValue

public static String getAttributeValue(Object aDetail,
                                       String anAttributeName)
Method getAttributeValue is a convenience method for attempting to get a String value of the given attribute from the given object. If the given attribute is not found for the given object, an empty String is returned.

Parameters:
aDetail - the Object from which the value of the given attribute is retrieved
anAttributeName - the String name of the attribute whose value is attempted to be retrieved from the given object

Supported API: true

getNumber

public String getNumber()
Returns a String representation of the number associated with the FolderEntry object being wrapped by this object. If no number attribute is found to be associated with the FolderEntry object, an empty String is returned.

Returns:
a String representation of the number associated with the FolderEntry object; if the FolderEntry object contains no number, an empty String is returned
See Also:


Supported API: true

isEqual

public boolean isEqual(FolderEntry folder_entry)
Method isEqual is a convenience method to determine if a given FolderEntry object is the same object as the FolderEntry object being wrapped by this object. Note that this method is not checking if the two FolderEntry objects have the same values, but rather that the two objects are references to the same FolderEntry object.

Parameters:
folder_entry - the FolderEntry object to be compared for equality with the FolderEntry wrapped by this object
Returns:
if true, the given FolderEntry and the FolderEntry wrapped by this object reference the same FolderEntry object

Supported API: true

formatDate

private String formatDate(Timestamp time)

getUniqueIdentity

public String getUniqueIdentity()
Description copied from class: WTBusinessObject
Returns a String that uniquely represents the object instance. This method is used by WTExplorer during run-time.

Specified by:
getUniqueIdentity in interface Identifiable
Overrides:
getUniqueIdentity in class WTBusinessObject
Returns:
the unique identity of the object.

getObjectReference

public ObjectReference getObjectReference()

getOrganizationId

public String getOrganizationId()
Returns a String which identifies the current organizationUniqueIdentifier of the FolderEntry object wrapped by this object. If the given FolderEntry object is not OrganizationOwned, then an empty String is returned.

Returns:
if the FolderEntry wrapped by this object is Versioned, a String identifying the current version of that FolderEntry is returned; Otherwise, an empty String is returned
See Also:
FolderEntry,

Supported API: true