1 7 package org.apache.lenya.cms.cocoon.components.modules.input; 8 9 import java.util.Map ; 10 11 import org.apache.avalon.framework.configuration.ConfigurationException; 12 import org.apache.lenya.cms.publication.PageEnvelope; 13 import org.apache.lenya.cms.publication.Publication; 14 15 21 public class PublicationFallbackModule extends FallbackModule { 22 23 26 public PublicationFallbackModule() { 27 super(); 28 } 29 30 34 protected String [] getBaseURIs(Map objectModel) throws ConfigurationException { 35 String [] superUris = super.getBaseURIs(objectModel); 36 String [] uris = new String [superUris.length + 1]; 37 38 PageEnvelope envelope = getEnvelope(objectModel); 39 String publicationId = envelope.getPublication().getId(); 40 41 String publicationUri = "context://" + Publication.PUBLICATION_PREFIX_URI + "/" 42 + publicationId + "/lenya"; 43 uris[0] = publicationUri; 44 45 for (int i = 0; i < superUris.length; i++) { 46 uris[i + 1] = superUris[i]; 47 } 48 49 return uris; 50 } 51 } | Popular Tags |