Package com.thingworx.projects
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
@ThingworxExtensionApiClass(since={7,1},
canInstantiate=true)
public class Project
extends ServiceProviderEntity
implements IVersionedEntity
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
Fields inherited from class com.thingworx.entities.RootEntity
BASIC_PROPERTY_DEFINITIONS, EXCLUDED_ENTITY_TYPES_IN_PROJECT
Fields inherited from class com.thingworx.types.NamedObject
NAME_COMPARATOR
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
AddEntities
(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.
Add entities to this project based on the combination of a search expression, tags and types.void
Remove this project from all of the entities that have it.static Project
fromJSON
(org.json.JSONObject jsonObject) Deprecated.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 itselfService Category: Projects Service Description: Get Project artifact id.
Get Project artifact idService Category: Projects Service Description: Get the entities of the project.
Get a reference to all of the entities in this projectService Category: Projects Service Description: Get the Entity type counts of the project.
Get Project's Entity counts by entity type.Service Category: Projects Service Description: Get Project group id.
Get Project group idService Category: Projects Service Description: Get minimum Platform version.
Get all of the entities in this projectorg.json.JSONObject
Service Category: Projects Service Description: Get Project version.
Get Project versionService Category: Projects Service Description: Lists the first level project external dependencies.org.json.JSONObject
org.json.JSONObject
SearchStructure
(org.json.JSONObject query)
Get/Search Project's entity names and its total counts by type based on matching query filter and pagination parameters.void
SetEntities
(InfoTable entities) Service Category: Projects Service Description: Set the entities for a project.void
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 dependenciesMethods inherited from class com.thingworx.entities.ServiceProviderEntity
getInstancePublicServiceDefinitions, getInstanceServiceDefinition, getInstanceServiceDefinitions, initializeEntity, preInitializeEntity, processAPIServiceRequest, processServiceRequest
Methods 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, validateConfiguration
Methods inherited from class com.thingworx.persistence.common.PersistableNamedObject
getID, hasID, isTransient
Methods inherited from class com.thingworx.types.NamedObject
getDescription, getName, setDescription, setName, toValueCollection
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.thingworx.types.INamedObject
getDescription, getName
Methods inherited from interface com.thingworx.entities.interfaces.IPersistable
getID, hasID
Methods inherited from interface com.thingworx.security.permissions.ISecurable
getID, getName
Methods 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()
-
-
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:RootEntity
Returns the type of this entity.
- Specified by:
getEntityType
in classRootEntity
- Returns:
- the entity type
-
getProjectEntities
@ThingworxExtensionApiMethod(since={7,1}) public EntityReferenceCollection getProjectEntities() throws Exception
Get 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:
UpdateProjectDependencies
in 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
- If an error occurs
-