Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.runtime.model.persistence.fs
Class FileSystemStorage

java.lang.Object
  extended by org.nuxeo.runtime.model.persistence.fs.FileSystemStorage
All Implemented Interfaces:
ContributionStorage

public class FileSystemStorage
extends Object
implements ContributionStorage

Author:
Bogdan Stefanescu

Field Summary
static Log log
           
 
Constructor Summary
FileSystemStorage()
           
 
Method Summary
 Contribution addContribution(Contribution contribution)
           
 Contribution getContribution(String name)
           
 List<Contribution> getContributions()
           
static void loadMetadata(Contribution contrib)
           
 boolean removeContribution(Contribution contrib)
           
static boolean safeCreate(File file, String content)
           
static String safeRead(File file)
           
static boolean safeRemove(File file)
           
static void safeWrite(File file, String content)
           
 Contribution updateContribution(Contribution contribution)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

public static final Log log
Constructor Detail

FileSystemStorage

public FileSystemStorage()
Method Detail

safeRead

public static String safeRead(File file)
                       throws IOException
Throws:
IOException

safeWrite

public static void safeWrite(File file,
                             String content)
                      throws IOException
Throws:
IOException

safeCreate

public static boolean safeCreate(File file,
                                 String content)
                          throws IOException
Throws:
IOException

safeRemove

public static boolean safeRemove(File file)
                          throws IOException
Throws:
IOException

loadMetadata

public static void loadMetadata(Contribution contrib)

addContribution

public Contribution addContribution(Contribution contribution)
                             throws Exception
Specified by:
addContribution in interface ContributionStorage
Throws:
Exception

getContribution

public Contribution getContribution(String name)
Specified by:
getContribution in interface ContributionStorage

getContributions

public List<Contribution> getContributions()
Specified by:
getContributions in interface ContributionStorage

removeContribution

public boolean removeContribution(Contribution contrib)
                           throws Exception
Specified by:
removeContribution in interface ContributionStorage
Throws:
Exception

updateContribution

public Contribution updateContribution(Contribution contribution)
                                throws Exception
Specified by:
updateContribution in interface ContributionStorage
Throws:
Exception

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.