SAP NetWeaver '04

com.sapportals.wcm.service.urlgenerator
Interface IUriMapper

[contained in: com.sap.netweaver.bc.rf.service.par - bc.rf.global.service.urlgenerator_api.jar]
public interface IUriMapper

Maps between RIDs and uri/uri references.

This interface is intended for managers which make resource from other servers available as internal CM resource. External resources have to have a hierarchical uri (e.g. http url of web pages) and will be given a CM resource identifier (RID).

Every child of the root resource id is mapped to the corresponding child of the root uri. Example:

             resource id           uri
 root map    /mapped       <->     http://sapportals.com/test
             /mapped/name  <->     http://sapportals.com/test/name
             /mapped/a/b   <->     http://sapportals.com/test/a/b
             /nomap/x       ->     null
             null          <-      http://sapportals.com/xxx
             null          <-      http://greenbytes.de/test/name
 

Copyright 2002 (c) SAP AG


Method Summary
 RID getRootRID()
          Get the root resource id of this mapping
 IHierarchicalUri getRootUri()
          Get the root uri of this mapping
 boolean isGeneric()
          Determine if this mapper is generic, e.g. handles conversions outside its root.
 IUriReference toAbsolutePath(RID resourceID)
          Map the given resource id to an relative uri reference with absolute path component.
toAbsoluteUri("/mapped/a") -> /test/a
 IHierarchicalUri toAbsoluteUri(RID resourceID)
          Map the given path to an (absolute) uri.
toAbsoluteUri("/mapped/a") -> http://sapportals.com/test/a
 RID toRID(IHierarchicalUri uri)
          Map the given uri to its resource id.
toAbsoluteUri("http://sapportals.com/test/a") -> /mapped/a
 

Method Detail

getRootUri

public IHierarchicalUri getRootUri()
Get the root uri of this mapping
Returns:
root uri of this mapping

getRootRID

public RID getRootRID()
Get the root resource id of this mapping
Returns:
root resource id of this mapping

toRID

public RID toRID(IHierarchicalUri uri)
Map the given uri to its resource id.
toAbsoluteUri("http://sapportals.com/test/a") -> /mapped/a
Parameters:
uri - to map to resource id
Returns:
mapped resource id or null, if uri was not descendant of root uri

toAbsoluteUri

public IHierarchicalUri toAbsoluteUri(RID resourceID)
Map the given path to an (absolute) uri.
toAbsoluteUri("/mapped/a") -> http://sapportals.com/test/a
Parameters:
resourceID - to map to uri
Returns:
mapped uri or null, if resourceID was not descendant of root

toAbsolutePath

public IUriReference toAbsolutePath(RID resourceID)
Map the given resource id to an relative uri reference with absolute path component.
toAbsoluteUri("/mapped/a") -> /test/a
Parameters:
resourceID - to map to uri reference
Returns:
mapped uri reference or null, if resourceID was not descendant of root

isGeneric

public boolean isGeneric()
Determine if this mapper is generic, e.g. handles conversions outside its root.
Returns:
if mapper is generic

SAP NetWeaver '04

Copyright © 2004 by SAP AG. All Rights Reserved.
SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.

These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.