Package com.thingworx.projects
Class Project
- java.lang.Object
-
- All Implemented Interfaces:
IConfigurableObject
,INotScriptFriendly
,ISupportsDeprecation
,IDiffableObject
,IAvatar
,IEntityLifeCycleEvent
,IPersistable
,IServiceProvider
,ITaggableObject
,IDependencyScannableObject
,IVersionedEntity
,IEntityDefinition
,IPersistableObject<java.lang.String>
,IDesignTimeSecurable
,IDesignTimeSecurableEntity
,IRunTimeSecurable
,IRunTimeSecurableEntity
,ISecurable
,IVisibilitySecurable
,IVisibilitySecurableEntity
,IAspectContainer
,INamedObject
,java.io.Serializable
@ThingworxExtensionApiClass(since={7,1}, canInstantiate=true) public class Project extends ServiceProviderEntity implements IVersionedEntity
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DEFAULT_PROJECT_NAME
static java.lang.String
NAMESPACE_EXCEPTION_MSG
static java.lang.String
PTC_DEFAULT_DEPENDENCY_ERROR_MSG
static java.lang.String
UPDATE_DEPENDENCIES_ERROR_MSG
-
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
Constructors Constructor Description Project()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
AddEntities(java.lang.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
ClearEntities()
Remove this project from all of the entities that have it.static Project
fromJSON(org.json.JSONObject jsonObject)
Deprecated.java.util.Set<java.lang.String>
getAllDependentProjectNames()
InfoTable
GetAllDependentProjectNames()
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 itselfjava.lang.String
getArtifactId()
java.lang.String
GetArtifactId()
Service Category: Projects Service Description: Get Project artifact id.
Get Project artifact idInfoTable
GetEntities()
Service Category: Projects Service Description: Get the entities of the project.
Get a reference to all of the entities in this projectRelationshipTypes.ThingworxRelationshipTypes
getEntityType()
InfoTable
GetEntityTypeCounts()
Service Category: Projects Service Description: Get the Entity type counts of the project.
Get Project's Entity counts by entity type.EntityVersion
getEntityVersion()
java.lang.String
getGroupId()
java.lang.String
GetGroupId()
Service Category: Projects Service Description: Get Project group id.
Get Project group idjava.lang.String
getMinPlatformVersion()
java.lang.String
GetMinPlatformVersion()
Service Category: Projects Service Description: Get minimum Platform version.EntityReferenceCollection
getProjectEntities()
Get all of the entities in this projectjava.lang.String
getPublishResult()
org.json.JSONObject
GetPublishResult()
java.lang.String
GetVersion()
Service Category: Projects Service Description: Get Project version.
Get Project versionInfoTable
ListExternalDependencies()
Service Category: Projects Service Description: Lists the first level project external dependencies.org.json.JSONObject
PublishSolution()
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
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-
Methods 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 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
-
-
Method Detail
-
getEntityVersion
@ThingworxExtensionApiMethod(since={7,1}) public EntityVersion getEntityVersion()
-
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()
-
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()
-
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 java.lang.String getPublishResult()
-
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()
-
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
-
getAllDependentProjectNames
@ThingworxExtensionApiMethod(since={7,1}) public java.util.Set<java.lang.String> 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 java.lang.Exception
Get all of the entities in this project- Returns:
- EntityReferenceCollection of all the entities in the project
- Throws:
java.lang.Exception
-
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 classRootEntity
- 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.SearchModelEntitiestags
- - TagCollection of tags to matchtypes
- - 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
-
fromJSON
@Deprecated @ThingworxExtensionApiMethod(since={7,1}, deprecatedSince={8,4}) public static Project fromJSON(org.json.JSONObject jsonObject) throws java.lang.Exception
Deprecated.- Throws:
java.lang.Exception
- If an error occurs
-
-