Interface DataObjectRuntimeService

  • All Known Implementing Classes:
    DataObjectRuntimeServiceImpl

    public interface DataObjectRuntimeService
    The data object runtime service supports lookup of data object instances based on DataObjectDefinitions as well as some more data object and its definition based features. If you need strongly type support for builder and data objects then use the DataObjectDataSource for that applicable data object.
    Author:
    Micha Kiener
    • Method Detail

      • findDataObjectValueByLookupIdAndDefinitionKey

        DataObjectInstanceVariableContainer findDataObjectValueByLookupIdAndDefinitionKey​(String lookupId,
                                                                                          String dataObjectDefinitionKey)
        Lookup a single data object given by its lookup id and definition key.
        Parameters:
        lookupId - the lookup id of the data object to be returned
        dataObjectDefinitionKey - the key of the data object definition to return a data object instance for
        Returns:
        the data object instance, if found, null otherwise
      • findDataObjectValueByLookupIdAndDefinitionKey

        DataObjectInstanceVariableContainer findDataObjectValueByLookupIdAndDefinitionKey​(String lookupId,
                                                                                          String dataObjectDefinitionKey,
                                                                                          String tenantId)
        Lookup a single data object given by its lookup id and definition key.
        Parameters:
        lookupId - the lookup id of the data object to be returned
        dataObjectDefinitionKey - the key of the data object definition to return a data object instance for
        tenantId - the tenant id to return a data object instance for
        Returns:
        the data object instance, if found, null otherwise
      • findDataObjectValueByDataObjectInstanceId

        DataObjectInstanceVariableContainer findDataObjectValueByDataObjectInstanceId​(String instanceId)
        Lookup a single data object given by its instance id.
        Parameters:
        instanceId - the instance id of the data object to be returned
        Returns:
        the data object instance, if found, null otherwise
      • findDataObjectValueByLookupIdAndDefinitionId

        DataObjectInstanceVariableContainer findDataObjectValueByLookupIdAndDefinitionId​(String lookupId,
                                                                                         String dataObjectDefinitionId)
        Lookup a single data object given by its lookup id and definition id.
        Parameters:
        lookupId - the lookup id of the data object to be returned
        dataObjectDefinitionId - the id of the data object definition to return a data object instance for
        Returns:
        the data object instance, if found, null otherwise
      • createDataObjectValueInstanceBuilder

        DataObjectInstanceVariableContainerBuilder createDataObjectValueInstanceBuilder()
        Creates a new generic data object instance builder to create new data objects.
        Returns:
        the data object instance builder
      • createDataObjectValueInstanceBuilderByDefinitionKey

        DataObjectInstanceVariableContainerBuilder createDataObjectValueInstanceBuilderByDefinitionKey​(String dataObjectDefinitionKey)
        Creates a new generic data object instance builder to create new data objects.
        Parameters:
        dataObjectDefinitionKey - the key of the data object definition a new instance should be created for
        Returns:
        the data object instance builder
      • createDataObjectValueInstanceBuilderByDefinitionKeyAndTenantId

        DataObjectInstanceVariableContainerBuilder createDataObjectValueInstanceBuilderByDefinitionKeyAndTenantId​(String dataObjectDefinitionKey,
                                                                                                                  String tenantId)
        Creates a new generic data object instance builder to create new data objects.
        Parameters:
        dataObjectDefinitionKey - the key of the data object definition a new instance should be created for
        tenantId - the tenant of the data object definition
        Returns:
        the data object instance builder
      • createDataObjectValueInstanceBuilderByDefinitionId

        DataObjectInstanceVariableContainerBuilder createDataObjectValueInstanceBuilderByDefinitionId​(String dataObjectDefinitionId)
        Creates a new generic data object instance builder to create new data objects.
        Parameters:
        dataObjectDefinitionId - the id of the data object definition a new instance should be created for
        Returns:
        the data object instance builder
      • createDataObjectModificationBuilder

        DataObjectModificationBuilder createDataObjectModificationBuilder()
        Creates a new database schema data object modification builder to modify existing data objects. As we already know the data object to be modified, this method will get a modification builder through the data source handling this specific data object.
        Returns:
        the data object modification builder
      • createDataObjectModificationBuilder

        DataObjectModificationBuilder createDataObjectModificationBuilder​(String dataObjectDefinitionId)
        Creates a new database schema data object modification builder to modify existing data objects. As we already know the data object to be modified, this method will get a modification builder through the data source handling this specific data object.
        Parameters:
        dataObjectDefinitionId - the id of the data object definition for the data object to be modified
        Returns:
        the data object modification builder
      • createDataObjectInstanceQuery

        DataObjectInstanceVariableContainerQuery createDataObjectInstanceQuery()
        Creates a new generic data object instance query to query data objects.
        Returns:
        the data object query
      • createDataObjectDeletionBuilder

        DataObjectDeletionBuilder createDataObjectDeletionBuilder()
        Creates a new generic data object instance deletion builder to delete data objects.
        Returns:
        the data object deletion builder
      • deleteDataObject

        void deleteDataObject​(String lookupId,
                              String dataObjectDefinitionId)
        Deletes the specified data object given by its lookup id and data object definition.
        Parameters:
        lookupId - the lookup id of the data object to be deleted
        dataObjectDefinitionId - the id of the data object definition the data object is specified with
      • getIdentityLinksForDataObjectInstance

        List<IdentityLink> getIdentityLinksForDataObjectInstance​(String lookupId,
                                                                 String dataObjectDefinitionKey)
        Retrieves the IdentityLinks associated with the given data object instance. Such an IdentityLink informs how a certain user is involved with a data object instance
      • addUserIdentityLink

        void addUserIdentityLink​(String lookupId,
                                 String dataObjectDefinitionKey,
                                 String userId,
                                 String identityLinkType)
        Involves a user with a data object instance. The type of identity link is defined by the given identityLinkType.
        Parameters:
        lookupId - id of the lookup id, cannot be null.
        dataObjectDefinitionKey - the key of the data object definition key
        userId - id of the involved user, cannot be null.
        identityLinkType - type of identityLink, cannot be null (@see IdentityLinkType).
      • addGroupIdentityLink

        void addGroupIdentityLink​(String lookupId,
                                  String dataObjectDefinitionKey,
                                  String groupId,
                                  String identityLinkType)
        Involves a group with a data object instance. The type of identity link is defined by the given identityLinkType.
        Parameters:
        lookupId - id of the lookup id, cannot be null.
        dataObjectDefinitionKey - the key of the data object definition key
        groupId - id of the involved group, cannot be null.
        identityLinkType - type of identityLink, cannot be null (@see IdentityLinkType).
      • deleteUserIdentityLink

        void deleteUserIdentityLink​(String lookupId,
                                    String dataObjectDefinitionKey,
                                    String userId,
                                    String identityLinkType)
        Removes the association between a user and a data object instance for the given identityLinkType.
        Parameters:
        lookupId - id of the lookup id, cannot be null.
        dataObjectDefinitionKey - the key of the data object definition key
        userId - id of the involved user, cannot be null.
        identityLinkType - type of identityLink, cannot be null (@see IdentityLinkType).
      • deleteGroupIdentityLink

        void deleteGroupIdentityLink​(String lookupId,
                                     String dataObjectDefinitionKey,
                                     String groupId,
                                     String identityLinkType)
        Removes the association between a group and a data object instance for the given identityLinkType.
        Parameters:
        lookupId - id of the lookup id, cannot be null.
        dataObjectDefinitionKey - the key of the data object definition key
        groupId - id of the involved group, cannot be null.
        identityLinkType - type of identityLink, cannot be null (@see IdentityLinkType).
      • loadMasterDataInstanceData

        void loadMasterDataInstanceData​(String data,
                                        String dataObjectDefinitionId)
        Loads master data instance data into the data object engine
      • createDataObjectInstanceEntityQuery

        DataObjectInstanceEntityQuery createDataObjectInstanceEntityQuery()
        Returns a data object instance query to be used when searching for data object instances.
        Returns:
        the query instance used to specify the data object instance query terms
      • createMasterDataInstanceQuery

        MasterDataInstanceQuery createMasterDataInstanceQuery()
        Returns a master data instance query to be used when searching for master data instances.
        Returns:
        the query instance used to specify the master data instance query terms
      • createMasterDataInstanceBuilder

        MasterDataInstanceBuilder createMasterDataInstanceBuilder()
        Creates a builder to add a new master data instance
        Returns:
        the master data instance builder
      • createMasterDataInstanceImportBuilder

        MasterDataInstanceImportBuilder createMasterDataInstanceImportBuilder()
        Creates a loader to add a new master data instances from a document.
        Returns:
        the master data instance loader
      • getMasterDataInstanceVariables

        Map<String,​Object> getMasterDataInstanceVariables​(String masterDataInstanceId)
        Get the variables for the master data instance with the provided id
        Returns:
        the master data instance variables
      • saveMasterDataInstance

        MasterDataInstance saveMasterDataInstance​(MasterDataInstance masterDataInstance)
        Saves an updated master data instance
        Returns:
        the updated master data instance
      • deleteMasterDataInstancesByDefinitionId

        void deleteMasterDataInstancesByDefinitionId​(String dataObjectDefinitionId)
        Deletes master data instances by data object definition id
      • deleteDataObjectVariablesByInstanceId

        void deleteDataObjectVariablesByInstanceId​(String dataInstanceId)
        Deletes data object variables by master instance id