info.magnolia.cms.beans.config
Class URI2RepositoryManager

java.lang.Object
  extended by info.magnolia.cms.beans.config.URI2RepositoryManager

public class URI2RepositoryManager
extends java.lang.Object

Maps uri prefixes to repositories.

Version:
$Id: URI2RepositoryManager.java 41137 2011-01-06 18:19:25Z gjoseph $
Author:
Philipp Bracher

Field Summary
protected static URI2RepositoryMapping DEFAULT_MAPPING
           
 
Constructor Summary
URI2RepositoryManager()
           
 
Method Summary
 void addMapping(URI2RepositoryMapping mapping)
           
 URI2RepositoryMapping getDefaultMapping()
           
 java.lang.String getHandle(java.lang.String uri)
          Get the handle for this uri.
static URI2RepositoryManager getInstance()
           
 URI2RepositoryMapping getMapping(java.lang.String uri)
          The mapping to use for this uri.
protected  java.util.Comparator<URI2RepositoryMapping> getMappingComparator()
           
 java.util.Collection<URI2RepositoryMapping> getMappings()
           
 java.lang.String getRepository(java.lang.String uri)
          Get the repository to use for this uri.
 java.lang.String getURI(Link uuidLink)
           
 java.lang.String getURI(java.lang.String repository, java.lang.String handle)
          Get the uri to use for this handle.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_MAPPING

protected static final URI2RepositoryMapping DEFAULT_MAPPING
Constructor Detail

URI2RepositoryManager

public URI2RepositoryManager()
Method Detail

getMappingComparator

protected java.util.Comparator<URI2RepositoryMapping> getMappingComparator()

getMapping

public URI2RepositoryMapping getMapping(java.lang.String uri)
The mapping to use for this uri.


getDefaultMapping

public URI2RepositoryMapping getDefaultMapping()

getHandle

public java.lang.String getHandle(java.lang.String uri)
Get the handle for this uri.


getRepository

public java.lang.String getRepository(java.lang.String uri)
Get the repository to use for this uri.


getURI

public java.lang.String getURI(java.lang.String repository,
                               java.lang.String handle)
Get the uri to use for this handle.


getURI

public java.lang.String getURI(Link uuidLink)

addMapping

public void addMapping(URI2RepositoryMapping mapping)

getInstance

public static URI2RepositoryManager getInstance()

getMappings

public java.util.Collection<URI2RepositoryMapping> getMappings()
Returns:
the mappings


Copyright © 2003-2011 Magnolia International Ltd.. All Rights Reserved.