Interface ObjectFactory
-
- All Known Implementing Classes:
DefaultObjectFactory
public interface ObjectFactory
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T> T
get(Class<T> interfaceClass)
Retrieves an instance of a Pentaho BI Server API interface using the simple interface name (interfaceClass name without the package) as the object key.<T> T
get(Class<T> interfaceClass, String key)
Retrieves an instance of a Pentaho BI Server API interface by the given object key.
-
-
-
Method Detail
-
get
<T> T get(Class<T> interfaceClass)
Retrieves an instance of a Pentaho BI Server API interface using the simple interface name (interfaceClass name without the package) as the object key. If an appropriate implementation does not exist the factory implementation should create it.- Parameters:
interfaceClass
- the type of object to retrieve (retrieved object will be returned as this type)- Returns:
- the implementation object typed to interfaceClass, never null.
- Throws:
ObjectFactoryException
- if the object is undefined.
-
get
<T> T get(Class<T> interfaceClass, String key)
Retrieves an instance of a Pentaho BI Server API interface by the given object key. If an appropriate implementation does not exist the factory implementation should create it.- Parameters:
interfaceClass
- the type of object to retrieve (retrieved object will be returned as this type)key
- the object identifier, typically the interface name- Returns:
- the implementation object typed to interfaceClass, never null.
- Throws:
ObjectFactoryException
- if the object is undefined.
-
-