info.magnolia.cms.beans.config
Class URI2RepositoryManager

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

public class URI2RepositoryManager
extends 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()
           
 String getHandle(String uri)
          Get the handle for this uri.
static URI2RepositoryManager getInstance()
           
 URI2RepositoryMapping getMapping(String uri)
          The mapping to use for this uri.
protected  Comparator<URI2RepositoryMapping> getMappingComparator()
           
 Collection<URI2RepositoryMapping> getMappings()
           
 String getRepository(String uri)
          Get the repository to use for this uri.
 String getURI(Link uuidLink)
           
 String getURI(String repository, 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 Comparator<URI2RepositoryMapping> getMappingComparator()

getMapping

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


getDefaultMapping

public URI2RepositoryMapping getDefaultMapping()

getHandle

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


getRepository

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


getURI

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


getURI

public String getURI(Link uuidLink)

addMapping

public void addMapping(URI2RepositoryMapping mapping)

getInstance

public static URI2RepositoryManager getInstance()

getMappings

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


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