|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.clients.beans.EffectivityTaskLogic
This class contains the logic to create, update, view, assign,
and retrieve 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.
Field Summary | |
private static int |
DATE_MODE
|
private Effectivity |
effectivity
|
private static int |
LOT_NUMBER_MODE
|
private int |
mode
|
private EffectivityManageable |
object
|
private Effectivity |
oldEffectivity
|
private static int |
SERIAL_NUMBER_MODE
|
Constructor Summary | |
EffectivityTaskLogic()
This is the no-arg constructor for the effectivityTaskLogic Supported API: true. |
|
EffectivityTaskLogic(EffectivityManageable object)
This instantiates the EffectivityTaskLogic
and sets the current EffectivityManageable
object. |
|
EffectivityTaskLogic(int mode)
This instantiates the EffectivityTaskLogic
and sets the mode of the Effectivity to
DATE_MODE, SERIAL_NUMBER_MODE, or LOT_NUMBER_MODE. |
Method Summary | |
Effectivity |
assignValues(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 current EffectivityManageable object. |
String |
dateString(Timestamp ts)
Returns the value as a String representing a date with the format of
MM/dd/yyyy. |
ConfigurationItem |
getConfigItem(String config_item)
This returns the current ConfigurationItem
for the Effectivity
Supported API: true. |
String |
getConfigItemName()
This returns the String representing the current
ConfigurationItem for the Effectivity
Supported API: true. |
Effectivity |
getEffectivity()
This is the public getter for the Effectivity
that is being created, updated, or viewed. |
EffectivityType |
getEffectivityType(ConfigurationItem config_item)
This returns the EffectivityType of the
ConfigurationItem passed in. |
String |
getEffectivityTypeDisplay()
This returns the String representing the
EffectivityType of the ConfigurationItem
Supported API: true. |
String |
getEffectivityTypeDisplay(ConfigurationItem config_item)
This returns the String representing the
EffectivityType of the ConfigurationItem
passed in. |
String |
getEnd()
This returns the String representing the current end date or number depending on the current mode. |
int |
getMode()
This is the public getter for the mode variable. |
int |
getModeForType(EffectivityType type)
This returns the EffectivityTaskLogic mode
given an EffectivityType
Supported API: true. |
EffectivityManageable |
getObject()
This is the public getter for the EffectivityManageable
object. |
Effectivity |
getOldEffectivity()
This is the public getter for the Effectivity
that is deleted. |
String |
getStart()
This returns the String representing the current start date or number depending on the current mode. |
protected Timestamp |
parseDate(String date_string)
This converts a string to a timestamp using the dateHelperResource. |
void |
save()
This saves the new effectivity as defined by the user and removes the previous one - if one existed. |
void |
save(Enumeration effectivities,
Enumeration old_effectivities)
This saves an Enumeration of new effectivities and removes the old effectivities. |
void |
setMode(EffectivityType type)
This sets the mode of the EffectivityTaskLogic
based on the EffectivityType . |
void |
setMode(int mode)
This sets the mode of the Effectivity to
DATE_MODE, SERIAL_NUMBER_MODE, or LOT_NUMBER_MODE. |
void |
setObject(EffectivityManageable object)
This sets the EffectivityManageable object of the
taskLogic and retrieves the Effectivity for that
object. |
void |
setObject(EffectivityManageable object,
Effectivity new_effectivity)
This sets the EffectivityManageable object of the
taskLogic and sets the Effectivity for that
object to the passed in Effectivity. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private EffectivityManageable object
private Effectivity effectivity
private Effectivity oldEffectivity
private int mode
private static final int DATE_MODE
private static final int SERIAL_NUMBER_MODE
private static final int LOT_NUMBER_MODE
Constructor Detail |
public EffectivityTaskLogic()
public EffectivityTaskLogic(int mode)
EffectivityTaskLogic
and sets the mode of the Effectivity
to
DATE_MODE, SERIAL_NUMBER_MODE, or LOT_NUMBER_MODE.
public EffectivityTaskLogic(EffectivityManageable object)
EffectivityTaskLogic
and sets the current EffectivityManageable
object.
Method Detail |
public void setMode(int mode)
Effectivity
to
DATE_MODE, SERIAL_NUMBER_MODE, or LOT_NUMBER_MODE.
public void setMode(EffectivityType type)
EffectivityTaskLogic
based on the EffectivityType
.
public int getMode()
mode
variable.
public int getModeForType(EffectivityType type)
EffectivityTaskLogic
mode
given an EffectivityType
public void setObject(EffectivityManageable object) throws WTException
EffectivityManageable
object of the
taskLogic and retrieves the Effectivity
for that
object. It also sets the mode based on the retrieved Effectivity.
WTException
public void setObject(EffectivityManageable object, Effectivity new_effectivity) throws WTException
EffectivityManageable
object of the
taskLogic and sets the Effectivity
for that
object to the passed in Effectivity. It also sets the mode
based on the passed in Effectivity.
WTException
public EffectivityManageable getObject()
EffectivityManageable
object.
public Effectivity getEffectivity()
Effectivity
that is being created, updated, or viewed.
public Effectivity getOldEffectivity()
Effectivity
that is deleted.
public Effectivity assignValues(String config_item, String start, String end) throws WTPropertyVetoException, WTException
EffectivityManageable
object.
WTPropertyVetoException
WTException
public void save(Enumeration effectivities, Enumeration old_effectivities) throws WTException
WTException
public void save() throws WTException
WTException
protected Timestamp parseDate(String date_string) throws WTPropertyVetoException
WTPropertyVetoException
public String dateString(Timestamp ts)
String
representing a date with the format of
MM/dd/yyyy.
public EffectivityType getEffectivityType(ConfigurationItem config_item)
EffectivityType
of the
ConfigurationItem
passed in.
public String getEffectivityTypeDisplay(ConfigurationItem config_item)
String
representing the
EffectivityType of the ConfigurationItem
passed in.
public String getEffectivityTypeDisplay()
String
representing the
EffectivityType of the ConfigurationItem
public String getConfigItemName()
String
representing the current
ConfigurationItem
for the Effectivity
public ConfigurationItem getConfigItem(String config_item) throws ConfigItemNotFoundException, WTException
ConfigurationItem
for the Effectivity
ConfigItemNotFoundException
WTException
public String getStart()
public String getEnd()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |