org.eclipse.stardust.engine.api.runtime
Interface QueryService

All Superinterfaces:
org.eclipse.stardust.engine.api.runtime.Service

@TransientState
public interface QueryService
extends org.eclipse.stardust.engine.api.runtime.Service

to set SessionProperties.DS_NAME_READ_ONLY used in DataValueBean


Method Summary
 List<Department> findAllDepartments(DepartmentInfo parent, OrganizationInfo organization)
          Retrieves all the departments satisfying the search criteria.
 Department findDepartment(DepartmentInfo parent, String id, OrganizationInfo info)
          Searches for a department having the specified id in the scope defined by the parent department.
 ActivityInstance findFirstActivityInstance(ActivityInstanceQuery query)
          Retrieves the first ActivityInstance satisfying the criteria specified in the provided query.
 Document findFirstDocument(DocumentQuery query)
          Deprecated. since 8.0 use DocumentManagementService.findDocuments(DocumentQuery).
 LogEntry findFirstLogEntry(LogEntryQuery query)
          Retrieves the first LogEntry satisfying the criteria specified in the provided query.
 ProcessInstance findFirstProcessInstance(ProcessInstanceQuery query)
          Retrieves the first ProcessInstance satisfying the criteria specified in the provided query.
 User findFirstUser(UserQuery query)
          Retrieves the first User satisfying the criteria specified in the provided query.
 UserGroup findFirstUserGroup(UserGroupQuery query)
          Retrieves the first UserGroup satisfying the criteria specified in the provided query.
 DeployedModel getActiveModel()
          Deprecated. This method returns the active model with the highest priority. Use getModels(DeployedModelQuery.findActive()) to retrieve all active models.
 DeployedModelDescription getActiveModelDescription()
          Deprecated. This method returns the description of the active model with the highest priority. Use getModels(DeployedModelQuery.findActive()) to retrieve all active models.
 long getActivityInstancesCount(ActivityInstanceQuery query)
          Counts the number of activity instances satisfying the criteria specified in the provided query.
 ActivityInstances getAllActivityInstances(ActivityInstanceQuery query)
          Retrieves all activity instances satisfying the criteria specified in the provided query.
 List<DeployedModelDescription> getAllAliveModelDescriptions()
          Deprecated. Use getModels(DeployedModelQuery.findInState(DeployedModelQuery.ALIVE)).
 BusinessObjects getAllBusinessObjects(BusinessObjectQuery query)
          Returns the business objects satisfying the query.
 org.eclipse.stardust.engine.api.runtime.DataQueryResult getAllData(DataQuery query)
          Retrieves all data satisfying the criteria specified in the provided query.
 Documents getAllDocuments(DocumentQuery query)
          Deprecated. since 8.0 use DocumentManagementService.findDocuments(DocumentQuery).
 LogEntries getAllLogEntries(LogEntryQuery query)
          Retrieves all log entries satisfying the criteria specified in the provided query.
 List<DeployedModelDescription> getAllModelDescriptions()
          Deprecated. Use getModels(DeployedModelQuery.findAll()).
 List<Participant> getAllParticipants()
          Retrieves all the participants for all active models.
 List<Participant> getAllParticipants(long modelOID)
          Retrieves all participants defined in the specified model.
 List<Preferences> getAllPreferences(PreferenceQuery preferenceQuery)
          Retrieves preferences satisfying the criteria specified in the provided query.
 List<ProcessDefinition> getAllProcessDefinitions()
          Retrieves all process definitions for all active models.
 List<ProcessDefinition> getAllProcessDefinitions(long modelOID)
          Retrieves all the process definitions contained in the specified model.
 List<ProcessInstanceLinkType> getAllProcessInstanceLinkTypes()
          Gets all process instance link types defined.
 ProcessInstances getAllProcessInstances(ProcessInstanceQuery query)
          Retrieves all process instances satisfying the criteria specified in the provided query.
 UserGroups getAllUserGroups(UserGroupQuery query)
          Retrieves all user groups satisfying the criteria specified in the provided query.
 Users getAllUsers(UserQuery query)
          Retrieves all users satisfying the criteria specified in the provided query.
 List<ActivityInstance> getAuditTrail(long processInstanceOID)
          Returns all performed activity instances for the specified process instance.
 long getLogEntriesCount(LogEntryQuery query)
          Counts the number of log entries satisfying the criteria specified in the provided query.
 DeployedModel getModel(long modelOID)
          Retrieves the specified model.
 DeployedModel getModel(long modelOID, boolean computeAliveness)
          Retrieves the specified model.
 String getModelAsXML(long modelOID)
          Retrieves the XML representation of the specified model.
 DeployedModelDescription getModelDescription(long modelOID)
          Retrieves the description of the specified model.
 Models getModels(DeployedModelQuery query)
          Retrieves the model descriptions satisfying the criteria specified in the provided query.
 Participant getParticipant(long modelOID, String id)
          Retrieves a participant from a specified model.
 Participant getParticipant(String id)
          Retrieves a specific participant from the active model.
 List<Permission> getPermissions()
          Retrieves all permissions the current user has on this service.
 Preferences getPreferences(PreferenceScope scope, String moduleId, String preferencesId)
          Retrieves preferences from the given scope.
 ProcessDefinition getProcessDefinition(long modelOID, String id)
          Retrieves a process definition from the specified model.
 ProcessDefinition getProcessDefinition(String id)
          Retrieves the specified process definition from the active model.
 ProcessDefinitions getProcessDefinitions(ProcessDefinitionQuery query)
           
 ProcessInstanceLinkType getProcessInstanceLinkType(String id)
          Gets a specific process instance link type.
 long getProcessInstancesCount(ProcessInstanceQuery query)
          Counts the number of process instances satisfying the criteria specified in the provided query.
 ResourceBundle getResourceBundle(String moduleId, String bundleName, Locale locale)
          Retrieves a resource bundle from a specified moduleId.
 RuntimeArtifact getRuntimeArtifact(long oid)
          Retrieves the artifact by the unique oid.
 org.eclipse.stardust.engine.api.query.DeployedRuntimeArtifacts getRuntimeArtifacts(DeployedRuntimeArtifactQuery query)
          Retrieves all DeployedRuntimeArtifacts satisfying the criteria specified in the provided query.
 RuntimeEnvironmentInfo getRuntimeEnvironmentInfo()
          Retrieves the information about the deployed runtime environment (e.g.
 byte[] getSchemaDefinition(long modelOID, String typeDeclarationId)
          Retrieves XSD schema of the specified type declaration serialized into a byte[].
 long getUserGroupsCount(UserGroupQuery query)
          Counts the number of user groups satisfying the criteria specified in the provided query.
 long getUsersCount(UserQuery query)
          Counts the number of users satisfying the criteria specified in the provided query.
 boolean wasRedeployed(long modelOid, int revision)
          Determines if the model was redeployed, i.e.
 

Method Detail

getUsersCount

@ExecutionPermission(id=readUserData,
                     defaults=ALL)
long getUsersCount(UserQuery query)
Counts the number of users satisfying the criteria specified in the provided query.

Parameters:
query - the user query.
Returns:
the user count.

getUserGroupsCount

@ExecutionPermission(id=readUserData,
                     defaults=ALL)
long getUserGroupsCount(UserGroupQuery query)
Counts the number of user groups satisfying the criteria specified in the provided query.

Parameters:
query - the user group query.
Returns:
the user group count.

getProcessInstancesCount

@ExecutionPermission(id=readProcessInstanceData,
                     scope=processDefinition,
                     defer=true,
                     defaults=ALL)
long getProcessInstancesCount(ProcessInstanceQuery query)
                              throws IllegalOperationException
Counts the number of process instances satisfying the criteria specified in the provided query.

Parameters:
query - the process instance query.
Returns:
the process instance count.
Throws:
IllegalOperationException - if no attributeName (XPath) is specified in a DataFilter for queries on a structured data
IllegalOperationException - if attributeName (XPath) is specified in a DataFilter for queries on a non-structured data
IllegalOperationException - if attributeName (XPath) specified in a DataFilter contains an invalid XPath
IllegalOperationException - if PerformingOnBehalfOfFilter is used but activity instance history is disabled.

getActivityInstancesCount

@ExecutionPermission(id=readActivityInstanceData,
                     scope=activity,
                     defer=true,
                     defaults=ALL,
                     fixed=OWNER)
long getActivityInstancesCount(ActivityInstanceQuery query)
                               throws IllegalOperationException
Counts the number of activity instances satisfying the criteria specified in the provided query.

Parameters:
query - the activity instance query.
Returns:
the activity instance count.
Throws:
IllegalOperationException - if no attributeName (XPath) is specified in a DataFilter for queries on a structured data
IllegalOperationException - if attributeName (XPath) is specified in a DataFilter for queries on a non-structured data
IllegalOperationException - if attributeName (XPath) specified in a DataFilter contains an invalid XPath
IllegalOperationException - if PerformingOnBehalfOfFilter is used but activity instance history is disabled.

getLogEntriesCount

@ExecutionPermission(id=readAuditTrailStatistics)
long getLogEntriesCount(LogEntryQuery query)
Counts the number of log entries satisfying the criteria specified in the provided query.

Parameters:
query - the log entry query.
Returns:
the log entry count.

getAllUsers

@ExecutionPermission(id=readUserData,
                     defaults=ALL)
Users getAllUsers(UserQuery query)
Retrieves all users satisfying the criteria specified in the provided query.

Parameters:
query - the user query.
Returns:
a List of User objects.

getAllUserGroups

@ExecutionPermission(id=readUserData,
                     defaults=ALL)
UserGroups getAllUserGroups(UserGroupQuery query)
Retrieves all user groups satisfying the criteria specified in the provided query.

Parameters:
query - the user group query.
Returns:
A list of UserGroup objects.

getAllProcessInstances

@ExecutionPermission(id=readProcessInstanceData,
                     scope=processDefinition,
                     defer=true,
                     defaults=ALL)
ProcessInstances getAllProcessInstances(ProcessInstanceQuery query)
                                        throws IllegalOperationException
Retrieves all process instances satisfying the criteria specified in the provided query.

Parameters:
query - the process instance query.
Returns:
a List of ProcessInstance objects.
Throws:
IllegalOperationException - if no attributeName (XPath) is specified in a DataFilter for queries on a structured data
IllegalOperationException - if attributeName (XPath) is specified in a DataFilter for queries on a non-structured data
IllegalOperationException - if attributeName (XPath) specified in a DataFilter contains an invalid XPath
IllegalOperationException - if PerformingOnBehalfOfFilter is used but activity instance history is disabled.

getAllActivityInstances

@ExecutionPermission(id=readActivityInstanceData,
                     scope=activity,
                     defer=true,
                     defaults=ALL,
                     fixed=OWNER)
ActivityInstances getAllActivityInstances(ActivityInstanceQuery query)
                                          throws IllegalOperationException
Retrieves all activity instances satisfying the criteria specified in the provided query.

Parameters:
query - the activity instance query.
Returns:
a List of ActivityInstance objects.
Throws:
IllegalOperationException - if no attributeName (XPath) is specified in a DataFilter for queries on a structured data
IllegalOperationException - if attributeName (XPath) is specified in a DataFilter for queries on a non-structured data
IllegalOperationException - if attributeName (XPath) specified in a DataFilter contains an invalid XPath
IllegalOperationException - if PerformingOnBehalfOfFilter is used but activity instance history is disabled.

getAllLogEntries

@ExecutionPermission(id=readAuditTrailStatistics)
LogEntries getAllLogEntries(LogEntryQuery query)
                            throws org.eclipse.stardust.common.error.AccessForbiddenException
Retrieves all log entries satisfying the criteria specified in the provided query.

Parameters:
query - the log entry query.
Returns:
a List of LogEntry objects.
Throws:
org.eclipse.stardust.common.error.AccessForbiddenException

findFirstUser

@ExecutionPermission(id=readUserData,
                     defaults=ALL)
User findFirstUser(UserQuery query)
                   throws org.eclipse.stardust.common.error.ObjectNotFoundException
Retrieves the first User satisfying the criteria specified in the provided query.

Parameters:
query - the user query.
Returns:
the first matching user.
Throws:
org.eclipse.stardust.common.error.ObjectNotFoundException - if no matching user is found.

findFirstUserGroup

@ExecutionPermission(id=readUserData,
                     defaults=ALL)
UserGroup findFirstUserGroup(UserGroupQuery query)
                             throws org.eclipse.stardust.common.error.ObjectNotFoundException
Retrieves the first UserGroup satisfying the criteria specified in the provided query.

Parameters:
query - the user group query.
Returns:
the first matching user group.
Throws:
org.eclipse.stardust.common.error.ObjectNotFoundException - if no matching user group is found.

findFirstProcessInstance

@ExecutionPermission(id=readProcessInstanceData,
                     scope=processDefinition,
                     defer=true,
                     defaults=ALL)
ProcessInstance findFirstProcessInstance(ProcessInstanceQuery query)
                                         throws org.eclipse.stardust.common.error.ObjectNotFoundException,
                                                IllegalOperationException
Retrieves the first ProcessInstance satisfying the criteria specified in the provided query.

Parameters:
query - the process instance query.
Returns:
the first matching process instance.
Throws:
org.eclipse.stardust.common.error.ObjectNotFoundException - if no matching process instance is found.
IllegalOperationException - if no attributeName (XPath) is specified in a DataFilter for queries on a structured data
IllegalOperationException - if attributeName (XPath) is specified in a DataFilter for queries on a non-structured data
IllegalOperationException - if attributeName (XPath) specified in a DataFilter contains an invalid XPath
IllegalOperationException - if PerformingOnBehalfOfFilter is used but activity instance history is disabled.

findFirstActivityInstance

@ExecutionPermission(id=readActivityInstanceData,
                     scope=activity,
                     defer=true,
                     defaults=ALL,
                     fixed=OWNER)
ActivityInstance findFirstActivityInstance(ActivityInstanceQuery query)
                                           throws org.eclipse.stardust.common.error.ObjectNotFoundException,
                                                  IllegalOperationException
Retrieves the first ActivityInstance satisfying the criteria specified in the provided query.

Parameters:
query - the activity instance query.
Returns:
the first matching activity instance.
Throws:
org.eclipse.stardust.common.error.ObjectNotFoundException - if no matching activity instance is found.
IllegalOperationException - if no attributeName (XPath) is specified in a DataFilter for queries on a structured data
IllegalOperationException - if attributeName (XPath) is specified in a DataFilter for queries on a non-structured data
IllegalOperationException - if attributeName (XPath) specified in a DataFilter contains an invalid XPath
IllegalOperationException - if PerformingOnBehalfOfFilter is used but activity instance history is disabled.

findFirstLogEntry

@ExecutionPermission(id=readAuditTrailStatistics)
LogEntry findFirstLogEntry(LogEntryQuery query)
                           throws org.eclipse.stardust.common.error.ObjectNotFoundException
Retrieves the first LogEntry satisfying the criteria specified in the provided query.

Parameters:
query - the log entry query.
Returns:
the first matching log entry.
Throws:
org.eclipse.stardust.common.error.ObjectNotFoundException - if no matching log entry is found.

getAuditTrail

@ExecutionPermission(id=readActivityInstanceData,
                     scope=activity,
                     defer=true,
                     defaults=ALL,
                     fixed=OWNER)
List<ActivityInstance> getAuditTrail(long processInstanceOID)
                                     throws org.eclipse.stardust.common.error.ObjectNotFoundException
Returns all performed activity instances for the specified process instance.

Parameters:
processInstanceOID - the OID of the process instance from where we retrieve the audit trail.
Returns:
a List of ActivityInstance objects.
Throws:
org.eclipse.stardust.common.error.ObjectNotFoundException - if there is no process instance with the specified OID.

getAllBusinessObjects

@ExecutionPermission(id=readDataValues,
                     scope=data,
                     defer=true,
                     defaults=ALL)
BusinessObjects getAllBusinessObjects(BusinessObjectQuery query)
Returns the business objects satisfying the query.

Parameters:
query - the business objects query.
Returns:
a list of business objects, possibly empty.

getAllModelDescriptions

@ExecutionPermission(id=readModelData,
                     defaults=ALL)
List<DeployedModelDescription> getAllModelDescriptions()
Deprecated. Use getModels(DeployedModelQuery.findAll()).

Retrieves the list of model descriptions for all deployed models.

Returns:
a List of DeployedModelDescription objects.

getAllAliveModelDescriptions

@ExecutionPermission(id=readModelData,
                     defaults=ALL)
List<DeployedModelDescription> getAllAliveModelDescriptions()
Deprecated. Use getModels(DeployedModelQuery.findInState(DeployedModelQuery.ALIVE)).

Retrieves the list of model descriptions for all alive models. Whereby alive models are models with non-completed and non-aborted processes plus the active model.

Returns:
a List of DeployedModelDescription objects.

getActiveModelDescription

@ExecutionPermission(id=readModelData,
                     defaults=ALL)
DeployedModelDescription getActiveModelDescription()
                                                   throws org.eclipse.stardust.common.error.ObjectNotFoundException
Deprecated. This method returns the description of the active model with the highest priority. Use getModels(DeployedModelQuery.findActive()) to retrieve all active models.

Retrieves the current active model description.

Returns:
the description of the active model.
Throws:
org.eclipse.stardust.common.error.ObjectNotFoundException - if there is no active model.

getModels

@ExecutionPermission(id=readModelData,
                     defaults=ALL)
Models getModels(DeployedModelQuery query)
Retrieves the model descriptions satisfying the criteria specified in the provided query.

Parameters:
query - the deployed model query.
Returns:
a List of DeployedModelDescription objects.

getModelDescription

@ExecutionPermission(id=readModelData,
                     defaults=ALL)
DeployedModelDescription getModelDescription(long modelOID)
                                             throws org.eclipse.stardust.common.error.ObjectNotFoundException
Retrieves the description of the specified model.

Parameters:
modelOID - the oid of the model to retrieve.
Returns:
the description of the specified model.
Throws:
org.eclipse.stardust.common.error.ObjectNotFoundException - if there is no model with the specified OID.

wasRedeployed

@ExecutionPermission(id=readModelData,
                     defaults=ALL)
boolean wasRedeployed(long modelOid,
                                                                    int revision)
Determines if the model was redeployed, i.e. if a more recent revision than the provided one is available.

Parameters:
modelOid - The OID of the model to be checked..
revision - The currently retrieved revision of the model.
Returns:
true if a more recent revision of the model is available, false if not.

getModel

@ExecutionPermission(id=readModelData,
                     defaults=ALL)
DeployedModel getModel(long modelOID)
                       throws org.eclipse.stardust.common.error.ObjectNotFoundException
Retrieves the specified model.

Parameters:
modelOID - the oid of the model to retrieve.
Returns:
the specified model.
Throws:
org.eclipse.stardust.common.error.ObjectNotFoundException - if there is no model with the specified OID.

getModel

@ExecutionPermission(id=readModelData,
                     defaults=ALL)
DeployedModel getModel(long modelOID,
                                                                     boolean computeAliveness)
                       throws org.eclipse.stardust.common.error.ObjectNotFoundException
Retrieves the specified model.

Parameters:
modelOID - the oid of the model to retrieve.
computeAliveness - whether the aliveness of the model should be computed or not
Returns:
the specified model.
Throws:
org.eclipse.stardust.common.error.ObjectNotFoundException - if there is no model with the specified OID.

getActiveModel

@ExecutionPermission(id=readModelData,
                     defaults=ALL)
DeployedModel getActiveModel()
                             throws org.eclipse.stardust.common.error.ObjectNotFoundException
Deprecated. This method returns the active model with the highest priority. Use getModels(DeployedModelQuery.findActive()) to retrieve all active models.

Retrieves the current active model.

Returns:
the active model.
Throws:
org.eclipse.stardust.common.error.ObjectNotFoundException - if there is no active model.

getModelAsXML

@ExecutionPermission(id=readModelData,
                     defaults=ALL)
String getModelAsXML(long modelOID)
                     throws org.eclipse.stardust.common.error.ObjectNotFoundException
Retrieves the XML representation of the specified model.

Parameters:
modelOID - the oid of the model to retrieve.
Returns:
A string containing the XML representation of the model.
Throws:
org.eclipse.stardust.common.error.ObjectNotFoundException - if there is no model with the specified OID.

getAllProcessDefinitions

@ExecutionPermission(id=readModelData,
                     defaults=ALL)
List<ProcessDefinition> getAllProcessDefinitions(long modelOID)
                                                 throws org.eclipse.stardust.common.error.ObjectNotFoundException
Retrieves all the process definitions contained in the specified model.

Parameters:
modelOID - the oid of the model.
Returns:
a List of ProcessDefinition objects.
Throws:
org.eclipse.stardust.common.error.ObjectNotFoundException - if there is no model with the specified OID.

getProcessDefinition

@ExecutionPermission(id=readModelData,
                     defaults=ALL)
ProcessDefinition getProcessDefinition(long modelOID,
                                                                                     String id)
                                       throws org.eclipse.stardust.common.error.ObjectNotFoundException
Retrieves a process definition from the specified model.

Parameters:
modelOID - the oid of the model.
id - the id of the process definition.
Returns:
the process definition.
Throws:
org.eclipse.stardust.common.error.ObjectNotFoundException - if there is no model with the specified OID or there is no process definition with the specified id in the model.

getAllProcessDefinitions

@ExecutionPermission(id=readModelData,
                     defaults=ALL)
List<ProcessDefinition> getAllProcessDefinitions()
                                                 throws org.eclipse.stardust.common.error.ObjectNotFoundException
Retrieves all process definitions for all active models.

Returns:
a List of ProcessDefinition objects.
Throws:
org.eclipse.stardust.common.error.ObjectNotFoundException - if there is no active model.

getProcessDefinition

@ExecutionPermission(id=readModelData,
                     defaults=ALL)
ProcessDefinition getProcessDefinition(String id)
                                       throws org.eclipse.stardust.common.error.ObjectNotFoundException
Retrieves the specified process definition from the active model.

Parameters:
id - the id of the process definition.
Returns:
the process definition.
Throws:
org.eclipse.stardust.common.error.ObjectNotFoundException - if there is no active model or if the active model does not contain the requested process definition.

getProcessDefinitions

@ExecutionPermission(id=readModelData,
                     defaults=ALL)
ProcessDefinitions getProcessDefinitions(ProcessDefinitionQuery query)

getAllData

@ExecutionPermission(id=readModelData,
                     defaults=ALL)
org.eclipse.stardust.engine.api.runtime.DataQueryResult getAllData(DataQuery query)
Retrieves all data satisfying the criteria specified in the provided query.

Parameters:
query - The DataQuery.
Returns:
A list of Data objects.

getAllParticipants

@ExecutionPermission(id=readModelData,
                     defaults=ALL)
List<Participant> getAllParticipants(long modelOID)
                                     throws org.eclipse.stardust.common.error.ObjectNotFoundException
Retrieves all participants defined in the specified model.

Parameters:
modelOID - the oid of the model.
Returns:
a List of Participant objects.
Throws:
org.eclipse.stardust.common.error.ObjectNotFoundException - if there is no model with the specified oid.

getParticipant

@ExecutionPermission(id=readModelData,
                     defaults=ALL)
Participant getParticipant(long modelOID,
                                                                         String id)
                           throws org.eclipse.stardust.common.error.ObjectNotFoundException
Retrieves a participant from a specified model.

Parameters:
modelOID - the oid of the model.
id - the id of the participant.
Returns:
the participant.
Throws:
org.eclipse.stardust.common.error.ObjectNotFoundException - if there is no model with the specified oid, or the model does not contains the requested participant.

getAllParticipants

@ExecutionPermission(id=readModelData,
                     defaults=ALL)
List<Participant> getAllParticipants()
                                     throws org.eclipse.stardust.common.error.ObjectNotFoundException
Retrieves all the participants for all active models.

Returns:
a List of Participant objects.
Throws:
org.eclipse.stardust.common.error.ObjectNotFoundException - if there is no active model.

getParticipant

@ExecutionPermission(id=readModelData,
                     defaults=ALL)
Participant getParticipant(String id)
                           throws org.eclipse.stardust.common.error.ObjectNotFoundException
Retrieves a specific participant from the active model.

Parameters:
id - the id of the participant.
Returns:
the participant.
Throws:
org.eclipse.stardust.common.error.ObjectNotFoundException - if there is no active model, or if the active model does not contain the requested participant.

getPermissions

@ExecutionPermission
List<Permission> getPermissions()
Retrieves all permissions the current user has on this service.

Returns:
a list of permission ids.

getSchemaDefinition

@ExecutionPermission(id=readModelData,
                     defaults=ALL)
byte[] getSchemaDefinition(long modelOID,
                                                                         String typeDeclarationId)
                           throws org.eclipse.stardust.common.error.ObjectNotFoundException
Retrieves XSD schema of the specified type declaration serialized into a byte[].

Parameters:
modelOID - the oid of the model.
typeDeclarationId - the id of the type declaration.
Returns:
XSD schema of this type declaration
Throws:
org.eclipse.stardust.common.error.ObjectNotFoundException - if there is no active model, or if the active model does not contain the requested type declaration.

findAllDepartments

@ExecutionPermission(id=readDepartments,
                     defaults=ALL)
List<Department> findAllDepartments(DepartmentInfo parent,
                                                                                    OrganizationInfo organization)
                                    throws org.eclipse.stardust.common.error.ObjectNotFoundException
Retrieves all the departments satisfying the search criteria. The search is performed as following: On synchronization departments will be updated when existing in audit trail and having any changes. If a department does not exist in audit trail but is present in external repository the department will not be created in audit trail on synchronization with external repository.

Parameters:
parent - the parent department.
organization - the organization to which the retrieved departments are assigned.
Returns:
the list of departments. The list can be empty if no departments are matching the search criteria.
Throws:
org.eclipse.stardust.common.error.ObjectNotFoundException - if either the parent or the organization could not be resolved.

findDepartment

@ExecutionPermission(id=readDepartments,
                     defaults=ALL)
Department findDepartment(DepartmentInfo parent,
                                                                          String id,
                                                                          OrganizationInfo info)
                          throws org.eclipse.stardust.common.error.ObjectNotFoundException
Searches for a department having the specified id in the scope defined by the parent department. On synchronization with external repository the specified department will be created in audit trail if it is not already present there but exists in external repository. If the department exists in audit trail it will be updated on synchronization if there are any changes.

Parameters:
parent - the search scope. It can be null, in which case the search scope is the top level.
id - the id of the department. Must not be null or empty.
info - the organization to which the retrieved departments are assigned.
Returns:
the department having the specified id.
Throws:
org.eclipse.stardust.common.error.ObjectNotFoundException - if the parent could not be resolved or if the specified id is null or empty or if there is no department with the specified id in the parent scope.

findFirstDocument

@ExecutionPermission
@Deprecated
Document findFirstDocument(DocumentQuery query)
                           throws org.eclipse.stardust.common.error.ObjectNotFoundException
Deprecated. since 8.0 use DocumentManagementService.findDocuments(DocumentQuery).

Retrieves the first document satisfying the criteria specified in the provided query.

Parameters:
query - the document query.
Returns:
the first matching document.
Throws:
org.eclipse.stardust.common.error.ObjectNotFoundException - if no matching document is found.

getAllDocuments

@ExecutionPermission
@Deprecated
Documents getAllDocuments(DocumentQuery query)
Deprecated. since 8.0 use DocumentManagementService.findDocuments(DocumentQuery).

Retrieves all documents satisfying the criteria specified in the provided query.

Parameters:
query - the document query.
Returns:
a List of Document objects.

getPreferences

@ExecutionPermission
Preferences getPreferences(PreferenceScope scope,
                                               String moduleId,
                                               String preferencesId)
Retrieves preferences from the given scope.

Parameters:
scope - the scope from which the preferences are to be retrieved from.
moduleId - the moduleId of the preferences.
preferencesId - the id of the preferences.
Returns:
a preferences object.
Throws:
org.eclipse.stardust.common.error.PublicException - if scope is null.

getAllPreferences

@ExecutionPermission
List<Preferences> getAllPreferences(PreferenceQuery preferenceQuery)
Retrieves preferences satisfying the criteria specified in the provided query.

Parameters:
preferenceQuery - the preference query.
Returns:
a list of preferences.
Throws:
org.eclipse.stardust.common.error.PublicException - if querying is not supported for the specified PreferenceScope.
UnsupportedOperationException - if the PreferenceQuery contains unsupported terms or operations.
org.eclipse.stardust.common.error.InvalidArgumentException - if preferencesQuery is null.

getRuntimeEnvironmentInfo

@ExecutionPermission
RuntimeEnvironmentInfo getRuntimeEnvironmentInfo()
Retrieves the information about the deployed runtime environment (e.g. version information).

Returns:
the runtime environment information.

getResourceBundle

@ExecutionPermission
ResourceBundle getResourceBundle(String moduleId,
                                                     String bundleName,
                                                     Locale locale)
Retrieves a resource bundle from a specified moduleId.

Parameters:
moduleId - The id of the engine resource bundle module.
bundleName - The name of the bundle.
locale - The to retrieve the resource bundle for.
Returns:
The ResourceBundle or null if no ResourceBundle was found.

getRuntimeArtifact

@ExecutionPermission(id=readRuntimeArtifact,
                     defaults=ALL)
RuntimeArtifact getRuntimeArtifact(long oid)
Retrieves the artifact by the unique oid.

Parameters:
oid - The oid of the artifact.
Returns:
The artifact or null if it does not exist.

getRuntimeArtifacts

@ExecutionPermission(id=readRuntimeArtifact,
                     defaults=ALL)
org.eclipse.stardust.engine.api.query.DeployedRuntimeArtifacts getRuntimeArtifacts(DeployedRuntimeArtifactQuery query)
Retrieves all DeployedRuntimeArtifacts satisfying the criteria specified in the provided query.

Parameters:
query - the deployed runtime artifact query.
Returns:
The deployed runtime artifacts matching the specified criteria.

getProcessInstanceLinkType

@ExecutionPermission
ProcessInstanceLinkType getProcessInstanceLinkType(String id)
Gets a specific process instance link type.

Parameters:
id - the in of the process instance link type.
Returns:
the process instance link type.
Throws:
org.eclipse.stardust.common.error.ObjectNotFoundException - if there is no process instance link type with the specified id.

getAllProcessInstanceLinkTypes

@ExecutionPermission
List<ProcessInstanceLinkType> getAllProcessInstanceLinkTypes()
Gets all process instance link types defined.

Returns:
a list of process instance link types.


Copyright © 2017 Eclipse Stardust. All Rights Reserved.