Class LocalTriggerManager.ScriptCustomFieldBean

  • All Implemented Interfaces:
    mks.frame.triggers.ScriptExposableBean
    Enclosing class:
    LocalTriggerManager

    public static class LocalTriggerManager.ScriptCustomFieldBean
    extends ScriptBaseBean
    A bean representing a single custom field on an issue. A custom field bean is obtained from the issue bean, via the getCustomFieldBean method. A list of custom field beans can be obtained from the issue bean, via the getCustomFieldBeans method.
    • Constructor Summary

      Constructors 
      Constructor Description
      ScriptCustomFieldBean​(mks.ci.server.engine.CustomField cfd)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Map<java.lang.String,​java.lang.Integer> getAllowedPickValues()
      Returns list of picks for Cusom Field.
      java.lang.String getDataType()
      Returns the data type of Custom Field.
      java.lang.Object getDefaultValue()
      Retrieve the default value of the custom field.
      java.lang.String getDescription()
      Returns Description of Custom Field
      java.lang.String getExposedName()
      Returns the name of this bean that is exposed to the scripting language.
      java.lang.String getName()
      Returns name of Custom Field.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ScriptCustomFieldBean

        public ScriptCustomFieldBean​(mks.ci.server.engine.CustomField cfd)
    • 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: imCustomFieldBean.
      • getName

        public java.lang.String getName()
        Returns name of Custom Field.
        Returns:
        returns Custom Field name
      • getDescription

        public java.lang.String getDescription()
        Returns Description of Custom Field
        Returns:
        Description of Custom Field
      • getDataType

        public java.lang.String getDataType()
        Returns the data type of Custom Field.
        Returns:
        A String representing the data type, either: integer, float, shorttext, logical, date, pick
      • getDefaultValue

        public java.lang.Object getDefaultValue()
                                         throws mks.frame.triggers.TriggerException
        Retrieve the default value of the custom field. The actual value returned is always a java object:
        • Integer: Java 'Integer' object
        • Boolean: Java 'Boolean' object
        • Float: Java 'Double' object
        • Pick: Java 'String' representing the pick name.
        • Date: Java 'Date' object
        • Text: Java 'String' object.
            Note that in javascript, you can mostly use all these values without converting, javascript will for example extract the int value out of the Integer if you try to use it for arithmetic.
        Returns:
        Various, if the field has not been set, the null value.
        Throws:
        mks.frame.triggers.TriggerException
      • getAllowedPickValues

        public java.util.Map<java.lang.String,​java.lang.Integer> getAllowedPickValues()
                                                                                     throws mks.frame.triggers.TriggerException
        Returns list of picks for Cusom Field.
        Returns:
        Map of pick key value for Custom Field with Pick data type, otherwise returns null.
        Throws:
        mks.frame.triggers.TriggerException