Interface ICustomField
- All Known Subinterfaces:
AutomaticProgressCustomField
,CheckboxCustomField
,CurrencyCustomField
,DateCustomField
,DropDownCustomField
,EmailCustomField
,EmojiCustomField
,LabelsCustomField
,LocationCustomField
,ManualProgressCustomField
,NumberCustomField
,PhoneCustomField
,ShortTextCustomField
,TasksCustomField
,TextCustomField
,URLCustomField
,UsersCustomField
- All Known Implementing Classes:
AutomaticProgressCustomFieldImpl
,CheckboxCustomFieldImpl
,CurrencyCustomFieldImpl
,CustomFieldImpl
,DateCustomFieldImpl
,EmailCustomFieldImpl
,EmojiCustomFieldImpl
,LabelsCustomFieldImpl
,LocationCustomFieldImpl
,ManualProgressCustomFieldImpl
,NumberCustomFieldImpl
,PhoneCustomFieldImpl
,ShortTextCustomFieldImpl
,TasksCustomFieldImpl
,TextCustomFieldImpl
,URLCustomFieldImpl
,UsersCustomFieldImpl
public interface ICustomField
Interface for custom fields. All custom fields class extend this, and may have more methods.
-
Method Summary
Modifier and TypeMethodDescriptionReturns thisClickUp4j
instance.getId()
Returns the ID of the custom field.getName()
Returns the name of this Custom Field, which is displayed to the user.Returns when this custom field was created.getType()
Returns the type of this custom field.getValue()
Returns the value of this custom field.boolean
Whether this is a required field.
-
Method Details
-
getId
String getId()Returns the ID of the custom field.- Returns:
- an ID of the custom field
-
getName
String getName()Returns the name of this Custom Field, which is displayed to the user.- Returns:
- the name of this Custom Field
-
getValue
Object getValue()Returns the value of this custom field.It's highly recommended to cast this value to the appropriate type, because it returns more appropriate data. For example, if the custom field is of type
CustomFieldType.TEXT
, you can cast the value toTextCustomField
, this class can be found usingCustomFieldType.getAssociatedClass()
.This will be null under the following circumstances:
- No value is specified.
- The task response did not contain a
value
. Notably when an individual task is retrieved.
- Returns:
- the value of this custom field
-
getType
CustomFieldType getType()Returns the type of this custom field. This will be one ofCustomFieldType
.- Returns:
- the type of this custom field
-
getTimeCreated
OffsetDateTime getTimeCreated()Returns when this custom field was created.- Returns:
- when this custom field was created
-
isRequired
boolean isRequired()Whether this is a required field. Unlike the name implies,getValue()
may still benull
..This feature is exclusive to the Business plan or above, so this is likely to be
false
.- Returns:
- if this is a required custom field.
-
getClickUp4j
ClickUp4j getClickUp4j()Returns thisClickUp4j
instance.- Returns:
- this
ClickUp4j
instance
-