wt.clients.prodmgmt
Class ConfigurationHelper

java.lang.Object
  extended bywt.clients.prodmgmt.ConfigurationHelper

public class ConfigurationHelper
extends Object

ConfigurationHelper is a facade class that contains static methods for manipulating Product Configurations. It encapsulates some of the persistence and navigation operations for Product Configurations.

Supported API: false

Extendable: false

See Also:
wt.part.WTProductConfiguration

Field Summary
private static ResourceBundle resource
           
private static String RESOURCE
           
 
Constructor Summary
ConfigurationHelper()
           
 
Method Summary
static WTProductConfiguration deleteConfiguration(WTProductConfiguration configuration)
          Deletes a Part.
static WTProductConfiguration getConfigurationForOID(String theConfigurationID)
          Get the configuration with the specified object id
static String getLifeCycle(WTProductConfiguration configuration)
          Get the name of the lifecycle the configuration is assigned to
static String getLifeCycleState(WTProductConfiguration configuration)
          Get the lifecycle state of the specified configuration
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 String getTeamTemplate(WTProductConfiguration configuration)
          Get the name of the teamTemplate the configuration is assigned to
static Explorable[] getUses(WTProductConfiguration configuration, WTPartConfigSpec configSpec)
          Gets the uses WTPartUsageLinks for a Product Configuration.
protected  void initResources()
           
static Object refresh(Persistable obj)
          Refresh the specified object.
static WTProductConfiguration refresh(WTProductConfiguration configuration)
          Refresh the specified configuration.
static WTProductConfiguration reviseConfiguration(WTProductConfiguration configuration)
          Revises a Configuration.
static WTProductConfiguration saveConfiguration(WTProductConfiguration configuration, WTProduct product)
          Saves a Product Configuration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

resource

private static ResourceBundle resource

RESOURCE

private static String RESOURCE
Constructor Detail

ConfigurationHelper

public ConfigurationHelper()
Method Detail

initResources

protected void initResources()

getResource

protected ResourceBundle getResource()

getConfigurationForOID

public static WTProductConfiguration getConfigurationForOID(String theConfigurationID)
Get the configuration with the specified object id

Parameters:
theConfigurationID - the id of the configuration requested
Returns:
the configuration with the specified object id

refresh

public static Object refresh(Persistable obj)
                      throws WTException
Refresh the specified object.

Parameters:
obj - the object to refresh
Returns:
the refreshed object
Throws:
WTException

refresh

public static WTProductConfiguration refresh(WTProductConfiguration configuration)
                                      throws WTException
Refresh the specified configuration.

Parameters:
configuration - the configuration to refresh
Returns:
the refreshed configuration
Throws:
WTException

getUses

public static Explorable[] getUses(WTProductConfiguration configuration,
                                   WTPartConfigSpec configSpec)
                            throws WTException
Gets the uses WTPartUsageLinks for a Product Configuration.

Returns:
an array of wt.part.WTPartUsageLink
Throws:
WTException
See Also:
Part, WTPartUsageLink

saveConfiguration

public static WTProductConfiguration saveConfiguration(WTProductConfiguration configuration,
                                                       WTProduct product)
                                                throws WTException
Saves a Product Configuration.

Parameters:
configuration - the configuration to save
product - the product version to save
Returns:
the saved configuration
Throws:
WTException
See Also:
WTProductConfiguration, WTProduct

deleteConfiguration

public static WTProductConfiguration deleteConfiguration(WTProductConfiguration configuration)
                                                  throws WTException
Deletes a Part.

Parameters:
configuration - the configuration to delete
Returns:
the deleted configuration
Throws:
WTException
See Also:
Part

reviseConfiguration

public static WTProductConfiguration reviseConfiguration(WTProductConfiguration configuration)
                                                  throws WTException,
                                                         WTPropertyVetoException
Revises a Configuration.

Parameters:
configuration - the configuration to revise
Returns:
the revised configuration
Throws:
WTException
WTPropertyVetoException
See Also:
WTProductConfiguration

getLifeCycle

public static String getLifeCycle(WTProductConfiguration configuration)
                           throws WTException
Get the name of the lifecycle the configuration is assigned to

Parameters:
configuration - the configuration to find the lifecycle name for
Returns:
the lifecycle name for the specified configuration
Throws:
WTException

getTeamTemplate

public static String getTeamTemplate(WTProductConfiguration configuration)
                              throws WTException
Get the name of the teamTemplate the configuration is assigned to

Parameters:
configuration - the configuration to find the lifecycle name for
Returns:
the teamTemplate name for the specified configuration
Throws:
WTException

getLifeCycleState

public static String getLifeCycleState(WTProductConfiguration configuration)
                                throws WTException
Get the lifecycle state of the specified configuration

Parameters:
configuration - the configuration whose name is requested
Returns:
the lifecycle state name for the configuration
Throws:
WTException

getMaxLength

public static int getMaxLength(Class a_class,
                               String attribute_constant)
                        throws WTIntrospectionException
Get the maximum length for the specified attribute in the specified class.

Parameters:
a_class - the class
attribute_constant - the string constant for the attribute
Returns:
the maximum length of the attribute
Throws:
WTIntrospectionException