Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.modeshape.web.jcr.webdav
Class MultiRepositoryRequestResolver

    java.lang.Object
      org.modeshape.web.jcr.webdav.MultiRepositoryRequestResolver

All Implemented Interfaces:
  RequestResolver

    public class MultiRepositoryRequestResolver

extends Object
implements RequestResolver

A `RequestResolver` implementation that expects the first segment of the URI is the repository name, the second is the workspace name, and the remaining form the node path. This resolver does handle the case when only the repository name is specified, or only the repository and workspace names are supplied, or when not even the repository name is given.

See Also:
  `SingleRepositoryRequestResolver`

Field Summary
`protected static int` | `PATH_GROUP`
`protected static Pattern` | `PATH_PATTERN` The regular expression that is used to extract the repository name, workspace name, and node path.
`protected static String` | `PATH_PATTERN_STRING` The string representation of the Java version of the `PATH_PATTERN` regular expression.
`protected static int` | `REPOSITORY_NAME_GROUP`
`protected static String` | `ROOT_NODE_PATH`
`protected static int` | `WORKSPACE_NAME_GROUP`
`protected static int` | `WORKSPACE_WITH_SLASH_GROUP`

Constructor Summary
`MultiRepositoryRequestResolver()`

Method Summary
`void` | `initialize(javax.servlet.ServletContext context)` Initialize the resolver based on the provided context
`ResolvedRequest` | `resolve(javax.servlet.http.HttpServletRequest request, String relativePath)` Resolve the given request to the repository, workspace, and path of the node

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### PATH_PATTERN_STRING

    protected static final String PATH_PATTERN_STRING

  The string representation of the Java version of the `PATH_PATTERN` regular expression.

  See Also:
    Constant Field Values

### PATH_PATTERN

    protected static final Pattern PATH_PATTERN

  The regular expression that is used to extract the repository name, workspace name, and node path. Group 2 will contain the repository name, group 4 the workspace name, group 5 the node path (with leading slash). Any of these groups may be empty (or null).

  The regular expression is `/?(([^/]*)(/([^/]*)?(/(.*))?)?)?`.

### REPOSITORY_NAME_GROUP

    protected static final int REPOSITORY_NAME_GROUP

See Also:
  Constant Field Values

### WORKSPACE_WITH_SLASH_GROUP

    protected static final int WORKSPACE_WITH_SLASH_GROUP

See Also:
  Constant Field Values

### WORKSPACE_NAME_GROUP

    protected static final int WORKSPACE_NAME_GROUP

See Also:
  Constant Field Values

### PATH_GROUP

    protected static final int PATH_GROUP

See Also:
  Constant Field Values

### ROOT_NODE_PATH

    protected static final String ROOT_NODE_PATH

See Also:
  Constant Field Values

Constructor Detail

### MultiRepositoryRequestResolver

    public MultiRepositoryRequestResolver()

Method Detail

### initialize

    public void initialize(javax.servlet.ServletContext context)

  Description copied from interface: `RequestResolver`
  Initialize the resolver based on the provided context

  Specified by:
    `initialize` in interface `RequestResolver`
  Parameters:
    `context` - the servlet context for this servlet

### resolve

    public ResolvedRequest resolve(javax.servlet.http.HttpServletRequest request,
                                   String relativePath)

  Description copied from interface: `RequestResolver`
  Resolve the given request to the repository, workspace, and path of the node

  Specified by:
    `resolve` in interface `RequestResolver`
  Parameters:
    `request` - the request to be resolved
    `relativePath` - the requested relative path; never null or empty
  Returns:
    the repository, workspace, and path to a node

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.