com.sap.netweaver.bc.rf.mi.type
Interface ITypeManager
- 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 |
Object |
as(IResourceHandle resourceHandle,
Class requestedType)
Get resource AS instance of the given requested type ("cast"). |
boolean |
isA(IResourceHandle resourceHandle,
Class requestedType)
Check if resource IS An or providing an instance of the given requested
type ("instanceof"). |
isA
boolean isA(IResourceHandle resourceHandle,
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 handlerequestedType - 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
Object as(IResourceHandle resourceHandle,
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 handlerequestedType - 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
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 2011 SAP AG Complete Copyright Notice