public class AssignmentBuilder extends ValidationRegistryImpl implements DomainObjectBuilder<Assignment>
Assignment object.
You can generate multiple Assignments for the same Problem Set by calling one of the assignTo methods
#assignToIndividual(AssistmentsPrincipal), assignToIndivdualInGroup(XInfo, XInfo),
assignToGroup(XInfo), or assignToGroupInGroup(XInfo, XInfo) followed by the
getDomainObject()().
Each call to an assignTo methods overwrites the assignee information held by this AssignmentBuilder.
| Constructor and Description |
|---|
AssignmentBuilder(int problemSetId,
XInfo ownerXinfo)
Creates an AssignmentBuilder for a particular Problem Set
|
AssignmentBuilder(int problemSetId,
XInfo ownerXinfo,
java.time.Instant assignDate)
Creates an AssignmentBuilder for a particular Problem Set
Note: This constructor is intended for internal use by CAS only.
|
AssignmentBuilder(java.lang.String problemSetXref,
XInfo ownerXinfo) |
| Modifier and Type | Method and Description |
|---|---|
AssignmentBuilder |
assignToGroup(XInfo groupXinfo)
Assigns the Problem Set specified in the constructor to a group.
|
AssignmentBuilder |
assignToGroupInGroup(XInfo toGroupXinfo,
XInfo inGroupXinfo)
Assigns the Problem Set specified in the constructor to a group within a particular group.
|
AssignmentBuilder |
assignToIndivdualInGroup(XInfo userXinfo,
XInfo groupXinfo)
Assigns the Problem Set specified in the constructor to an individual within a particular group.
|
AssignmentBuilder |
assignToIndividual(XInfo user)
Assigns the Problem Set specified in the constructor to an individual.
|
XInfo |
getAssignee() |
Assignment |
getDomainObject()
Creates an assignment
|
XInfo |
getGroupContext() |
XInfo |
getOwner() |
int |
getProblemSetId() |
AssignmentBuilder |
setAssignmentName(java.lang.String name)
Sets the assignment's name.
|
AssignmentBuilder |
setDueDate(java.time.Instant date)
Sets the assignment's due date
|
AssignmentBuilder |
setReleaseDate(java.time.Instant date)
Sets the assignment's release date
|
addFailures, addFailures, addToValidationQueue, addToValidationQueue, addToValidationQueue, addToValidationQueue, doValidation, failuresToString, getFailures, hasFailures, overrideValidator, setValidator, throwBuilderExceptionOnFailure, throwIllegalArgumentExceptionOnFailureclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddFailures, addFailures, addToValidationQueue, addToValidationQueue, addToValidationQueue, addToValidationQueue, doValidation, failuresToString, getFailures, getInstance, hasFailures, overrideValidator, setValidator, throwBuilderExceptionOnFailure, throwIllegalArgumentExceptionOnFailurepublic AssignmentBuilder(int problemSetId,
XInfo ownerXinfo)
problemSetId - The Problem Set's database IDownerXinfo - The assignment owner.public AssignmentBuilder(java.lang.String problemSetXref,
XInfo ownerXinfo)
public AssignmentBuilder(int problemSetId,
XInfo ownerXinfo,
java.time.Instant assignDate)
problemSetId - The Problem Set's database IDownerXinfo - The assignment owner.assignDate - The date the assignment was created.public AssignmentBuilder assignToIndividual(XInfo user)
user - The user assignee's external information.public AssignmentBuilder assignToGroup(XInfo groupXinfo)
groupXinfo - The group assignee's external information.public AssignmentBuilder assignToIndivdualInGroup(XInfo userXinfo, XInfo groupXinfo)
userXinfo - The user assignee's external information.groupXinfo - The external information for the group in which context the assignment is made.public AssignmentBuilder assignToGroupInGroup(XInfo toGroupXinfo, XInfo inGroupXinfo)
toGroupXinfo - The group assignee's external information.inGroupXinfo - The external information for the group in which context the assignment is made.public AssignmentBuilder setAssignmentName(java.lang.String name)
If not provided, defaults to the Problem Set's name.
name - Assignment namepublic AssignmentBuilder setReleaseDate(java.time.Instant date)
date - Release datepublic AssignmentBuilder setDueDate(java.time.Instant date)
date - Due datepublic XInfo getOwner()
public XInfo getAssignee()
public XInfo getGroupContext()
public int getProblemSetId()
public Assignment getDomainObject()
getDomainObject in interface DomainObjectBuilder<Assignment>Validator}