Author: thorsten
Date: Wed Sep 17 04:26:43 2008
New Revision: 696249

URL: http://svn.apache.org/viewvc?rev=696249&view=rev
Log:
Adding Resolver and Structurer interfaces to the api

Added:
    
forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/api/Resolver.java
   (with props)
    
forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/api/Structurer.java
   (with props)
Modified:
    
forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/api/Contract.java

Modified: 
forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/api/Contract.java
URL: 
http://svn.apache.org/viewvc/forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/api/Contract.java?rev=696249&r1=696248&r2=696249&view=diff
==============================================================================
--- 
forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/api/Contract.java
 (original)
+++ 
forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/api/Contract.java
 Wed Sep 17 04:26:43 2008
@@ -19,7 +19,7 @@
 import java.io.InputStream;
 import java.util.HashMap;
 
-import org.apache.forrest.dispatcher.DispatcherException;
+import org.apache.forrest.dispatcher.exception.DispatcherException;
 
 public interface Contract {
 

Added: 
forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/api/Resolver.java
URL: 
http://svn.apache.org/viewvc/forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/api/Resolver.java?rev=696249&view=auto
==============================================================================
--- 
forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/api/Resolver.java
 (added)
+++ 
forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/api/Resolver.java
 Wed Sep 17 04:26:43 2008
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.forrest.dispatcher.api;
+
+import java.io.InputStream;
+
+/**
+ * Wrapper interface to enable multible resolver implementation this makes it
+ * possible to use the dispatcher outside of cocoon as standalone application
+ * without any mayor rewrites.
+ * 
+ * @version 1.0
+ * 
+ */
+public interface Resolver {
+
+  /**
+   * A resolver simply looks up a given uri and tries to generate a stream
+   * from it.
+   * 
+   * @param uri the uri that we want
+   * @return the stream representation of the uri.
+   */
+  public InputStream resolve(String uri);
+
+}

Propchange: 
forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/api/Resolver.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: 
forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/api/Structurer.java
URL: 
http://svn.apache.org/viewvc/forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/api/Structurer.java?rev=696249&view=auto
==============================================================================
--- 
forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/api/Structurer.java
 (added)
+++ 
forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/api/Structurer.java
 Wed Sep 17 04:26:43 2008
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.forrest.dispatcher.api;
+
+import java.io.InputStream;
+
+import org.apache.forrest.dispatcher.exception.DispatcherException;
+
+public interface Structurer {
+
+  public abstract InputStream execute(InputStream structurerStream,
+      String format) throws DispatcherException;
+
+}
\ No newline at end of file

Propchange: 
forrest/trunk/whiteboard/dispatcher/java/org/apache/forrest/dispatcher/api/Structurer.java
------------------------------------------------------------------------------
    svn:eol-style = native