1 /* 2 Copyright (c) 2003, Laurent Caillette. 3 All rights reserved. 4 5 Redistribution and use in source and binary forms, with or without modifica- 6 tion, are permitted provided that the following conditions are met: 7 8 1. Redistributions of source code must retain the above copyright notice, 9 this list of conditions and the following disclaimer. 10 11 2. Redistributions in binary form must reproduce the above copyright notice, 12 this list of conditions and the following disclaimer in the documentation 13 and/or other materials provided with the distribution. 14 15 3. The end-user documentation included with the redistribution, if any, must 16 include the following acknowledgment: "This product includes software 17 written by Laurent Caillette." 18 Alternately, this acknowledgment may appear in the software itself, if 19 and wherever such third-party acknowledgments normally appear. 20 21 4. The name "Laurent Caillette" must not be used to endorse or 22 promote products derived from this software without 23 prior written permission. For written permission, please contact 24 laurent.caillette@laposte.net 25 26 5. Products derived from this software may not be called 27 "Laurent Caillette", nor may "Laurent Caillette" appear 28 in their name, without prior written permission of the 29 author. 30 31 THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, 32 INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 33 FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 34 AUTHOR (LAURENT CAILLETTE) BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 35 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 36 TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 37 OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 38 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 39 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 40 THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 41 */ 42 package tweed.invocation; 43 import java.util.ArrayList; 44 import java.util.List; 45 import tweed.context.Context; 46 import tweed.system.FunctionalException; 47 48 /*** 49 * A <code>Command</code> for testing externalization. 50 * 51 * @author Laurent Caillette 52 * @version $Id$ 53 */ 54 public class MyConcreteCommand extends MyAbstractCommand { 55 56 private int in_int1 ; 57 private List in_list1 ; 58 private int in_out_int1 ; 59 private List in_out_list1 ; 60 private int out_int1 ; 61 private List out_list1 ; 62 63 public int getIn_int1() { 64 return in_int1; 65 } 66 67 public void setIn_int1( int in_int1 ) { 68 this.in_int1 = in_int1; 69 } 70 71 public List getIn_list1() { 72 return in_list1; 73 } 74 75 public void setIn_list1( List in_list1 ) { 76 this.in_list1 = in_list1; 77 } 78 79 public int getIn_out_int1() { 80 return in_out_int1; 81 } 82 83 public void setIn_out_int1( int in_out_int1 ) { 84 this.in_out_int1 = in_out_int1; 85 } 86 87 public List getIn_out_list1() { 88 return in_out_list1; 89 } 90 91 public void setIn_out_list1( List in_out_list1 ) { 92 this.in_out_list1 = in_out_list1; 93 } 94 95 public int getOut_int1() { 96 return out_int1; 97 } 98 99 public void setOut_int1( int out_int1 ) { 100 this.out_int1 = out_int1; 101 } 102 103 public List getOut_list1() { 104 return out_list1; 105 } 106 107 public void setOut_list1( List out_list1 ) { 108 this.out_list1 = out_list1; 109 } 110 111 public MyConcreteCommand( Context context ) { 112 super( context ) ; 113 } 114 115 protected void doExecute() throws FunctionalException { 116 super.doExecute() ; 117 118 in_out_int1 = in_int1 * 2 ; 119 in_out_list1 = new ArrayList( /*in_list1*/ ) ; 120 in_out_list1.addAll( in_list1 ) ; 121 122 out_int1 = in_int1 + 1 ; 123 out_list1 = new ArrayList( in_list1 ) ; 124 out_list1.add( "one more element" ) ; 125 } 126 127 }

This page was automatically generated by Maven