public class FileSystemStorage extends Object implements ContributionStorage
Constructor and Description |
---|
FileSystemStorage() |
Modifier and Type | Method and Description |
---|---|
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) |
public static final Log log
public static String safeRead(File file) throws IOException
IOException
public static void safeWrite(File file, String content) throws IOException
IOException
public static boolean safeCreate(File file, String content) throws IOException
IOException
public static boolean safeRemove(File file) throws IOException
IOException
public static void loadMetadata(Contribution contrib)
public Contribution addContribution(Contribution contribution) throws Exception
addContribution
in interface ContributionStorage
Exception
public Contribution getContribution(String name)
getContribution
in interface ContributionStorage
public List<Contribution> getContributions()
getContributions
in interface ContributionStorage
public boolean removeContribution(Contribution contrib) throws Exception
removeContribution
in interface ContributionStorage
Exception
public Contribution updateContribution(Contribution contribution) throws Exception
updateContribution
in interface ContributionStorage
Exception
Copyright © 2011 Nuxeo SA. All Rights Reserved.