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

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

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.html 1304258 2012-03-23 10:09:27Z ilgrosso $
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-2010 The Apache Software Foundation. All Rights Reserved.