Interface AssessmentOrGroup

    • Method Detail

      • getGroup

        AssessmentGroup getGroup()
                          throws java.rmi.RemoteException
        Returns the parent group (AssessmentGroup) of this assessment or null if this is the top level object (i.e. it resides directly below the Project).
        Returns:
        The parent AssessmentGroup or null.
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getProject

        Project getProject()
                    throws java.rmi.RemoteException
        Returns:
        The parent TPT Project for this AssessmentOrGroup.
        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. Use getIdString() instead.
        Returns:
        the assessment or assessment group ID.
        Throws:
        java.rmi.RemoteException - remote communication problem
        ApiException - 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 or null, or given status is invalid.
        java.rmi.RemoteException - remote communication problem
      • move

        void move​(AssessmentGroup newParent,
                  int index)
           throws ApiException,
                  java.rmi.RemoteException
        Moves this AssessmentOrGroup to a new position in the assessment tree.
        Parameters:
        newParent - the new parent AssessmentGroup or null 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
        Copies this into the given targetGroup that can be from a different Project that is opened in the same TPT instance. If the targetGroup already contains an element with the same name a new one will be generated.
        Parameters:
        targetGroup - The group to copy this into. Can be from another Project.
        targetIndex - The index where the copy will be inserted. Use Integer.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 is null or copying failed.
        java.rmi.RemoteException - remote communication problem