1 17 18 19 20 package org.apache.lenya.cms.publishing; 21 22 import org.apache.avalon.framework.configuration.Configuration; 23 import org.apache.avalon.framework.configuration.ConfigurationException; 24 import org.apache.log4j.Category; 25 26 27 31 public class ResourcePublishingEnvironment extends PublishingEnvironment { 32 private static Category log = Category.getInstance(ResourcePublishingEnvironment.class); 33 public static final String PARAMETER_RESOURCE_AUTHORING_PATH = "resources-authoring-path"; 34 public static final String PARAMETER_RESOURCE_LIVE_PATH = "resources-live-path"; 35 private String resourceAuthoringPath; 36 private String resourceLivePath; 37 38 44 public ResourcePublishingEnvironment(String contextPath, String publicationId) { 45 super(contextPath, publicationId); 46 } 47 48 53 public ResourcePublishingEnvironment(String publicationPath) { 54 super(publicationPath); 55 } 56 57 64 public void configure(Configuration configuration) 65 throws ConfigurationException { 66 super.configure(configuration); 67 68 setResourceAuthoringPath(configuration.getChild("authoring").getChild("resource") 70 .getAttribute("href")); 71 72 setResourceLivePath(configuration.getChild("live").getChild("resource").getAttribute("href")); 74 log.debug("CONFIGURATION:\nresource authoring path=" + getResourceAuthoringPath() + 75 "\nresource live path=" + getResourceLivePath()); 76 } 77 78 83 public String getResourceLivePath() { 84 return resourceLivePath; 85 } 86 87 92 protected void setResourceLivePath(String path) { 93 resourceLivePath = path; 94 } 95 96 101 public String getResourceAuthoringPath() { 102 return resourceAuthoringPath; 103 } 104 105 110 protected void setResourceAuthoringPath(String path) { 111 resourceAuthoringPath = path; 112 } 113 } 114 | Popular Tags |