View Javadoc

1   /*
2    * Copyright (c) 2002 Peter Antman, Teknik i Media  <peter.antman@tim.se>
3    *
4    * $Id: Action.java,v 1.1.1.1 2004/05/19 12:07:30 pra Exp $
5    *
6    * This library is free software; you can redistribute it and/or
7    * modify it under the terms of the GNU Lesser General Public
8    * License as published by the Free Software Foundation; either
9    * version 2 of the License, or (at your option) any later version
10   * 
11   * This library is distributed in the hope that it will be useful,
12   * but WITHOUT ANY WARRANTY; without even the implied warranty of
13   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14   * Lesser General Public License for more details.
15   * 
16   * You should have received a copy of the GNU Lesser General Public
17   * License along with this library; if not, write to the Free Software
18   * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19   */
20  package org.backsource.utils.ant;
21  /***
22   * The action an editing filter should take.
23   *
24   * @author <a href="mailto:pra@tim.se">Peter Antman</a>
25   * @version $Revision: 1.1.1.1 $
26   */
27  
28  public class Action {
29     public static String REPLACE_ACTION = "replace";
30     public static String INSERT_ACTION = "insert";
31     public static String REMOVE_ACTION = "remove";
32     
33     String type;
34     String pattern;
35     String action;
36     String value;
37     public Action (){
38        
39     }
40     
41     public void setType(String type) {
42        this.type = type;
43     }
44  
45     public String getType() {
46        return type;
47     }
48  
49     public void setPattern(String pattern) {
50        this.pattern = pattern;
51     }
52  
53     public String getPattern() {
54        return pattern;
55     }
56  
57     public void setAction(String action) {
58        this.action = action;
59     }
60  
61     public String getAction() {
62        return action;
63     }
64  
65     public void setValue(String value) {
66        this.value = value;
67     }
68  
69     public String getValue() {
70        return value;
71     }
72  
73     public String toString() {
74        StringBuffer buf = new StringBuffer();
75        buf.append("Type=").append(type).append("\n");
76        buf.append("Action=").append(action).append("\n");
77        buf.append("Pattern=").append(pattern).append("\n");
78        buf.append("Value=").append(value).append("\n");
79        return buf.toString();
80     }
81     
82  }// Action