Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 97 #4

Merged
merged 1 commit into from
Oct 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.projectmanager</groupId>
<artifactId>projectmanagersdk</artifactId>
<version>96.0.2123</version>
<version>97.0.2178</version>

<name>ProjectManagerSDK</name>
<description>Software development kit for the ProjectManager.com API. for Java</description>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/projectmanager/ProjectManagerClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* @author ProjectManager.com <[email protected]>
*
* @copyright 2023-2023 ProjectManager.com, Inc.
* @version 96.0.2123
* @version 97.0.2178
* @link https://github.com/projectmgr/projectmanager-sdk-java
*/

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/projectmanager/RestRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public void AddBody(Object body) {
}

request.addHeader("SdkName", "Java");
request.addHeader("SdkVersion", "96.0.2123.0");
request.addHeader("SdkVersion", "97.0.2178.0");

String applicationName = this.client.getAppName();

Expand Down
43 changes: 43 additions & 0 deletions src/main/java/com/projectmanager/clients/TaskClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -172,4 +172,47 @@ public TaskClient(@NotNull ProjectManagerClient client) {
if (body != null) { r.AddBody(body); }
return r.Call(new TypeToken<AstroResult<ChangeSetStatusDto[]>>() {}.getType());
}

/**
* Adds a task parent relationship
*
* @param taskId The task that will become the child
* @param parentTaskId The parent task
* @return A {@link com.projectmanager.AstroResult} containing the results
*/
public @NotNull AstroResult<ChangeSetStatusDto> addParentTask(@NotNull String taskId, @NotNull String parentTaskId)
{
RestRequest<ChangeSetStatusDto> r = new RestRequest<ChangeSetStatusDto>(this.client, "POST", "/api/data/tasks/{taskId}/parent/{parentTaskId}");
r.AddPath("{taskId}", taskId == null ? "" : taskId.toString());
r.AddPath("{parentTaskId}", parentTaskId == null ? "" : parentTaskId.toString());
return r.Call(new TypeToken<AstroResult<ChangeSetStatusDto>>() {}.getType());
}

/**
* Updates a task parent relationship
*
* @param taskId The task that will become the child
* @param parentTaskId The parent task
* @return A {@link com.projectmanager.AstroResult} containing the results
*/
public @NotNull AstroResult<ChangeSetStatusDto> updateParentTask(@NotNull String taskId, @NotNull String parentTaskId)
{
RestRequest<ChangeSetStatusDto> r = new RestRequest<ChangeSetStatusDto>(this.client, "PUT", "/api/data/tasks/{taskId}/parent/{parentTaskId}");
r.AddPath("{taskId}", taskId == null ? "" : taskId.toString());
r.AddPath("{parentTaskId}", parentTaskId == null ? "" : parentTaskId.toString());
return r.Call(new TypeToken<AstroResult<ChangeSetStatusDto>>() {}.getType());
}

/**
* Removes a task parent relationship completely
*
* @param taskId The child task
* @return A {@link com.projectmanager.AstroResult} containing the results
*/
public @NotNull AstroResult<ChangeSetStatusDto> removeParentTask(@NotNull String taskId)
{
RestRequest<ChangeSetStatusDto> r = new RestRequest<ChangeSetStatusDto>(this.client, "DELETE", "/api/data/tasks/{taskId}/parent");
r.AddPath("{taskId}", taskId == null ? "" : taskId.toString());
return r.Call(new TypeToken<AstroResult<ChangeSetStatusDto>>() {}.getType());
}
}
23 changes: 15 additions & 8 deletions src/main/java/com/projectmanager/models/ProjectCreateDto.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
* A Project is a collection of Tasks that contributes towards a goal. Within a Project, Tasks
* represent individual items of work that team members must complete. The sum total of Tasks
* within a Project represents the work to be completed for that Project.
*
* Fields that cannot be selected during a CreateProject API call are not visible on this
* data model.
*/
public class ProjectCreateDto
{
Expand Down Expand Up @@ -225,23 +228,27 @@ public class ProjectCreateDto
*/
public void setTemplate(@NotNull Boolean value) { this.template = value; }
/**
* The Template that this project should be created from.
* When creating a Project, you can optionally specify a Template to use to construct
* the Project using a collection of pre-designed Tasks.
*
* Specifying a TemplateId will copy default settings for Tasks.
* Specifying a value in the TemplateId field will copy default settings for Tasks from
* your template Project into the newly created Project.
*
* NOTE: This does not support custom templates - TemplateId has to be a reference
* to a static non-Custom template.
* This field does not support custom templates. You must choose from a list of
* ProjectManager-supplied templates.
*
* @return The field templateId
*/
public @Nullable String getTemplateId() { return this.templateId; }
/**
* The Template that this project should be created from.
* When creating a Project, you can optionally specify a Template to use to construct
* the Project using a collection of pre-designed Tasks.
*
* Specifying a TemplateId will copy default settings for Tasks.
* Specifying a value in the TemplateId field will copy default settings for Tasks from
* your template Project into the newly created Project.
*
* NOTE: This does not support custom templates - TemplateId has to be a reference
* to a static non-Custom template.
* This field does not support custom templates. You must choose from a list of
* ProjectManager-supplied templates.
*
* @param value The new value for templateId
*/
Expand Down
82 changes: 80 additions & 2 deletions src/main/java/com/projectmanager/models/ProjectDto.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ public class ProjectDto
private @Nullable String startDate;
private @Nullable String endDate;
private @Nullable String targetDate;
private @Nullable String plannedStartDate;
private @Nullable String plannedFinishDate;
private @Nullable String actualStartDate;
private @Nullable String actualFinishDate;
private @Nullable ProjectPriorityDto priority;
private @Nullable ProjectChargeCodeDto chargeCode;
private @Nullable ProjectManagerDto manager;
Expand All @@ -49,13 +53,15 @@ public class ProjectDto
private @Nullable ProjectMemberDto[] members;

/**
* The unique identifier of the Project.
* The unique identifier of the Project. This value is set by the system and cannot
* be set with a CreateProject or changed with an UpdateProject call.
*
* @return The field id
*/
public @NotNull String getId() { return this.id; }
/**
* The unique identifier of the Project.
* The unique identifier of the Project. This value is set by the system and cannot
* be set with a CreateProject or changed with an UpdateProject call.
*
* @param value The new value for id
*/
Expand Down Expand Up @@ -202,6 +208,66 @@ public class ProjectDto
* @param value The new value for targetDate
*/
public void setTargetDate(@Nullable String value) { this.targetDate = value; }
/**
* The planned start date for this Project. This is calculated based
* off of the earliest task start date
*
* @return The field plannedStartDate
*/
public @Nullable String getPlannedStartDate() { return this.plannedStartDate; }
/**
* The planned start date for this Project. This is calculated based
* off of the earliest task start date
*
* @param value The new value for plannedStartDate
*/
public void setPlannedStartDate(@Nullable String value) { this.plannedStartDate = value; }
/**
* The planned start date for this Project. This is calculated based
* off of the latest task finish date
*
* @return The field plannedFinishDate
*/
public @Nullable String getPlannedFinishDate() { return this.plannedFinishDate; }
/**
* The planned start date for this Project. This is calculated based
* off of the latest task finish date
*
* @param value The new value for plannedFinishDate
*/
public void setPlannedFinishDate(@Nullable String value) { this.plannedFinishDate = value; }
/**
* The actual start date for this Project. This is calculated based
* on the earliest task actual start date, or null if no projects have
* been started
*
* @return The field actualStartDate
*/
public @Nullable String getActualStartDate() { return this.actualStartDate; }
/**
* The actual start date for this Project. This is calculated based
* on the earliest task actual start date, or null if no projects have
* been started
*
* @param value The new value for actualStartDate
*/
public void setActualStartDate(@Nullable String value) { this.actualStartDate = value; }
/**
* The actual finish date for this Project. This is calculated based
* on the latest task actual finish date, or null if no projects have
* been finished
*
* @return The field actualFinishDate
*/
public @Nullable String getActualFinishDate() { return this.actualFinishDate; }
/**
* The actual finish date for this Project. This is calculated based
* on the latest task actual finish date, or null if no projects have
* been finished
*
* @param value The new value for actualFinishDate
*/
public void setActualFinishDate(@Nullable String value) { this.actualFinishDate = value; }
/**
* The ProjectPriority level of this Project, if defined.
*
Expand Down Expand Up @@ -299,24 +365,36 @@ public class ProjectDto
/**
* The timestamp in UTC when the Project was most recently modified.
*
* This field is automatically determined by the system when this Project is modified
* and cannot be directly changed by the user.
*
* @return The field modifyDate
*/
public @NotNull String getModifyDate() { return this.modifyDate; }
/**
* The timestamp in UTC when the Project was most recently modified.
*
* This field is automatically determined by the system when this Project is modified
* and cannot be directly changed by the user.
*
* @param value The new value for modifyDate
*/
public void setModifyDate(@NotNull String value) { this.modifyDate = value; }
/**
* The timestamp in UTC when the Project was created.
*
* This field is automatically determined by the system when this Project is created
* and cannot be changed by the user.
*
* @return The field createDate
*/
public @NotNull String getCreateDate() { return this.createDate; }
/**
* The timestamp in UTC when the Project was created.
*
* This field is automatically determined by the system when this Project is created
* and cannot be changed by the user.
*
* @param value The new value for createDate
*/
public void setCreateDate(@NotNull String value) { this.createDate = value; }
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/com/projectmanager/models/ProjectUpdateDto.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
* A Project is a collection of Tasks that contributes towards a goal. Within a Project, Tasks
* represent individual items of work that team members must complete. The sum total of Tasks
* within a Project represents the work to be completed for that Project.
*
* Fields that cannot be modified during an UpdateProject call are not visible on this data
* model.
*/
public class ProjectUpdateDto
{
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/com/projectmanager/models/TaskDetailsDto.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class TaskDetailsDto
private @Nullable String description;
private @Nullable TaskStatusDto status;
private @NotNull Integer priorityId;
private @NotNull String plannedStartDate;
private @Nullable String plannedStartDate;
private @Nullable String plannedFinishDate;
private @Nullable String actualStartDate;
private @Nullable String actualFinishDate;
Expand Down Expand Up @@ -174,13 +174,13 @@ public class TaskDetailsDto
*
* @return The field plannedStartDate
*/
public @NotNull String getPlannedStartDate() { return this.plannedStartDate; }
public @Nullable String getPlannedStartDate() { return this.plannedStartDate; }
/**
* The date when work on this Task is planned to begin.
*
* @param value The new value for plannedStartDate
*/
public void setPlannedStartDate(@NotNull String value) { this.plannedStartDate = value; }
public void setPlannedStartDate(@Nullable String value) { this.plannedStartDate = value; }
/**
* The date when work on this Task is expected to complete.
*
Expand Down
65 changes: 65 additions & 0 deletions src/main/java/com/projectmanager/models/TaskDto.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,14 @@ public class TaskDto
{
private @NotNull String id;
private @Nullable TaskProjectDto project;
private @Nullable TaskTagDto[] tags;
private @NotNull String projectId;
private @Nullable TaskAssigneeDto[] assignees;
private @Nullable TaskTodoDto[] todos;
private @Nullable String shortId;
private @Nullable String name;
private @Nullable String description;
private @Nullable TaskStatusDto status;
private @NotNull String plannedStartDate;
private @Nullable String plannedFinishDate;
private @Nullable String actualStartDate;
Expand All @@ -45,6 +48,8 @@ public class TaskDto
private @Nullable String color;
private @Nullable Double actualCost;
private @Nullable Double plannedCost;
private @Nullable Integer plannedDuration;
private @Nullable Integer plannedEffort;

/**
* The unique identifier of this Task.
Expand All @@ -70,6 +75,18 @@ public class TaskDto
* @param value The new value for project
*/
public void setProject(@Nullable TaskProjectDto value) { this.project = value; }
/**
* The TaskTags that apply to this Task.
*
* @return The field tags
*/
public @Nullable TaskTagDto[] getTags() { return this.tags; }
/**
* The TaskTags that apply to this Task.
*
* @param value The new value for tags
*/
public void setTags(@Nullable TaskTagDto[] value) { this.tags = value; }
/**
* The unique identifier of the Project to which this Task belongs.
*
Expand All @@ -94,6 +111,18 @@ public class TaskDto
* @param value The new value for assignees
*/
public void setAssignees(@Nullable TaskAssigneeDto[] value) { this.assignees = value; }
/**
* A list of TaskTodo items, which are sub-tasks within this Task.
*
* @return The field todos
*/
public @Nullable TaskTodoDto[] getTodos() { return this.todos; }
/**
* A list of TaskTodo items, which are sub-tasks within this Task.
*
* @param value The new value for todos
*/
public void setTodos(@Nullable TaskTodoDto[] value) { this.todos = value; }
/**
* A short ID that can be used to refer to this Task. This short ID is
* guaranteed to be unique within your Workspace.
Expand Down Expand Up @@ -132,6 +161,18 @@ public class TaskDto
* @param value The new value for description
*/
public void setDescription(@Nullable String value) { this.description = value; }
/**
* The TaskStatus assigned to this Task.
*
* @return The field status
*/
public @Nullable TaskStatusDto getStatus() { return this.status; }
/**
* The TaskStatus assigned to this Task.
*
* @param value The new value for status
*/
public void setStatus(@Nullable TaskStatusDto value) { this.status = value; }
/**
* The date when work on this Task is planned to begin.
*
Expand Down Expand Up @@ -400,4 +441,28 @@ public class TaskDto
* @param value The new value for plannedCost
*/
public void setPlannedCost(@Nullable Double value) { this.plannedCost = value; }
/**
* The planned duration (in minutes) for this Task.
*
* @return The field plannedDuration
*/
public @Nullable Integer getPlannedDuration() { return this.plannedDuration; }
/**
* The planned duration (in minutes) for this Task.
*
* @param value The new value for plannedDuration
*/
public void setPlannedDuration(@Nullable Integer value) { this.plannedDuration = value; }
/**
* The planned effort (in minutes) for this Task.
*
* @return The field plannedEffort
*/
public @Nullable Integer getPlannedEffort() { return this.plannedEffort; }
/**
* The planned effort (in minutes) for this Task.
*
* @param value The new value for plannedEffort
*/
public void setPlannedEffort(@Nullable Integer value) { this.plannedEffort = value; }
};