Interface TemplateChangeService
- All Known Implementing Classes:
TemplateChangeServiceImpl
public interface TemplateChangeService
This service handles the runtime change of a template or template definition with an optional change / approval process to be triggered.
- Author:
- Micha Kiener
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
deployTemplateVariationContentChange
(String templateVariationId, String tenantId, String newVariationContent, String newVariationContentResource) Directly changes and deploys the variation content of the given template variation at runtime.void
deployTemplateVariationContentChange
(String templateVariationId, String tenantId, String newVariationContent, String newVariationContentResource, String externalId) Directly changes and deploys the variation content of the given template variation at runtime.findApprovalProcessInstance
(String combinedTemplateVariationKey, String tenantId) Find a running approval / change process for the specified template variation.void
triggerTemplateVariationContentChange
(String templateVariationId, String tenantId, UpdateTemplateVariationRequest updateRequest) Changes and deploys the variation content of the given template variation at runtime.
-
Field Details
-
PRC_VAR_NAME_TPL_DEF_ID
- See Also:
-
PRC_VAR_NAME_NEW_CONTENT
- See Also:
-
PRC_VAR_NAME_NEW_CONTENT_RESOURCE
- See Also:
-
PRC_VAR_NAME_NEW_EXTERNAL_ID
- See Also:
-
PRC_VAR_NAME_TRIGGERING_USER_ID
- See Also:
-
PRC_VAR_NAME_APPROVED
- See Also:
-
PRC_VAR_NAME_TRIGGERING_USER_NAME
- See Also:
-
AUDIT_ENTRY_TYPE_DEPLOYMENT
- See Also:
-
AUDIT_ENTRY_SUB_TYPE_TEMPLATE_VARIATION
- See Also:
-
AUDIT_ENTRY_VAR_NAME_CHANGE_USER_ID
- See Also:
-
AUDIT_ENTRY_VAR_NAME_APPROVAL_USER_ID
- See Also:
-
AUDIT_ENTRY_VAR_OLD_VERSION_TIMESTAMP
- See Also:
-
-
Method Details
-
triggerTemplateVariationContentChange
void triggerTemplateVariationContentChange(String templateVariationId, String tenantId, UpdateTemplateVariationRequest updateRequest) Changes and deploys the variation content of the given template variation at runtime. This will start a change / approval process, if configured. And if that's the case, the change and deploy does not happen immediately, but will be done as part of the process. If there is no such process in place, this method will directly invokedeployTemplateVariationContentChange(String, String, String, String)
.- Parameters:
templateVariationId
- the id of the template variation to change its variation contentupdateRequest
- the update request containing the necessary data (e.g. new variation content, etc) for the update
-
deployTemplateVariationContentChange
void deployTemplateVariationContentChange(String templateVariationId, String tenantId, String newVariationContent, String newVariationContentResource) Directly changes and deploys the variation content of the given template variation at runtime. This method is either invoked bytriggerTemplateVariationContentChange(String, String, UpdateTemplateVariationRequest)
or as part of the change / approval process to eventually deploy the changed content.- Parameters:
templateVariationId
- the id of the template variation to change and deploy its contenttenantId
- the optional id of the tenantnewVariationContent
- the new variation content to change and deploy (can be null ifnewVariationContentResource
is passed)newVariationContentResource
- the new variation content resource to change and deploy (can be null ifnewVariationContent
is passed)
-
deployTemplateVariationContentChange
void deployTemplateVariationContentChange(String templateVariationId, String tenantId, String newVariationContent, String newVariationContentResource, String externalId) Directly changes and deploys the variation content of the given template variation at runtime. This method is either invoked bytriggerTemplateVariationContentChange(String, String, UpdateTemplateVariationRequest)
or as part of the change / approval process to eventually deploy the changed content.- Parameters:
templateVariationId
- the ID of the template variation to change and deploy its contenttenantId
- the optional ID of the tenantnewVariationContent
- the new variation content to change and deploy (can be null ifnewVariationContentResource
is passed)newVariationContentResource
- the new variation content resource to change and deploy (can be null ifnewVariationContent
is passed)externalId
- the new external ID
-
findApprovalProcessInstance
Find a running approval / change process for the specified template variation.- Parameters:
combinedTemplateVariationKey
- the combined id of the template and variation key (as being returned byTemplateVariationModel.getKey()
- Returns:
- the optional, running approval process, if any found, null otherwise
-