public class RepositoryMarshaller extends Object
RepositoryNode
and unmarshall back
into the repository.Constructor and Description |
---|
RepositoryMarshaller() |
Modifier and Type | Method and Description |
---|---|
protected String |
getStringByValue(javax.jcr.Value propertyValue)
Gets a string representation of a
Value . |
protected javax.jcr.Value |
getValueByType(int propertyType,
String propertyValue,
javax.jcr.ValueFactory valueFactory)
Get the
Value of a property value according to its type. |
RepositoryNode |
marshallNode(javax.jcr.Node node) |
RepositoryNode |
marshallNode(javax.jcr.Node node,
int depth,
List<String> excludeNodeTypes,
boolean includeMeta) |
RepositoryProperty |
marshallProperty(javax.jcr.Property property) |
void |
unmarshallProperties(javax.jcr.Node node,
List<RepositoryProperty> properties) |
void |
unmarshallProperty(javax.jcr.Node node,
RepositoryProperty property) |
public RepositoryNode marshallNode(javax.jcr.Node node) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
public RepositoryNode marshallNode(javax.jcr.Node node, int depth, List<String> excludeNodeTypes, boolean includeMeta) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
public RepositoryProperty marshallProperty(javax.jcr.Property property) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
public void unmarshallProperties(javax.jcr.Node node, List<RepositoryProperty> properties) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
public void unmarshallProperty(javax.jcr.Node node, RepositoryProperty property) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
protected String getStringByValue(javax.jcr.Value propertyValue) throws javax.jcr.RepositoryException
Value
.
PropertyType.BINARY
types will be base64 encoded.javax.jcr.RepositoryException
BaseNCodec.encode(byte[])
protected javax.jcr.Value getValueByType(int propertyType, String propertyValue, javax.jcr.ValueFactory valueFactory) throws javax.jcr.RepositoryException
Value
of a property value according to its type.
Converting PropertyType.BINARY
types requires the String to be base64 encoded.javax.jcr.RepositoryException
Base64.decodeBase64(String)
Copyright © 2017 Magnolia International Ltd.. All rights reserved.