Author: weaver
Date: Fri Nov 4 13:20:25 2005
New Revision: 330905
URL: http://svn.apache.org/viewcvs?rev=330905&view=rev
Log:
http://issues.apache.org/jira/browse/JS2-398#action_12356822
Added:
portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/decoration/
portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/decoration/BaseDecoration.java
(with props)
portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/decoration/LayoutDecorationImpl.java
(with props)
portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/decoration/PortletDecorationImpl.java
(with props)
portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/decoration/caches/
portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/decoration/caches/HashMapPathResolverCache.java
(with props)
portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/decoration/caches/NoCachePathResolverCache.java
(with props)
portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/decoration/caches/SessionPathResolverCache.java
(with props)
portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/decoration/validators/
portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/decoration/validators/ClasspathResourceValidator.java
(with props)
portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/decoration/validators/WebApplicationResourceValidator.java
(with props)
portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/decoration/
portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/decoration/Decoration.java
(with props)
portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/decoration/InvalidDecorationConfigurationException.java
(with props)
portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/decoration/LayoutDecoration.java
(with props)
portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/decoration/PathResolverCache.java
(with props)
portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/decoration/PortletDecoration.java
(with props)
portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/decoration/ResourceValidator.java
(with props)
Modified:
portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/PortalReservedParameters.java
Added:
portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/decoration/BaseDecoration.java
URL:
http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/decoration/BaseDecoration.java?rev=330905&view=auto
==============================================================================
---
portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/decoration/BaseDecoration.java
(added)
+++
portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/decoration/BaseDecoration.java
Fri Nov 4 13:20:25 2005
@@ -0,0 +1,108 @@
+/*
+ * Copyright 2000-2001,2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy
of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
under
+ * the License.
+ */
+package org.apache.jetspeed.decoration;
+
+import java.util.Properties;
+
+import org.apache.jetspeed.util.Path;
+
+/**
+ *
+ * @author <href a="mailto:[EMAIL PROTECTED]">Scott T. Weaver</a>
+ *
+ */
+public class BaseDecoration implements Decoration
+{
+ protected static final String NO_SUCH_RESOURCE = "no_such_resource";
+ protected final Properties config;
+ private final ResourceValidator validator;
+ private final String name;
+ private final Path basePath;
+ private final PathResolverCache cache;
+ private final String styleSheet;
+
+ /**
+ *
+ * @param config
+ * @param validator
+ * @param basePath
+ * @throws InvalidDecorationConfigurationException
+ */
+ public BaseDecoration(Properties config, ResourceValidator validator, Path
basePath, PathResolverCache cache) throws
InvalidDecorationConfigurationException
+ {
+ this.config = config;
+ this.validator = validator;
+ this.basePath= basePath;
+ this.cache = cache;
+ this.styleSheet = config.getProperty("stylesheet", "/css/styles.css");
+
+ this.name = config.getProperty("name", config.getProperty("id"));
+ if(name == null)
+ {
+ throw new InvalidDecorationConfigurationException("The decoration
configuration does not contain a name or id property.");
+ }
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public String getResource(String path)
+ {
+ Path workingPath = basePath.getChild(path);
+
+ if(cache.getPath(workingPath.toString()) != null)
+ {
+ return cache.getPath(workingPath.toString());
+ }
+ else
+ {
+ String locatedPath = getResource(basePath, new Path(path));
+ if(!locatedPath.startsWith(NO_SUCH_RESOURCE))
+ {
+ cache.addPath(workingPath.toString(), locatedPath);
+ }
+
+ return locatedPath;
+ }
+
+ }
+
+ protected String getResource(Path rootPath, Path searchPath)
+ {
+ String pathString = rootPath.getChild(searchPath).toString();
+ if(validator.resourceExists(pathString))
+ {
+ return pathString;
+ }
+ else if((searchPath.length()-1) > 0)
+ {
+
+ return getResource(rootPath.getSubPath(0,
(rootPath.length()-1)),searchPath);
+ }
+ else
+ {
+ return NO_SUCH_RESOURCE+searchPath.getFileExtension();
+ }
+ }
+
+ public String getStyleSheet()
+ {
+ return getResource(styleSheet);
+ }
+
+}
Propchange:
portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/decoration/BaseDecoration.java
------------------------------------------------------------------------------
svn:eol-style = native
Added:
portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/decoration/LayoutDecorationImpl.java
URL:
http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/decoration/LayoutDecorationImpl.java?rev=330905&view=auto
==============================================================================
---
portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/decoration/LayoutDecorationImpl.java
(added)
+++
portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/decoration/LayoutDecorationImpl.java
Fri Nov 4 13:20:25 2005
@@ -0,0 +1,27 @@
+package org.apache.jetspeed.decoration;
+
+import java.util.Properties;
+
+import org.apache.jetspeed.util.Path;
+
+public class LayoutDecorationImpl extends BaseDecoration implements
LayoutDecoration
+{
+
+ public LayoutDecorationImpl(Properties config, ResourceValidator
validator, Path basePath, PathResolverCache cache) throws
InvalidDecorationConfigurationException
+ {
+ super(config, validator, basePath, cache);
+ }
+
+ public String getHeader()
+ {
+ String headerTemplate = config.getProperty("header", "header.vm");
+ return getResource(headerTemplate);
+ }
+
+ public String getFooter()
+ {
+ String footerTemplate = config.getProperty("footer", "footer.vm");
+ return getResource(footerTemplate);
+ }
+
+}
Propchange:
portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/decoration/LayoutDecorationImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Added:
portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/decoration/PortletDecorationImpl.java
URL:
http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/decoration/PortletDecorationImpl.java?rev=330905&view=auto
==============================================================================
---
portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/decoration/PortletDecorationImpl.java
(added)
+++
portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/decoration/PortletDecorationImpl.java
Fri Nov 4 13:20:25 2005
@@ -0,0 +1,20 @@
+package org.apache.jetspeed.decoration;
+
+import java.util.Properties;
+
+import org.apache.jetspeed.util.Path;
+
+public class PortletDecorationImpl extends BaseDecoration implements
PortletDecoration
+{
+
+ public PortletDecorationImpl(Properties config, ResourceValidator
validator, Path basePath, PathResolverCache cache) throws
InvalidDecorationConfigurationException
+ {
+ super(config, validator, basePath, cache);
+ }
+
+ public String getTemplate()
+ {
+ return null;
+ }
+
+}
Propchange:
portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/decoration/PortletDecorationImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Added:
portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/decoration/caches/HashMapPathResolverCache.java
URL:
http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/decoration/caches/HashMapPathResolverCache.java?rev=330905&view=auto
==============================================================================
---
portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/decoration/caches/HashMapPathResolverCache.java
(added)
+++
portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/decoration/caches/HashMapPathResolverCache.java
Fri Nov 4 13:20:25 2005
@@ -0,0 +1,38 @@
+package org.apache.jetspeed.decoration.caches;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.jetspeed.decoration.PathResolverCache;
+
+
+public class HashMapPathResolverCache implements PathResolverCache
+{
+ protected Map cache;
+
+ public HashMapPathResolverCache()
+ {
+ this.cache = new HashMap();
+ }
+
+ public void addPath(String key, String path)
+ {
+ cache.put(key, path);
+ }
+
+ public String getPath(String key)
+ {
+ return (String) cache.get(key);
+ }
+
+ public String removePath(String key)
+ {
+ return (String) cache.remove(key);
+ }
+
+ public void clear()
+ {
+ cache.clear();
+ }
+
+}
Propchange:
portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/decoration/caches/HashMapPathResolverCache.java
------------------------------------------------------------------------------
svn:eol-style = native
Added:
portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/decoration/caches/NoCachePathResolverCache.java
URL:
http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/decoration/caches/NoCachePathResolverCache.java?rev=330905&view=auto
==============================================================================
---
portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/decoration/caches/NoCachePathResolverCache.java
(added)
+++
portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/decoration/caches/NoCachePathResolverCache.java
Fri Nov 4 13:20:25 2005
@@ -0,0 +1,51 @@
+/*
+ * Copyright 2000-2001,2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy
of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
under
+ * the License.
+ */
+package org.apache.jetspeed.decoration.caches;
+
+import org.apache.jetspeed.decoration.PathResolverCache;
+
+/**
+ * Represents an entirely non-caching cache :)
+ *
+ * @author <href a="mailto:[EMAIL PROTECTED]">Scott T. Weaver</a>
+ *
+ */
+public class NoCachePathResolverCache implements PathResolverCache
+{
+
+ public void addPath(String key, String path)
+ {
+ // Does nothing
+ }
+
+ public String getPath(String key)
+ {
+ // alawys returns null
+ return null;
+ }
+
+ public String removePath(String key)
+ {
+ // alawys returns null
+ return null;
+ }
+
+ public void clear()
+ {
+ // Does nothing
+ }
+
+}
Propchange:
portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/decoration/caches/NoCachePathResolverCache.java
------------------------------------------------------------------------------
svn:eol-style = native
Added:
portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/decoration/caches/SessionPathResolverCache.java
URL:
http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/decoration/caches/SessionPathResolverCache.java?rev=330905&view=auto
==============================================================================
---
portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/decoration/caches/SessionPathResolverCache.java
(added)
+++
portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/decoration/caches/SessionPathResolverCache.java
Fri Nov 4 13:20:25 2005
@@ -0,0 +1,26 @@
+package org.apache.jetspeed.decoration.caches;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.servlet.http.HttpSession;
+
+import org.apache.jetspeed.PortalReservedParameters;
+import org.apache.jetspeed.decoration.PathResolverCache;
+
+public class SessionPathResolverCache extends HashMapPathResolverCache
implements PathResolverCache
+{
+ private final HttpSession session;
+
+ public SessionPathResolverCache(HttpSession session)
+ {
+ this.session = session;
+ cache = (Map)
session.getAttribute(PortalReservedParameters.RESOVLER_CACHE_ATTR);
+
+ if(cache == null)
+ {
+ cache = new HashMap();
+ session.setAttribute(PortalReservedParameters.RESOVLER_CACHE_ATTR,
cache);
+ }
+ }
+}
Propchange:
portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/decoration/caches/SessionPathResolverCache.java
------------------------------------------------------------------------------
svn:eol-style = native
Added:
portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/decoration/validators/ClasspathResourceValidator.java
URL:
http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/decoration/validators/ClasspathResourceValidator.java?rev=330905&view=auto
==============================================================================
---
portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/decoration/validators/ClasspathResourceValidator.java
(added)
+++
portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/decoration/validators/ClasspathResourceValidator.java
Fri Nov 4 13:20:25 2005
@@ -0,0 +1,24 @@
+package org.apache.jetspeed.decoration.validators;
+
+import org.apache.jetspeed.decoration.ResourceValidator;
+
+public class ClasspathResourceValidator implements ResourceValidator
+{
+ private ClassLoader classLoader;
+
+ public ClasspathResourceValidator(ClassLoader classLoader)
+ {
+ this.classLoader = classLoader;
+ }
+
+ public ClasspathResourceValidator()
+ {
+ this(ClasspathResourceValidator.class.getClassLoader());
+ }
+
+ public boolean resourceExists(String path)
+ {
+ return classLoader.getResource(path) != null;
+ }
+
+}
Propchange:
portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/decoration/validators/ClasspathResourceValidator.java
------------------------------------------------------------------------------
svn:eol-style = native
Added:
portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/decoration/validators/WebApplicationResourceValidator.java
URL:
http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/decoration/validators/WebApplicationResourceValidator.java?rev=330905&view=auto
==============================================================================
---
portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/decoration/validators/WebApplicationResourceValidator.java
(added)
+++
portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/decoration/validators/WebApplicationResourceValidator.java
Fri Nov 4 13:20:25 2005
@@ -0,0 +1,32 @@
+package org.apache.jetspeed.decoration.validators;
+
+import java.net.MalformedURLException;
+
+import javax.servlet.ServletContext;
+
+import org.apache.jetspeed.decoration.ResourceValidator;
+
+public class WebApplicationResourceValidator implements ResourceValidator
+{
+ private final ServletContext servletContext;
+
+ public WebApplicationResourceValidator(ServletContext servletContext)
+ {
+ this.servletContext = servletContext;
+ }
+
+ public boolean resourceExists(String path)
+ {
+ try
+ {
+ return servletContext.getResource(path) != null;
+ }
+ catch (MalformedURLException e)
+ {
+ IllegalArgumentException iae = new IllegalArgumentException(path+"
is not a valid path.");
+ iae.initCause(e);
+ throw iae;
+ }
+ }
+
+}
Propchange:
portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/decoration/validators/WebApplicationResourceValidator.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified:
portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/PortalReservedParameters.java
URL:
http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/PortalReservedParameters.java?rev=330905&r1=330904&r2=330905&view=diff
==============================================================================
---
portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/PortalReservedParameters.java
(original)
+++
portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/PortalReservedParameters.java
Fri Nov 4 13:20:25 2005
@@ -49,4 +49,5 @@
public static final String HEADER_RESOURCE_ATTRIBUTE =
"org.apache.jetspeed.headerresource";
public static final String PATH_ATTRIBUTE = "org.apache.jetspeed.Path";
public static final String PARAMETER_ALREADY_DECODED_ATTRIBUTE =
"org.apache.jetspeed.parameterAlreadyDecoded";
+ public static final String RESOVLER_CACHE_ATTR =
"org.apache.jetspeed.resovler.cache";
}
Added:
portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/decoration/Decoration.java
URL:
http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/decoration/Decoration.java?rev=330905&view=auto
==============================================================================
---
portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/decoration/Decoration.java
(added)
+++
portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/decoration/Decoration.java
Fri Nov 4 13:20:25 2005
@@ -0,0 +1,10 @@
+package org.apache.jetspeed.decoration;
+
+public interface Decoration
+{
+ String getName();
+
+ String getResource(String path);
+
+ String getStyleSheet();
+}
Propchange:
portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/decoration/Decoration.java
------------------------------------------------------------------------------
svn:eol-style = native
Added:
portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/decoration/InvalidDecorationConfigurationException.java
URL:
http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/decoration/InvalidDecorationConfigurationException.java?rev=330905&view=auto
==============================================================================
---
portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/decoration/InvalidDecorationConfigurationException.java
(added)
+++
portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/decoration/InvalidDecorationConfigurationException.java
Fri Nov 4 13:20:25 2005
@@ -0,0 +1,59 @@
+/*
+ * Copyright 2000-2001,2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy
of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
under
+ * the License.
+ */
+package org.apache.jetspeed.decoration;
+
+import org.apache.jetspeed.exception.JetspeedException;
+import org.apache.jetspeed.i18n.KeyedMessage;
+
+/**
+ *
+ * @author <href a="mailto:[EMAIL PROTECTED]">Scott T. Weaver</a>
+ *
+ */
+public class InvalidDecorationConfigurationException extends JetspeedException
+{
+
+ public InvalidDecorationConfigurationException()
+ {
+ super();
+ }
+
+ public InvalidDecorationConfigurationException(String message)
+ {
+ super(message);
+ }
+
+ public InvalidDecorationConfigurationException(KeyedMessage typedMessage)
+ {
+ super(typedMessage);
+ }
+
+ public InvalidDecorationConfigurationException(Throwable nested)
+ {
+ super(nested);
+ }
+
+ public InvalidDecorationConfigurationException(String msg, Throwable
nested)
+ {
+ super(msg, nested);
+ }
+
+ public InvalidDecorationConfigurationException(KeyedMessage keyedMessage,
Throwable nested)
+ {
+ super(keyedMessage, nested);
+ }
+
+}
Propchange:
portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/decoration/InvalidDecorationConfigurationException.java
------------------------------------------------------------------------------
svn:eol-style = native
Added:
portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/decoration/LayoutDecoration.java
URL:
http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/decoration/LayoutDecoration.java?rev=330905&view=auto
==============================================================================
---
portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/decoration/LayoutDecoration.java
(added)
+++
portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/decoration/LayoutDecoration.java
Fri Nov 4 13:20:25 2005
@@ -0,0 +1,8 @@
+package org.apache.jetspeed.decoration;
+
+public interface LayoutDecoration extends Decoration
+{
+ String getHeader();
+
+ String getFooter();
+}
Propchange:
portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/decoration/LayoutDecoration.java
------------------------------------------------------------------------------
svn:eol-style = native
Added:
portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/decoration/PathResolverCache.java
URL:
http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/decoration/PathResolverCache.java?rev=330905&view=auto
==============================================================================
---
portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/decoration/PathResolverCache.java
(added)
+++
portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/decoration/PathResolverCache.java
Fri Nov 4 13:20:25 2005
@@ -0,0 +1,13 @@
+package org.apache.jetspeed.decoration;
+
+public interface PathResolverCache
+{
+ void addPath(String key, String path);
+
+ String getPath(String key);
+
+ String removePath(String key);
+
+ void clear();
+
+}
Propchange:
portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/decoration/PathResolverCache.java
------------------------------------------------------------------------------
svn:eol-style = native
Added:
portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/decoration/PortletDecoration.java
URL:
http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/decoration/PortletDecoration.java?rev=330905&view=auto
==============================================================================
---
portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/decoration/PortletDecoration.java
(added)
+++
portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/decoration/PortletDecoration.java
Fri Nov 4 13:20:25 2005
@@ -0,0 +1,6 @@
+package org.apache.jetspeed.decoration;
+
+public interface PortletDecoration extends Decoration
+{
+ String getTemplate();
+}
Propchange:
portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/decoration/PortletDecoration.java
------------------------------------------------------------------------------
svn:eol-style = native
Added:
portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/decoration/ResourceValidator.java
URL:
http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/decoration/ResourceValidator.java?rev=330905&view=auto
==============================================================================
---
portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/decoration/ResourceValidator.java
(added)
+++
portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/decoration/ResourceValidator.java
Fri Nov 4 13:20:25 2005
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2000-2001,2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy
of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
under
+ * the License.
+ */
+
+package org.apache.jetspeed.decoration;
+
+/**
+ *
+ * @author <href a="mailto:[EMAIL PROTECTED]">Scott T. Weaver</a>
+ *
+ */
+public interface ResourceValidator
+{
+ boolean resourceExists(String path);
+}
Propchange:
portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/decoration/ResourceValidator.java
------------------------------------------------------------------------------
svn:eol-style = native
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]