org.apache.cocoon.components.source.impl
Class ZipSourceFactory

java.lang.Object
  extended byorg.apache.avalon.framework.logger.AbstractLogEnabled
      extended byorg.apache.cocoon.components.source.impl.ZipSourceFactory
All Implemented Interfaces:
Component, LogEnabled, Serviceable, SourceFactory, ThreadSafe

public class ZipSourceFactory
extends AbstractLogEnabled
implements SourceFactory, ThreadSafe, Serviceable

Implementation of a Source that gets its content from a ZIP archive.

A ZIP source can be obtained using the zip: pseudo-protocol. The syntax for protocol is

   zip:[archive-url]!/[file-path]
 
Where, archive-url can be any supported Cocoon URL, and file-path is the path to the file within archive.

Since:
2.1.8
Version:
CVS $Id: ZipSourceFactory.java 295026 2005-10-05 09:28:58Z vgritsenko $
Author:
Reinhard Poetz

Field Summary
 
Fields inherited from interface org.apache.excalibur.source.SourceFactory
ROLE
 
Constructor Summary
ZipSourceFactory()
           
 
Method Summary
 Source getSource(String location, Map parameters)
           
 void release(Source source)
           
 void service(ServiceManager manager)
           
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ZipSourceFactory

public ZipSourceFactory()
Method Detail

service

public void service(ServiceManager manager)
             throws ServiceException
Specified by:
service in interface Serviceable
Throws:
ServiceException

getSource

public Source getSource(String location,
                        Map parameters)
                 throws IOException,
                        MalformedURLException
Specified by:
getSource in interface SourceFactory
Throws:
IOException
MalformedURLException

release

public void release(Source source)
Specified by:
release in interface SourceFactory


Copyright ? 1999-2005 The Apache Software Foundation. All Rights Reserved.