Package wt.clients.beans
Class EffectivityTaskLogic
java.lang.Object
wt.clients.beans.EffectivityTaskLogic
This class contains the logic to create, update, view, assign,
and retrieve
Supported API: true.
Extendable: true.
Effectivity. There are 3 major
subclasses of Effectivity: WTDatedEffectivitiy,
WTSerialNumberedEffectivity, and WTLotNumberEffectivity.
This class encapsulates the method calls for the 3 classes.
To use this class, instantiate it and set the mode, or call
the constructor that takes the mode as a parameter. Use
DATE_MODE, SERIAL_NUMBER_MODE, or LOT_NUMBER_MODE.
Supported API: true.
Extendable: true.
-
Constructor Summary
ConstructorsConstructorDescriptionThis is the no-arg constructor for the effectivityTaskLogic
Supported API: true.EffectivityTaskLogic(int mode) This instantiates theEffectivityTaskLogicand sets the mode of theEffectivityto DATE_MODE, SERIAL_NUMBER_MODE, or LOT_NUMBER_MODE.EffectivityTaskLogic(wt.effectivity.EffectivityManageable object) This instantiates theEffectivityTaskLogicand sets the currentEffectivityManageableobject. -
Method Summary
Modifier and TypeMethodDescriptionassignValues(String config_item, String start, String end) This creates a new Effectivity object, sets the values as defined by the user, and assigns it to the currentEffectivityManageableobject.dateString(Timestamp ts) Returns the value as aStringrepresenting a date with the format of MM/dd/yyyy.getConfigItem(String config_item) This returns the currentConfigurationItemfor theEffectivity
Supported API: true.This returns theStringrepresenting the currentConfigurationItemfor theEffectivity
Supported API: true.This is the public getter for theEffectivitythat is being created, updated, or viewed.getEffectivityType(ConfigurationItem config_item) This returns theEffectivityTypeof theConfigurationItempassed in.This returns theStringrepresenting the EffectivityType of theConfigurationItem
Supported API: true.getEffectivityTypeDisplay(ConfigurationItem config_item) This returns theStringrepresenting the EffectivityType of theConfigurationItempassed in.getEnd()This returns the String representing the current end date or number depending on the current mode.intgetMode()This is the public getter for themodevariable.intThis returns theEffectivityTaskLogicmode given anEffectivityType
Supported API: true.wt.effectivity.EffectivityManageableThis is the public getter for theEffectivityManageableobject.This is the public getter for theEffectivitythat is deleted.getStart()This returns the String representing the current start date or number depending on the current mode.protected TimestampThis converts a string to a timestamp using the dateHelperResource.voidsave()This saves the new effectivity as defined by the user and removes the previous one - if one existed.voidsave(Enumeration effectivities, Enumeration old_effectivities) This saves an Enumeration of new effectivities and removes the old effectivities.voidsetMode(int mode) This sets the mode of theEffectivityto DATE_MODE, SERIAL_NUMBER_MODE, or LOT_NUMBER_MODE.voidsetMode(EffectivityType type) This sets the mode of theEffectivityTaskLogicbased on theEffectivityType.voidsetObject(wt.effectivity.EffectivityManageable object) This sets theEffectivityManageableobject of the taskLogic and retrieves theEffectivityfor that object.voidsetObject(wt.effectivity.EffectivityManageable object, Effectivity new_effectivity) This sets theEffectivityManageableobject of the taskLogic and sets theEffectivityfor that object to the passed in Effectivity.
-
Constructor Details
-
EffectivityTaskLogic
public EffectivityTaskLogic()This is the no-arg constructor for the effectivityTaskLogic
Supported API: true. -
EffectivityTaskLogic
public EffectivityTaskLogic(int mode) This instantiates theEffectivityTaskLogicand sets the mode of theEffectivityto DATE_MODE, SERIAL_NUMBER_MODE, or LOT_NUMBER_MODE.
Supported API: true. -
EffectivityTaskLogic
public EffectivityTaskLogic(wt.effectivity.EffectivityManageable object) This instantiates theEffectivityTaskLogicand sets the currentEffectivityManageableobject.
Supported API: true.
-
-
Method Details
-
setMode
public void setMode(int mode) This sets the mode of theEffectivityto DATE_MODE, SERIAL_NUMBER_MODE, or LOT_NUMBER_MODE.
Supported API: true. -
setMode
This sets the mode of theEffectivityTaskLogicbased on theEffectivityType.
Supported API: true. -
getMode
public int getMode()This is the public getter for themodevariable.
Supported API: true. -
getModeForType
This returns theEffectivityTaskLogicmode given anEffectivityType
Supported API: true. -
setObject
This sets theEffectivityManageableobject of the taskLogic and retrieves theEffectivityfor that object. It also sets the mode based on the retrieved Effectivity.
Supported API: true.- Throws:
WTException
-
setObject
public void setObject(wt.effectivity.EffectivityManageable object, Effectivity new_effectivity) throws WTException This sets theEffectivityManageableobject of the taskLogic and sets theEffectivityfor that object to the passed in Effectivity. It also sets the mode based on the passed in Effectivity.
Supported API: true.- Throws:
WTException
-
getObject
public wt.effectivity.EffectivityManageable getObject()This is the public getter for theEffectivityManageableobject.
Supported API: true. -
getEffectivity
This is the public getter for theEffectivitythat is being created, updated, or viewed.
Supported API: true. -
getOldEffectivity
This is the public getter for theEffectivitythat is deleted.
Supported API: true. -
assignValues
public Effectivity assignValues(String config_item, String start, String end) throws WTPropertyVetoException, WTException This creates a new Effectivity object, sets the values as defined by the user, and assigns it to the currentEffectivityManageableobject.
Supported API: true.- Throws:
WTPropertyVetoExceptionWTException
-
save
This saves an Enumeration of new effectivities and removes the old effectivities.
Supported API: true.- Throws:
WTException
-
save
This saves the new effectivity as defined by the user and removes the previous one - if one existed. This must be done because the server supports multiple effectivities, but the client does not.
Supported API: true.- Throws:
WTException
-
parseDate
This converts a string to a timestamp using the dateHelperResource.
Supported API: true.- Throws:
WTPropertyVetoException
-
dateString
Returns the value as aStringrepresenting a date with the format of MM/dd/yyyy.
Supported API: true. -
getEffectivityType
This returns theEffectivityTypeof theConfigurationItempassed in.
Supported API: true. -
getEffectivityTypeDisplay
This returns theStringrepresenting the EffectivityType of theConfigurationItempassed in.
Supported API: true. -
getEffectivityTypeDisplay
This returns theStringrepresenting the EffectivityType of theConfigurationItem
Supported API: true. -
getConfigItemName
This returns theStringrepresenting the currentConfigurationItemfor theEffectivity
Supported API: true. -
getConfigItem
public ConfigurationItem getConfigItem(String config_item) throws ConfigItemNotFoundException, WTException This returns the currentConfigurationItemfor theEffectivity
Supported API: true. -
getStart
This returns the String representing the current start date or number depending on the current mode.
Supported API: true. -
getEnd
This returns the String representing the current end date or number depending on the current mode.
Supported API: true.
-