Class FileSystemStorage
- java.lang.Object
-
- org.nuxeo.runtime.model.persistence.fs.FileSystemStorage
-
- All Implemented Interfaces:
ContributionStorage
public class FileSystemStorage extends Object implements ContributionStorage
- Author:
- Bogdan Stefanescu
-
-
Constructor Summary
Constructors Constructor Description FileSystemStorage()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method 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)
-
-
-
Field Detail
-
log
public static final Log log
-
factory
protected static final DocumentBuilderFactory factory
-
root
protected final File root
-
-
Method Detail
-
safeRemove
public static boolean safeRemove(File file)
-
loadMetadata
public static void loadMetadata(Contribution contrib)
-
addContribution
public Contribution addContribution(Contribution contribution)
- Specified by:
addContribution
in interfaceContributionStorage
-
getContribution
public Contribution getContribution(String name)
- Specified by:
getContribution
in interfaceContributionStorage
-
getContributions
public List<Contribution> getContributions()
- Specified by:
getContributions
in interfaceContributionStorage
-
removeContribution
public boolean removeContribution(Contribution contrib)
- Specified by:
removeContribution
in interfaceContributionStorage
-
updateContribution
public Contribution updateContribution(Contribution contribution)
- Specified by:
updateContribution
in interfaceContributionStorage
-
-