org.apache.sling.jcr.classloader.internal.net
Class URLFactory

java.lang.Object
  extended by org.apache.sling.jcr.classloader.internal.net.URLFactory

public final class URLFactory
extends Object

The URLFactory class provides factory methods for creating JCR Repository and JCRJar URLs.

This class is not intended to be subclassed or instantiated by clients.

Author:
Felix Meschberger

Field Summary
static String REPOSITORY_JAR_SCHEME
          The scheme for JCRJar URLs (value is "jar").
static String REPOSITORY_SCHEME
          The scheme for JCR Repository URLs (value is "jcr").
 
Method Summary
static URL createURL(javax.jcr.Session session, String path)
          Creates a new JCR Repository URL for the given session and item path.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REPOSITORY_SCHEME

public static final String REPOSITORY_SCHEME
The scheme for JCR Repository URLs (value is "jcr").

See Also:
Constant Field Values

REPOSITORY_JAR_SCHEME

public static final String REPOSITORY_JAR_SCHEME
The scheme for JCRJar URLs (value is "jar").

See Also:
Constant Field Values
Method Detail

createURL

public static URL createURL(javax.jcr.Session session,
                            String path)
                     throws MalformedURLException
Creates a new JCR Repository URL for the given session and item path.

Parameters:
session - The repository session providing access to the item.
path - The absolute path to the item. This must be an absolute path with a leading slash character. If this is null the root node path - / - is assumed.
Returns:
The JCR Repository URL
Throws:
MalformedURLException - If an error occurrs creating the URL instance.


Copyright © 2007-2013 The Apache Software Foundation. All Rights Reserved.