Package mks.ci.server.engine
Class LocalTriggerManager.ScriptTimeEntryDeltaBean
- java.lang.Object
-
- mks.frame.triggers.ScriptExposableBaseBean
-
- mks.frame.triggers.beans.ScriptBaseBean
-
- mks.ci.server.engine.LocalTriggerManager.ScriptIMBaseBean
-
- mks.ci.server.engine.LocalTriggerManager.ScriptTimeEntryDeltaBean
-
- All Implemented Interfaces:
mks.frame.triggers.ScriptExposableBean
- Enclosing class:
- LocalTriggerManager
public static class LocalTriggerManager.ScriptTimeEntryDeltaBean extends LocalTriggerManager.ScriptIMBaseBean implements mks.frame.triggers.ScriptExposableBean
A bean that encompasses a change to a single time entry. A read only instance of this bean is available from the ScriptCreateTimeEntryOpBean and the ScriptEditTimeEntryOpBean. Provides the script writer with access to the new values for the time entry through calls to getDelta for various time entry properties. Property names are available through getDeltaProperties.
-
-
Constructor Summary
Constructors Constructor Description ScriptTimeEntryDeltaBean(mks.ci.common.ModifyTEInfo info, int userId, java.sql.Connection c, boolean includeKey)
Create a new ScriptTimeEntryDeltaBean
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
getDelta(java.lang.String property)
Return the delta value of a specific property.java.lang.String[]
getDeltaProperties()
Returns the names of properties that have changed.java.lang.String
getExposedName()
Returns the name of this bean that is exposed to the scripting language.boolean
hasDelta(java.lang.String property)
Return a flag indicating if the specified property has a delta or not.-
Methods inherited from class mks.ci.server.engine.LocalTriggerManager.ScriptIMBaseBean
getCurrentDatabaseTime, getCurrentDatabaseTime, getCurrentUser, getServerBean, getUserID, isParallelProcessingEnabled
-
Methods inherited from class mks.frame.triggers.beans.ScriptBaseBean
getEnvironmentBean, setEnvironmentBean
-
-
-
-
Constructor Detail
-
ScriptTimeEntryDeltaBean
public ScriptTimeEntryDeltaBean(mks.ci.common.ModifyTEInfo info, int userId, java.sql.Connection c, boolean includeKey)
Create a new ScriptTimeEntryDeltaBean- Parameters:
info
- an object encompassing the arguments for the change to the entryuserId
- the current userc
- the database connectionincludeKey
- true if key value deltas should be included, false otherwise
-
-
Method Detail
-
getExposedName
public java.lang.String getExposedName()
Returns the name of this bean that is exposed to the scripting language.- Specified by:
getExposedName
in interfacemks.frame.triggers.ScriptExposableBean
- Specified by:
getExposedName
in classScriptBaseBean
- Returns:
- the bean name:
imTimeEntryDeltaBean
.
-
getDeltaProperties
public java.lang.String[] getDeltaProperties() throws mks.frame.triggers.TriggerException
Returns the names of properties that have changed. Current properties and their types are:- issueID (integer)
- user (string)
- entryDate (date)
- duration (float)
- notes (string)
- source (string)
- Returns:
- the names of properties.
- Throws:
mks.frame.triggers.TriggerException
- if the properties could not be resolved.
-
getDelta
public java.lang.Object getDelta(java.lang.String property) throws mks.frame.triggers.TriggerException
Return the delta value of a specific property.- Parameters:
property
- the property to lookup- Returns:
- the delta value
- Throws:
mks.frame.triggers.TriggerException
-
hasDelta
public boolean hasDelta(java.lang.String property) throws mks.frame.triggers.TriggerException
Return a flag indicating if the specified property has a delta or not.- Parameters:
property
- the property to check for a delta.- Returns:
- true if the property has a delta, false otherwise
- Throws:
mks.frame.triggers.TriggerException
-
-