Class UsersCustomFieldImpl

java.lang.Object
pw.chew.clickup4j.internal.entities.customfields.CustomFieldImpl
pw.chew.clickup4j.internal.entities.customfields.UsersCustomFieldImpl
All Implemented Interfaces:
ICustomField, UsersCustomField

public class UsersCustomFieldImpl extends CustomFieldImpl implements UsersCustomField
  • Constructor Details

    • UsersCustomFieldImpl

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

    • getValue

      public List<User> 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
      Specified by:
      getValue in interface UsersCustomField
      Overrides:
      getValue in class CustomFieldImpl
      Returns:
      the value of this custom field
    • isSingleUser

      public boolean isSingleUser()
      Description copied from interface: UsersCustomField
      Whether this allows multiple values. If true, the value will be a single user.
      In the client, this is referred to as "Select multiple users," and this is actually inverted.
      Specified by:
      isSingleUser in interface UsersCustomField
      Returns:
      Whether this allows multiple values.
    • shouldIncludeGuests

      public boolean shouldIncludeGuests()
      Description copied from interface: UsersCustomField
      Whether guests may show up in this field.
      Guests are not Members of the workspace, but may have rights in the list or task.
      Specified by:
      shouldIncludeGuests in interface UsersCustomField
      Returns:
      Whether guests may show up in this field.
    • includeTeams

      public boolean includeTeams()
      Description copied from interface: UsersCustomField
      Whether teams may show up in the field response. If this is true, UsersCustomField.getValue() may break.
      Specified by:
      includeTeams in interface UsersCustomField
      Returns:
      Whether teams may show up in the field response.
    • includeEntireWorkspace

      public boolean includeEntireWorkspace()
      Description copied from interface: UsersCustomField
      Whether the entire workspace can show up in the field response. Normally, only members of the list this task is a part of can be here.
      Specified by:
      includeEntireWorkspace in interface UsersCustomField
      Returns:
      Whether the entire workspace can show up in the field response.