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

New FVTs for To Do Action Management #8088

Merged
merged 3 commits into from
Mar 12, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ public interface ToDoManagementInterface
*
* @param userId calling user
* @param originatorGUID optional originator element (such as a person or Governance Service)
* @param actionOwnerGUID optional element that maintains the "To Do" on their list
* @param assignToActorGUID optional actor to assign the action to
* @param actionSponsorGUID optional element that maintains the "To Do" on their list
* @param assignToActorGUID optional actor to assign the action to
* @param newActionTargetProperties optional list of elements that the action is to target
* @param properties properties of the to do action
*
Expand All @@ -36,7 +36,7 @@ public interface ToDoManagementInterface
*/
String createToDo(String userId,
String originatorGUID,
String actionOwnerGUID,
String actionSponsorGUID,
String assignToActorGUID,
List<NewActionTargetProperties> newActionTargetProperties,
ToDoProperties properties) throws InvalidParameterException,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ public class ToDoElement implements MetadataElement
{
private ElementHeader elementHeader = null;
private ToDoProperties properties = null;
private RelatedElement relatedElement = null;
private ElementStub toDoSource = null;
private List<ElementStub> assignedActors = null;
private List<ElementStub> sponsors = null;
private List<ActionTargetElement> actionTargets = null;

/**
Expand All @@ -48,11 +49,12 @@ public ToDoElement(ToDoElement template)
{
if (template != null)
{
elementHeader = template.getElementHeader();
properties = template.getProperties();
relatedElement = template.getRelatedElement();
elementHeader = template.getElementHeader();
properties = template.getProperties();
toDoSource = template.getToDoSource();
assignedActors = template.getAssignedActors();
actionTargets = template.getActionTargets();
sponsors = template.getSponsors();
actionTargets = template.getActionTargets();
}
}

Expand Down Expand Up @@ -104,28 +106,27 @@ public void setProperties(ToDoProperties properties)


/**
* Return details of the relationship used to retrieve this element.
* Will be null if the element was retrieved directly rather than via a relationship.
* Return the source of the To Do
*
* @return list of element stubs
* @return element stub
*/
public RelatedElement getRelatedElement()
public ElementStub getToDoSource()
{
return relatedElement;
return toDoSource;
}


/**
* Set up details of the relationship used to retrieve this element.
* Will be null if the element was retrieved directly rather than via a relationship.
* Set up details of the To Do
*
* @param relatedElement relationship details
* @param toDoSource element stub
*/
public void setRelatedElement(RelatedElement relatedElement)
public void setToDoSource(ElementStub toDoSource)
{
this.relatedElement = relatedElement;
this.toDoSource = toDoSource;
}


/**
* Return the list of actors assigned to this work item.
*
Expand All @@ -148,6 +149,28 @@ public void setAssignedActors(List<ElementStub> assignedActors)
}


/**
* Return the list of sponsors for this action.
*
* @return list of sponsors
*/
public List<ElementStub> getSponsors()
{
return sponsors;
}


/**
* Set up the list of sponsors for this action.
*
* @param sponsors list of sponsors
*/
public void setSponsors(List<ElementStub> sponsors)
{
this.sponsors = sponsors;
}


/**
* Return the list of action targets to work on.
*
Expand Down Expand Up @@ -181,8 +204,9 @@ public String toString()
return "ToDoElement{" +
"elementHeader=" + elementHeader +
", properties=" + properties +
", relatedElement=" + relatedElement +
", toDoSource=" + toDoSource +
", assignedActors=" + assignedActors +
", sponsors=" + sponsors +
", actionTargets=" + actionTargets +
'}';
}
Expand All @@ -208,8 +232,9 @@ public boolean equals(Object objectToCompare)
ToDoElement that = (ToDoElement) objectToCompare;
return Objects.equals(elementHeader, that.elementHeader) &&
Objects.equals(properties, that.properties) &&
Objects.equals(relatedElement, that.relatedElement) &&
Objects.equals(toDoSource, that.toDoSource) &&
Objects.equals(assignedActors, that.assignedActors) &&
Objects.equals(sponsors, that.sponsors) &&
Objects.equals(actionTargets, that.actionTargets);
}

Expand All @@ -222,6 +247,6 @@ public boolean equals(Object objectToCompare)
@Override
public int hashCode()
{
return Objects.hash(super.hashCode(), elementHeader, properties, relatedElement, assignedActors, actionTargets);
return Objects.hash(super.hashCode(), elementHeader, properties, toDoSource, sponsors, assignedActors, actionTargets);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class ToDoProperties extends ReferenceableProperties
private Date dueTime = null;
private Date lastReviewTime = null;
private Date completionTime = null;
private ToDoStatus status = null;
private ToDoStatus status = ToDoStatus.OPEN;



Expand Down
Loading
Loading