Class CustomFieldImpl

java.lang.Object
pw.chew.clickup4j.internal.entities.customfields.CustomFieldImpl
All Implemented Interfaces:
ICustomField
Direct Known Subclasses:
AutomaticProgressCustomFieldImpl, CheckboxCustomFieldImpl, CurrencyCustomFieldImpl, DateCustomFieldImpl, EmailCustomFieldImpl, EmojiCustomFieldImpl, LabelsCustomFieldImpl, LocationCustomFieldImpl, ManualProgressCustomFieldImpl, NumberCustomFieldImpl, PhoneCustomFieldImpl, ShortTextCustomFieldImpl, TasksCustomFieldImpl, TextCustomFieldImpl, URLCustomFieldImpl, UsersCustomFieldImpl

public class CustomFieldImpl extends Object implements ICustomField
  • Constructor Details

    • CustomFieldImpl

      public CustomFieldImpl(org.json.JSONObject data, ClickUp4j api)
  • Method Details

    • getId

      public String getId()
      Description copied from interface: ICustomField
      Returns the ID of the custom field.
      Specified by:
      getId in interface ICustomField
      Returns:
      an ID of the custom field
    • getName

      public String getName()
      Description copied from interface: ICustomField
      Returns the name of this Custom Field, which is displayed to the user.
      Specified by:
      getName in interface ICustomField
      Returns:
      the name of this Custom Field
    • getValue

      public Object getValue()
      Description copied from interface: ICustomField
      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 to TextCustomField, this class can be found using CustomFieldType.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.
      Specified by:
      getValue in interface ICustomField
      Returns:
      the value of this custom field
    • getType

      public CustomFieldType getType()
      Description copied from interface: ICustomField
      Returns the type of this custom field. This will be one of CustomFieldType.
      Specified by:
      getType in interface ICustomField
      Returns:
      the type of this custom field
    • getTimeCreated

      public OffsetDateTime getTimeCreated()
      Description copied from interface: ICustomField
      Returns when this custom field was created.
      Specified by:
      getTimeCreated in interface ICustomField
      Returns:
      when this custom field was created
    • isRequired

      public boolean isRequired()
      Description copied from interface: ICustomField
      Whether this is a required field. Unlike the name implies, ICustomField.getValue() may still be null..

      This feature is exclusive to the Business plan or above, so this is likely to be false.

      Specified by:
      isRequired in interface ICustomField
      Returns:
      if this is a required custom field.
    • getClickUp4j

      public ClickUp4j getClickUp4j()
      Description copied from interface: ICustomField
      Returns this ClickUp4j instance.
      Specified by:
      getClickUp4j in interface ICustomField
      Returns:
      this ClickUp4j instance