Class Project
- All Implemented Interfaces:
IConfigurableObject,INotScriptFriendly,ISupportsDeprecation,IDiffableObject,IAvatar,IEntityLifeCycleEvent,IPersistable,IServiceProvider,ITaggableObject,IDependencyScannableObject,IVersionedEntity,IEntityDefinition,IPersistableObject<String>,IDesignTimeSecurable,IDesignTimeSecurableEntity,IRunTimeSecurable,IRunTimeSecurableEntity,ISecurable,IVisibilitySecurable,IVisibilitySecurableEntity,IAspectContainer,INamedObject,Serializable
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class com.thingworx.entities.RootEntity
BASIC_PROPERTY_DEFINITIONS, EXCLUDED_ENTITY_TYPES_IN_PROJECTFields inherited from class com.thingworx.types.NamedObject
NAME_COMPARATOR -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAddEntities(String searchExpression, TagCollection tags, org.json.JSONObject types) Service Category: Projects Service Description: Adds to the project of all model entities filtered by keyword query and tags.voidRemove this project from all of the entities that have it.static ProjectfromJSON(org.json.JSONObject jsonObject) Deprecated.Service Category: Projects Service Description: Get list of all of the projects that this project depends on, including itself.Service Category: Projects Service Description: Get Project artifact id.Service Category: Projects Service Description: Get the entities of the project.Returns the type of this entity.Service Category: Projects Service Description: Get the Entity type counts of the project.Service Category: Projects Service Description: Get Project group id.Service Category: Projects Service Description: Get minimum Platform version.Get all of the entities in this projectorg.json.JSONObjectService Category: Projects Service Description: Get Project version.Service Category: Projects Service Description: Lists the first level project external dependencies.org.json.JSONObjectorg.json.JSONObjectSearchStructure(org.json.JSONObject query) Get/Search Project's entity names and its total counts by type based on matching query filter and pagination parameters.voidSetEntities(InfoTable entities) Service Category: Projects Service Description: Set the entities for a project.voidService Category: Projects Service Description: Updates current project's 'depends-on Projects' list by scanning entity set's external dependencies.Methods inherited from class com.thingworx.entities.ServiceProviderEntity
getInstancePublicServiceDefinitions, getInstanceServiceDefinition, getInstanceServiceDefinitions, initializeEntity, preInitializeEntity, processAPIServiceRequest, processServiceRequestMethods inherited from class com.thingworx.entities.RootEntity
AddConfigurationTableDefinition, AddConfigurationTableDefinition, addDesignTimePermission, AddDesignTimePermission, addRunTimePermission, AddRunTimePermission, AddTags, addVisibilityPermission, AddVisibilityPermission, CheckDesignTimePermission, CheckDesignTimePermissionForGroup, CheckDesignTimePermissionForUser, CheckPermission, CheckPermissionForGroup, CheckPermissionForUser, cleanupEntity, DeleteAllConfigurationTableRows, DeleteConfigurationTable, DeleteConfigurationTableRows, DeleteConfigurationTableRows, deleteDesignTimePermission, DeleteDesignTimePermission, deleteRunTimePermission, DeleteRunTimePermission, deleteVisibilityPermission, DeleteVisibilityPermission, dispose, getAspects, GetAvatar, getAvatarContent, GetAvatarURL, GetConfigurationChangeHistory, getConfigurationSetting, getConfigurationTable, GetConfigurationTable, GetConfigurationTableDefinition, GetConfigurationTableRow, GetConfigurationTables, GetDescription, getDesignTimePermissions, GetDesignTimePermissions, GetDesignTimePermissionsAsJSON, getDocumentationContent, getEntityTypeAsString, GetEventDefinition, GetEventDefinitions, GetHomeMashup, GetIncomingDependencies, GetIncomingDependenciesAsNetwork, GetInstanceMetadataAsJSON, GetInstanceMetadataWithPermissionsAsJSON, GetLastModifiedDate, GetMetadata, GetMetadataAsJSON, GetMetadataWithPermissionsAsJSON, GetOutgoingDependencies, GetOutgoingDependenciesAsNetwork, getOwner, GetOwner, GetPermissionsForCurrentUser, GetPermissionsForGroup, GetPermissionsForUser, GetProjectName, GetPropertyDefinition, GetPropertyDefinitions, getRunTimePermissions, GetRunTimePermissions, GetRunTimePermissionsAsJSON, GetServiceDefinition, GetServiceDefinitions, getStringConfigurationSetting, getStringConfigurationSettingWithDefault, GetSummaryInformation, getTags, GetTags, GetTagsAsInfoTable, getVisibilityPermissions, GetVisibilityPermissions, GetVisibilityPermissionsAsJSON, HasIncomingDependencies, HasOutgoingDependencies, isEditable, isEditableExtensionObject, isEditableSystemObject, isExtensionObject, IsMultiRowTable, isOwner, isSystemObject, isThemeObject, isVisible, isVisible, ListDeprecatedUsage, persistDesignTimePermissions, persistRunTimePermissions, persistVisibilityPermissions, RemoveTags, SaveConfigurationTables, SetAvatar, setConfigurationSetting, SetConfigurationTable, SetConfigurationTableRows, SetDescription, setDesignTimePermissions, SetDesignTimePermissionsAsJSON, setDocumentationContent, setExtensionObject, SetHomeMashup, setLastModifiedDate, SetMultiRowConfigurationTable, setOwner, SetOwner, SetProjectName, setRunTimePermissions, SetRunTimePermissionsAsJSON, setStringConfigurationSetting, SetTags, setVisibilityPermissions, SetVisibilityPermissionsAsJSON, toJSON, toJSONDefinition, validateConfigurationMethods inherited from class com.thingworx.persistence.common.PersistableNamedObject
getID, hasID, isTransientMethods inherited from class com.thingworx.types.NamedObject
getDescription, getName, setDescription, setName, toValueCollectionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.thingworx.types.INamedObject
getDescription, getNameMethods inherited from interface com.thingworx.entities.interfaces.IPersistable
getID, hasIDMethods inherited from interface com.thingworx.security.permissions.ISecurable
getID, getNameMethods inherited from interface com.thingworx.deprecation.ISupportsDeprecation
getDeprecated, isDeprecated, isDeprecatedBefore, since
-
Field Details
-
DEFAULT_PROJECT_NAME
- See Also:
-
UPDATE_DEPENDENCIES_ERROR_MSG
- See Also:
-
PTC_DEFAULT_DEPENDENCY_ERROR_MSG
- See Also:
-
NAMESPACE_EXCEPTION_MSG
- See Also:
-
-
Constructor Details
-
Project
public Project()Initializes this instace with default values.
-
-
Method Details
-
getEntityVersion
-
GetVersion
- Service Category:
- Projects
- Service Description:
- Get Project version.
Get Project version
- Returns:
- String Project version
-
getGroupId
-
GetGroupId
- Service Category:
- Projects
- Service Description:
- Get Project group id.
Get Project group id
- Returns:
- String Project group id
-
getArtifactId
-
GetArtifactId
- Service Category:
- Projects
- Service Description:
- Get Project artifact id.
Get Project artifact id
- Returns:
- String Project artifact id
-
getPublishResult
-
GetPublishResult
- Returns:
- result Publish Result - JSON
Get Publish Result
-
getMinPlatformVersion
-
GetMinPlatformVersion
- Service Category:
- Projects
- Service Description:
- Get minimum Platform version.
- Returns:
- result Minimum Platform version - STRING
Get minimum Platform version
-
getAllDependentProjectNames
-
getEntityType
@ThingworxExtensionApiMethod(since={7,1}) public RelationshipTypes.ThingworxRelationshipTypes getEntityType()Description copied from class:RootEntityReturns the type of this entity.
- Specified by:
getEntityTypein classRootEntity- Returns:
- the entity type
-
getProjectEntities
@ThingworxExtensionApiMethod(since={7,1}) public EntityReferenceCollection getProjectEntities() throws ExceptionGet all of the entities in this project- Returns:
- EntityReferenceCollection of all the entities in the project
- Throws:
Exception
-
GetEntities
- 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:
Exception
-
GetEntityTypeCounts
- 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:
Exception
-
ClearEntities
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:
Exception
-
ListExternalDependencies
@ThingworxExtensionApiMethod(since={8,5}) public InfoTable ListExternalDependencies() throws 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:
Exception
-
UpdateProjectDependencies
- 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:
UpdateProjectDependenciesin classRootEntity- Throws:
Exception
-
SetEntities
@ThingworxExtensionApiMethod(since={7,1}) public void SetEntities(InfoTable entities) throws 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:
Exception
-
AddEntities
@ThingworxExtensionApiMethod(since={7,1}) public void AddEntities(String searchExpression, TagCollection tags, org.json.JSONObject types) throws 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.SearchModelEntitiestags- - TagCollection of tags to matchtypes- - JSONObject compatible with the types parameter of Searcher.SearchModelEntities- Throws:
Exception
-
SearchStructure
@ThingworxExtensionApiMethod(since={9,1}) public org.json.JSONObject SearchStructure(org.json.JSONObject query) throws 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:
Exception
-
GetAllDependentProjectNames
@ThingworxExtensionApiMethod(since={7,1}) public InfoTable GetAllDependentProjectNames() throws 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:
Exception
-
PublishSolution
@ThingworxExtensionApiMethod(since={8,5}) public org.json.JSONObject PublishSolution() throws Exception- Returns:
- result Publish result - JSON
Publish solution
- Throws:
Exception
-
fromJSON
@Deprecated @ThingworxExtensionApiMethod(since={7,1}, deprecatedSince={8,4}) public static Project fromJSON(org.json.JSONObject jsonObject) throws Exception Deprecated.- Throws:
Exception
-