|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.clients.replication.unit.UnitHelper
UnitHelper
is a facade class that contains static methods
for manipulating Units. It encapsulates some of the persistence and navigation
operations for Units.
Supported API: true
Extendable: false
wt.replication.unit.WTUnit
Field Summary | |
private static ResourceBundle |
resource
|
private static String |
RESOURCE
|
Constructor Summary | |
UnitHelper()
|
Method Summary | |
static WTUnit |
deleteUnit(WTUnit unit)
Deletes a Unit. |
static UnitWTPartUsageLink |
deleteUsageLink(UnitWTPartUsageLink usagelink)
Deletes a UsageLink. |
static WTPartConfigSpec |
getConfigSpec()
Gets the current ConfigSpec for the current user. |
static String |
getLifeCycle(WTUnit unit)
Get the name of the lifecycle the unit is assigned to |
static String |
getLifeCycleState(WTUnit unit)
Get the lifecycle state of the specified unit |
static int |
getMaxLength(Class a_class,
String attribute_constant)
Get the maximum length for the specified attribute in the specified class. |
protected ResourceBundle |
getResource()
|
static State[] |
getStates()
Gets the all the possible States. |
static String |
getTeamTemplate(WTUnit unit)
Get the name of the teamTemplate the unit is assigned to |
static WTUnit |
getUnitForOID(String theUnitID)
Get the unit with the specified object id |
static Explorable[] |
getUses(WTUnit unit)
Gets the uses WTPartUsageLinks for a Unit. |
static Explorable[] |
getUses(WTUnit unit,
WTPartConfigSpec configSpec)
Gets the uses WTPartUsageLinks for a unit. |
static UnitWTPartUsageLink[] |
getUsesInterface(WTUnit unit)
Get the WTPartUsageLinks for the specified unit |
protected void |
initResources()
|
static void |
main(String[] args)
A short main to allow for testing and demonstrate usage. |
static Object |
refresh(Persistable obj)
Refresh the specified object. |
static WTUnit |
refresh(WTUnit unit)
Refresh the specified unit. |
static WTUnit |
saveUnit(WTUnit unit)
Saves a Unit |
static UnitWTPartUsageLink |
saveUsageLink(UnitWTPartUsageLink usagelink)
Saves a WTPartUsageLink. |
static WTPartConfigSpec |
setConfigSpec(WTPartConfigSpec spec)
Sets the ConfigSpec for the current principal. |
static WTUnit |
setUnitConfigSpec(WTUnit unit)
|
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 UnitHelper()
Method Detail |
protected void initResources()
protected ResourceBundle getResource()
public static WTUnit getUnitForOID(String theUnitID)
theUnitID
- the id of the part requested
public static Object refresh(Persistable obj) throws WTException
obj
- the object to refresh
WTException
public static WTUnit refresh(WTUnit unit) throws WTException
unit
- the unit 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 WTUnit setUnitConfigSpec(WTUnit unit) throws WTException
WTException
public static State[] getStates() throws WTException
WTException
State
public static Explorable[] getUses(WTUnit unit) throws WTException
unit
- - the unit to use
WTException
Part
,
WTPartUsageLink
public static Explorable[] getUses(WTUnit unit, WTPartConfigSpec configSpec) throws WTException
WTException
WTUnit
,
WTPartUsageLink
public static UnitWTPartUsageLink[] getUsesInterface(WTUnit unit) throws WTException
WTException
public static WTUnit saveUnit(WTUnit unit) throws WTException
WTException
WTUnit
public static WTUnit deleteUnit(WTUnit unit) throws WTException
unit
- the unit to delete
WTException
WTUnit
public static UnitWTPartUsageLink saveUsageLink(UnitWTPartUsageLink usagelink) throws WTException
WTException
WTPartUsageLink
public static UnitWTPartUsageLink deleteUsageLink(UnitWTPartUsageLink usagelink) throws WTException
WTException
wt.part.UsageLink
public static String getLifeCycle(WTUnit unit) throws WTException
unit
- the part to find the lifecycle name for
WTException
public static String getTeamTemplate(WTUnit unit) throws WTException
unit
- the unit to find the lifecycle name for
WTException
public static String getLifeCycleState(WTUnit unit) throws WTException
unit
- the unit whose name is 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 |