Author: reinhard
Date: Sat Apr  9 01:31:30 2005
New Revision: 160667

URL: http://svn.apache.org/viewcvs?view=rev&rev=160667
Log:
support for SingleBlockLocator (--> development deployment); improve exception 
handling; more renaming RemoteBlock --> Block; unit tests

Added:
    
cocoon/whiteboard/block-deployer/test/junit/org/apache/cocoon/blockdeployer/repository/LocatorFactoryTest.java
    
cocoon/whiteboard/block-deployer/test/junit/org/apache/cocoon/blockdeployer/repository/SingleBlockLocator.java
    
cocoon/whiteboard/block-deployer/test/sample-repositories/single-block-repository/
    
cocoon/whiteboard/block-deployer/test/sample-repositories/single-block-repository/block.xml
    
cocoon/whiteboard/block-deployer/test/sample-repositories/single-block-repository/webmail.xmap
Modified:
    
cocoon/whiteboard/block-deployer/src/api/org/apache/cocoon/blockdeployer/block/Block.java
    
cocoon/whiteboard/block-deployer/src/api/org/apache/cocoon/blockdeployer/repository/Browsable.java
    
cocoon/whiteboard/block-deployer/src/api/org/apache/cocoon/blockdeployer/repository/Locator.java
    
cocoon/whiteboard/block-deployer/src/impl/org/apache/cocoon/blockdeployer/block/Cob10.java
    
cocoon/whiteboard/block-deployer/src/impl/org/apache/cocoon/blockdeployer/repository/ApplicationServer22Locator.java
    
cocoon/whiteboard/block-deployer/src/impl/org/apache/cocoon/blockdeployer/repository/DefaultRepository.java
    
cocoon/whiteboard/block-deployer/src/impl/org/apache/cocoon/blockdeployer/repository/FilesystemLocator.java
    
cocoon/whiteboard/block-deployer/src/impl/org/apache/cocoon/blockdeployer/repository/LocatorFactory.java
    
cocoon/whiteboard/block-deployer/test/junit/org/apache/cocoon/blockdeployer/Constants.java
    
cocoon/whiteboard/block-deployer/test/junit/org/apache/cocoon/blockdeployer/repository/DefaultRepositoryTest.java
    
cocoon/whiteboard/block-deployer/test/junit/org/apache/cocoon/blockdeployer/repository/FilesystemLocatorTest.java
    
cocoon/whiteboard/block-deployer/test/sample-repositories/rep1/mycompany.com/webmail/1.3.43/webmail-1.3.43.cob

Modified: 
cocoon/whiteboard/block-deployer/src/api/org/apache/cocoon/blockdeployer/block/Block.java
URL: 
http://svn.apache.org/viewcvs/cocoon/whiteboard/block-deployer/src/api/org/apache/cocoon/blockdeployer/block/Block.java?view=diff&r1=160666&r2=160667
==============================================================================
--- 
cocoon/whiteboard/block-deployer/src/api/org/apache/cocoon/blockdeployer/block/Block.java
 (original)
+++ 
cocoon/whiteboard/block-deployer/src/api/org/apache/cocoon/blockdeployer/block/Block.java
 Sat Apr  9 01:31:30 2005
@@ -19,6 +19,7 @@
 import java.io.InputStream;
 
 import org.apache.cocoon.blockdeployer.block.descriptor.BlockDescriptor;
+import org.apache.cocoon.blockdeployer.repository.BlockNotFoundException;
 import org.apache.cocoon.blockdeployer.repository.Locator;
 
 
@@ -43,9 +44,10 @@
      * This method executes the call that reads the complete block as stream.
      * 
      * @return returns an @link InputStream of the Block
+     * @throws BlockNotFoundException TODO
      * @throws throws IOException if block can't be read by its locator 
      */
-    public InputStream getStream() throws IOException;
+    public InputStream getStream() throws IOException, BlockNotFoundException;
     
     
     /**

Modified: 
cocoon/whiteboard/block-deployer/src/api/org/apache/cocoon/blockdeployer/repository/Browsable.java
URL: 
http://svn.apache.org/viewcvs/cocoon/whiteboard/block-deployer/src/api/org/apache/cocoon/blockdeployer/repository/Browsable.java?view=diff&r1=160666&r2=160667
==============================================================================
--- 
cocoon/whiteboard/block-deployer/src/api/org/apache/cocoon/blockdeployer/repository/Browsable.java
 (original)
+++ 
cocoon/whiteboard/block-deployer/src/api/org/apache/cocoon/blockdeployer/repository/Browsable.java
 Sat Apr  9 01:31:30 2005
@@ -15,6 +15,8 @@
  */
 package org.apache.cocoon.blockdeployer.repository;
 
+import java.io.IOException;
+
 import org.apache.cocoon.blockdeployer.block.Block;
 
 /** 
@@ -28,7 +30,8 @@
      * Find all available blocks
      * 
      * @return returns an array of RemoteBlocks.
+     * @throws IOException TODO
      */
-    public Block[] browse();
+    public Block[] browse() throws IOException;
 
 }

Modified: 
cocoon/whiteboard/block-deployer/src/api/org/apache/cocoon/blockdeployer/repository/Locator.java
URL: 
http://svn.apache.org/viewcvs/cocoon/whiteboard/block-deployer/src/api/org/apache/cocoon/blockdeployer/repository/Locator.java?view=diff&r1=160666&r2=160667
==============================================================================
--- 
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
 Sat Apr  9 01:31:30 2005
@@ -28,7 +28,7 @@
  */
 public interface Locator extends Browsable {
 
-    public static final String COB_INF_BLOCK_XML = "COB-INF/block.xml";
+    public static final String COB_INF_BLOCK_XML = "block.xml";
 
     /**
      * Get a block by its id (e.g. http://mycompany.com/webmail/1.3.43). The 
Locator 
@@ -40,7 +40,7 @@
      * @throws IOException in the case that the block can be found but there 
are problems
      *         when accessing its meta data
      */
-    public Block getRemoteBlock(String blockId) throws BlockNotFoundException, 
IOException;
+    public Block getBlock(String blockId) throws BlockNotFoundException, 
IOException;
     
     /**
      * @return returns the unique identifier of this locator

Modified: 
cocoon/whiteboard/block-deployer/src/impl/org/apache/cocoon/blockdeployer/block/Cob10.java
URL: 
http://svn.apache.org/viewcvs/cocoon/whiteboard/block-deployer/src/impl/org/apache/cocoon/blockdeployer/block/Cob10.java?view=diff&r1=160666&r2=160667
==============================================================================
--- 
cocoon/whiteboard/block-deployer/src/impl/org/apache/cocoon/blockdeployer/block/Cob10.java
 (original)
+++ 
cocoon/whiteboard/block-deployer/src/impl/org/apache/cocoon/blockdeployer/block/Cob10.java
 Sat Apr  9 01:31:30 2005
@@ -20,6 +20,7 @@
 
 import org.apache.cocoon.blockdeployer.block.Block;
 import org.apache.cocoon.blockdeployer.block.descriptor.BlockDescriptor;
+import org.apache.cocoon.blockdeployer.repository.BlockNotFoundException;
 import org.apache.cocoon.blockdeployer.repository.Locator;
 
 /**
@@ -49,8 +50,14 @@
         this.blockDescriptor = blockDescriptor;
     }
 
-    public InputStream getStream() throws IOException {
-        return null;
+    public InputStream getStream() throws IOException, BlockNotFoundException {
+        InputStream is = null;
+        try {
+            is = this.locator.getBlockAsStream(this.blockId);
+        } catch(BlockNotFoundException bnfe) {
+            throw new BlockNotFoundException("Block can't be found anymore. 
Maybe it has been deleted since the last lookup!");
+        }
+        return is;
     }
     
     protected void setBlockId(String blockId) {

Modified: 
cocoon/whiteboard/block-deployer/src/impl/org/apache/cocoon/blockdeployer/repository/ApplicationServer22Locator.java
URL: 
http://svn.apache.org/viewcvs/cocoon/whiteboard/block-deployer/src/impl/org/apache/cocoon/blockdeployer/repository/ApplicationServer22Locator.java?view=diff&r1=160666&r2=160667
==============================================================================
--- 
cocoon/whiteboard/block-deployer/src/impl/org/apache/cocoon/blockdeployer/repository/ApplicationServer22Locator.java
 (original)
+++ 
cocoon/whiteboard/block-deployer/src/impl/org/apache/cocoon/blockdeployer/repository/ApplicationServer22Locator.java
 Sat Apr  9 01:31:30 2005
@@ -44,7 +44,7 @@
  */
 public class ApplicationServer22Locator implements Locator, Deployable, 
Lockable, Transactional {
 
-    protected final static String WIRING_XML = "wiring.xml";
+    public final static String WIRING_XML = "wiring.xml";
     protected final static String WORK_DIR = "work";
     
     private File basedir;
@@ -66,11 +66,11 @@
         this.logger = logger;
     }
 
-    public Block getRemoteBlock(String blockUri) {
+    public Block getBlock(String blockUri) {
         return null;
     }
 
-    public Block[] browse() {
+    public Block[] browse() throws IOException {
         return null;
     }
 

Modified: 
cocoon/whiteboard/block-deployer/src/impl/org/apache/cocoon/blockdeployer/repository/DefaultRepository.java
URL: 
http://svn.apache.org/viewcvs/cocoon/whiteboard/block-deployer/src/impl/org/apache/cocoon/blockdeployer/repository/DefaultRepository.java?view=diff&r1=160666&r2=160667
==============================================================================
--- 
cocoon/whiteboard/block-deployer/src/impl/org/apache/cocoon/blockdeployer/repository/DefaultRepository.java
 (original)
+++ 
cocoon/whiteboard/block-deployer/src/impl/org/apache/cocoon/blockdeployer/repository/DefaultRepository.java
 Sat Apr  9 01:31:30 2005
@@ -45,7 +45,7 @@
         this.locators.remove(locator);   
     }
 
-    public Block[] browse() {
+    public Block[] browse() throws IOException {
         return null;
     }
 
@@ -64,7 +64,7 @@
             Locator locator = (Locator) locatorsIterator.next();
             Block remoteBlock = null;
             try {
-                remoteBlock = locator.getRemoteBlock(blockId);
+                remoteBlock = locator.getBlock(blockId);
                 tempLocators.add(remoteBlock);   
             } catch (BlockNotFoundException e) {
                 // block not added to the list to be returned

Modified: 
cocoon/whiteboard/block-deployer/src/impl/org/apache/cocoon/blockdeployer/repository/FilesystemLocator.java
URL: 
http://svn.apache.org/viewcvs/cocoon/whiteboard/block-deployer/src/impl/org/apache/cocoon/blockdeployer/repository/FilesystemLocator.java?view=diff&r1=160666&r2=160667
==============================================================================
--- 
cocoon/whiteboard/block-deployer/src/impl/org/apache/cocoon/blockdeployer/repository/FilesystemLocator.java
 (original)
+++ 
cocoon/whiteboard/block-deployer/src/impl/org/apache/cocoon/blockdeployer/repository/FilesystemLocator.java
 Sat Apr  9 01:31:30 2005
@@ -86,7 +86,7 @@
         return LocatorUtils.getBlockAsFile(this.basedir, 
blockUri.substring("http:/".length()));
     }
     
-    public Block getRemoteBlock(String blockUri) throws IOException, 
BlockNotFoundException {
+    public Block getBlock(String blockUri) throws IOException, 
BlockNotFoundException {
         InputStream descriptorInputStream = 
this.getBlockDescriptorAsStream(blockUri);
         if(descriptorInputStream == null) {
             throw new BlockNotFoundException("Block " + blockUri + " not 
found.");
@@ -94,7 +94,7 @@
         return BlockFactory.getRemoteBlock(descriptorInputStream, this);
     }  
     
-    public Block[] browse() {
+    public Block[] browse() throws IOException {
         throw new UnsupportedOperationException("Not supported yet");
     }
     

Modified: 
cocoon/whiteboard/block-deployer/src/impl/org/apache/cocoon/blockdeployer/repository/LocatorFactory.java
URL: 
http://svn.apache.org/viewcvs/cocoon/whiteboard/block-deployer/src/impl/org/apache/cocoon/blockdeployer/repository/LocatorFactory.java?view=diff&r1=160666&r2=160667
==============================================================================
--- 
cocoon/whiteboard/block-deployer/src/impl/org/apache/cocoon/blockdeployer/repository/LocatorFactory.java
 (original)
+++ 
cocoon/whiteboard/block-deployer/src/impl/org/apache/cocoon/blockdeployer/repository/LocatorFactory.java
 Sat Apr  9 01:31:30 2005
@@ -15,6 +15,10 @@
  */
 package org.apache.cocoon.blockdeployer.repository;
 
+import java.io.File;
+
+import org.apache.cocoon.blockdeployer.logging.LoggerFacade;
+
 /**
  * The LocatorFactory creates based on the provided URL
  * a Locator.
@@ -23,8 +27,17 @@
  */
 public class LocatorFactory {
 
-    public static Locator getLocator(String url) {
-        return null;
+    public static Locator getLocator(String url, boolean singleBlock, 
LoggerFacade logger) {
+        // return a SingleBlockLocator
+        if(singleBlock) {
+            return new SingleBlockLocator(new File(url),  logger);
+        }
+        
+        // return a HttpLocator
+        
+        // return a FileSystemLocator
+        return new FilesystemLocator(new File(url), logger);
+        
     }
     
 }

Modified: 
cocoon/whiteboard/block-deployer/test/junit/org/apache/cocoon/blockdeployer/Constants.java
URL: 
http://svn.apache.org/viewcvs/cocoon/whiteboard/block-deployer/test/junit/org/apache/cocoon/blockdeployer/Constants.java?view=diff&r1=160666&r2=160667
==============================================================================
--- 
cocoon/whiteboard/block-deployer/test/junit/org/apache/cocoon/blockdeployer/Constants.java
 (original)
+++ 
cocoon/whiteboard/block-deployer/test/junit/org/apache/cocoon/blockdeployer/Constants.java
 Sat Apr  9 01:31:30 2005
@@ -26,6 +26,7 @@
     // basedirs for locators
     public static final String VALID_LOCATION_1 = 
"test/sample-repositories/rep1";
     public static final String VALID_ASL_1 = 
"test/sample-repositories/application-server/WEB-INF/blocks";
+    public static final String VALID_SBL_1 = 
"test/sample-repositories/single-block-repository";
     public static final String TMP_VALID_ASL_1 = TMP_JUNIT + 
"/asf1/WEB-INF/blocks";
     public static final String INVALID_LOCATION = "bla";
     

Modified: 
cocoon/whiteboard/block-deployer/test/junit/org/apache/cocoon/blockdeployer/repository/DefaultRepositoryTest.java
URL: 
http://svn.apache.org/viewcvs/cocoon/whiteboard/block-deployer/test/junit/org/apache/cocoon/blockdeployer/repository/DefaultRepositoryTest.java?view=diff&r1=160666&r2=160667
==============================================================================
--- 
cocoon/whiteboard/block-deployer/test/junit/org/apache/cocoon/blockdeployer/repository/DefaultRepositoryTest.java
 (original)
+++ 
cocoon/whiteboard/block-deployer/test/junit/org/apache/cocoon/blockdeployer/repository/DefaultRepositoryTest.java
 Sat Apr  9 01:31:30 2005
@@ -149,7 +149,7 @@
         locator.getIdentifier();
         control1.setReturnValue(name, MockControl.ZERO_OR_MORE);
         for(int i = 0; i < allAvailableBlocks.length; i++) {
-            locator.getRemoteBlock(allAvailableBlocks[i]);
+            locator.getBlock(allAvailableBlocks[i]);
             if(hasItem(locatorBlocks, allAvailableBlocks[i])) {
                 control1.setReturnValue(remoteBlock, 
MockControl.ZERO_OR_MORE);                       
             }
@@ -160,7 +160,7 @@
         
         // add mock behaviour for unavailable blocks (have to throw 
BlockNotFoundException)
         for(int i = 0; i < allUnavailableBlocks.length; i++) {
-            locator.getRemoteBlock(allUnavailableBlocks[i]);
+            locator.getBlock(allUnavailableBlocks[i]);
             control1.setThrowable(new BlockNotFoundException());
         }
 

Modified: 
cocoon/whiteboard/block-deployer/test/junit/org/apache/cocoon/blockdeployer/repository/FilesystemLocatorTest.java
URL: 
http://svn.apache.org/viewcvs/cocoon/whiteboard/block-deployer/test/junit/org/apache/cocoon/blockdeployer/repository/FilesystemLocatorTest.java?view=diff&r1=160666&r2=160667
==============================================================================
--- 
cocoon/whiteboard/block-deployer/test/junit/org/apache/cocoon/blockdeployer/repository/FilesystemLocatorTest.java
 (original)
+++ 
cocoon/whiteboard/block-deployer/test/junit/org/apache/cocoon/blockdeployer/repository/FilesystemLocatorTest.java
 Sat Apr  9 01:31:30 2005
@@ -57,7 +57,7 @@
         // get the block that should be available and test its data
         Block remoteBlock = null;
         try {
-            remoteBlock = 
filesystemLocator.getRemoteBlock(Constants.AVAILABLE_VALID_WEBMAIL1343_BLOCKID);
+            remoteBlock = 
filesystemLocator.getBlock(Constants.AVAILABLE_VALID_WEBMAIL1343_BLOCKID);
         } catch(Exception e) {
             // test fails because this should work (maybe a problem with the 
mapping)
             throw e;
@@ -89,7 +89,7 @@
         // try to get an unavailable block
         Block remoteBlock = null;
         try {
-            remoteBlock = 
filesystemLocator.getRemoteBlock(Constants.AVAILABLE_INVALID_SAMPLE_BLOCKID);
+            remoteBlock = 
filesystemLocator.getBlock(Constants.AVAILABLE_INVALID_SAMPLE_BLOCKID);
             fail("The block URI is valid but at this place there is no block. 
An exception should be raised.");
         } catch (BlockNotFoundException e) {
             // correct behaviour

Added: 
cocoon/whiteboard/block-deployer/test/junit/org/apache/cocoon/blockdeployer/repository/LocatorFactoryTest.java
URL: 
http://svn.apache.org/viewcvs/cocoon/whiteboard/block-deployer/test/junit/org/apache/cocoon/blockdeployer/repository/LocatorFactoryTest.java?view=auto&rev=160667
==============================================================================
--- 
cocoon/whiteboard/block-deployer/test/junit/org/apache/cocoon/blockdeployer/repository/LocatorFactoryTest.java
 (added)
+++ 
cocoon/whiteboard/block-deployer/test/junit/org/apache/cocoon/blockdeployer/repository/LocatorFactoryTest.java
 Sat Apr  9 01:31:30 2005
@@ -0,0 +1,37 @@
+/*
+ * Copyright 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.cocoon.blockdeployer.repository;
+
+import org.apache.cocoon.blockdeployer.Constants;
+import org.apache.cocoon.blockdeployer.LogEnabledTestCase;
+
+public class LocatorFactoryTest extends LogEnabledTestCase {
+    
+    public void testSingleBlockLocator() {
+        Locator l = LocatorFactory.getLocator(Constants.VALID_SBL_1, true, 
this.logger);
+        if (!(l instanceof SingleBlockLocator)) {
+            fail("The LocatorFactory has to return a SingleBlockLocator in the 
case that the singleLocalblock value is set to true");
+        }
+    }
+    
+    public void testFilesystemLocator() {
+        Locator l = LocatorFactory.getLocator(Constants.VALID_LOCATION_1, 
false, this.logger);      
+        if (!(l instanceof FilesystemLocator)) {
+            fail("The LocatorFactory has to return a FilesystemLocator in the 
case that the singleLocalblock value is set to true");
+        }        
+    }    
+
+}

Added: 
cocoon/whiteboard/block-deployer/test/junit/org/apache/cocoon/blockdeployer/repository/SingleBlockLocator.java
URL: 
http://svn.apache.org/viewcvs/cocoon/whiteboard/block-deployer/test/junit/org/apache/cocoon/blockdeployer/repository/SingleBlockLocator.java?view=auto&rev=160667
==============================================================================
--- 
cocoon/whiteboard/block-deployer/test/junit/org/apache/cocoon/blockdeployer/repository/SingleBlockLocator.java
 (added)
+++ 
cocoon/whiteboard/block-deployer/test/junit/org/apache/cocoon/blockdeployer/repository/SingleBlockLocator.java
 Sat Apr  9 01:31:30 2005
@@ -0,0 +1,76 @@
+/*
+ * Copyright 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.cocoon.blockdeployer.repository;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+
+import org.apache.cocoon.blockdeployer.block.Block;
+import org.apache.cocoon.blockdeployer.logging.LoggerFacade;
+import org.apache.cocoon.blockdeployer.utils.LocatorUtils;
+
+/**
+ * A locator that contains only a single block. This is useful when
+ * only a local reference to a block should be set while deployment (this
+ * is of course only useful for development).
+ */
+public class SingleBlockLocator implements Locator {
+    
+    LoggerFacade logger;
+    File basedir;
+    
+    public SingleBlockLocator(File basedir, LoggerFacade logger) {
+        if(logger == null) {
+            throw new NullPointerException("Please set a Logger implementing 
the interface " + LoggerFacade.class.getClass().getName() + ".");
+        }        
+        this.logger = logger;
+        
+        LocatorUtils.checkBasedir(basedir, logger, FilesystemLocator.class);   
+        this.basedir = basedir;
+        this.logger.debug(this.getClass(), "Created SingleBlockLocator, 
basedir: " + this.basedir.getAbsolutePath());
+    }
+    
+    public Block getBlock(String blockId) throws BlockNotFoundException, 
IOException {
+        return null;
+    }
+
+    public String getIdentifier() {
+        try {
+            return this.basedir.toURL().toString();
+        } catch (MalformedURLException e) {
+            this.logger.error(FilesystemLocator.class, "The locator's basedir 
can't be resolved", e);
+        }
+        return null;
+    }
+
+    public InputStream getBlockAsStream(String blockId) throws IOException, 
BlockNotFoundException {
+        throw new UnsupportedOperationException("Not supported yet!");
+    }
+
+    public Block[] browse() throws IOException {
+        Block[] block = new Block[1];
+        try {
+            block[0] = this.getBlock("");
+        } catch (BlockNotFoundException ex) {
+            return new Block[0];
+        } 
+        return block;
+    }
+
+
+}

Modified: 
cocoon/whiteboard/block-deployer/test/sample-repositories/rep1/mycompany.com/webmail/1.3.43/webmail-1.3.43.cob
URL: 
http://svn.apache.org/viewcvs/cocoon/whiteboard/block-deployer/test/sample-repositories/rep1/mycompany.com/webmail/1.3.43/webmail-1.3.43.cob?view=diff&r1=160666&r2=160667
==============================================================================
Binary files - no diff available.

Added: 
cocoon/whiteboard/block-deployer/test/sample-repositories/single-block-repository/block.xml
URL: 
http://svn.apache.org/viewcvs/cocoon/whiteboard/block-deployer/test/sample-repositories/single-block-repository/block.xml?view=auto&rev=160667
==============================================================================
--- 
cocoon/whiteboard/block-deployer/test/sample-repositories/single-block-repository/block.xml
 (added)
+++ 
cocoon/whiteboard/block-deployer/test/sample-repositories/single-block-repository/block.xml
 Sat Apr  9 01:31:30 2005
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  Copyright 1999-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.
+-->
+<block xmlns="http://apache.org/cocoon/blocks/cob/1.0";
+       id="http://mycompany.com/webmail/1.3.43";>
+       
+   <!-- MANDATORY -->
+   
+   <name>Super Webmail</name>
+   <description href="http://www.mycompany.com/products/webmail/";>This is a 
super webmail block with amazing functionalities</description>
+   <license href="http://www.mycompany.com/license/1.3";>BSD License</license>
+   <author href="http://www.mycompany.com/";>MyCompany Inc.</author>
+   <sitemap src="/webmail.xmap"/>
+   
+   <!-- OPTIONAL -->
+   
+   <requirements>
+      <requires 
+          block="http://mycompany.com/skin"; 
+          name="external-skin"
+      />
+      <requires 
+          block="http://mycompany.com/skin/2.0";
+          name="internal-skin"
+      />
+      <requires 
+          block="http://anothercompany.com/MailRepository/2.0"; 
+          name="repository">
+         <uses component="com.anothercompany.repository.Repository" 
+              name="repository"
+         />
+      </requires>
+   </requirements>
+   
+   <properties>
+     <property name="database.user">
+       <default>saa</default>
+       <description>the database user ÃÃÃ</description>
+       <test>test</test>
+     </property>
+
+     <property name="database.user1">
+       <default>sa1</default>
+       <description>the database user</description>
+       <test>test</test>
+     </property>     
+     
+   </properties>
+   
+   <implements block="http://mycompany.com/skin/1.2"/>
+   
+   <extends block="http://yetanothercompany.com/skins/fancy/1.2.2"/>
+   
+   <provides component="http://anothercompany.repository.Repository"/>
+   
+</block>
\ No newline at end of file

Added: 
cocoon/whiteboard/block-deployer/test/sample-repositories/single-block-repository/webmail.xmap
URL: 
http://svn.apache.org/viewcvs/cocoon/whiteboard/block-deployer/test/sample-repositories/single-block-repository/webmail.xmap?view=auto&rev=160667
==============================================================================
--- 
cocoon/whiteboard/block-deployer/test/sample-repositories/single-block-repository/webmail.xmap
 (added)
+++ 
cocoon/whiteboard/block-deployer/test/sample-repositories/single-block-repository/webmail.xmap
 Sat Apr  9 01:31:30 2005
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-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.
+-->
+<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0"/>
\ No newline at end of file


Reply via email to