Class GoalImpl

java.lang.Object
pw.chew.clickup4j.internal.entities.GoalImpl
All Implemented Interfaces:
Goal

public class GoalImpl extends Object implements Goal
  • Constructor Details

    • GoalImpl

      public GoalImpl(@NotNull @NotNull org.json.JSONObject data, @NotNull @NotNull ClickUp4j api)
  • Method Details

    • getId

      @NotNull public @NotNull UUID getId()
      Description copied from interface: Goal
      The unique identifier for this goal.
      Specified by:
      getId in interface Goal
      Returns:
      never-null UUID of this goal.
    • getPrettyId

      @NotNull public @NotNull String getPrettyId()
      Description copied from interface: Goal
      Returns the "pretty" ID of this goal.
      This is the ID displayed in the client, and appears to be incremental.
      Specified by:
      getPrettyId in interface Goal
      Returns:
      never-null String of the "pretty" ID of this goal.
    • getName

      @NotNull public @NotNull String getName()
      Description copied from interface: Goal
      The name of this goal.
      Specified by:
      getName in interface Goal
      Returns:
      never-null String of the name of this goal.
    • getWorkspaceId

      @NotNull public @NotNull String getWorkspaceId()
      Description copied from interface: Goal
      The ID of the workspace this goal is in.
      Specified by:
      getWorkspaceId in interface Goal
      Returns:
      never-null ID of the workspace this goal is in.
    • getCreatorId

      @NotNull public @NotNull String getCreatorId()
      Description copied from interface: Goal
      The ID of the creator of this goal.
      Specified by:
      getCreatorId in interface Goal
      Returns:
      never-null ID of the creator of this goal.
    • getColor

      @NotNull public @NotNull Color getColor()
      Description copied from interface: Goal
      Returns the color of this Goal, as used in the client as a background color.
      Specified by:
      getColor in interface Goal
      Returns:
      never-null Color of this goal.
    • getDateCreated

      @NotNull public @NotNull OffsetDateTime getDateCreated()
      Description copied from interface: Goal
      Returns the date this goal was created.
      Specified by:
      getDateCreated in interface Goal
      Returns:
      never-null OffsetDateTime of the date this goal was created.
    • getStartDate

      @Nullable public @Nullable OffsetDateTime getStartDate()
      Description copied from interface: Goal
      Returns the start date of this goal. It may be null if a goal does not have a start date.
      Specified by:
      getStartDate in interface Goal
      Returns:
      nullable OffsetDateTime of the start date of this goal.
    • getDueDate

      @Nullable public @Nullable OffsetDateTime getDueDate()
      Description copied from interface: Goal
      Returns the due date of this goal. It may be null if a goal does not have a due date.
      Specified by:
      getDueDate in interface Goal
      Returns:
      nullable OffsetDateTime of the due date of this goal.
    • getDescription

      @NotNull public @NotNull String getDescription()
      Description copied from interface: Goal
      Returns the description of this goal.
      Specified by:
      getDescription in interface Goal
      Returns:
      never-null String of the description of this goal.
    • isPrivate

      public boolean isPrivate()
      Description copied from interface: Goal
      Whether this goal is private, meaning users must be invited to view it.
      Specified by:
      isPrivate in interface Goal
      Returns:
      true if this goal is private, false otherwise.
    • isArchived

      public boolean isArchived()
      Description copied from interface: Goal
      Whether this goal is archived, meaning it is no longer visible to users.
      Specified by:
      isArchived in interface Goal
      Returns:
      true if this goal is archived, false otherwise.
    • isMultipleOwners

      public boolean isMultipleOwners()
      Description copied from interface: Goal
      Whether this goal can have multiple owners.
      Specified by:
      isMultipleOwners in interface Goal
      Returns:
      true if this goal can have multiple owners, false otherwise.
    • getEditorToken

      @NotNull public @NotNull String getEditorToken()
      Description copied from interface: Goal
      Returns the token used to edit this goal.
      Specified by:
      getEditorToken in interface Goal
      Returns:
      never-null String of the token used to edit this goal.
    • getDateUpdated

      @NotNull public @NotNull OffsetDateTime getDateUpdated()
      Description copied from interface: Goal
      Returns when this goal was last updated.
      Specified by:
      getDateUpdated in interface Goal
      Returns:
      never-null OffsetDateTime of when this goal was last updated.
    • getOwners

      @NotNull public @NotNull List<User> getOwners()
      Description copied from interface: Goal
      Returns a potentially empty-list of "owners" of this goal.
      If Goal.isMultipleOwners() is false, this will be a list of at most one element.
      Specified by:
      getOwners in interface Goal
      Returns:
      never-null List of the owners of this goal.
    • getTargets

      @NotNull public @NotNull List<Target> getTargets()
      Description copied from interface: Goal
      Returns all the targets in this goal.
      This might be an empty list.
      Specified by:
      getTargets in interface Goal
      Returns:
      never-null List of the targets in this goal.
    • getTargetCount

      public int getTargetCount()
      Description copied from interface: Goal
      Returns the target count.
      In theory, this is equal to targets.size(), but it is not guaranteed to be.
      Specified by:
      getTargetCount in interface Goal
      Returns:
      int of the target count.
    • getPercentCompleted

      public float getPercentCompleted()
      Description copied from interface: Goal
      Returns the current progress of this goal.
      Specified by:
      getPercentCompleted in interface Goal
      Returns:
      never-null Progress of this goal.
    • getHistory

      @NotNull public @NotNull List<TimelineEntry> getHistory()
      Description copied from interface: Goal
      Returns the history for this goal.
      This contains created or changed targets.
      Specified by:
      getHistory in interface Goal
      Returns:
      never-null List of the history for this goal.
    • getPrettyUrl

      @NotNull public @NotNull String getPrettyUrl()
      Description copied from interface: Goal
      Returns the pretty URL of this goal.
      This is equal to "https://app.clickup.com/workspaceId/goals/prettyId.
      Specified by:
      getPrettyUrl in interface Goal
      Returns:
      never-null String of the pretty URL of this goal.
    • getClickUp4j

      @NotNull public @NotNull ClickUp4j getClickUp4j()
      Description copied from interface: Goal
      Returns this ClickUp4j instance.
      Specified by:
      getClickUp4j in interface Goal
      Returns:
      never-null ClickUp4j instance.