public class FileSystemStorage extends Object implements ContributionStorage
Modifier and Type | Field and Description |
---|---|
protected static DocumentBuilderFactory |
factory |
static org.apache.commons.logging.Log |
log |
protected File |
root |
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 org.apache.commons.logging.Log log
protected static final DocumentBuilderFactory factory
public FileSystemStorage()
public static boolean safeCreate(File file, String content)
public static boolean safeRemove(File file)
public static void loadMetadata(Contribution contrib)
public Contribution addContribution(Contribution contribution)
addContribution
in interface ContributionStorage
public Contribution getContribution(String name)
getContribution
in interface ContributionStorage
public List<Contribution> getContributions()
getContributions
in interface ContributionStorage
public boolean removeContribution(Contribution contrib)
removeContribution
in interface ContributionStorage
public Contribution updateContribution(Contribution contribution)
updateContribution
in interface ContributionStorage
Copyright © 2018 Nuxeo. All rights reserved.