Interface Project

    • Method Detail

      • closeProject

        boolean closeProject()
                      throws ApiException,
                             java.rmi.RemoteException
        Closes the project represented by this object in the TPT GUI.

        It discards all changes since the last time the project has been saved. Closed projects cannot be saved anymore.

        Returns:
        false if the Project could not be closed.
        Throws:
        java.rmi.RemoteException - remote communication problem
        ApiException - The project is not open/unknown
      • saveProject

        java.util.List<java.lang.String> saveProject()
                                              throws ApiException,
                                                     java.rmi.RemoteException
        Saves the project in its assigned file. The file has been specified in one of the following functions:

        saveAsProject(File)

        TptApi.newProject(File)

        TptApi.openProject(File)

        Returns:
        A list of messages that have occurred while saving the project.
        Throws:
        java.rmi.RemoteException - remote communication problem
        ApiException - If the project is not opened or if the file cannot be written.
      • saveAsProject

        java.util.List<java.lang.String> saveAsProject​(java.io.File file)
                                                throws ApiException,
                                                       java.rmi.RemoteException
        Saves the project in the given file. The file can be changed by this method. This function basically represents the "Save as..." menu item.

        The file extension defines the save format for the file (*.tpt, *.tptz, *.tptprj)

        Parameters:
        file - the file to save the project to
        Returns:
        A list of messages that have occurred during the save operation.
        Throws:
        java.rmi.RemoteException - remote communication problem
        ApiException - If the project is not open or it the project cannot be written to the given file,
        See Also:
        saveProject(), TptApi.newProject(File), TptApi.openProject(File)
      • saveAsProjectByPath

        java.util.List<java.lang.String> saveAsProjectByPath​(java.lang.String file)
                                                      throws ApiException,
                                                             java.rmi.RemoteException
        Saves the project in the file at the given path. The file can be changed by this method. This function basically represents the "Save as..." menu item.

        The file extension defines the save format for the file (*.tpt, *.tptz, *.tptprj)

        Parameters:
        file - the path to the file to save the project to
        Returns:
        A list of messages that have occurred during the save operation.
        Throws:
        java.rmi.RemoteException - remote communication problem
        ApiException - If the project is not open or it the project cannot be written to the given file,
        See Also:
        saveProject(), TptApi.newProject(File), TptApi.openProject(File)
      • getFile

        java.io.File getFile()
                      throws java.rmi.RemoteException
        Returns the File that is associated with this TPT project. If no file has been specified so far, it returns null.
        Returns:
        A TPT file or null
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getFilePath

        java.lang.String getFilePath()
                              throws java.rmi.RemoteException
        Returns the path to the file that is associated with this TPT project. If no file has been specified so far, it returns null.
        Returns:
        A path to a TPT file or null
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getExecutionConfigurationOrGroupByName

        ExecutionConfigurationOrGroup getExecutionConfigurationOrGroupByName​(java.lang.String name)
                                                                      throws java.rmi.RemoteException
        Delivers the first execution configuration or group with the given name or null if no such execution configuration or group exists.
        Parameters:
        name - The name of the ExecutionConfigurationOrGroup.
        Returns:
        The ExecutionConfigurationOrGroup or null.
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getExecutionConfigurationOrGroupByNamePattern

        java.util.Collection<ExecutionConfigurationOrGroup> getExecutionConfigurationOrGroupByNamePattern​(java.util.regex.Pattern namepattern)
                                                                                                   throws java.rmi.RemoteException
        Delivers all execution configurations and/or groups, matching the given name pattern.
        Parameters:
        namepattern - A regular expression for the name pattern.
        Returns:
        Collection of all ExecutionConfigurationOrGroups, matching the given name pattern.
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getExecutionConfigurationOrGroupByNamePattern

        java.util.Collection<ExecutionConfigurationOrGroup> getExecutionConfigurationOrGroupByNamePattern​(java.lang.String namepattern)
                                                                                                   throws java.util.regex.PatternSyntaxException,
                                                                                                          java.rmi.RemoteException
        Delivers all execution configurations and/or groups, matching the given name pattern.
        Parameters:
        namepattern - A regular expression for the name pattern.
        Returns:
        Collection of all ExecutionConfigurationOrGroups, matching the given name pattern.
        Throws:
        java.util.regex.PatternSyntaxException - If the expression's syntax is invalid
        java.rmi.RemoteException - remote communication problem
      • getTestSets

        RemoteCollection<TestSet> getTestSets()
                                       throws java.rmi.RemoteException
        Returns:
        Returns the set of all TestSets defined in this project. Changes to the returned RemoteCollection will change the TPT model but changes in the TPT model will not be reflected here.
        Throws:
        java.rmi.RemoteException - remote communication problem
        See Also:
        getTopLevelTestSets()
      • getTestSetOrGroupByName

        TestSetOrGroup getTestSetOrGroupByName​(java.lang.String name)
                                        throws java.rmi.RemoteException
        Delivers the first test set or test set group with the given name or null if no such test set or test set group exists.
        Parameters:
        name - The name of the TestSet.
        Returns:
        The TestSets/TestSetGroups or null.
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getTestSetOrGroupByNamePattern

        java.util.Collection<TestSetOrGroup> getTestSetOrGroupByNamePattern​(java.util.regex.Pattern namepattern)
                                                                     throws java.rmi.RemoteException
        Delivers all test sets and test set groups, matching the given name pattern.
        Parameters:
        namepattern - A regular expression for the name pattern.
        Returns:
        Collection of all TestSets and TestSetGroups, matching the given name pattern.
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getTestSetOrGroupByNamePattern

        java.util.Collection<TestSetOrGroup> getTestSetOrGroupByNamePattern​(java.lang.String namepattern)
                                                                     throws java.rmi.RemoteException,
                                                                            java.util.regex.PatternSyntaxException
        Delivers all test sets and test set groups, matching the given name pattern.
        Parameters:
        namepattern - A regular expression for the name pattern.
        Returns:
        Collection of all TestSets and TestSetGroups, matching the given name pattern.
        Throws:
        java.util.regex.PatternSyntaxException - If the expression's syntax is invalid
        java.rmi.RemoteException - remote communication problem
      • getTopLevelTestSets

        RemoteList<TestSetOrGroup> getTopLevelTestSets()
                                                throws java.rmi.RemoteException
        Returns:
        Returns the list of all TestSets and TestSetGroups defined at the top level of this project.
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getPlatformConfigurations

        RemoteList<PlatformConfiguration> getPlatformConfigurations()
                                                             throws java.rmi.RemoteException
        Returns:
        Returns the list of all PlatformConfigurations defined for this project.
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getPlatformConfigurationByName

        PlatformConfiguration getPlatformConfigurationByName​(java.lang.String name)
                                                      throws java.rmi.RemoteException
        Delivers the first platform configuration with the given name or null if no such platform configuration exists.
        Parameters:
        name - The name of the PlatformConfiguration.
        Returns:
        The PlatformConfiguration or null.
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getPlatformConfigurationByNamePattern

        java.util.Collection<PlatformConfiguration> getPlatformConfigurationByNamePattern​(java.util.regex.Pattern namepattern)
                                                                                   throws java.rmi.RemoteException
        Delivers all Platform configurations, matching the given name pattern.
        Parameters:
        namepattern - A regular expression for the name pattern.
        Returns:
        Collection of all PlatformConfigurations, matching the given name pattern.
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getPlatformConfigurationByNamePattern

        java.util.Collection<PlatformConfiguration> getPlatformConfigurationByNamePattern​(java.lang.String namepattern)
                                                                                   throws java.util.regex.PatternSyntaxException,
                                                                                          java.rmi.RemoteException
        Delivers all Platform configurations, matching the given name pattern.
        Parameters:
        namepattern - A regular expression for the name pattern.
        Returns:
        Collection of all PlatformConfigurations, matching the given name pattern.
        Throws:
        java.util.regex.PatternSyntaxException - If the expression's syntax is invalid
        java.rmi.RemoteException - remote communication problem
      • getTopLevelAssessments

        RemoteList<AssessmentOrGroup> getTopLevelAssessments()
                                                      throws java.rmi.RemoteException
        Returns the list all top level Assessments and AssessmentGroups of this project. These are basically those elements that are placed on the highest hierarchy level in the Assessment view.
        Returns:
        A list of AssessmentOrGroup representing the top level assessments and assessment groups.
        Throws:
        java.rmi.RemoteException - remote communication problem
      • setRequirementsLinking

        void setRequirementsLinking​(Project.RequirementsLinking requirementsLinking)
                             throws java.rmi.RemoteException
        Sets the Project.RequirementsLinking for this project.
        Parameters:
        requirementsLinking - the requirements linking to be used
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getRequirementsLinking

        Project.RequirementsLinking getRequirementsLinking()
                                                    throws java.rmi.RemoteException
        Returns the Project.RequirementsLinking used for this project.
        Returns:
        the requirements linking used for this project
        Throws:
        java.rmi.RemoteException - remote communication problem
      • createRequirement

        Requirement createRequirement​(java.lang.String id,
                                      java.lang.String document,
                                      java.lang.String text,
                                      Requirement.RequirementType type)
                               throws ApiException,
                                      java.rmi.RemoteException
        Adds a new requirement to this project.
        Parameters:
        id - The unique ID of the requirement
        document - The requirements document or null.
        text - The describing requirement text.
        type - The type of the requirement.
        Returns:
        The newly created requirement.
        Throws:
        ApiException - If a requirement with the same id already exists.
        java.rmi.RemoteException - remote communication problem
      • getRequirements

        RemoteIndexedList<java.lang.String,​Requirement> getRequirements()
                                                                       throws java.rmi.RemoteException
        Get the list of all requirements of this project.
        Returns:
        The list of requirements.
        Throws:
        java.rmi.RemoteException - remote communication problem
      • createRequirementSet

        RequirementSet createRequirementSet​(java.lang.String name,
                                            java.lang.String condition)
                                     throws ApiException,
                                            java.rmi.RemoteException
        Add a new requirement set to this project.
        Parameters:
        name - The name of the requirement set
        condition - the condtion of the requirement set. The value null will be corrected to an empty string.
        Returns:
        The newly created requirement set.
        Throws:
        ApiException - If name is null.
        java.rmi.RemoteException - remote communication problem
      • getRequirementSets

        RemoteList<RequirementSet> getRequirementSets()
                                               throws java.rmi.RemoteException
        Get the list of all requirement sets of this project.
        Returns:
        The list of requirement sets.
        Throws:
        java.rmi.RemoteException - remote communication problem
      • addFormalRequirementDefine

        FormalRequirementDefine addFormalRequirementDefine​(java.lang.String name,
                                                           java.lang.String value)
                                                    throws java.rmi.RemoteException,
                                                           ApiException
        Adds a define to the current TPT project.
        Parameters:
        name - The name of the define
        value - The value of the define
        Returns:
        define which was created and added to the current TPT project
        Throws:
        java.rmi.RemoteException - remote communication problem
        ApiException - If the name already exists or is illegal
      • removeRequirementAttribute

        void removeRequirementAttribute​(java.lang.String attributeName)
                                 throws java.rmi.RemoteException
        Removes the requirement attribute with the given name. The attribute will be removed in all requirements of the project.
        Parameters:
        attributeName - The name of the attribute to remove.
        Throws:
        java.rmi.RemoteException - remote communication problem
        ApiException - if the name of the attribute is empty or null
      • setUsedNameSpaces

        void setUsedNameSpaces​(java.lang.String nameSpaces)
                        throws java.rmi.RemoteException,
                               ApiException
        Sets the name spaces which will be used for the Defines of this TPT project. If several name spaces are used the names have to be comma separated.
        Parameters:
        nameSpaces - the name space, comma separated
        Throws:
        java.rmi.RemoteException - remote communication problem
        ApiException - if nameSpace is null
      • getUsedNameSpaces

        java.lang.String getUsedNameSpaces()
                                    throws java.rmi.RemoteException
        Gets the name spaces which will be used for the Defines of this TPT project.
        Returns:
        the name spaces as String
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getScenarioOrGroupByID

        ScenarioOrGroup getScenarioOrGroupByID​(java.lang.String id)
                                        throws java.rmi.RemoteException
        Delivers the scenario or scenario group with the given id or null if no such scenario or scenario group exists.
        Parameters:
        id - The ID of the ScenarioOrGroup.
        Returns:
        The ScenarioOrGroup or null.
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getScenarioOrGroupByUUID

        ScenarioOrGroup getScenarioOrGroupByUUID​(java.util.UUID uuid)
                                          throws java.rmi.RemoteException
        Delivers the scenario or scenario group with the given uuid or null if no such scenario or scenario group exists.
        Parameters:
        uuid - The UUID of the ScenarioOrGroup.
        Returns:
        The ScenarioOrGroup or null.
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getScenarioOrGroupByName

        ScenarioOrGroup getScenarioOrGroupByName​(java.lang.String name)
                                          throws java.rmi.RemoteException
        Delivers the first scenario or scenario group with the given name or null if no such scenario or scenario group exists.
        Parameters:
        name - The name of the ScenarioOrGroup.
        Returns:
        The ScenarioOrGroup or null.
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getScenarioOrGroupByNamePattern

        java.util.Collection<ScenarioOrGroup> getScenarioOrGroupByNamePattern​(java.util.regex.Pattern namepattern)
                                                                       throws java.rmi.RemoteException
        Delivers all scenarios and/or scenario groups, matching the given name pattern.
        Parameters:
        namepattern - A regular expression for the name pattern.
        Returns:
        Collection of all ScenarioOrGroups, matching the given name pattern.
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getScenarioOrGroupByNamePattern

        java.util.Collection<ScenarioOrGroup> getScenarioOrGroupByNamePattern​(java.lang.String namepattern)
                                                                       throws java.util.regex.PatternSyntaxException,
                                                                              java.rmi.RemoteException
        Delivers all scenarios and/or scenario groups, matching the given name pattern.
        Parameters:
        namepattern - A regular expression for the name pattern.
        Returns:
        Collection of all ScenarioOrGroups, matching the given name pattern.
        Throws:
        java.util.regex.PatternSyntaxException - If the expression's syntax is invalid
        java.rmi.RemoteException - remote communication problem
      • createTestSet

        TestSet createTestSet​(java.lang.String name)
                       throws java.rmi.RemoteException
        Create a new TestSet with the given name.
        Parameters:
        name - The name of the new test set. Null will be reduced to an empty string.
        Returns:
        The freshly created and empty test set.
        Throws:
        java.rmi.RemoteException - remote communication problem
      • createTestSet

        TestSet createTestSet​(java.lang.String name,
                              TestSetGroup groupOrNull)
                       throws java.rmi.RemoteException
        Creates a new TestSet with the given name below the given TestSetGroup. If groupOrNull == null the new TestSet will automatically become a top level item.
        Parameters:
        name - The name of the new Test Set. Null will be reduced to an empty string.
        groupOrNull - The parent group for the new Test Set or null.
        Returns:
        The object representing the new TestSet.
        Throws:
        java.rmi.RemoteException - remote communication problem
      • createTestSetGroup

        TestSetGroup createTestSetGroup​(java.lang.String name,
                                        TestSetGroup groupOrNull)
                                 throws java.rmi.RemoteException
        Creates a new TestSetGroup with the given name below the given TestSetGroup. If groupOrNull == null the new TestSetGroup will automatically become a top level item.
        Parameters:
        name - The name of the new Test Set Group. Null will be reduced to an empty string.
        groupOrNull - The parent group for the new Test Set Group or null.
        Returns:
        The object representing the new TestSet Group.
        Throws:
        java.rmi.RemoteException - remote communication problem
      • createType

        Type createType​(java.lang.String nameOrNull,
                        java.lang.String typeString)
                 throws ApiException,
                        java.rmi.RemoteException
        Create a new type. The structure of the type is given by the typeString argument. You can see this string in TPT in the type editor in the "Type String" field at the bottom or in an tptaif export.

        Patterns:

        • Array : "primitive_type[]"
        • Curve : "curve[primitive_type1,primitive_type2]"
        • Map : "map[primitive_type1,primitive_type2,primitive_type3]"
        • Matrix : "primitive_type[][]"
        • Struct : "struct[e1:primitive_type1, e2:primitive_type2, e3:primitive_type3, ...]"
        • Enums : "int8 [ a = 1, b = 2 ]"
        Parameters:
        nameOrNull - The name of the declared type or null to create an anonymous type.
        typeString - The type definition in the same format as seen in tptaif or in the type editor.
        Returns:
        the new created type object.
        Throws:
        ApiException - If the given name is not a legal identifier name, a type with the given name already exists or the given type string could not be parsed.
        java.rmi.RemoteException - remote communication problem
      • getTypes

        RemoteCollection<Type> getTypes()
                                 throws java.rmi.RemoteException
        Get a collection of all known types. Anonymous and predefined types are not included. If you call this method multiple times the returned lists will have different hashes and equals will return false when comparing these objects.
        Returns:
        The collection of all explicitly declared types.
        Throws:
        java.rmi.RemoteException - remote communication problem
      • renameType

        void renameType​(java.lang.String oldName,
                        java.lang.String newName)
                 throws ApiException,
                        java.rmi.RemoteException
        A declared type can be renamed using this method. This replaces the old type (declared under name oldName before) with a new type (declared under name newName) with the same structure (just renamed). This method has no effect if there is no type declared with name oldName.
        Parameters:
        oldName - name of the declared type to be renamed
        newName - new name for the renamed type. No other type must ne declared using this name.
        Throws:
        ApiException - if another type named newName exists.
        java.rmi.RemoteException - remote communication problem
      • getTypeBoolean

        Type getTypeBoolean()
                     throws java.rmi.RemoteException
        The predefined Types are not returned by getTypes(). This method returns the predefined type boolean.
        Returns:
        The predefined Type boolean
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getTypeUInt8

        Type getTypeUInt8()
                   throws java.rmi.RemoteException
        The predefined Types are not returned by getTypes(). This method returns the predefined type uint8.
        Returns:
        The predefined Type uint8
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getTypeInt8

        Type getTypeInt8()
                  throws java.rmi.RemoteException
        The predefined Types are not returned by getTypes(). This method returns the predefined type int8.
        Returns:
        The predefined Type int8
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getTypeUInt16

        Type getTypeUInt16()
                    throws java.rmi.RemoteException
        The predefined Types are not returned by getTypes(). This method returns the predefined type uint16.
        Returns:
        The predefined Type uint16
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getTypeInt16

        Type getTypeInt16()
                   throws java.rmi.RemoteException
        The predefined Types are not returned by getTypes(). This method returns the predefined type int16.
        Returns:
        The predefined Type int16
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getTypeUInt32

        Type getTypeUInt32()
                    throws java.rmi.RemoteException
        The predefined Types are not returned by getTypes(). This method returns the predefined type uint32.
        Returns:
        The predefined Type uint32
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getTypeInt32

        Type getTypeInt32()
                   throws java.rmi.RemoteException
        The predefined Types are not returned by getTypes(). This method returns the predefined type int32.
        Returns:
        The predefined Type int32
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getTypeInt64

        Type getTypeInt64()
                   throws java.rmi.RemoteException
        The predefined Types are not returned by getTypes(). This method returns the predefined type int64.
        Returns:
        The predefined Type int64
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getTypeFloat

        Type getTypeFloat()
                   throws java.rmi.RemoteException
        The predefined Types are not returned by getTypes(). This method returns the predefined type float.
        Returns:
        The predefined Type float
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getTypeDouble

        Type getTypeDouble()
                    throws java.rmi.RemoteException
        The predefined Types are not returned by getTypes(). This method returns the predefined type double.
        Returns:
        The predefined Type double
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getTypeString

        Type getTypeString()
                    throws java.rmi.RemoteException
        The predefined Types are not returned by getTypes(). This method returns the predefined type string.
        Returns:
        The predefined Type string
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getDeclarations

        RemoteIndexedList<java.lang.String,​Declaration> getDeclarations()
                                                                       throws java.rmi.RemoteException
        Returns an indexed list of all Declarations defined in this project. The name of the Declaration serves as index.
        Returns:
        The list of all declarations (assessment variables, channels, constants, parameters, measurements).
        Throws:
        java.rmi.RemoteException - remote communication problem
      • createChannel

        Channel createChannel​(java.lang.String name)
                       throws ApiException,
                              java.rmi.RemoteException
        Creates a new channel with the given name.
        Parameters:
        name - The name of the channel
        Returns:
        The new created channel
        Throws:
        ApiException - If the given name is not a legal identifier name or a declaration with the given name already exists.
        java.rmi.RemoteException - remote communication problem
      • createParameter

        Parameter createParameter​(java.lang.String name)
                           throws ApiException,
                                  java.rmi.RemoteException
        Creates a new parameter with the given name. The default exchange mode is "exchange".
        Parameters:
        name - The name of the parameter
        Returns:
        The new created parameter
        Throws:
        ApiException - If the given name is not a legal identifier name or a declaration with the given name already exists.
        java.rmi.RemoteException - remote communication problem
      • createConstant

        Constant createConstant​(java.lang.String name)
                         throws ApiException,
                                java.rmi.RemoteException
        Creates a new constant with the given name.
        Parameters:
        name - The name of the constant
        Returns:
        The new created constant
        Throws:
        ApiException - If the given name is not a legal identifier name or a declaration with the given name already exists.
        java.rmi.RemoteException - remote communication problem
      • createMeasurement

        Measurement createMeasurement​(java.lang.String name)
                               throws ApiException,
                                      java.rmi.RemoteException
        Creates a new measurement with the given name.
        Parameters:
        name - The name of the measurement
        Returns:
        The new created measurement
        Throws:
        ApiException - If the given name is not a legal identifier name or a declaration with the given name already exists.
        java.rmi.RemoteException - remote communication problem
      • createAssessmentVariable

        AssessmentVariable createAssessmentVariable​(java.lang.String name)
                                             throws ApiException,
                                                    java.rmi.RemoteException
        Creates a new assessment variable with the given name.
        Parameters:
        name - The name of the assessment variable
        Returns:
        The new created assessment variable
        Throws:
        ApiException - If the given name is not a legal identifier name or a declaration with the given name already exists.
        java.rmi.RemoteException - remote communication problem
      • createExecutionConfiguration

        ExecutionConfiguration createExecutionConfiguration​(java.lang.String name)
                                                     throws java.rmi.RemoteException
        Creates a new ExecutionConfiguration with the given name at top level.
        Parameters:
        name - The name of the new Execution Configuration. null will be reduced to an empty string.
        Returns:
        The object representing the new Execution Configuration
        Throws:
        java.rmi.RemoteException - remote communication problem
      • createExecutionConfiguration

        ExecutionConfiguration createExecutionConfiguration​(java.lang.String name,
                                                            ExecutionConfigurationGroup groupOrNull)
                                                     throws java.rmi.RemoteException
        Creates a new ExecutionConfiguration with the given name below the given ExecutionConfigurationGroup. If groupOrNull == null the new ExecutionConfiguration will automatically become a top level item.
        Parameters:
        name - The name of the new Execution Configuration. Null will be reduced to an empty string.
        groupOrNull - The parent group for the new Execution Configuration or null.
        Returns:
        The object representing the new Execution Configuration
        Throws:
        java.rmi.RemoteException - remote communication problem
      • createExecutionConfigurationGroup

        ExecutionConfigurationGroup createExecutionConfigurationGroup​(java.lang.String name,
                                                                      ExecutionConfigurationGroup groupOrNull)
                                                               throws java.rmi.RemoteException
        Creates a new ExecutionConfigurationGroup with the given name below the given ExecutionConfigurationGroup. If groupOrNull == null the new ExecutionConfigurationGroup will automatically become a top level item.
        Parameters:
        name - The name of the new Execution Configuration Group. Null will be reduced to an empty string.
        groupOrNull - The parent group for the new Execution Configuration Group or null.
        Returns:
        The object representing the new Execution Configuration Group.
        Throws:
        java.rmi.RemoteException - remote communication problem
      • createPlatformConfiguration

        PlatformConfiguration createPlatformConfiguration​(java.lang.String name,
                                                          java.lang.String type)
                                                   throws ApiException,
                                                          java.rmi.RemoteException
        Create a new PlatformConfiguration with the given name and the given type.
        Parameters:
        name - The name for the new PlatformConfiguration. Null will be reduced to an empty string.
        type - A String representing the platform type.
        Returns:
        Returns an object representing the new PlatformConfiguration.
        Throws:
        java.rmi.RemoteException - remote communication problem
        ApiException - if type==null or type is unknown.
      • getAssessmentOrGroupByID

        AssessmentOrGroup getAssessmentOrGroupByID​(java.lang.String id)
                                            throws java.rmi.RemoteException
        Delivers the assessment or assessment group with the given id or null if no such assessment or assessment group exists.
        Parameters:
        id - The ID of the AssessmentOrGroup.
        Returns:
        The AssessmentOrGroup or null.
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getAssessmentOrGroupByUUID

        AssessmentOrGroup getAssessmentOrGroupByUUID​(java.util.UUID uuid)
                                              throws java.rmi.RemoteException
        Delivers the assessment or assessment group with the given uuid or null if no such assessment or assessment group exists.
        Parameters:
        uuid - The UUID of the AssessmentOrGroup.
        Returns:
        The AssessmentOrGroup or null.
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getAssessmentOrGroupByName

        AssessmentOrGroup getAssessmentOrGroupByName​(java.lang.String name)
                                              throws java.rmi.RemoteException
        Delivers the first assessment or assessment group with the given name or null if no such assessment or assessment group exists.
        Parameters:
        name - The name of the AssessmentOrGroup.
        Returns:
        The AssessmentOrGroup or null.
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getAssessmentOrGroupByNamePattern

        java.util.Collection<AssessmentOrGroup> getAssessmentOrGroupByNamePattern​(java.util.regex.Pattern namepattern)
                                                                           throws java.rmi.RemoteException
        Delivers all assessments and/or assessment groups, matching the given name pattern.
        Parameters:
        namepattern - A regular expression for the name pattern.
        Returns:
        Collection of all AssessmentOrGroups, matching the given name pattern.
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getAssessmentOrGroupByNamePattern

        java.util.Collection<AssessmentOrGroup> getAssessmentOrGroupByNamePattern​(java.lang.String namepattern)
                                                                           throws java.util.regex.PatternSyntaxException,
                                                                                  java.rmi.RemoteException
        Delivers all assessments and/or assessment groups, matching the given name pattern.
        Parameters:
        namepattern - A regular expression for the name pattern.
        Returns:
        Collection of all AssessmentOrGroups, matching the given name pattern.
        Throws:
        java.util.regex.PatternSyntaxException - If the expression's syntax is invalid
        java.rmi.RemoteException - remote communication problem
      • createAssessmentGroup

        AssessmentGroup createAssessmentGroup​(java.lang.String name,
                                              AssessmentGroup groupOrNull)
                                       throws java.rmi.RemoteException
        Create a AssessmentGroup with the given name and within the given parent AssessmentGroup.

        If groupOrNull==null, the newly created AssessmentGroup automatically becomes a top level item.

        Parameters:
        name - The name for the new AssessmentGroup. Null will be reduced to an empty string.
        groupOrNull - Either the parent AssessmentGroup or null
        Returns:
        An object representing the newly created AssessmentGroup
        Throws:
        java.rmi.RemoteException - remote communication problem
      • createAssessment

        Assessment createAssessment​(java.lang.String name,
                                    java.lang.String type,
                                    AssessmentGroup groupOrNull)
                             throws ApiException,
                                    java.rmi.RemoteException
        Creates a new Assessment with the given name and the given type below the given AssessmentGroup. If groupOrNull==null, the newly created Assessment automatically becomes a top level assessment
        Parameters:
        name - The name of the new Assessment. Null will be reduced to an empty string.
        type - A String representing the assessment type. Constants for available types can be found in Assessment.
        groupOrNull - The parent group for the new Assessment or null
        Returns:
        The object representing the newly created Assessment
        Throws:
        java.rmi.RemoteException - remote communication problem
        ApiException - type==null
      • getTopLevelTestlet

        Testlet getTopLevelTestlet()
                            throws java.rmi.RemoteException
        This function returns the top level testlet of a TPT project for which all other testlets are child nodes.

        In the project tree, this testlet is represented by the project node. Its variants are test cases.

        Returns:
        The top level Testlet for this project.
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getTestCaseAttributes

        RemoteCollection<TestCaseAttribute> getTestCaseAttributes()
                                                           throws java.rmi.RemoteException
        Returns the list of declared TestCaseAttributes for this project.
        Returns:
        A list of TestCaseAttributes.
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getExtensionOrNull

        java.rmi.Remote getExtensionOrNull​(java.lang.String key)
                                    throws java.rmi.RemoteException,
                                           ApiException
        Returns an entry point for an API extension of the given type. The Return value needs to be cast accordingly. Returns null, if no extension was registered for key.
        Parameters:
        key - Name of the extension
        Returns:
        null, if no extension could have been found with the given key. Otherwise, an object representing the entry point.
        Throws:
        java.rmi.RemoteException - remote communication problem
        ApiException - If an extension has been found but is not available for the current TPT instance (e.g. missing license option).
      • getMappings

        RemoteList<Mapping> getMappings()
                                 throws java.rmi.RemoteException
        Returns:
        Returns a list of the Mappings that are defined for this project.
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getMappingByName

        Mapping getMappingByName​(java.lang.String name)
                          throws java.rmi.RemoteException
        Delivers the first mapping with the given name or null if no such mapping exists.
        Parameters:
        name - The name of the Mapping.
        Returns:
        The Mapping or null.
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getMappingByNamePattern

        java.util.Collection<Mapping> getMappingByNamePattern​(java.util.regex.Pattern namepattern)
                                                       throws java.rmi.RemoteException
        Delivers all mappings, matching the given name pattern.
        Parameters:
        namepattern - A regular expression for the name pattern.
        Returns:
        Collection of all Mappings, matching the given name pattern.
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getMappingByNamePattern

        java.util.Collection<Mapping> getMappingByNamePattern​(java.lang.String namepattern)
                                                       throws java.util.regex.PatternSyntaxException,
                                                              java.rmi.RemoteException
        Delivers all mappings, matching the given name pattern.
        Parameters:
        namepattern - A regular expression for the name pattern.
        Returns:
        Collection of all Mappings, matching the given name pattern.
        Throws:
        java.util.regex.PatternSyntaxException - If the expression's syntax is invalid
        java.rmi.RemoteException - remote communication problem
      • createMapping

        Mapping createMapping​(java.lang.String name)
                       throws java.rmi.RemoteException
        Create a new Mapping with the given name. If the name already exists, a suffix (_00<n>) is added to the name of the new mapping.
        Parameters:
        name - The intended name for the new mapping. Null will be reduced to an empty string.
        Returns:
        An object representing the new Mapping
        Throws:
        java.rmi.RemoteException - remote communication problem
      • generateTestCasesFromTestData

        java.lang.String generateTestCasesFromTestData​(ScenarioGroup scenarioGroup,
                                                       java.io.File dir,
                                                       java.lang.String filePatternOrNull,
                                                       boolean includeSubdirs,
                                                       java.lang.String channelPatternOrNull,
                                                       boolean linkSignals,
                                                       java.lang.String renameMappingNameOrNull,
                                                       boolean createAssesslets,
                                                       java.lang.String timeTolOrNull,
                                                       java.lang.String valueTolOrNull,
                                                       boolean createLocalReferenceChannels,
                                                       boolean addTerminationCondition,
                                                       boolean assignParameters,
                                                       boolean updateExistingGeneratedScenarios)
                                                throws ApiException,
                                                       java.rmi.RemoteException
        Imports existing test data as step lists to TPT. This corresponds to "Tools | Generate Test Cases from Test Data". This function could either try to update an already existing set of imported test data or create a new set. *
        Parameters:
        scenarioGroup - A variant group where the imported test data should be inserted.
        dir - The directory where the test data resides.
        filePatternOrNull - A regular expression to constrain the set of files that are imported to TPT.
        For example, use ".*\.mdf" to consider only MDF files (i.e., all files whose file name ends with '.mdf').
        If the expression is null or empty, all available files with supported file format will be imported.
        includeSubdirs - Enable/disable the traversal of sub-directories of dir for further data to import.
        channelPatternOrNull - Provide a regular expression to define a mapping between channels in TPT and signal names in the file. The placeholder ${CHANNEL} can be used to refer to a arbitrary channel name in TPT: the expression "prefix_${CHANNEL}_postfix" would match a TPT channel "mysignal" to the signal "prefix_mysignal_postfix" in the file.
        linkSignals - Enable or disable the linking of test data files. If set to false, test date will be imported as Embedded Signal Step, instead.
        renameMappingNameOrNull - The name of a existing mapping with a rename flavor, that should be used to map the channels in TPT to the signal in the file.
        createAssesslets - Enable/Disable the automatic creation of Signal Comparison Assesslets for the input channels in the test data.
        timeTolOrNull - Specify the time tolerance for the Signal Comparison Assesslets. null means none.
        valueTolOrNull - Specify the value tolerance for the Signal Comparison Assesslets. null means none.
        createLocalReferenceChannels - Create local signals for the reference channels of the Signal comparison from the channels of the file to have the reference data available for embedded signals, too.
        addTerminationCondition - Add a wait stept that terminates the variant when the test data has been fully replayed.
        assignParameters - Enable the assignment of parameter values to test cases, if those are present in the test data file and a respective mapping flavor is present.
        updateExistingGeneratedScenarios - If this argument is set to true, TPT tries to find an older import to update with the new data. If it finds an older import, TPT updates already existing test cases, adds missing test cases, and removes such test cases, that do not have corresponding test data anymore.

        A older updateable import exists, if the testlet for the provided scenarioGroup contains exactly one child group that matches the name scheme "Import DD.MM.YY HH:MM:SS - RootDirName" and there exists a test case group of the same name.

        Returns:
        Returns a String containing the error and warning messages occurred during the import.
        Throws:
        ApiException -
        • If dir cannot be read.
        • If no mapping with the name renameMappingNameOrNull can be found or the Mapping does not have a Rename Flavor.
        • If createAssesslets == true, but are no TPT-Input-Channels for which a Signal Comparison Assesslet could be created.
        • If an error occurs during the import.
        java.rmi.RemoteException - remote communication problem
      • generateTestCasesFromTestDataByPath

        java.lang.String generateTestCasesFromTestDataByPath​(ScenarioGroup scenarioGroup,
                                                             java.lang.String dir,
                                                             java.lang.String filePatternOrNull,
                                                             boolean includeSubdirs,
                                                             java.lang.String channelPatternOrNull,
                                                             boolean linkSignals,
                                                             java.lang.String renameMappingNameOrNull,
                                                             boolean createAssesslets,
                                                             java.lang.String timeTolOrNull,
                                                             java.lang.String valueTolOrNull,
                                                             boolean createLocalReferenceChannels,
                                                             boolean addTerminationCondition,
                                                             boolean assignParameters,
                                                             boolean updateExistingGeneratedScenarios)
                                                      throws ApiException,
                                                             java.rmi.RemoteException
        Imports existing test data as step lists to TPT. This corresponds to "Tools | Generate Test Cases from Test Data". This function could either try to update an already existing set of imported test data or create a new set. *
        Parameters:
        scenarioGroup - A variant group where the imported test data should be inserted.
        dir - The path to the directory where the test data resides.
        filePatternOrNull - A regular expression to constrain the set of files that are imported to TPT.
        For example, use ".*\.mdf" to consider only MDF files (i.e., all files whose file name ends with '.mdf').
        If the expression is null or empty, all available files with supported file format will be imported.
        includeSubdirs - Enable/disable the traversal of sub-directories of dir for further data to import.
        channelPatternOrNull - Provide a regular expression to define a mapping between channels in TPT and signal names in the file. The placeholder ${CHANNEL} can be used to refer to a arbitrary channel name in TPT: the expression "prefix_${CHANNEL}_postfix" would match a TPT channel "mysignal" to the signal "prefix_mysignal_postfix" in the file.
        linkSignals - Enable or disable the linking of test data files. If set to false, test date will be imported as Embedded Signal Step, instead.
        renameMappingNameOrNull - The name of a existing mapping with a rename flavor, that should be used to map the channels in TPT to the signal in the file.
        createAssesslets - Enable/Disable the automatic creation of Signal Comparison Assesslets for the input channels in the test data.
        timeTolOrNull - Specify the time tolerance for the Signal Comparison Assesslets. null means none.
        valueTolOrNull - Specify the value tolerance for the Signal Comparison Assesslets. null means none.
        createLocalReferenceChannels - Create local signals for the reference channels of the Signal comparison from the channels of the file to have the reference data available for embedded signals, too.
        addTerminationCondition - Add a wait stept that terminates the variant when the test data has been fully replayed.
        assignParameters - Enable the assignment of parameter values to test cases, if those are present in the test data file and a respective mapping flavor is present.
        updateExistingGeneratedScenarios - If this argument is set to true, TPT tries to find an older import to update with the new data. If it finds an older import, TPT updates already existing test cases, adds missing test cases, and removes such test cases, that do not have corresponding test data anymore.

        A older updateable import exists, if the testlet for the provided scenarioGroup contains exactly one child group that matches the name scheme "Import DD.MM.YY HH:MM:SS - RootDirName" and there exists a test case group of the same name.

        Returns:
        Returns a String containing the error and warning messages occurred during the import.
        Throws:
        ApiException -
        • If dir cannot be read.
        • If no mapping with the name renameMappingNameOrNull can be found or the Mapping does not have a Rename Flavor.
        • If createAssesslets == true, but are no TPT-Input-Channels for which a Signal Comparison Assesslet could be created.
        • If an error occurs during the import.
        java.rmi.RemoteException - remote communication problem
      • importIO

        java.util.List<java.lang.String> importIO​(java.io.File f,
                                                  Mapping mappingOrNull,
                                                  Project.SynchronizationMethod syncMethod)
                                           throws ApiException,
                                                  java.rmi.RemoteException
        Imports the interface from the given file. Supported are tpt, tptprj, tptz, tptaif, xml and xlsx files.
        Parameters:
        f - The interface file containing the declarations to import.
        mappingOrNull - The mapping where mapping information shall be imported or null if a new mapping should be created if needed.
        syncMethod - Specifies how the existing and imported declarations are matched.
        Returns:
        A list of warnings that occurred during import.
        Throws:
        ApiException - If an error occurs during import or the file format is not supported.
        java.rmi.RemoteException - remote communication problem
      • importIOByPath

        java.util.List<java.lang.String> importIOByPath​(java.lang.String f,
                                                        Mapping mappingOrNull,
                                                        Project.SynchronizationMethod syncMethod)
                                                 throws ApiException,
                                                        java.rmi.RemoteException
        Imports the interface from the given file. Supported are tpt, tptprj, tptz, tptaif, xml and xlsx files.
        Parameters:
        f - The path to the interface file containing the declarations to import.
        mappingOrNull - The mapping where mapping information shall be imported or null if a new mapping should be created if needed.
        syncMethod - Specifies how the existing and imported declarations are matched.
        Returns:
        A list of warnings that occurred during import.
        Throws:
        ApiException - If an error occurs during import or the file format is not supported.
        java.rmi.RemoteException - remote communication problem
      • importIO

        Log importIO​(ImportInterfaceSettings settings)
              throws ApiException,
                     java.rmi.RemoteException
        Imports the interface by selecting the suitable importer by the given ImportInterfaceSettings sub class of settings, using the configuration contained in this instance.
        Parameters:
        settings - A sub class of ImportInterfaceSettings for a specific import type containing the needed information to execute the import without user interactions.
        Returns:
        The log containing warning und error messages, that occured during import and did not result in an ApiException
        Throws:
        ApiException - If an error occurs during import or the file format is not supported.
        java.rmi.RemoteException - remote communication problem
      • createdWithCurrentVersion

        boolean createdWithCurrentVersion()
                                   throws java.rmi.RemoteException
        Returns:
        is this ProjectFile created with the current TPT-version?
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getCreatedWithFileFormatVersion

        int getCreatedWithFileFormatVersion()
                                     throws java.rmi.RemoteException
        Returns:
        Fileformat version number of the tpt-project-file.
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getCreatedWithTptVersionName

        java.lang.String getCreatedWithTptVersionName()
                                               throws java.rmi.RemoteException
        Returns:
        TPT version name of the tpt-project-file.
        Throws:
        java.rmi.RemoteException - remote communication problem
      • importEquivalenceClasses

        java.util.List<java.lang.String> importEquivalenceClasses​(java.io.File f)
                                                           throws java.rmi.RemoteException
        Parameters:
        f - File to be imported.
        Returns:
        List with warnings occurred during import.
        Throws:
        java.rmi.RemoteException - remote communication problem
      • importEquivalenceClassesByPath

        java.util.List<java.lang.String> importEquivalenceClassesByPath​(java.lang.String f)
                                                                 throws java.rmi.RemoteException,
                                                                        ApiException
        Parameters:
        f - the path to the file to be imported.
        Returns:
        List with warnings occurred during import.
        Throws:
        java.rmi.RemoteException - remote communication problem
        ApiException - if the path is null
      • exportEquivalenceClasses

        java.util.List<java.lang.String> exportEquivalenceClasses​(java.io.File f)
                                                           throws java.rmi.RemoteException
        Parameters:
        f - target-File for export.
        Returns:
        List with warnings occurred during import.
        Throws:
        java.rmi.RemoteException - remote communication problem
      • exportEquivalenceClassesByPath

        java.util.List<java.lang.String> exportEquivalenceClassesByPath​(java.lang.String f)
                                                                 throws ApiException,
                                                                        java.rmi.RemoteException
        Parameters:
        f - path to the target File for export.
        Returns:
        List with warnings occurred during import.
        Throws:
        ApiException - if the path is null
        java.rmi.RemoteException - remote communication problem
      • generateTestCasesFromEquivalenceClasses

        java.util.List<java.lang.String> generateTestCasesFromEquivalenceClasses​(ScenarioOrGroup scenarioOrGroup,
                                                                                 GenerateTestCasesFromEquivalenceClassessSettings settings,
                                                                                 java.util.Map<Declaration,​java.util.Collection<java.lang.String>> equivalenceClassMap)
                                                                          throws java.rmi.RemoteException
        This method provides the functionality to generate test cases from equivalence classes.
        Parameters:
        scenarioOrGroup - where generated test cases should be added.
        settings - for generation of test cases from equivalence classes.
        equivalenceClassMap - selected equivalence classes.
        Returns:
        A List<String> with all warnings as a log.
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getDefaultReportSection

        Assessment getDefaultReportSection()
                                    throws java.rmi.RemoteException
        Get the default report section.
        Returns:
        The default report section
        Throws:
        java.rmi.RemoteException - remote communication problem
      • setDefaultReportSection

        void setDefaultReportSection​(Assessment reportSection)
                              throws ApiException,
                                     java.rmi.RemoteException
        Set the default report section. If the given argument is null the top level report section is set as the default.
        Parameters:
        reportSection - The report section to be set or null to set top level as default.
        Throws:
        ApiException - if the report section is not part of the project or if it is not a report section assesslet.
        java.rmi.RemoteException - remote communication problem
      • getUnits

        RemoteList<Unit> getUnits()
                           throws java.rmi.RemoteException
        Returns:
        the Projects Units.
        Throws:
        java.rmi.RemoteException - remote communication problem
      • createUnit

        Unit createUnit​(java.lang.String name,
                        java.lang.String symbol)
                 throws ApiException,
                        java.rmi.RemoteException
        Creates a new Unit for this project.
        Parameters:
        name - to be set.
        symbol - to be set.
        Returns:
        the newly created unit
        Throws:
        java.rmi.RemoteException - remote communication problem
        ApiException - if the given symbol or name is null, has illegal characters or a unit with the same name or symbol already exists
      • getStatusTypes

        RemoteList<java.lang.String> getStatusTypes()
                                             throws java.rmi.RemoteException
        A list of all status types defined for this project. If you delete an element in the list, the status will also be deleted if it is used.
        Returns:
        Remote List of all status types.
        Throws:
        java.rmi.RemoteException - remote communication problem
      • createStatusType

        void createStatusType​(java.lang.String status)
                       throws ApiException,
                              java.rmi.RemoteException
        Creates a new status type for this project.
        Parameters:
        status - The status type to be created.
        Throws:
        ApiException - If status is empty, null, contains line breaks, or a status with the given name already exists.
        java.rmi.RemoteException - remote communication problem
      • getStatusTags

        java.util.Set<java.lang.String> getStatusTags()
                                               throws java.rmi.RemoteException
        Get all tags already used for tagging statuses.
        Returns:
        The list of tags.
        Throws:
        java.rmi.RemoteException - remote communication problem
      • tagCurrentRevisions

        void tagCurrentRevisions​(java.lang.String tag)
                          throws ApiException,
                                 java.rmi.RemoteException
        Adds the same tag to all current revisions of test cases and assesslets.
        Parameters:
        tag - The tag to be added.
        Throws:
        ApiException - If tag is empty, null, contains line breaks, or a tag with the given name already exists.
        java.rmi.RemoteException - remote communication problem
      • exportTestResults

        void exportTestResults​(TestResultsExporterKey key)
                        throws ApiException,
                               java.rmi.RemoteException
        Exports the last test results to an extern destination.
        Parameters:
        key - the key of the exporter to use
        Throws:
        ApiException - if any problems occur during the export
        java.rmi.RemoteException - remote communication problem
      • exportRequirements

        void exportRequirements​(RequirementsExportSettings exportSettings)
                         throws ApiException,
                                java.rmi.RemoteException
        Exports the requirements to a CSV or an Excel file to import the changes to a test management tool.
        Parameters:
        exportSettings - The settings for the individual export.
        For the requirements export to a CSV file use CsvFileRequirementsExportSettings.
        For the requirements export to an Excel file use ExcelFileRequirementsExportSettings.
        Throws:
        ApiException - if any problems occur during the export
        java.rmi.RemoteException - remote communication problem
      • getRequirementsDocuments

        java.util.List<java.lang.String> getRequirementsDocuments()
                                                           throws java.rmi.RemoteException
        Delivers the names of all requirements documents contained in the project in alphabetical order.
        Returns:
        A list of all names of requirements documents in this project
        Throws:
        java.rmi.RemoteException - remote communication problem