jakarta.faces.flow.builder.NavigationCaseBuilder Maven / Gradle / Ivy
Show all versions of jakarta.faces Show documentation
/*
* Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the
* Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
* version 2 with the GNU Classpath Exception, which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/
package jakarta.faces.flow.builder;
import jakarta.el.ValueExpression;
/**
*
* Create a navigation case in the current {@link jakarta.faces.flow.Flow}.
*
*
* @since 2.2
*/
public abstract class NavigationCaseBuilder {
/**
*
*
* Set the from-view-id of the current navigation case.
*
*
* @param fromViewId the from-view-id
* @throws NullPointerException if any of the parameters are {@code null}
* @since 2.2
*
* @return the builder instance
*/
public abstract NavigationCaseBuilder fromViewId(String fromViewId);
/**
*
*
* Set the from-action of the current navigation case.
*
*
* @param fromAction the from-action
* @throws NullPointerException if any of the parameters are {@code null}
* @since 2.2
*
* @return the builder instance
*/
public abstract NavigationCaseBuilder fromAction(String fromAction);
/**
*
*
* Set the from-outcome of the current navigation case.
*
*
* @param fromOutcome the from-outcome
* @throws NullPointerException if any of the parameters are {@code null}
* @since 2.2
*
* @return the builder instance
*/
public abstract NavigationCaseBuilder fromOutcome(String fromOutcome);
/**
*
*
* Set the to-view-id of the current navigation case.
*
*
* @param toViewId the to-view-id
* @throws NullPointerException if any of the parameters are {@code null}
* @since 2.2
*
* @return the builder instance
*/
public abstract NavigationCaseBuilder toViewId(String toViewId);
/**
*
*
* Set the to-flow-document-id of the current navigation case.
*
*
* @param toFlowDocumentId the to-flow-document-id
* @throws NullPointerException if any of the parameters are {@code null}
* @since 2.2
*
* @return the builder instance
*/
public abstract NavigationCaseBuilder toFlowDocumentId(String toFlowDocumentId);
/**
*
*
* Set the if of the current navigation case.
*
*
* @param condition the <if>
* @throws NullPointerException if any of the parameters are {@code null}
* @since 2.2
*
* @return the builder instance
*/
public abstract NavigationCaseBuilder condition(String condition);
/**
*
*
* Set the if of the current navigation case.
*
*
* @param condition the <if>
* @throws NullPointerException if any of the parameters are {@code null}
* @since 2.2
*
* @return the builder instance
*/
public abstract NavigationCaseBuilder condition(ValueExpression condition);
/**
*
*
* Create a redirect within this navigation case.
*
*
* @since 2.2
*
* @return the builder instance
*/
public abstract RedirectBuilder redirect();
/**
*
*
* Allows populating the redirect with parameters and setting the includeViewParams option.
*
*
* @since 2.2
*
*/
public abstract class RedirectBuilder {
/**
*
* Add a parameter to the redirect.
*
*
* @param name the name of the redirect parameter
* @param value the value of the redirect parameter. May not be a {@code ValueExpression}.
* @throws NullPointerException if any of the parameters are {@code null}
* @since 2.2
*
* @return the builder instance
*/
public abstract RedirectBuilder parameter(String name, String value);
/**
*
* Indicates the current redirect should include view parameters.
*
*
* @since 2.2
*
* @return the builder instance
*/
public abstract RedirectBuilder includeViewParams();
}
}