Package org.apache.sling.servlets.post.impl.helper

# Klasse 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 to parse it. ReferenceParser is only used if JCR is available.

## Konstruktorübersicht

Konstruktoren
Konstruktor
Beschreibung
`ReferenceParser()`

## Methodenübersicht

Modifizierer und Typ
Methode
Beschreibung
`static javax.jcr.Value[]`
`parse(javax.jcr.Session session, String[] values, boolean weak)`
Parses the given source strings and returns the respective reference value instances.
`static javax.jcr.Value`
`parse(javax.jcr.Session session, String value, boolean weak)`
Parses the given source string and returns the correct Value object.

### Von Klasse geerbte Methoden java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Konstruktordetails

### ReferenceParser

public ReferenceParser()

## Methodendetails

### parse

public static javax.jcr.Value parse(javax.jcr.Session session, String value, boolean weak) throws javax.jcr.RepositoryException
Parses the given source string and returns the correct Value object. If no node matches returns `null`.

Parameter:
  `session` - the session
  `value` - a path or UUID
  `weak` - true to create a WeakReference value
Gibt zurück:
  the value or `null`
Löst aus:
  `javax.jcr.RepositoryException` - in case of problems

### parse

public static javax.jcr.Value[] parse(javax.jcr.Session session, String[] values, 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`.

Parameter:
  `session` - the session
  `values` - path or UUID strings
  `weak` - true to create a WeakReference value
Gibt zurück:
  the values or `null`
Löst aus:
  `javax.jcr.RepositoryException` - in case of problems