org.apache.cocoon.components
Class Repository

java.lang.Object
  extended by org.apache.cocoon.components.Repository

public class Repository
extends Object

Author:
stefano

Field Summary
static String FILE_NAME
           
 
Method Summary
static void copy(File from, File to)
           
static void copy(InputStream from, OutputStream to)
           
static void copy(String from, String to)
           
static void fomSave(FOM_Cocoon cocoon, String dirName)
           
static int getID(String dirName)
           
static Repository getInstance()
           
static OutputStream getOutputStream(String dir)
           
static int getVersionID(String dirName)
          Returns the highest version id of the files included in the given directory.
static Object[] getVersions(String dirName)
           
static boolean remove(File file)
           
static boolean remove(String fileName)
           
static void revertFrom(String dir, int version)
           
static void save(Part part, File file)
           
static void save(Request request, String dirName)
           
static void save(Request request, String param, String file)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FILE_NAME

public static final String FILE_NAME
See Also:
Constant Field Values
Method Detail

getInstance

public static Repository getInstance()

save

public static void save(Request request,
                        String dirName)
                 throws Exception
Throws:
Exception

fomSave

public static void fomSave(FOM_Cocoon cocoon,
                           String dirName)
                    throws Exception
Throws:
Exception

save

public static void save(Request request,
                        String param,
                        String file)
                 throws Exception
Throws:
Exception

save

public static void save(Part part,
                        File file)
                 throws Exception
Throws:
Exception

getOutputStream

public static OutputStream getOutputStream(String dir)
                                    throws IOException
Throws:
IOException

revertFrom

public static void revertFrom(String dir,
                              int version)
                       throws IOException
Throws:
IOException

getVersionID

public static int getVersionID(String dirName)
Returns the highest version id of the files included in the given directory.


getVersions

public static Object[] getVersions(String dirName)

getID

public static int getID(String dirName)

remove

public static boolean remove(String fileName)

remove

public static boolean remove(File file)

copy

public static void copy(String from,
                        String to)
                 throws IOException
Throws:
IOException

copy

public static void copy(File from,
                        File to)
                 throws IOException
Throws:
IOException

copy

public static void copy(InputStream from,
                        OutputStream to)
                 throws IOException
Throws:
IOException


Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.