Class 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 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 entry
        userId - the current user
        c - the database connection
        includeKey - 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 interface mks.frame.triggers.ScriptExposableBean
        Specified by:
        getExposedName in class ScriptBaseBean
        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