wt.clients.replication.unit
Class PartItem

java.lang.Object
  extended bywt.clients.beans.explorer.WTBusinessObject
      extended bywt.clients.replication.unit.PartItem
All Implemented Interfaces:
Explorable, Identifiable, ReferenceHolder, Serializable

public class PartItem
extends WTBusinessObject

PartItem is a model class for manipulating WTPart objects. It contains helper methods for manipulating attributes and relationships of the WTPart class. It extends wt.clients.beans.WTBusinessObject to allow easy manipulation in the wt.clients.beans.WTExplorer.

Supported API: true

Extendable: true

See Also:
WTPart, Serialized Form

Field Summary
private  BuildRuleList buildRule
          A list of the build sources to this part.
private  ConfigSpecItem configSpecItem
          The ConfigSpecItem used for navigation with this part.
private  Folder folder
          The folder.
private  boolean isNew
          If the part is new.
private  String iteration
           
private  String iterationIdentifier
           
private  String lifecycle
           
private  String location
          The location.
private  boolean modified
          If the part has been modified.
private  String name
          The Part name
private  String number
          The Part number
private  ReferencesList references
          A list of the references to this part.
private static ResourceBundle resource
           
private static String RESOURCE
           
private  String revision
          The revision.
private  Source source
          The source.
private  String state
          The state.
private  String teamTemplate
           
private  PartType type
          The type.
private  UsedByList usedBy
          A list of the parts this part uses.
private  UsesInterfaceList usesInterface
          A list of the part masters this part uses.
private  String version
           
private  View view
          The view
private  String viewName
          The view name
 
Fields inherited from class wt.clients.beans.explorer.WTBusinessObject
 
Constructor Summary
PartItem()
          Constructs a new PartItem.
PartItem(Part part)
          Deprecated. use the constructor taking a wt.part.WTPart object instead
PartItem(WTPart part)
          Constructs a new PartItem.
 
Method Summary
 void create()
          Create a new contained part for this partitem.
 void delete()
          Delete the contained part of this partitem.
 void dispatchRefresh()
          Dispatch a RefeshEvent for modifications to the contained Part
 BuildRuleList getBuildRule()
          Returns the a list of the build sources for thisPartItem.
 ConfigSpecItem getConfigSpecItem()
          Return the contained ConfigSpecItem
 String getCreatedByPersonName()
          Returns the Created by person name.
 String getCreationDate()
          Returns the creation date.
 String getDisplayIdentity(Locale locale)
          Returns the identity of this object.
 Folder getFolder()
          Returns the current folder of this PartItem.
 String getIdentity()
          Deprecated. replaced with getDisplayIdentity
 String getIteration()
          Returns the current Iteration.
 String getIterationIdentifier()
          Returns the current IterationIdentifier.
 String getLastUpdated()
          Returns the last updated date.
 String getLifecycleName()
          Get the lifecycle name for this object
 String getLocation()
          Returns the current location of this PartItem.
 String getModifiedByPersonName()
          Returns the Modified by person name.
 String getName()
          Returns the current name of this PartItem.
 String getNumber()
          Returns the current number of this PartItem.
 WTPart getPart()
          Return the contained WTPart object.
 ReferencesList getReferences()
          Returns the a list of the Parts this PartItem references.
protected  ResourceBundle getResource()
           
 String getRevision()
          Returns the current revision of this PartItem.
 Source getSource()
          Returns the current source of this PartItem.
 String getState()
          Returns the current state of this PartItem.
 String getStatusText()
          Return a string indicating the checkout status of this object
 String getTeamTemplateName()
          Get the teamTemplate name for this object
 PartType getType()
          Returns the current type of this PartItem.
 String getUniqueIdentity()
          Override the default behavior defined in wt.clients.beans.WTBusinessObject.
 UsedByList getUsedBy()
          Returns the a list of the Parts this PartItem is used by.
 Explorable[] getUses()
          Returns an array of Explorable objects this PartItem uses.
 UsesInterfaceList getUsesInterfaceList()
          Returns the a list of the Parts this PartItem uses.
 String getVersion()
          Returns the current Version.
 View getView()
          Get the view for this object
 String getViewName()
          Returns the name of the view for this object.
protected  void init()
          Initialize the PartItem part without any side effect.
private  void initResources()
           
 boolean isModified()
          gets the modified flag for this partitem.
 boolean isNew()
          gets the isNew flag for this partitem.
 void setConfigSpecItem(ConfigSpecItem configSpecItem)
          Set the contained ConfigSpecItem
 void setFields()
          Copies values from the PartItem to contained Part
 void setFolder(Folder folder)
          Sets the folder of this partitem.
 void setIteration(String iteration)
           
 void setLocation(String location)
          Sets the location of this partitem.
protected  void setModified(boolean modified)
          Sets the modified flag for this partitem.
 void setName(String name)
          Sets the name of this partitem.
 void setNew(boolean isNew)
          Sets the isNew flag for this partitem.
 void setNumber(String number)
          Sets the number of this partitem.
 void setPart(WTPart part)
          Sets the contained part.
protected  void setPartSimply(WTPart part)
          Sets the contained part without any side effect.
 void setRevision(String revision)
          Sets the revision of this partitem.
 void setSource(Source source)
          Sets the source of this partitem.
 void setState(String state)
          Sets the state of this partitem.
 void setStatusText(String value)
           
 void setType(PartType type)
          Sets the type of this partitem.
 void setView(View view)
          Set the view for this object
 void setViewName(String viewname)
           
 String toString()
          Returns a string representation of the partitem.
 void update()
          Save the contained part of this partitem.
 
Methods inherited from class wt.clients.beans.explorer.WTBusinessObject
getAttributeValue, getAttributeValue, getContents, getObject, getOpenIcon, getStandardIcon, setIdentity, setObject, setObject, setStandardIcon, setStandardIcon
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

resource

private static ResourceBundle resource

RESOURCE

private static String RESOURCE

configSpecItem

private ConfigSpecItem configSpecItem
The ConfigSpecItem used for navigation with this part.


modified

private boolean modified
If the part has been modified.


isNew

private boolean isNew
If the part is new.


number

private String number
The Part number


viewName

private String viewName
The view name


view

private View view
The view


name

private String name
The Part name


revision

private String revision
The revision.


version

private String version

iteration

private String iteration

iterationIdentifier

private String iterationIdentifier

state

private String state
The state.


teamTemplate

private String teamTemplate

lifecycle

private String lifecycle

type

private PartType type
The type.


source

private Source source
The source.


location

private String location
The location.


folder

private Folder folder
The folder.


usesInterface

private UsesInterfaceList usesInterface
A list of the part masters this part uses.


usedBy

private UsedByList usedBy
A list of the parts this part uses.


references

private ReferencesList references
A list of the references to this part.


buildRule

private BuildRuleList buildRule
A list of the build sources to this part.

Constructor Detail

PartItem

public PartItem()
         throws WTException
Constructs a new PartItem.

Throws:
WTException

PartItem

public PartItem(Part part)
Deprecated. use the constructor taking a wt.part.WTPart object instead

Constructs a new PartItem.

Parameters:
part - the contained wt.part.Part.
See Also:
Part

PartItem

public PartItem(WTPart part)
Constructs a new PartItem.

Parameters:
part - the contained wt.part.WTPart.
See Also:
WTPart
Method Detail

setPart

public void setPart(WTPart part)
Sets the contained part. This will initialize many of the attributes in the PartItem class.

Parameters:
part - the contained wt.part.WTPart.
See Also:
WTPart

setPartSimply

protected void setPartSimply(WTPart part)
Sets the contained part without any side effect.

Parameters:
part - the contained wt.part.WTPart.
See Also:
WTPart

init

protected void init()
             throws WTException
Initialize the PartItem part without any side effect.

Throws:
WTException
VersionException
See Also:
WTPart

getPart

public WTPart getPart()
Return the contained WTPart object.

Returns:
the contained wt.part.WTPart.
See Also:
WTPart

setConfigSpecItem

public void setConfigSpecItem(ConfigSpecItem configSpecItem)
Set the contained ConfigSpecItem

Parameters:
configSpecItem - the contained ConfigSpecItem
See Also:
ConfigSpecItem

getConfigSpecItem

public ConfigSpecItem getConfigSpecItem()
Return the contained ConfigSpecItem

Returns:
the contained ConfigSpecItem
See Also:
ConfigSpecItem

setNew

public void setNew(boolean isNew)
Sets the isNew flag for this partitem.

Parameters:
isNew - the new isNew value of this partitem.

isNew

public boolean isNew()
gets the isNew flag for this partitem.

Returns:
boolean the isNew value of this partitem.

setModified

protected void setModified(boolean modified)
Sets the modified flag for this partitem.

Parameters:
modified - the new modified value of this partitem.

isModified

public boolean isModified()
gets the modified flag for this partitem.

Returns:
boolean the modified value of this partitem.

create

public void create()
            throws WTException
Create a new contained part for this partitem.

Throws:
WTException

setFields

public void setFields()
               throws WTException,
                      WTPropertyVetoException
Copies values from the PartItem to contained Part

Throws:
WTException
WTPropertyVetoException

update

public void update()
            throws WTException,
                   WTPropertyVetoException
Save the contained part of this partitem.

Throws:
WTException
WTPropertyVetoException

delete

public void delete()
            throws WTException
Delete the contained part of this partitem.

Throws:
WTException

dispatchRefresh

public void dispatchRefresh()
Dispatch a RefeshEvent for modifications to the contained Part

See Also:
wt.clients.util.RefeshEvent

setNumber

public void setNumber(String number)
Sets the number of this partitem.

Parameters:
number - the new number of this partitem.

getNumber

public String getNumber()
Returns the current number of this PartItem.

Returns:
the current number of this PartItem.

setFolder

public void setFolder(Folder folder)
Sets the folder of this partitem.

Parameters:
folder - the new folder of this partitem.
See Also:
Folder

getFolder

public Folder getFolder()
Returns the current folder of this PartItem.

Returns:
the current folder of this PartItem.
See Also:
Folder

getIterationIdentifier

public String getIterationIdentifier()
Returns the current IterationIdentifier.

Returns:
the current IterationIdentifier.

getVersion

public String getVersion()
Returns the current Version.

Returns:
the current Version.

setIteration

public void setIteration(String iteration)

getIteration

public String getIteration()
Returns the current Iteration.

Returns:
the current Iteration.

setRevision

public void setRevision(String revision)
Sets the revision of this partitem.

Parameters:
revision - the new revision of this partitem.

getRevision

public String getRevision()
Returns the current revision of this PartItem.

Returns:
the current revision of this PartItem.

setName

public void setName(String name)
Sets the name of this partitem.

Parameters:
name - the new name of this partitem.

getName

public String getName()
Returns the current name of this PartItem.

Returns:
the current name of this PartItem.

setState

public void setState(String state)
Sets the state of this partitem.

Parameters:
state - the new state of this partitem.

getState

public String getState()
Returns the current state of this PartItem.

Returns:
the current state of this PartItem.

setType

public void setType(PartType type)
Sets the type of this partitem.

Parameters:
type - the new type of this partitem.

getType

public PartType getType()
Returns the current type of this PartItem.

Returns:
the current type of this PartItem.

setSource

public void setSource(Source source)
Sets the source of this partitem.

Parameters:
source - the new folder of this partitem.

getSource

public Source getSource()
Returns the current source of this PartItem.

Returns:
the current source of this PartItem.

setLocation

public void setLocation(String location)
Sets the location of this partitem.

Parameters:
location - the new location of this partitem.

getLocation

public String getLocation()
Returns the current location of this PartItem.

Returns:
the current location of this PartItem.

getCreatedByPersonName

public String getCreatedByPersonName()
Returns the Created by person name.

Returns:
the Created by person name.
Throws:
WTException
VersionException

getModifiedByPersonName

public String getModifiedByPersonName()
Returns the Modified by person name.

Returns:
the Modified by person name.
Throws:
WTException
VersionException

getCreationDate

public String getCreationDate()
Returns the creation date.

Returns:
the creation date.

getLastUpdated

public String getLastUpdated()
Returns the last updated date.

Returns:
the last updated date.

getUsesInterfaceList

public UsesInterfaceList getUsesInterfaceList()
                                       throws WTException
Returns the a list of the Parts this PartItem uses.

Returns:
a list of the Parts this PartItem uses.
Throws:
WTException

getUses

public Explorable[] getUses()
                     throws WTException
Returns an array of Explorable objects this PartItem uses.

Specified by:
getUses in interface Explorable
Overrides:
getUses in class WTBusinessObject
Returns:
an array of Explorable objects this PartItem uses.
Throws:
WTException
See Also:
Explorable

getUsedBy

public UsedByList getUsedBy()
Returns the a list of the Parts this PartItem is used by.

Returns:
a list of the Parts this PartItem is used by.

getReferences

public ReferencesList getReferences()
Returns the a list of the Parts this PartItem references.

Returns:
a list of the Parts this PartItem references.

getBuildRule

public BuildRuleList getBuildRule()
Returns the a list of the build sources for thisPartItem.

Returns:
a list of the BuildSources this PartItem has.

toString

public String toString()
Returns a string representation of the partitem.

Returns:
a string representation of the partitem.

getDisplayIdentity

public String getDisplayIdentity(Locale locale)
Returns the identity of this object. Replaces the deprecated getIdentity.

Returns:
the identity of this object.

getIdentity

public String getIdentity()
Deprecated. replaced with getDisplayIdentity

Returns the identity of this object.

Specified by:
getIdentity in interface Identifiable
Overrides:
getIdentity in class WTBusinessObject
Returns:
athe identity of this object.
See Also:
String

getViewName

public String getViewName()
Returns the name of the view for this object.

Returns:
the name of the view for this object.

setViewName

public void setViewName(String viewname)

setView

public void setView(View view)
Set the view for this object

See Also:
View

getView

public View getView()
Get the view for this object

Returns:
the view for this object
See Also:
View

getTeamTemplateName

public String getTeamTemplateName()
Get the teamTemplate name for this object

Returns:
the teamTemplate name for this object

getLifecycleName

public String getLifecycleName()
Get the lifecycle name for this object

Returns:
the lifecycle name for this object

setStatusText

public void setStatusText(String value)

getStatusText

public String getStatusText()
Return a string indicating the checkout status of this object

Returns:
a string indicating the checkout status of this object

initResources

private void initResources()

getResource

protected ResourceBundle getResource()

getUniqueIdentity

public String getUniqueIdentity()
Override the default behavior defined in wt.clients.beans.WTBusinessObject. Use the branch identifier instead of the oid to uniquely identify the contained WTPart object.

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