~ubuntu-branches/ubuntu/lucid/libstruts1.2-java/lucid

« back to all changes in this revision

Viewing changes to src/share/org/apache/struts/config/ActionConfig.java

  • Committer: Bazaar Package Importer
  • Author(s): Arnaud Vandyck
  • Date: 2006-04-24 12:14:23 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20060424121423-naev53qigqgks0sa
Tags: 1.2.9-1
New upstream  release Fixes  three security  problems: CVE-2006-1546,
CVE-2006-1547,  CVE-2006-1548  (closes:  #360551),  thanks  to  Moritz
Muehlenhoff.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/config/ActionConfig.java,v 1.18 2004/03/14 06:23:47 sraeburn Exp $
3
 
 * $Revision: 1.18 $
4
 
 * $Date: 2004/03/14 06:23:47 $
 
2
 * $Id: ActionConfig.java 377805 2006-02-14 19:26:15Z niallp $ 
5
3
 *
6
4
 * Copyright 1999-2004 The Apache Software Foundation.
7
5
 * 
30
28
 * <code>&lt;action&gt;</code> element from a Struts
31
29
 * module configuration file.</p>
32
30
 *
33
 
 * @version $Revision: 1.18 $ $Date: 2004/03/14 06:23:47 $
 
31
 * @version $Rev: 377805 $ $Date: 2006-02-14 19:26:15 +0000 (Tue, 14 Feb 2006) $
34
32
 * @since Struts 1.1
35
33
 */
36
34
public class ActionConfig implements Serializable {
527
525
        }
528
526
        this.validate = validate;
529
527
    }
530
 
 
 
528
    
 
529
    /**
 
530
     * <p>Can this Action be cancelled? [false]</p> <p> By default, when an
 
531
     * Action is cancelled, validation is bypassed and the Action should not
 
532
     * execute the business operation. If a request tries to cancel an Action
 
533
     * when cancellable is not set, a "InvalidCancelException" is thrown.</p>
 
534
     * @since Struts 1.2.9
 
535
     */ 
 
536
    protected boolean cancellable = false;
 
537
 
 
538
    /**
 
539
     * <p>Accessor for cancellable property</p>
 
540
     *
 
541
     * @return True if Action can be cancelled
 
542
     * @since  Struts 1.2.9
 
543
     */
 
544
    public boolean getCancellable() {
 
545
        return (this.cancellable);
 
546
    }
 
547
 
 
548
    /**
 
549
     * <p>Mutator for for cancellable property</p>
 
550
     *
 
551
     * @param cancellable
 
552
     * @since Struts 1.2.9
 
553
     */
 
554
    public void setCancellable(boolean cancellable) {
 
555
        if (configured) {
 
556
            throw new IllegalStateException("Configuration is frozen");
 
557
        }
 
558
        this.cancellable = cancellable;
 
559
    }
 
560
    
531
561
 
532
562
    // --------------------------------------------------------- Public Methods
533
563
 
777
807
            sb.append(",type=");
778
808
            sb.append(type);
779
809
        }
 
810
        sb.append(",validate=");
 
811
        sb.append(validate);
 
812
        sb.append(",cancellable=");
 
813
        sb.append(cancellable);
780
814
        return (sb.toString());
781
815
 
782
816
    }