Class Project

    • Field Detail

      • DEFAULT_PROJECT_NAME

        public static final java.lang.String DEFAULT_PROJECT_NAME
        See Also:
        Constant Field Values
      • UPDATE_DEPENDENCIES_ERROR_MSG

        public static final java.lang.String UPDATE_DEPENDENCIES_ERROR_MSG
        See Also:
        Constant Field Values
      • PTC_DEFAULT_DEPENDENCY_ERROR_MSG

        public static final java.lang.String PTC_DEFAULT_DEPENDENCY_ERROR_MSG
        See Also:
        Constant Field Values
      • NAMESPACE_EXCEPTION_MSG

        public static final java.lang.String NAMESPACE_EXCEPTION_MSG
        See Also:
        Constant Field Values
    • Constructor Detail

      • Project

        public Project()
    • Method Detail

      • GetVersion

        @ThingworxExtensionApiMethod(since={8,5})
        public java.lang.String GetVersion()
        Service Category:
        Projects
        Service Description:
        Get Project version.


        Get Project version
        Returns:
        String Project version
      • GetGroupId

        @ThingworxExtensionApiMethod(since={8,5})
        public java.lang.String GetGroupId()
        Service Category:
        Projects
        Service Description:
        Get Project group id.


        Get Project group id
        Returns:
        String Project group id
      • GetArtifactId

        @ThingworxExtensionApiMethod(since={8,5})
        public java.lang.String GetArtifactId()
        Service Category:
        Projects
        Service Description:
        Get Project artifact id.


        Get Project artifact id
        Returns:
        String Project artifact id
      • GetPublishResult

        @ThingworxExtensionApiMethod(since={8,5})
        public org.json.JSONObject GetPublishResult()
        Returns:
        result Publish Result - JSON

        Get Publish Result
      • GetMinPlatformVersion

        @ThingworxExtensionApiMethod(since={8,5})
        public java.lang.String GetMinPlatformVersion()
        Service Category:
        Projects
        Service Description:
        Get minimum Platform version.
        Returns:
        result Minimum Platform version - STRING

        Get minimum Platform version
      • GetEntities

        @ThingworxExtensionApiMethod(since={7,1})
        public InfoTable GetEntities()
                              throws java.lang.Exception
        Service Category:
        Projects
        Service Description:
        Get the entities of the project.


        Get a reference to all of the entities in this project
        Returns:
        InfoTable with DataShape EntityReference
        Throws:
        java.lang.Exception
      • GetEntityTypeCounts

        @ThingworxExtensionApiMethod(since={9,1})
        public InfoTable GetEntityTypeCounts()
                                      throws java.lang.Exception
        Service Category:
        Projects
        Service Description:
        Get the Entity type counts of the project.


        Get Project's Entity counts by entity type.
        Returns:
        InfoTable with DataShape EntityCount
        Throws:
        java.lang.Exception
      • ClearEntities

        @ThingworxExtensionApiMethod(since={7,1})
        public void ClearEntities()
                           throws java.lang.Exception


        Remove this project from all of the entities that have it.

        When entity project changed it also validates the entity and its characteristics accessModifier.

        • If entity has invalid accessModifier then this method updates its accessModifier to Projects defaultaccessModifier if present otherwise updates to PRIVATE.
        • If entity characteristics(property, service and configuration table) has invalid accessModifier then method removes characteristics accessModifier.
        Throws:
        java.lang.Exception
      • ListExternalDependencies

        @ThingworxExtensionApiMethod(since={8,5})
        public InfoTable ListExternalDependencies()
                                           throws java.lang.Exception
        Service Category:
        Projects
        Service Description:
        Lists the first level project external dependencies.
        Returns:
        result List first level external dependencies of project - INFOTABLE - Aspects {dataShape:EntityDependency}

        Lists all the external dependencies of this project.
        Throws:
        java.lang.Exception
      • UpdateProjectDependencies

        @ThingworxExtensionApiMethod(since={9,1})
        public void UpdateProjectDependencies()
                                       throws java.lang.Exception
        Service Category:
        Projects
        Service Description:
        Updates current project's 'depends-on Projects' list by scanning entity set's external dependencies.


        Updates current project's dependencies by scanning project and project's entity set external dependencies
        Overrides:
        UpdateProjectDependencies in class RootEntity
        Throws:
        java.lang.Exception
      • SetEntities

        @ThingworxExtensionApiMethod(since={7,1})
        public void SetEntities​(InfoTable entities)
                         throws java.lang.Exception
        Service Category:
        Projects
        Service Description:
        Set the entities for a project. This clears entities from the project first.


        Set this project on all of the entities in the entities List.

        When entity project changed it also validates the entity and its characteristics accessModifier.

        • If entity has invalid accessModifier then this method updates its accessModifier to Projects defaultaccessModifier if present otherwise updates to PRIVATE.
        • If entity characteristics(property, service and configuration table) has invalid accessModifier then method removes characteristics accessModifier.
        Parameters:
        entities - - InfoTable with DataShape EntityReference
        Throws:
        java.lang.Exception
      • AddEntities

        @ThingworxExtensionApiMethod(since={7,1})
        public void AddEntities​(java.lang.String searchExpression,
                                TagCollection tags,
                                org.json.JSONObject types)
                         throws java.lang.Exception
        Service Category:
        Projects
        Service Description:
        Adds to the project of all model entities filtered by keyword query and tags.


        Add entities to this project based on the combination of a search expression, tags and types. For each entity found, set the projectName to this project.

        When entity project changed it also validates the entity and its characteristics accessModifier.

        • If entity has invalid accessModifier then this method updates its accessModifier to Projects defaultaccessModifier if present otherwise updates to PRIVATE.
        • If entity characteristics(property, service and configuration table) has invalid accessModifier then method removes characteristics accessModifier.
        Parameters:
        searchExpression - - String compatible with Searcher.SearchModelEntities
        tags - - TagCollection of tags to match
        types - - JSONObject compatible with the types parameter of Searcher.SearchModelEntities
        Throws:
        java.lang.Exception
      • SearchStructure

        @ThingworxExtensionApiMethod(since={9,1})
        public org.json.JSONObject SearchStructure​(org.json.JSONObject query)
                                            throws java.lang.Exception


        Get/Search Project's entity names and its total counts by type based on matching query filter and pagination parameters.
        Parameters:
        query - JSON query input which is used for filter and pagination.
        Returns:
        JSON Object which returns entity names and its total count.
        Throws:
        java.lang.Exception
      • GetAllDependentProjectNames

        @ThingworxExtensionApiMethod(since={7,1})
        public InfoTable GetAllDependentProjectNames()
                                              throws java.lang.Exception
        Service Category:
        Projects
        Service Description:
        Get list of all of the projects that this project depends on, including itself.


        Get list of all of the projects that this project depends on, including itself
        Returns:
        InfoTable with DataShape GenericStringList
        Throws:
        java.lang.Exception
      • PublishSolution

        @ThingworxExtensionApiMethod(since={8,5})
        public org.json.JSONObject PublishSolution()
                                            throws java.lang.Exception
        Returns:
        result Publish result - JSON

        Publish solution
        Throws:
        java.lang.Exception