cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From reinh...@apache.org
Subject svn commit: rev 54242 - in cocoon/whiteboard/block-deployer/src/api/org/apache/cocoon/blockdeployer: block repository
Date Sun, 10 Oct 2004 11:50:21 GMT
Author: reinhard
Date: Sun Oct 10 04:50:21 2004
New Revision: 54242

Modified:
   cocoon/whiteboard/block-deployer/src/api/org/apache/cocoon/blockdeployer/block/RemoteBlock.java
   cocoon/whiteboard/block-deployer/src/api/org/apache/cocoon/blockdeployer/repository/Deployable.java
   cocoon/whiteboard/block-deployer/src/api/org/apache/cocoon/blockdeployer/repository/Locator.java
   cocoon/whiteboard/block-deployer/src/api/org/apache/cocoon/blockdeployer/repository/Writeable.java
Log:
over designed (merging Block with RemoteBlock)
(RemoteBlock to be renamed to Block later)

Modified: cocoon/whiteboard/block-deployer/src/api/org/apache/cocoon/blockdeployer/block/RemoteBlock.java
==============================================================================
--- cocoon/whiteboard/block-deployer/src/api/org/apache/cocoon/blockdeployer/block/RemoteBlock.java
(original)
+++ cocoon/whiteboard/block-deployer/src/api/org/apache/cocoon/blockdeployer/block/RemoteBlock.java
Sun Oct 10 04:50:21 2004
@@ -15,6 +15,8 @@
  */
 package org.apache.cocoon.blockdeployer.block;
 
+import java.io.InputStream;
+
 import org.apache.cocoon.blockdeployer.block.descriptor.BlockDescriptor;
 import org.apache.cocoon.blockdeployer.repository.Locator;
 
@@ -22,22 +24,26 @@
 /**
  * The RemoteBlock points to a block that can be reached by a locator. This
  * object gives access to this locator, to its meta information and has a method
- * to get the complete block.
+ * to get the complete block as stream.
  */
 public interface RemoteBlock {
     
     /**
+     * @return returns the Block uri
+     */
+    public String getBlockId();
+    
+    /**
      * @return the locator that contains this block
      */
     public Locator getLocator();
     
     /**
-     * This method executes the call that reads the complete block as binary
-     * from the locator.
+     * This method executes the call that reads the complete block as stream.
      * 
-     * @return the Block object that gives access to the binary
+     * @return returns an @link InputStream of the Block
      */
-    public Block getBlock();
+    public InputStream getStream() throws Exception;
     
     
     /**

Modified: cocoon/whiteboard/block-deployer/src/api/org/apache/cocoon/blockdeployer/repository/Deployable.java
==============================================================================
--- cocoon/whiteboard/block-deployer/src/api/org/apache/cocoon/blockdeployer/repository/Deployable.java
(original)
+++ cocoon/whiteboard/block-deployer/src/api/org/apache/cocoon/blockdeployer/repository/Deployable.java
Sun Oct 10 04:50:21 2004
@@ -15,7 +15,7 @@
  */
 package org.apache.cocoon.blockdeployer.repository;
 
-import org.apache.cocoon.blockdeployer.block.Block;
+import org.apache.cocoon.blockdeployer.block.RemoteBlock;
 
 /**
  * This interface marks a locator that is able to deploy a block into
@@ -33,6 +33,6 @@
      * @return true if deployment was successfull, false if not
      * @throws @link UnsupportedBlockException
      */
-    public boolean deploy(Block[] blocks) throws UnsupportedBlockException;
+    public boolean deploy(RemoteBlock[] blocks) throws Exception;
     
 }

Modified: cocoon/whiteboard/block-deployer/src/api/org/apache/cocoon/blockdeployer/repository/Locator.java
==============================================================================
--- cocoon/whiteboard/block-deployer/src/api/org/apache/cocoon/blockdeployer/repository/Locator.java
(original)
+++ cocoon/whiteboard/block-deployer/src/api/org/apache/cocoon/blockdeployer/repository/Locator.java
Sun Oct 10 04:50:21 2004
@@ -15,6 +15,8 @@
  */
 package org.apache.cocoon.blockdeployer.repository;
 
+import java.io.InputStream;
+
 import org.apache.cocoon.blockdeployer.block.RemoteBlock;
 
 
@@ -23,12 +25,14 @@
  * 
  * @since 0.1
  */
-public interface Locator extends Browsable, Searchable {
+public interface Locator extends Browsable {
 
     public static final String COB_INF_BLOCK_XML = "COB-INF/block.xml";
 
-    public RemoteBlock getBlock(String blockId) throws Exception;
+    public RemoteBlock getRemoteBlock(String blockId) throws Exception;
     
     public String getIdentifier();
+
+    public InputStream getBlockAsStream(String blockId) throws Exception;
     
 }

Modified: cocoon/whiteboard/block-deployer/src/api/org/apache/cocoon/blockdeployer/repository/Writeable.java
==============================================================================
--- cocoon/whiteboard/block-deployer/src/api/org/apache/cocoon/blockdeployer/repository/Writeable.java
(original)
+++ cocoon/whiteboard/block-deployer/src/api/org/apache/cocoon/blockdeployer/repository/Writeable.java
Sun Oct 10 04:50:21 2004
@@ -15,7 +15,7 @@
  */
 package org.apache.cocoon.blockdeployer.repository;
 
-import org.apache.cocoon.blockdeployer.block.Block;
+import org.apache.cocoon.blockdeployer.block.RemoteBlock;
 
 /**
  * This interface marks a locator which a block can be added to.
@@ -24,6 +24,6 @@
  */
 public interface Writeable {
 
-    public void addBlock(final Block block, final Credentials credentials);
+    public void addBlock(final RemoteBlock block, final Credentials credentials);
     
 }

Mime
View raw message