![JAR search and dependency download from the Maven repository](/logo.png)
org.wicketstuff.webflow.session.ProgressLink Maven / Gradle / Ivy
/**
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Contributed by United Services Automotive Association (USAA)
*/
package org.wicketstuff.webflow.session;
import java.io.Serializable;
import org.apache.wicket.Page;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.Model;
/**
* This class holds all the information for a progress link step
*
* @author Clint Checketts, Florian Braun, Doug Hall, Subramanian Murali
* @version $Id: $
*/
public class ProgressLink implements Serializable
{
private static final long serialVersionUID = 1L;
private IModel labelModel;
private int stepNumber;
private int flowStepNumber; // the position of the corresponding step in webflow
private Class extends Page> resultPage;
/**
* Default constructor
*/
public ProgressLink()
{
}
/**
* Constructor for ProgressLink.
*
* @param resultPage a {@link java.lang.Class} object.
* @param stepNumber a int.
* @param label a {@link java.lang.String} object.
*/
public ProgressLink(Class extends Page> resultPage, int stepNumber, String label)
{
this(resultPage, stepNumber, new Model(label));
}
/**
* Constructor for ProgressLink.
*
* @param resultPage a {@link java.lang.Class} object.
* @param label a {@link java.lang.String} object.
*/
public ProgressLink(Class extends Page> resultPage, String label)
{
this(resultPage, 0, new Model(label));
}
/**
* Constructor for ProgressLink.
*
* @param resultPage a {@link java.lang.Class} object.
* @param stepNumber a int.
* @param labelModel a {@link org.apache.wicket.model.IModel} object.
*/
public ProgressLink(Class extends Page> resultPage, int stepNumber, IModel labelModel)
{
super();
this.stepNumber = stepNumber;
this.resultPage = resultPage;
this.labelModel = labelModel;
}
/**
* Getter for the field resultPage
.
*
* @return Class extends Page> The resultPage
*/
public Class extends Page> getResultPage()
{
return resultPage;
}
/**
* Getter for the field labelModel
.
*
* @return IModel labelModel
*/
public IModel getLabelModel()
{
return labelModel;
}
/**
* Getter for the field stepNumber
.
*
* @return int stepNumber
*/
public int getStepNumber()
{
return stepNumber;
}
/**
* Setter for the field stepNumber
.
*
* @param stepNumber a int.
*/
public void setStepNumber(int stepNumber)
{
this.stepNumber = stepNumber;
}
/**
* Getter for the field flowStepNumber
.
*
* @return the flowStepNumber
*/
public int getFlowStepNumber()
{
return flowStepNumber;
}
/**
* Setter for the field flowStepNumber
.
*
* @param flowStepNumber the flowStepNumber to set
*/
public void setFlowStepNumber(int flowStepNumber)
{
this.flowStepNumber = flowStepNumber;
}
/** {@inheritDoc} */
@Override
public String toString() {
String stepText = labelModel == null ? "" : labelModel.getObject();
return "Step #:"+flowStepNumber+" Text:"+ stepText+" for page:"+resultPage;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy