1 17 18 19 20 package org.apache.lenya.cms.ant; 21 22 import org.apache.lenya.cms.publication.SiteTreeException; 23 import org.apache.tools.ant.BuildException; 24 25 26 33 public abstract class TwoNodesTask extends PublicationTask { 34 private String firstarea; 35 private String firstdocumentid; 36 private String secarea; 37 private String secdocumentid; 38 39 42 public TwoNodesTask() { 43 super(); 44 } 45 46 49 public String getFirstarea() { 50 return firstarea; 51 } 52 53 56 public String getFirstdocumentid() { 57 return firstdocumentid; 58 } 59 60 63 public String getSecarea() { 64 return secarea; 65 } 66 67 70 public String getSecdocumentid() { 71 return secdocumentid; 72 } 73 74 77 public void setFirstarea(String string) { 78 firstarea = string; 79 } 80 81 84 public void setFirstdocumentid(String string) { 85 firstdocumentid = string; 86 } 87 88 91 public void setSecarea(String string) { 92 secarea = string; 93 } 94 95 98 public void setSecdocumentid(String string) { 99 secdocumentid = string; 100 } 101 102 112 public abstract void manipulateTree(String firstdocumentid, String secdocumentid, 113 String firstarea, String secarea) 114 throws SiteTreeException; 115 116 119 public void execute() throws BuildException { 120 try { 121 log("document-id corresponding to the first node: " + this.getFirstdocumentid()); 122 log("document-id corresponding to the second node: " + this.getSecdocumentid()); 123 log("area corresponding to the first node: " + this.getFirstarea()); 124 log("area corresponding to the second node: " + this.getSecarea()); 125 manipulateTree(getFirstdocumentid(), getSecdocumentid(), getFirstarea(), getSecarea()); 126 } catch (Exception e) { 127 throw new BuildException(e); 128 } 129 } 130 } 131 | Popular Tags |