com.sapportals.wcm.protocol.webdav

Class UriMapper

java.lang.Object
  extended by com.sapportals.wcm.protocol.webdav.UriMapper
All Implemented Interfaces:
IUriMapper

public class UriMapper
extends Object
implements IUriMapper

Default implementation of IUriMapper.

Copyright (c) SAP AG 2001-2005


Constructor Summary
UriMapper(RID rootPath, IHierarchicalUri rootUri)
          Create a new mapping between root path and uri
UriMapper(RID rootPath, IHierarchicalUri rootUri, List aliases)
          Create a new mapping between root path and uri
UriMapper(RID rootPath, IHierarchicalUri rootUri, List aliases, boolean caseSensitive)
          Create a new mapping between root path and uri
 
Method Summary
protected  RID discoverQueryInternal(RID path)
           
 RID getRootRID()
          Get the root resource id of this mapping
 IHierarchicalUri getRootUri()
          Get the root uri of this mapping
protected  RID hideQueryInternal(RID path)
           
 boolean isCaseSensitive()
           
 boolean isGeneric()
          Determine if this mapper is generic, e.g. handles conversions outside its root.
 IUriReference toAbsolutePath(RID path)
          Map the given resource id to an relative uri reference with absolute path component.
 IHierarchicalUri toAbsoluteUri(RID path)
          Map the given path to an (absolute) uri.
 RID toRID(IHierarchicalUri uri)
          Map the given uri to its resource id.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UriMapper

public UriMapper(RID rootPath,
                 IHierarchicalUri rootUri)
Create a new mapping between root path and uri

Parameters:
rootPath - of mapping
rootUri - uri of mapping

UriMapper

public UriMapper(RID rootPath,
                 IHierarchicalUri rootUri,
                 List aliases)
Create a new mapping between root path and uri

Parameters:
rootPath - of mapping
rootUri - uri of mapping
aliases - list of IHierarchicalUris pointing to same server

UriMapper

public UriMapper(RID rootPath,
                 IHierarchicalUri rootUri,
                 List aliases,
                 boolean caseSensitive)
Create a new mapping between root path and uri

Parameters:
rootPath - of mapping
rootUri - uri of mapping
aliases - list of IHierarchicalUris pointing to same server
caseSensitive - mapping of RIDs/URIs
Method Detail

isGeneric

public boolean isGeneric()
Description copied from interface: IUriMapper
Determine if this mapper is generic, e.g. handles conversions outside its root.

Specified by:
isGeneric in interface IUriMapper
Returns:
if mapper is generic

isCaseSensitive

public boolean isCaseSensitive()

getRootUri

public IHierarchicalUri getRootUri()
Description copied from interface: IUriMapper
Get the root uri of this mapping

Specified by:
getRootUri in interface IUriMapper
Returns:
root uri of this mapping

getRootRID

public RID getRootRID()
Description copied from interface: IUriMapper
Get the root resource id of this mapping

Specified by:
getRootRID in interface IUriMapper
Returns:
root resource id of this mapping

toAbsoluteUri

public IHierarchicalUri toAbsoluteUri(RID path)
Description copied from interface: IUriMapper
Map the given path to an (absolute) uri.
toAbsoluteUri("/mapped/a") -> http://sapportals.com/test/a

Specified by:
toAbsoluteUri in interface IUriMapper
Parameters:
path - to map to uri
Returns:
mapped uri or null, if resourceID was not descendant of root

toAbsolutePath

public IUriReference toAbsolutePath(RID path)
Description copied from interface: IUriMapper
Map the given resource id to an relative uri reference with absolute path component.
toAbsoluteUri("/mapped/a") -> /test/a

Specified by:
toAbsolutePath in interface IUriMapper
Parameters:
path - to map to uri reference
Returns:
mapped uri reference or null, if resourceID was not descendant of root

toRID

public RID toRID(IHierarchicalUri uri)
Description copied from interface: IUriMapper
Map the given uri to its resource id.
toAbsoluteUri("http://sapportals.com/test/a") -> /mapped/a

Specified by:
toRID in interface IUriMapper
Parameters:
uri - to map to resource id
Returns:
mapped resource id or null, if uri was not descendant of root uri

toString

public String toString()
Overrides:
toString in class Object

hideQueryInternal

protected RID hideQueryInternal(RID path)

discoverQueryInternal

protected RID discoverQueryInternal(RID path)
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] KMC-CM [sap.com] tc/km/frwk api EP-KM-CM
[sap.com] KMC-WPC [sap.com] tc/kmc/wpc/wpcfacade api EP-PIN-WPC-WCM


Copyright 2014 SAP AG Complete Copyright Notice