com.day.cq.workflow.model.ValidationException Maven / Gradle / Ivy
/*
* 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 com.day.cq.workflow.WorkflowException;
/**
* ValidationException
is used to indicate that a
* {@link WorkflowModel} is not valid.
*/
public class ValidationException extends WorkflowException {
/**
* Generated serial version UID.
*/
private static final long serialVersionUID = -8901352801743975909L;
private WorkflowNode node;
/**
* Returns the {@link WorkflowNode} that is not valid or null if node could
* not be determined.
*
* @return The {@link WorkflowNode} that is not valid.
*/
public WorkflowNode getNode() {
return node;
}
/**
* Constructs a new WorkflowException
with the specified detail
* message. The cause is not initialized, and may subsequently be
* initialized by a call to {@link #initCause}.
*
* @param message
* The detail message. The detail message is saved for later
* retrieval by the {@link #getMessage()} method.
* @param node
*/
public ValidationException(String message) {
super(message);
}
/**
* Constructs a new WorkflowException
with the specified detail
* message. The cause is not initialized, and may subsequently be
* initialized by a call to {@link #initCause}.
*
* @param message
* The detail message. The detail message is saved for later
* retrieval by the {@link #getMessage()} method.
* @param node
*/
public ValidationException(String message, WorkflowNode node) {
super(message);
this.node = node;
}
/**
* Constructs a new WorkflowException
with the specified cause
* and a detail message of (cause==null ? null : cause.toString())
* (which typically contains the class and detail message of cause
* ). This constructor is useful for WorkflowException
that are
* wrappers for other {@link Throwable}
s.
*
* @param cause
* The cause (which is saved for later retrieval by the
* {@link #getCause()} method). (A null value is
* permitted, and indicates that the cause is nonexistent or
* unknown.)
*/
public ValidationException(Throwable cause) {
super(cause);
}
/**
* Constructs a new WorkflowException
with the specified detail
* message and cause.
*
* @param message
* The detail message (which is saved for later retrieval by the
* {@link #getMessage()} method).
* @param cause
* The cause (which is saved for later retrieval by the
* {@link #getCause()} method). (A null value is
* permitted, and indicates that the cause is nonexistent or
* unknown.)
*/
public ValidationException(String message, Throwable cause) {
super(message, cause);
}
}