Nuxeo Enterprise Platform 5.4

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 java.lang.Object
implements ContributionStorage

Author:
Bogdan Stefanescu

Field Summary
static Log log
           
 
Constructor Summary
FileSystemStorage()
           
 
Method Summary
 Contribution addContribution(Contribution contribution)
           
 Contribution getContribution(java.lang.String name)
           
 java.util.List<Contribution> getContributions()
           
static void loadMetadata(ContributionFile contrib)
           
 boolean removeContribution(Contribution contrib)
           
static boolean safeCreate(java.io.File file, java.lang.String content)
           
static java.lang.String safeRead(java.io.File file)
           
static boolean safeRemove(java.io.File file)
           
static void safeWrite(java.io.File file, java.lang.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 Log log
Constructor Detail

FileSystemStorage

public FileSystemStorage()
Method Detail

safeRead

public static java.lang.String safeRead(java.io.File file)
                                 throws java.io.IOException
Throws:
java.io.IOException

safeWrite

public static void safeWrite(java.io.File file,
                             java.lang.String content)
                      throws java.io.IOException
Throws:
java.io.IOException

safeCreate

public static boolean safeCreate(java.io.File file,
                                 java.lang.String content)
                          throws java.io.IOException
Throws:
java.io.IOException

safeRemove

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

loadMetadata

public static void loadMetadata(ContributionFile contrib)

addContribution

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

getContribution

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

getContributions

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

removeContribution

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

updateContribution

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

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.