Package com.piketec.tpt.api
Interface AssessmentOrGroup
-
- All Superinterfaces:
IdentifiableRemote
,NamedObject
,java.rmi.Remote
,TptRemote
- All Known Subinterfaces:
Assessment
,AssessmentGroup
public interface AssessmentOrGroup extends NamedObject, IdentifiableRemote
An object representing either anAssessment
or a group of assessments (AssessmentGroup
). These objects can build up a tree where both, assessments and assessment groups, could be leaf nodes.- Author:
- Copyright (c) 2014-2020 Piketec GmbH - MIT License (MIT) - All rights reserved
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description ResultAndLogs<AssessmentOrGroup>
copy(AssessmentOwner targetGroup, int targetIndex)
Copiesthis
into the giventargetGroup
that can be from a differentProject
that is opened in the same TPT instance.AssessmentGroup
getGroup()
Returns the parent group (AssessmentGroup
) of this assessment ornull
if this is the top level object (i.e. it resides directly below theProject
).int
getId()
Deprecated.Will be removed in TPT-18.java.lang.String
getIdString()
Project
getProject()
void
move(AssessmentGroup newParent, int index)
Moves thisAssessmentOrGroup
to a new position in the assessment tree.void
setStatus(java.lang.String author, java.lang.String comment, java.lang.String status)
Set the review status of the assessment or group.-
Methods inherited from interface com.piketec.tpt.api.IdentifiableRemote
getIdentifier
-
Methods inherited from interface com.piketec.tpt.api.NamedObject
getName, setName
-
-
-
-
Method Detail
-
getGroup
AssessmentGroup getGroup() throws java.rmi.RemoteException
Returns the parent group (AssessmentGroup
) of this assessment ornull
if this is the top level object (i.e. it resides directly below theProject
).- Returns:
- The parent
AssessmentGroup
ornull
. - Throws:
java.rmi.RemoteException
- remote communication problem
-
getProject
Project getProject() throws java.rmi.RemoteException
- Returns:
- The parent TPT
Project
for thisAssessmentOrGroup
. - Throws:
java.rmi.RemoteException
- remote communication problem
-
getId
@Deprecated int getId() throws java.rmi.RemoteException, ApiException
Deprecated.Will be removed in TPT-18. Since TPT-16 assessment IDs are strings. UsegetIdString()
instead.- Returns:
- the assessment or assessment group ID.
- Throws:
java.rmi.RemoteException
- remote communication problemApiException
- If the ID of the assessment is not an integer
-
getIdString
java.lang.String getIdString() throws java.rmi.RemoteException
- Returns:
- the assessment or assessment group ID.
- Throws:
java.rmi.RemoteException
- remote communication problem
-
setStatus
void setStatus(java.lang.String author, java.lang.String comment, java.lang.String status) throws ApiException, java.rmi.RemoteException
Set the review status of the assessment or group.- Parameters:
author
- The author of the status.comment
- The comment of the status.status
- The status type of the status.- Throws:
ApiException
- If author or comment is empty ornull
, or given status is invalid.java.rmi.RemoteException
- remote communication problem
-
move
void move(AssessmentGroup newParent, int index) throws ApiException, java.rmi.RemoteException
Moves thisAssessmentOrGroup
to a new position in the assessment tree.- Parameters:
newParent
- the new parentAssessmentGroup
ornull
to move it to top level.index
- the new position under the new parent.- Throws:
ApiException
- If the new parent is invalid.java.rmi.RemoteException
- remote communication problem
-
copy
ResultAndLogs<AssessmentOrGroup> copy(AssessmentOwner targetGroup, int targetIndex) throws ApiException, java.rmi.RemoteException
Copiesthis
into the giventargetGroup
that can be from a differentProject
that is opened in the same TPT instance. If thetargetGroup
already contains an element with the same name a new one will be generated.- Parameters:
targetGroup
- The group to copythis
into. Can be from anotherProject
.targetIndex
- The index where the copy will be inserted. UseInteger.MAX_VALUE
to append the copy at the end.- Returns:
- The copy of this and all log messages that occured during copying.
- Throws:
ApiException
- If targetGroup isnull
or copying failed.java.rmi.RemoteException
- remote communication problem
-
-