Package mks.ci.server.engine
Class LocalTriggerManager.ScriptCustomFieldBean
- java.lang.Object
-
- mks.frame.triggers.ScriptExposableBaseBean
-
- mks.frame.triggers.beans.ScriptBaseBean
-
- mks.ci.server.engine.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 thegetCustomFieldBean
method. A list of custom field beans can be obtained from the issue bean, via thegetCustomFieldBeans
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 Fieldjava.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 mks.frame.triggers.beans.ScriptBaseBean
getEnvironmentBean, setEnvironmentBean
-
-
-
-
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:
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
-
-