|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object info.magnolia.jcr.util.PropertiesImportExport
public class PropertiesImportExport
Utility class providing support for properties-like format to import/export jcr data. Useful when data regularly needs to be bootstrapped, for instance, and the jcr xml format is too cumbersome to maintain. TODO : handle conflicts (already existing nodes, properties, what to do with existing properties if we don't create new nodes, ...) TODO dlipp - export is not yet implemented
Constructor Summary | |
---|---|
PropertiesImportExport()
|
Method Summary | |
---|---|
protected Object |
convertPropertyStringToObject(String valueStr)
|
void |
createNodes(javax.jcr.Node root,
InputStream propertiesStream)
Each property or node in the stream has to be separated by the \n. |
void |
createNodes(javax.jcr.Node root,
String... properties)
Each property is one item in the properties varargs passed in. |
protected void |
populateNode(javax.jcr.Node node,
String name,
String valueStr)
|
protected void |
setIdentifier(javax.jcr.Node ignoredNode,
String ignoredString)
Intentionally created this method to allow simple creation of sublcasses actually setting the identifier (e.g. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PropertiesImportExport()
Method Detail |
---|
public void createNodes(javax.jcr.Node root, String... properties) throws IOException, javax.jcr.RepositoryException
root
- properties
-
IOException
javax.jcr.RepositoryException
public void createNodes(javax.jcr.Node root, InputStream propertiesStream) throws IOException, javax.jcr.RepositoryException
root
- propertiesStream
-
IOException
javax.jcr.RepositoryException
protected void populateNode(javax.jcr.Node node, String name, String valueStr) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
protected void setIdentifier(javax.jcr.Node ignoredNode, String ignoredString)
protected Object convertPropertyStringToObject(String valueStr)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |