1 23 package org.enhydra.kelp.jbuilder.node; 24 25 import org.enhydra.tool.common.ToolException; 27 import org.enhydra.tool.common.PathHandle; 28 29 import org.enhydra.kelp.common.ResUtil; 31 import org.enhydra.kelp.common.PropUtil; 32 import org.enhydra.kelp.common.PathUtil; 33 import org.enhydra.kelp.common.node.OtterProject; 34 import org.enhydra.kelp.common.node.OtterNode; 35 import org.enhydra.kelp.common.node.OtterTemplateNode; 36 37 import com.borland.primetime.node.FileNode; 39 import com.borland.primetime.node.Project; 40 import com.borland.primetime.node.Node; 41 import com.borland.primetime.vfs.Url; 42 import com.borland.primetime.node.DuplicateNodeException; 43 44 import java.io.File ; 46 import java.util.ResourceBundle ; 47 48 public class PrimeTemplateNode extends PrimeTextFileNode 50 implements OtterTemplateNode { 51 52 static ResourceBundle res = 54 ResourceBundle.getBundle("org.enhydra.kelp.jbuilder.Res"); 56 public PrimeTemplateNode(FileNode n) throws ToolException { 57 super(n); 58 if (!PathUtil.isTemplate(this)) { 59 StringBuffer buf = new StringBuffer (); 60 61 buf.append(res.getString("Invalid_template_node")); 62 buf.append('\n'); 63 buf.append(ResUtil.format(res.getString("Node_file_path_0_"), 64 getFilePath())); 65 buf.append('\n'); 66 buf.append(ResUtil.format(res.getString("Deploy_input_path_0_"), 67 getProject().getDeployInputPath())); 68 throw new ToolException(buf.toString()); 69 } 70 } 71 72 79 public PrimeTemplateNode(OtterNode otterNode, String file) { 80 super(otterNode, file); 81 } 82 83 public String getOutputPath() { 85 return PathUtil.getOutputPath(this); 86 } 87 88 } 89 | Popular Tags |