SAP NetWeaver '04

com.sap.netweaver.bc.rf.mi.type
Interface ITypeManager

[contained in: com.sap.netweaver.bc.rf.par - bc.rf.mi_api.jar]
All Known Subinterfaces:
IMutableTypeManager

public interface ITypeManager

Read-Only interface describing a repository sub manager for type resolval. Resources may be asked if they support one or more special types, e.g. by implementing further interfaces or whatever. Beside really implementing further interfaces, they may contain instances or know how to instantiate or get instances of one or more special types.

This behaviour allows resources with the given limited interface of a standard resource handle to be "casted" to other objects with a specific interface, e.g. to a customer or contract or whatever.

It is also possible, to get a default instance for a resource hanlde, i.e. to "cast" a resource to a default type. This is useful for access layers not knowing what to access but needing the real object behind it in order to give it away to another layer not knowing the repository framework, but being able to handle instances of the default type.


Method Summary
 java.lang.Object as(IResourceHandle resourceHandle, java.lang.Class requestedType)
          Get resource AS instance of the given requested type ("cast").
 boolean isA(IResourceHandle resourceHandle, java.lang.Class requestedType)
          Check if resource IS An or providing an instance of the given requested type ("instanceof").
 

Method Detail

isA

public boolean isA(IResourceHandle resourceHandle,
                   java.lang.Class requestedType)
            throws ResourceException
Check if resource IS An or providing an instance of the given requested type ("instanceof"). If the requested type is null, this method returns true if this resource IS An instance of the default type.
Parameters:
resourceHandle - resource handle
requestedType - requested type (or null for implicit default type)
Returns:
true when resource handle represents a resource being or providing an instance of the given requested resp. default type
Throws:
ResourceException - when either the resource handle is invalid or the lookup wasn't successful

as

public java.lang.Object as(IResourceHandle resourceHandle,
                           java.lang.Class requestedType)
                    throws ResourceException
Get resource AS instance of the given requested type ("cast"). If the requested type is null, this method returns the resource AS an instance of the default type.
Parameters:
resourceHandle - resource handle
requestedType - requested type (or null for implicit default type)
Returns:
instance of the given requested resp. default type
Throws:
ResourceException - when either the resource handle is invalid or the lookup wasn't successful

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.