|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.clients.prodmgmt.PartHelper
PartHelper
is a facade class that contains static methods
for manipulating Parts. It encapsulates some of the persistence and navigation
operations for Parts.
Supported API: true
Extendable: false
wt.part.WTPart
Field Summary | |
private static ResourceBundle |
resource
|
private static String |
RESOURCE
|
Constructor Summary | |
PartHelper()
|
Method Summary | |
static BuildRule |
deleteBuildRule(BuildRule rule)
Uses the PersistenceHelper to delete the given BuildRule. |
static WTPart |
deletePart(WTPart part)
Uses the PersistenceHelper to delete the given part. |
static WTPartReferenceLink |
deletePartReferenceLink(WTPartReferenceLink link)
Uses the PersistenceHelper to delete the given WTPartReferenceLink. |
static WTPartUsageLink |
deletePartUsageLink(WTPartUsageLink usagelink)
Uses the PersistenceHelper to delete the given WTPartUsageLink. |
static WTPartUsageLink |
deleteUsageLink(WTPartUsageLink usagelink)
Uses the PersistenceHelper to delete the given WTPartUsageLink. |
static WTPart[] |
getAllPartVersions(WTPartMaster[] masters,
ConfigSpec config_spec)
|
static WTPart[] |
getAllPartVersions(WTPartMaster master,
ConfigSpec config_spec)
|
static WTPart[] |
getAllVersions(WTPartMaster[] masters,
WTPartConfigSpec configSpec)
Return all the versions of the specified PartMaster using the specified WTPartConfigSpec. |
static WTPart[] |
getAllVersions(WTPartMaster master,
WTPartConfigSpec configSpec)
Return all the versions of the specified PartMaster using the specified ConfigSpecItem. |
static BuildRule[] |
getBuildRule(WTPart part)
Returns an array of BuildRule objects containing all BuildRules for the given part. |
static WTPartConfigSpec |
getConfigSpec()
Returns the WTPartConfigSpec which is stored for the current user. |
static String |
getLifeCycle(WTPart part)
Returns the String name of the life cycle that the given part is currently assigned to. |
static String |
getLifeCycleState(WTPart part)
Get the lifecycle state of the specified part |
static int |
getMaxLength(Class a_class,
String attribute_constant)
Get the maximum length for the specified attribute in the specified class. |
static Part |
getPartForOID(String part_id)
Returns a Part which is retrieved using the given object id. |
static WTPartReferenceLink[] |
getReferences(WTPart part)
Returns an array of WTPartReferenceLink objects containing the reference relationships for the given part. |
protected ResourceBundle |
getResource()
|
static State[] |
getStates()
Returns all available valid life cycle State objects. |
static String |
getTeamTemplate(WTPart part)
Get the name of the teamTmeplate the part is assigned to |
static WTPartUsageLink[] |
getUsedBy(WTPart part)
Returns an array of WTPartUsageLink objects containing the WTPartUsageLinks that represent the relationship describing which parts use the given part. |
static Explorable[] |
getUses(WTPart part)
Returns an array of Explorable objects retrieved in finding the parts that are used by the given part. |
static Explorable[] |
getUses(WTPart part,
PartExplorer explorer,
ConfigSpec config_spec)
Returns an array of Explorable objects retrieved by getting the children of given part using the given ConfigSpec. |
static Explorable[] |
getUses(WTPart part,
WTPartConfigSpec config_spec,
PartExplorer explorer)
Returns an array of Explorable objects retrieved in finding the parts that are used by the given part. |
static WTPartUsageLink[] |
getUsesInterface(WTPart part)
Returns an array of WTPartUsageLinks containing the relationships to the child parts used by the given part. |
static View[] |
getViews()
Returns an array of all defined View objects. |
protected void |
initResources()
|
static void |
main(String[] args)
A short main to allow for testing and demonstrate usage. |
static WTPartConfigSpec |
newConfigSpec(boolean checkedOut,
State newState,
View newView)
Create a ConfigSpec based on the specified state, new, and checkout qualification. |
static Object |
refresh(Persistable obj)
Refreshes the given persistable object by re-retrieving it from the database. |
static WTPart |
refresh(WTPart part)
Refreshes the given WTPart object by re-retrieving it from the database. |
static WTPart |
revisePart(WTPart part)
Uses the VersionControlService to create a new version of the given part. |
static BuildRule |
saveBuildRule(BuildRule rule)
Uses the PersistenceHelper to save the given BuildRule. |
static WTPart |
savePart(WTPart part)
Uses the PersistentHelper to save the given part. |
static WTPartReferenceLink |
savePartReferenceLink(WTPartReferenceLink link)
Uses the PersistenceHelper to save the given WTPartReferenceLink. |
static WTPartUsageLink |
savePartUsageLink(WTPartUsageLink usagelink)
Uses the PersistenceHelper to save the given WTPartUsageLink. |
static WTPartUsageLink |
saveUsageLink(WTPartUsageLink usagelink)
Uses the PersistenceHelper to save the given WTPartUsageLink. |
static WTPartConfigSpec |
setConfigSpec(WTPartConfigSpec spec)
Sets the given WTPartConfigSpec as the WTPartConfigSpec to be associated with the current user. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static ResourceBundle resource
private static String RESOURCE
Constructor Detail |
public PartHelper()
Method Detail |
protected void initResources()
protected ResourceBundle getResource()
public static Part getPartForOID(String part_id)
part_id
- the String id of the part to be returned
public static Object refresh(Persistable obj) throws WTException
obj
- the Persistable object to be refreshed
WTException
Persistable
,
PersistenceHelper
public static WTPart refresh(WTPart part) throws WTException
part
- the WTPart object to be refreshed
WTException
Persistable
,
PersistenceHelper
public static WTPartConfigSpec getConfigSpec() throws WTException
WTException
WTPartConfigSpec
public static WTPartConfigSpec setConfigSpec(WTPartConfigSpec spec) throws WTException
spec
- the WTPartConfigSpec to be associated as the default config spec
for the current user
WTException
public static State[] getStates() throws WTException
WTException
State
public static View[] getViews() throws WTException
WTException
- if an error occurs attempting
to retrieve the views.public static WTPartReferenceLink[] getReferences(WTPart part) throws WTException
part
- the WTPart for which the references relationships are returned
WTException
- if an error occurs navigation the reference relationshippublic static BuildRule[] getBuildRule(WTPart part) throws WTException
part
- the WTPart for which build rules will be returned
WTException
- if an error occurs navigation the build rule
relationshipBuildRule
public static WTPartUsageLink[] getUsedBy(WTPart part) throws WTException
part
- the part for which the used by relationships are returned
WTException
- if an error occurs navigation the used by role for
the given partpublic static Explorable[] getUses(WTPart part) throws WTException
part
- the WTPart for which the uses parts are returned
WTException
- if an error occurs navigating the uses relationshippublic static WTPartConfigSpec newConfigSpec(boolean checkedOut, State newState, View newView) throws WTException
newState
- the value for the LifeCycleQualificationnewView
- the value for the ViewQualification
WTException
public static Explorable[] getUses(WTPart part, WTPartConfigSpec config_spec, PartExplorer explorer) throws WTException
part
- the WTPart for which the uses parts are returnedconfig_spec
- the WTPartConfigSpec used for selecting part versions found
when navigating the uses role for the given partexplorer
- the PartExplorer used to initialize the 'explorer' attribute
of any PartItems returned in the array.
WTException
- if an error occurs navigating the uses relationshippublic static Explorable[] getUses(WTPart part, PartExplorer explorer, ConfigSpec config_spec) throws WTException
part
- the WTPart for which the uses parts are returnedconfig_spec
- the ConfigSpec used for selecting part versions found
when navigating the uses role for the given partexplorer
- the PartExplorer used to initialize the 'explorer' attribute
of any PartItems returned in the array.
WTException
- if an error occurs navigating the uses relationshippublic static WTPartUsageLink[] getUsesInterface(WTPart part) throws WTException
part
- the part for which the usage relationships between the part
and its children are returned
WTException
- if an error occurs navigating the uses relationshippublic static WTPart savePart(WTPart part) throws WTException
part
- the WTPart to be saved
WTException
- if an error occurs saving the part.public static WTPart deletePart(WTPart part) throws WTException
part
- the WTPart to be deleted
WTException
- if an error occurs deleting the part.public static WTPart revisePart(WTPart part) throws WTException, WTPropertyVetoException
part
- the WTPart to be revised
WTException
- if an error occurs attempting to revise the part
WTPropertyVetoException
- if any of the properties of the given
part prevent it from being revised.public static WTPartReferenceLink deletePartReferenceLink(WTPartReferenceLink link) throws WTException
link
- the WTPartReferenceLink to be deleted
WTException
- if an error occurs attempting to delete the linkpublic static BuildRule deleteBuildRule(BuildRule rule) throws WTException
WTException
- if an error occurs attempting to delete the rulepublic static WTPartReferenceLink savePartReferenceLink(WTPartReferenceLink link) throws WTException
link
- the WTPartReferenceLink to be saved
WTException
- if an error occurs saving the linkpublic static BuildRule saveBuildRule(BuildRule rule) throws WTException
rule
- the BuildRule to be saved
WTException
- if an error occurs saving the rulepublic static WTPartUsageLink saveUsageLink(WTPartUsageLink usagelink) throws WTException
usagelink
- the WTPartUsageLink to be saved
WTException
- if an error occurs saving the linkpublic static WTPartUsageLink deleteUsageLink(WTPartUsageLink usagelink) throws WTException
usagelink
- the WTPartUsageLink to be deleted
WTException
- if an error occurs attempting to delete the linkpublic static WTPartUsageLink savePartUsageLink(WTPartUsageLink usagelink) throws WTException
usagelink
- the WTPartUsageLink to be saved
WTException
- if an error occurs saving the linkpublic static WTPartUsageLink deletePartUsageLink(WTPartUsageLink usagelink) throws WTException
usagelink
- the WTPartUsageLink to be deleted
WTException
- if an error occurs attempting to delete the linkpublic static String getLifeCycle(WTPart part) throws WTException
part
- the WTPart whose life cycle name is returned
WTException
- if an error occurs retrieving the name
of the life cycle for the given partpublic static String getTeamTemplate(WTPart part) throws WTException
part
- the part to find the lifecycle name for
WTException
public static String getLifeCycleState(WTPart part) throws WTException
part
- the part whose name is requested
WTException
public static WTPart[] getAllVersions(WTPartMaster[] masters, WTPartConfigSpec configSpec) throws WTException
masters
- the PartMasters whose versions are requestedconfigSpec
- the configuration specification qualifications
WTException
public static WTPart[] getAllPartVersions(WTPartMaster master, ConfigSpec config_spec) throws WTException
WTException
public static WTPart[] getAllPartVersions(WTPartMaster[] masters, ConfigSpec config_spec) throws WTException
WTException
public static WTPart[] getAllVersions(WTPartMaster master, WTPartConfigSpec configSpec) throws WTException
master
- the PartMaster whose versions are requested
WTException
public static void main(String[] args)
public static int getMaxLength(Class a_class, String attribute_constant) throws WTIntrospectionException
a_class
- the classattribute_constant
- the string constant for the attribute
WTIntrospectionException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |