org.apache.sling.servlets.post.impl.helper
Class ReferenceParser
java.lang.Object
org.apache.sling.servlets.post.impl.helper.ReferenceParser
public class ReferenceParser
- extends Object
Takes a string representation of a node (either a path or a uuid) and tries for parse it.
Method Summary |
javax.jcr.Value[] |
parse(String[] values,
javax.jcr.ValueFactory factory,
boolean weak)
Parses the given source strings and returns the respective reference value
instances. |
javax.jcr.Value |
parse(String value,
javax.jcr.ValueFactory factory,
boolean weak)
Parses the given source string and returns the correct Value object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ReferenceParser
public ReferenceParser(javax.jcr.Session session)
parse
public javax.jcr.Value parse(String value,
javax.jcr.ValueFactory factory,
boolean weak)
throws javax.jcr.RepositoryException
- Parses the given source string and returns the correct Value object.
If no node matches returns
null
.
- Parameters:
value
- a path or UUIDfactory
- the value factoryweak
- true to create a WeakReference value
- Returns:
- the value or
null
- Throws:
javax.jcr.RepositoryException
parse
public javax.jcr.Value[] parse(String[] values,
javax.jcr.ValueFactory factory,
boolean weak)
throws javax.jcr.RepositoryException
- Parses the given source strings and returns the respective reference value
instances. If no node matches for any of the sources
returns
null
.
- Parameters:
values
- path or UUID stringsfactory
- the value factoryweak
- true to create a WeakReference value
- Returns:
- the values or
null
- Throws:
javax.jcr.RepositoryException
Copyright © 2007-2013 The Apache Software Foundation. All Rights Reserved.