com.adobe.granite.workflow.model.WorkflowModel Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aem-sdk-api Show documentation
Show all versions of aem-sdk-api Show documentation
The Adobe Experience Manager SDK
/*************************************************************************
*
* ADOBE CONFIDENTIAL
* __________________
*
* Copyright 2012 Adobe Systems Incorporated
* All Rights Reserved.
*
* NOTICE: All information contained herein is, and remains
* the property of Adobe Systems Incorporated and its suppliers,
* if any. The intellectual and technical concepts contained
* herein are proprietary to Adobe Systems Incorporated and its
* suppliers and are protected by trade secret or copyright law.
* Dissemination of this information or reproduction of this material
* is strictly forbidden unless prior written permission is obtained
* from Adobe Systems Incorporated.
**************************************************************************/
package com.adobe.granite.workflow.model;
import java.util.List;
import java.util.Map;
import com.adobe.granite.workflow.HasMetaData;
import org.osgi.annotation.versioning.ProviderType;
/**
* WorkflowModel
represents a model/definition of a workflow.
*
* It provides methods for retrieving the entities of the model like
* {@link WorkflowNode}
s and
* {@link WorkflowTransition}
s as well as common model attributes
* like name, description or version.
*/
@ProviderType
public interface WorkflowModel extends HasMetaData {
/**
* Returns the ID of the WorkflowModel
.
*
* @return The ID of the WorkflowModel
.
*/
String getId();
/**
* Returns the title of the WorkflowModel
.
*
* @return The title of the WorkflowModel
.
*/
String getTitle();
/**
* Sets the title of the WorkflowModel
.
*
* @param title
* The new title of the WorkflowModel
.
*/
void setTitle(String title);
/**
* Returns the description of the WorkflowModel
.
*
* @return The description of the WorkflowModel
.
*/
String getDescription();
/**
* Sets the description of the WorkflowModel
.
*
* @param description
* The new description of the WorkflowModel
.
*/
void setDescription(String description);
/**
* Returns the version of the WorkflowModel
.
*
* @return The version of the WorkflowModel
.
*/
String getVersion();
/**
* Returns the list of {@link WorkflowNode}
s contained by the
* WorkflowModel
.
*
* @return The list of {@link WorkflowNode}
s of the
* WorkflowModel
.
*/
List getNodes();
/**
* @return the created workflow node
*/
WorkflowNode createNode();
/**
* @param title the title
* @param type the type
* @param description the description
* @return the created workflow node
*/
WorkflowNode createNode(String title, String type, String description);
/**
* @param node the workflow node
*/
public void setRootNode(WorkflowNode node);
/**
* @param node the workflow node
*/
public void setEndNode(WorkflowNode node);
/**
* Returns the {@link WorkflowNode}
with the given id
*
* @param id
* The ID of the {@link WorkflowNode}
.
*
* @return The WorkflowNode
or null if not found.
*/
WorkflowNode getNode(String id);
/**
* Returns the root/start {@link WorkflowNode}
.
*
* @return The root {@link WorkflowNode}
.
*/
WorkflowNode getRootNode();
/**
* Returns the end {@link WorkflowNode}
.
*
* @return The end {@link WorkflowNode}
.
*/
WorkflowNode getEndNode();
/**
* Returns the list of {@link WorkflowTransition}
s contained by
* the WorkflowModel
.
*
* @return The list of {@link WorkflowTransition}
s of the
* WorkflowModel
.
*/
List getTransitions();
/**
* @return the created workflow transition
*/
WorkflowTransition createTransition();
/**
* @param from the workflow node to begin the transition with
* @param to the workflow node to end the transition with
* @param rule the rule
* @return the created workflow transition
*/
WorkflowTransition createTransition(WorkflowNode from, WorkflowNode to,
String rule);
/**
* Validates the model.
*
* @throws ValidationException in case the validation fails
*/
void validate() throws ValidationException;
/**
* @return a {@link Map} with keys as variables' names and values as {@link VariableTemplate}
s .
*/
Map getVariableTemplates();
/**
* @param name the name of the variable
* @param dataType the type of the variable in java fully qualified class name format
* @return the created variable template
*/
VariableTemplate createVariableTemplate(String name, String dataType);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy