1 16 17 package org.apache.jk.ant; 18 19 import org.apache.tools.ant.Project; 20 21 30 public class JkData { 31 32 private String value; 33 private boolean isfile = false; 34 private String ifCond; 35 String unlessCond; 36 Project project; 37 38 39 public JkData() { 40 } 41 42 public void setProject( Project p ) { 43 project=p; 44 } 45 46 public void setFileName( String s ) { 47 value = s; 48 isfile = true; 49 } 50 51 public void setSymbol( String s ) { 52 value = s; 53 isfile = false; 54 } 55 56 public void setValue( String s ) { 57 value = s; 58 } 59 60 public void setIsFile( boolean isf ) { 61 isfile = isf; 62 } 63 64 public void setIf( String s ) { 65 ifCond = s; 66 } 67 68 public void setUnless( String s ) { 69 unlessCond = s; 70 } 71 72 public String getValue() 73 { 74 if( ifCond!=null && project.getProperty(ifCond) == null ) 75 return null; 76 if (unlessCond != null && project.getProperty(unlessCond) != null) 77 return null; 78 return value; 79 } 80 81 public boolean isFile() 82 { 83 return isfile; 84 } 85 } 86 | Popular Tags |