|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.clients.replication.unit.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)
Deletes a BuildRule. |
static WTPart |
deletePart(WTPart part)
Deletes a Part. |
static WTPartReferenceLink |
deletePartReferenceLink(WTPartReferenceLink link)
Deletes a WTPartReferenceLink. |
static WTPartUsageLink |
deletePartUsageLink(WTPartUsageLink usagelink)
Deletes a UsageLink. |
static WTPartUsageLink |
deleteUsageLink(WTPartUsageLink usagelink)
Deletes a UsageLink. |
static WTPart[] |
getAllVersions(WTPartMaster[] masters,
WTPartConfigSpec configSpec)
Return all the versions of the specified PartMaster using the specified ConfigSpecItem. |
static WTPart[] |
getAllVersions(WTPartMaster master,
WTPartConfigSpec configSpec)
Return all the versions of the specified PartMaster using the specified ConfigSpecItem. |
static BuildRule[] |
getBuildRule(WTPart part)
Gets the BuildRules for a Part. |
static WTPartConfigSpec |
getConfigSpec()
Gets the current ConfigSpec for the current user. |
static String |
getLifeCycle(WTPart part)
Get the name of the lifecycle the part is 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 thePartID)
Get the part with the specified object id |
static WTPartReferenceLink[] |
getReferences(WTPart part)
Gets the WTPartReferenceLinks for a Part. |
protected ResourceBundle |
getResource()
|
static State[] |
getStates()
Gets the all the possible States. |
static String |
getTeamTemplate(WTPart part)
Get the name of the teamTemplate the part is assigned to |
static WTPartUsageLink[] |
getUsedBy(WTPart part)
Gets the used by UsageLinks for a Part. |
static Explorable[] |
getUses(WTPart part)
Gets the uses WTPartUsageLinks for a Part. |
static Explorable[] |
getUses(WTPart part,
WTPartConfigSpec configSpec)
Gets the uses WTPartUsageLinks for a Part. |
static WTPartUsageLink[] |
getUsesInterface(WTPart part)
Get the WTPartUsageLinks for the specified part |
static View[] |
getViews()
Gets the allowed Views. |
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)
Refresh the specified object. |
static WTPart |
refresh(WTPart part)
Refresh the specified part. |
static WTPart |
revisePart(WTPart part)
Revises a Part. |
static BuildRule |
saveBuildRule(BuildRule rule)
Save a BuildRule. |
static WTPart |
savePart(WTPart part)
Saves a Part. |
static WTPartReferenceLink |
savePartReferenceLink(WTPartReferenceLink link)
Save a ReferenceLink. |
static WTPartUsageLink |
savePartUsageLink(WTPartUsageLink usagelink)
Saves a WTPartUsageLink. |
static WTPartUsageLink |
saveUsageLink(WTPartUsageLink usagelink)
Saves a WTPartUsageLink. |
static WTPartConfigSpec |
setConfigSpec(WTPartConfigSpec spec)
Sets the ConfigSpec for the current principal. |
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 thePartID)
thePartID
- the id of the part requested
public static Object refresh(Persistable obj) throws WTException
obj
- the object to refresh
WTException
public static WTPart refresh(WTPart part) throws WTException
part
- the part to refresh
WTException
public static WTPartConfigSpec getConfigSpec() throws WTException
WTException
ConfigSpec
public static WTPartConfigSpec setConfigSpec(WTPartConfigSpec spec) throws WTException
spec
- the wt.vc.config.ConfigSpec.
WTException
ConfigSpec
public static State[] getStates() throws WTException
WTException
State
public static View[] getViews() throws WTException
WTException
View
public static WTPartReferenceLink[] getReferences(WTPart part) throws WTException
part
- - the part to use
WTException
Part
,
WTPartReferenceLink
public static BuildRule[] getBuildRule(WTPart part) throws WTException
part
- - the part to use
WTException
Part
,
BuildRule
public static WTPartUsageLink[] getUsedBy(WTPart part) throws WTException
part
- - the part to use
WTException
Part
,
wt.part.UsageLink
public static Explorable[] getUses(WTPart part) throws WTException
part
- - the part to use
WTException
Part
,
WTPartUsageLink
public 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 configSpec) throws WTException
part
- the part whose UsageLinks are requested
WTException
Part
,
WTPartUsageLink
public static WTPartUsageLink[] getUsesInterface(WTPart part) throws WTException
part
- the to use
WTException
public static WTPart savePart(WTPart part) throws WTException
part
- the part to save
WTException
Part
public static WTPart deletePart(WTPart part) throws WTException
part
- the part to delete
WTException
Part
public static WTPart revisePart(WTPart part) throws WTException, WTPropertyVetoException
part
- the part to revise
WTException
WTPropertyVetoException
Part
public static WTPartReferenceLink deletePartReferenceLink(WTPartReferenceLink link) throws WTException
link
- the link to delete
WTException
WTPartReferenceLink
public static BuildRule deleteBuildRule(BuildRule rule) throws WTException
rule
- the build rule to delete
WTException
BuildRule
public static WTPartReferenceLink savePartReferenceLink(WTPartReferenceLink link) throws WTException
link
- the link to save
WTException
wt.part.ReferenceLink
public static BuildRule saveBuildRule(BuildRule rule) throws WTException
rule
- the build rule to save
WTException
BuildRule
public static WTPartUsageLink saveUsageLink(WTPartUsageLink usagelink) throws WTException
WTException
WTPartUsageLink
public static WTPartUsageLink deleteUsageLink(WTPartUsageLink usagelink) throws WTException
WTException
wt.part.UsageLink
public static WTPartUsageLink savePartUsageLink(WTPartUsageLink usagelink) throws WTException
WTException
WTPartUsageLink
public static WTPartUsageLink deletePartUsageLink(WTPartUsageLink usagelink) throws WTException
WTException
wt.part.UsageLink
public static String getLifeCycle(WTPart part) throws WTException
part
- the part to find the lifecycle name for
WTException
public 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 requested
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 |