public class FileSystemStorage extends Object implements ContributionStorage
Modifier and Type | Field and Description |
---|---|
static org.apache.commons.logging.Log |
log |
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 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 © 2015 Nuxeo SA. All rights reserved.