wt.clients.prodmgmt
Class InstanceItem

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

public class InstanceItem
extends WTBusinessObject

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

Supported API: false

Extendable: true

See Also:
WTProductInstance2, Serialized Form

Field Summary
private  BuildRuleList buildRule
          A list of the build sources to this instance.
private  ConfigSpecItem configSpecItem
          The ConfigSpecItem used for navigation with this instance.
private  WTProductConfiguration configuration
           
private  boolean isNew
          If the instance is new.
private  String iteration
           
private  String iterationIdentifier
           
private  String lifecycle
           
private  boolean modified
          If the instance has been modified.
private  PartExplorer myExplorer
          The parent explorer this item belongs to.
private  ReferencesList references
          A list of the references to this instance.
private static ResourceBundle resource
           
private static String RESOURCE
           
private  String revision
          The revision.
private  String sn
          The Instance serial number
private  String state
          The state.
private  String status_text
          The status text.
private  String teamTemplate
           
private  UsedByList usedBy
          A list of the instances this instance uses.
private  UsesInterfaceList usesInterface
          A list of the instance masters this instance 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
InstanceItem(WTProductConfiguration configuration)
          Constructs a new InstanceItem.
InstanceItem(WTProductInstance2 instance)
          Constructs a new InstanceItem.
 
Method Summary
 void create(WTProduct product, String sn)
          Create a new contained instance for this instanceitem.
 void delete()
          Delete the contained instance of this instanceitem.
 void dispatchRefresh()
          Dispatch a RefeshEvent for modifications to the contained Instance
 void duplicate(WTProductInstance2 original)
          Save the contained instance of this instanceitem.
 ConfigSpecItem getConfigSpecItem()
          Return the contained ConfigSpecItem
 WTProductConfiguration getConfiguration()
          Returns the configuration.
 String getCreatedByPersonName()
          Returns the Created by person name.
 String getCreationDate()
          Returns the creation date.
 String getDisplayIdentity(Locale locale)
          Returns the identity of this object.
 PartExplorer getExplorer()
          Return the parent part explorer
 String getIdentity()
          Deprecated. replaced with getDisplayIdentity
 WTProductInstance2 getInstance()
          Return the contained WTProductInstance2 object.
 String getIteration()
          Returns the current Iteration.
 String getIterationIdentifier()
          Returns the current IterationIdentifier.
private  String getIterationIdentifierString()
           
 String getLastUpdated()
          Returns the last updated date.
 String getLifecycleName()
          Get the lifecycle name for this object
 String getModifiedByPersonName()
          Returns the Modified by person name.
protected  ResourceBundle getResource()
           
 String getRevision()
          Returns the current revision of this InstanceItem.
 String getSerialNumber()
          Returns the current name of this InstanceItem.
 String getState()
          Returns the current state of this InstanceItem.
 String getStatusText()
          Return a string indicating the checkout status of this object
 String getTeamTemplateName()
          Get the teamTemplate name for this object
 String getUniqueIdentity()
          Override the default behavior defined in wt.clients.beans.WTBusinessObject.
 Explorable[] getUses()
          Returns an array of Explorable objects 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 InstanceItem instance without any side effect.
private  void initResources()
           
 boolean isModified()
          gets the modified flag for this instanceitem.
 boolean isNew()
          gets the isNew flag for this instanceitem.
 void setConfigSpecItem(ConfigSpecItem configSpecItem)
          Set the contained ConfigSpecItem
 void setExplorer(PartExplorer explorer)
          Set the parent part explorer
 void setFields()
          Copies values from the ConfigurationItem to contained Configuration
 void setFields(WTProduct product)
          Copies values from the InstanceItem to contained Instance
 void setInstance(WTProductInstance2 instance)
          Sets the contained instance.
protected  void setInstanceSimply(WTProductInstance2 instance)
          Sets the contained instance without any side effect.
 void setIteration(String iteration)
           
protected  void setModified(boolean modified)
          Sets the modified flag for this instanceitem.
 void setNew(boolean isNew)
          Sets the isNew flag for this instanceitem.
 void setRevision(String revision)
          Sets the revision of this instanceitem.
 void setSerialNumber(String sn)
          Sets the serial number of this instanceitem.
 void setState(String state)
          Sets the state of this instanceitem.
 void setStatusText(String value)
           
 void setView(View view)
          Set the view for this object
 void setViewName(String viewname)
           
 String toString()
          Returns a string representation of the instanceitem.
 void update()
          Save the contained instance of this instanceitem.
 
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 instance.


modified

private boolean modified
If the instance has been modified.


isNew

private boolean isNew
If the instance is new.


viewName

private String viewName
The view name


view

private View view
The view


sn

private String sn
The Instance serial number


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

status_text

private String status_text
The status text.


usesInterface

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


usedBy

private UsedByList usedBy
A list of the instances this instance uses.


references

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


buildRule

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


configuration

private WTProductConfiguration configuration

myExplorer

private PartExplorer myExplorer
The parent explorer this item belongs to.

Constructor Detail

InstanceItem

public InstanceItem(WTProductConfiguration configuration)
             throws WTException
Constructs a new InstanceItem.

Throws:
WTException

InstanceItem

public InstanceItem(WTProductInstance2 instance)
Constructs a new InstanceItem.

See Also:
WTProductInstance2
Method Detail

setInstance

public void setInstance(WTProductInstance2 instance)
Sets the contained instance. This will initialize many of the attributes in the InstanceItem class.

Parameters:
instance - the contained wt.part.WTProductInstance2.
See Also:
WTProductInstance2

setInstanceSimply

protected void setInstanceSimply(WTProductInstance2 instance)
Sets the contained instance without any side effect.

Parameters:
instance - the contained wt.part.WTProductInstance2.
See Also:
WTProductInstance2

init

protected void init()
             throws WTException
Initialize the InstanceItem instance without any side effect.

Throws:
WTException
VersionException
See Also:
WTProductInstance2

getInstance

public WTProductInstance2 getInstance()
Return the contained WTProductInstance2 object.

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

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 instanceitem.

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

isNew

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

Returns:
boolean the isNew value of this instanceitem.

setModified

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

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

isModified

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

Returns:
boolean the modified value of this instanceitem.

getConfiguration

public WTProductConfiguration getConfiguration()
Returns the configuration.

Returns:
the configuration.

create

public void create(WTProduct product,
                   String sn)
            throws WTException
Create a new contained instance for this instanceitem.

Throws:
WTException

setFields

public void setFields(WTProduct product)
               throws WTException,
                      WTPropertyVetoException
Copies values from the InstanceItem to contained Instance

Throws:
WTException
WTPropertyVetoException

setFields

public void setFields()
               throws WTException,
                      WTPropertyVetoException
Copies values from the ConfigurationItem to contained Configuration

Throws:
WTException
WTPropertyVetoException

update

public void update()
            throws WTException,
                   WTPropertyVetoException
Save the contained instance of this instanceitem.

Throws:
WTException
WTPropertyVetoException

duplicate

public void duplicate(WTProductInstance2 original)
               throws WTException,
                      WTPropertyVetoException
Save the contained instance of this instanceitem.

Throws:
WTException
WTPropertyVetoException

delete

public void delete()
            throws WTException
Delete the contained instance of this instanceitem.

Throws:
WTException

dispatchRefresh

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

See Also:
wt.clients.util.RefeshEvent

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 instanceitem.

Parameters:
revision - the new revision of this instanceitem.

getRevision

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

Returns:
the current revision of this InstanceItem.

setSerialNumber

public void setSerialNumber(String sn)
Sets the serial number of this instanceitem.


getSerialNumber

public String getSerialNumber()
Returns the current name of this InstanceItem.

Returns:
the current name of this InstanceItem.

setState

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

Parameters:
state - the new state of this instanceitem.

getState

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

Returns:
the current state of this InstanceItem.

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.

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

toString

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

Returns:
a string representation of the instanceitem.

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 WTProductInstance2 object.

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

setExplorer

public void setExplorer(PartExplorer explorer)
Set the parent part explorer

Parameters:
explorer - the part explorer
See Also:
PartExplorer

getExplorer

public PartExplorer getExplorer()
Return the parent part explorer


getIterationIdentifierString

private String getIterationIdentifierString()