
com.day.cq.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
/*
* Copyright 1997-2008 Day Management AG
* Barfuesserplatz 6, 4001 Basel, Switzerland
* All Rights Reserved.
*
* This software is the confidential and proprietary information of
* Day Management AG, ("Confidential Information"). You shall not
* disclose such Confidential Information and shall use it only in
* accordance with the terms of the license agreement you entered into
* with Day.
*/
package com.day.cq.workflow.model;
import java.util.List;
import com.day.cq.workflow.HasMetaData;
/**
* 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.
*/
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();
/**
* Creates and returns a {@link WorkflowNode}
*
* @return The {@link WorkflowNode}
created
*/
WorkflowNode createNode();
/**
* Creates and returns a {@link WorkflowNode}
*
* @param title
* Title of node created
*
* @param type
* Type of node created
* @param description
* Description of node created
*
* @return The {@link WorkflowNode}
created
*/
WorkflowNode createNode(String title, String type, String description);
/**
* Sets the root node of the WorkflowModel
.
*
* @param node
* The root node of the WorkflowModel
.
*/
public void setRootNode(WorkflowNode node);
/**
* Sets the end node of the WorkflowModel
.
*
* @param node
* The end node of the WorkflowModel
.
*/
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();
/**
* Creates and returns a {@link WorkflowTransition}
*
* @return The {@link WorkflowTransition}
created
*/
WorkflowTransition createTransition();
/**
* Creates and returns a {@link WorkflowTransition}
*
* @param from
* The from range {@link WorkflowNode}
*
* @param to
* The to range {@link WorkflowNode}
*
* @param rule
* The rule {@link String}
*
* @return The {@link WorkflowTransition}
created
*/
WorkflowTransition createTransition(WorkflowNode from, WorkflowNode to,
String rule);
/**
* Validates the model.
*
* @throws ValidationException
* {@link ValidationException}
in case an error occurs
*/
void validate() throws ValidationException;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy