CPD Results

The following document contains the results of PMD's CPD 4.1.

Duplications

File Line
org\apache\commons\scaffold\util\BizResponseImpl.java 33
org\apache\commons\scaffold\util\ProcessResultBase.java 34
public class ProcessResultBase implements ProcessResult {


// ----------------------------------------------------------- Properties

    /**
     * The attribute name for the result [null].
     */
    private String name = null;


    // Inherits JavaDoc
    public String getName() {
        return this.name;
    }


    /**
     * Set the attribute name for this result object.
     *
     * @param name The new name
     */
    public void setName(String name) {
        this.name = name;
    }


    /**
     * Field to store the scope property [request].
     */
    private String scope = Tokens.REQUEST;


    /**
     * Return the scope under which to store this result object.
     *
     * @return the scope
     */
    public String getScope() {
        return this.scope;
    }


    /**
     * Set the scope under which to store this result object.
     *
     * @param scope The new scope
     */
    public void setScope(String scope) {
        this.scope = scope;
    }



    /**
     * Field to store single-form state [false].
     */
    private boolean singleForm = false;


    /**
     * Return the single-form state:
     * list of 0 or more records=FALSE, exactly one record=TRUE.
     *
     * @return True if this is a single record
     */
    public boolean isSingleForm() {
        return this.singleForm;
    }


    /**
     * Set the single-form state:
     * list of 0 or more records=FALSE, exactly one record=TRUE.
     *
     * @param Set to true for single form.
     */
    public void setSingleForm(boolean singleForm) {
        this.singleForm = singleForm;
    }


    /**
     * Field to store exposed property [true].
     */
    private boolean exposed = true;


    /**
     * Return the exposed state.
     *
     * @return True if the result should be exposed
     */
    public boolean isExposed() {
        return this.exposed;
    }


    /**
     * Indicates whether the result should be exposed
     * to the rest of the application through a context.
     *
     * @param multiple The new exposed
     */
    public void setExposed(boolean exposed) {
        this.exposed = exposed;
    }


    /**
     * Field to store the data property [null].
     */
    private Object data = null;


    /**
     * Return the data object.
     *
     * @return The data object
     */
    public Object getData() {
        return this.data;
    }


    /**
     * Assign a new data object.
     *
     * @param data The new data object
     */
    public void setData(Object data) {
        this.data = data;
    }


    /**
     * Return whether data object has been set.
     *
     * @return True if this result contains a data object
     */
    public boolean isData() {
        return (getData()!=null);
    }


    /**
     * Field to store the aggregate state  [false].
     */
    protected boolean aggregate = false;


    /**
     * Return whether the result of this ProcessResult is a collection of
     * contains other ProcessResult objects to be handled individually.
     * This allows processes to be combined on the business tier and
     * returned to controller as a single operation.
     *
     * @return True if this ProcessResult contains other ProcessResults
     * objects
     */
    public boolean isAggregate() {
        return aggregate;
    }


    /**
     * Assign a new container state.
     *
     * @param aggregate Set to true for aggregate result
     */
    public void setAggregate(boolean aggregate) {
        this.aggregate = aggregate;
    }


    /**
     * Field to store the message property [ArrayList].
     */
    private List messages = (List) new ArrayList();

File Line
org\apache\commons\scaffold\util\BizResponseImpl.java 190
org\apache\commons\scaffold\util\ProcessResultBase.java 257
    public void setMessages(List messages) {
        this.messages = messages;
    }


    /**
     * Field to store dispatch property [null].
     */
    private String dispatch = null;


    /**
     * The dispatch property can be used to re-route control to an non-default location,
     * either as a system path or via a logical name (e.g ActionForward).
     *
     * @see <code>setDispatchPath()</code>
     *
     * @return The dispatch advice
     */
    public String getDispatch() {
        return (this.dispatch);
    }


    /**
     * Set the dispatch advice.
     *
     * @param dispatch The new dispatch advice.
     */
    public void setDispatch(String dispatch) {
        this.dispatch = dispatch;
    }


    /**
     * Return whether dispatch advice has been set.
     *
     * @return True if dispatch advice has been set.
     */
    public boolean isDispatch() {
        return (getDispatch()!=null);
    }


    /**
     * Field to store dispatchPath property [false].
     */
    private boolean dispatchPath = false;


    /**
     * Return whether dispatch advice is suppose to be a
     * path or a token (e.g. ActionForward name)
     *
     * @return True if dispatch advice is a URI
     */
    public boolean isDispatchPath() {
        return this.dispatchPath;
    }


    /**
     * Set the dispatchPath state.
     *
     * @param Boolean Set to true if dispatch is a URI
     */
    public void setDispatchPath(boolean dispatchPath) {
        this.dispatchPath = dispatchPath;
    }


    /**
     * Our scroller object for paging through lists.
     */
    protected Scroller scroller = null;


    public void setScroller(Scroller scroller){
        this.scroller = scroller;
    }


    public Scroller getScroller() {
        return this.scroller;
    }


// ----------------------------------------------------------- Constructors


    /**
     * Default constructor.
     */
    public ProcessResultBase() {