Class AggregateObjectFactory
- java.lang.Object
-
- org.pentaho.platform.engine.core.system.objfac.AggregateObjectFactory
-
- All Implemented Interfaces:
org.pentaho.platform.api.engine.IPentahoObjectFactory
public class AggregateObjectFactory extends Object implements org.pentaho.platform.api.engine.IPentahoObjectFactory
AggregateObectFactory holds a collection of IPentahoObjectFactory implementations, delegating calls to each and collecting the results. Results are ordered by "priority" attribute if present, with the highest priority object returned in the calls to retrieve a single object. User: nbaker Date: 1/15/13
-
-
Field Summary
Fields Modifier and Type Field Description protected Set<org.pentaho.platform.api.engine.IPentahoObjectFactory>
factories
protected org.pentaho.platform.api.engine.IPentahoObjectFactory
primaryFactory
-
Constructor Summary
Constructors Constructor Description AggregateObjectFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
clear()
boolean
deregisterObjectFactory(org.pentaho.platform.api.engine.IPentahoObjectFactory factory)
De-Register an ObjectFactory<T> T
get(Class<T> interfaceClass, String key, org.pentaho.platform.api.engine.IPentahoSession session)
<T> T
get(Class<T> interfaceClass, org.pentaho.platform.api.engine.IPentahoSession session)
<T> T
get(Class<T> clazz, org.pentaho.platform.api.engine.IPentahoSession session, Map<String,String> properties)
<T> List<T>
getAll(Class<T> interfaceClass, org.pentaho.platform.api.engine.IPentahoSession curSession)
<T> List<T>
getAll(Class<T> interfaceClass, org.pentaho.platform.api.engine.IPentahoSession curSession, Map<String,String> properties)
Set<org.pentaho.platform.api.engine.IPentahoObjectFactory>
getFactories()
Class<?>
getImplementingClass(String key)
Deprecated.All usage of key methods are deprecated, use object attributes insteadString
getName()
<T> org.pentaho.platform.api.engine.IPentahoObjectReference<T>
getObjectReference(Class<T> clazz, org.pentaho.platform.api.engine.IPentahoSession curSession)
<T> org.pentaho.platform.api.engine.IPentahoObjectReference<T>
getObjectReference(Class<T> interfaceClass, org.pentaho.platform.api.engine.IPentahoSession curSession, Map<String,String> properties)
<T> List<org.pentaho.platform.api.engine.IPentahoObjectReference<T>>
getObjectReferences(Class<T> interfaceClass, org.pentaho.platform.api.engine.IPentahoSession curSession)
<T> List<org.pentaho.platform.api.engine.IPentahoObjectReference<T>>
getObjectReferences(Class<T> interfaceClass, org.pentaho.platform.api.engine.IPentahoSession curSession, Map<String,String> properties)
org.pentaho.platform.api.engine.IPentahoObjectFactory
getPrimaryFactory()
void
init(String configFile, Object context)
boolean
objectDefined(Class<?> clazz)
boolean
objectDefined(String key)
void
registerObjectFactory(org.pentaho.platform.api.engine.IPentahoObjectFactory fact)
void
registerObjectFactory(org.pentaho.platform.api.engine.IPentahoObjectFactory fact, boolean primary)
-
-
-
Field Detail
-
factories
protected final Set<org.pentaho.platform.api.engine.IPentahoObjectFactory> factories
-
primaryFactory
protected org.pentaho.platform.api.engine.IPentahoObjectFactory primaryFactory
-
-
Method Detail
-
registerObjectFactory
public void registerObjectFactory(org.pentaho.platform.api.engine.IPentahoObjectFactory fact, boolean primary)
-
registerObjectFactory
public void registerObjectFactory(org.pentaho.platform.api.engine.IPentahoObjectFactory fact)
-
deregisterObjectFactory
public boolean deregisterObjectFactory(org.pentaho.platform.api.engine.IPentahoObjectFactory factory)
De-Register an ObjectFactory- Parameters:
factory
-- Returns:
- true if the factory was registered and successfully removed.
-
getFactories
public Set<org.pentaho.platform.api.engine.IPentahoObjectFactory> getFactories()
-
getPrimaryFactory
public org.pentaho.platform.api.engine.IPentahoObjectFactory getPrimaryFactory()
-
get
public <T> T get(Class<T> interfaceClass, String key, org.pentaho.platform.api.engine.IPentahoSession session) throws org.pentaho.platform.api.engine.ObjectFactoryException
- Specified by:
get
in interfaceorg.pentaho.platform.api.engine.IPentahoObjectFactory
- Throws:
org.pentaho.platform.api.engine.ObjectFactoryException
-
get
public <T> T get(Class<T> interfaceClass, org.pentaho.platform.api.engine.IPentahoSession session) throws org.pentaho.platform.api.engine.ObjectFactoryException
- Specified by:
get
in interfaceorg.pentaho.platform.api.engine.IPentahoObjectFactory
- Throws:
org.pentaho.platform.api.engine.ObjectFactoryException
-
objectDefined
public boolean objectDefined(String key)
- Specified by:
objectDefined
in interfaceorg.pentaho.platform.api.engine.IPentahoObjectFactory
-
getImplementingClass
public Class<?> getImplementingClass(String key)
Deprecated.All usage of key methods are deprecated, use object attributes instead- Specified by:
getImplementingClass
in interfaceorg.pentaho.platform.api.engine.IPentahoObjectFactory
-
init
public void init(String configFile, Object context)
- Specified by:
init
in interfaceorg.pentaho.platform.api.engine.IPentahoObjectFactory
-
getAll
public <T> List<T> getAll(Class<T> interfaceClass, org.pentaho.platform.api.engine.IPentahoSession curSession) throws org.pentaho.platform.api.engine.ObjectFactoryException
- Specified by:
getAll
in interfaceorg.pentaho.platform.api.engine.IPentahoObjectFactory
- Throws:
org.pentaho.platform.api.engine.ObjectFactoryException
-
getAll
public <T> List<T> getAll(Class<T> interfaceClass, org.pentaho.platform.api.engine.IPentahoSession curSession, Map<String,String> properties) throws org.pentaho.platform.api.engine.ObjectFactoryException
- Specified by:
getAll
in interfaceorg.pentaho.platform.api.engine.IPentahoObjectFactory
- Throws:
org.pentaho.platform.api.engine.ObjectFactoryException
-
getObjectReference
public <T> org.pentaho.platform.api.engine.IPentahoObjectReference<T> getObjectReference(Class<T> clazz, org.pentaho.platform.api.engine.IPentahoSession curSession) throws org.pentaho.platform.api.engine.ObjectFactoryException
- Specified by:
getObjectReference
in interfaceorg.pentaho.platform.api.engine.IPentahoObjectFactory
- Throws:
org.pentaho.platform.api.engine.ObjectFactoryException
-
get
public <T> T get(Class<T> clazz, org.pentaho.platform.api.engine.IPentahoSession session, Map<String,String> properties) throws org.pentaho.platform.api.engine.ObjectFactoryException
- Specified by:
get
in interfaceorg.pentaho.platform.api.engine.IPentahoObjectFactory
- Throws:
org.pentaho.platform.api.engine.ObjectFactoryException
-
objectDefined
public boolean objectDefined(Class<?> clazz)
- Specified by:
objectDefined
in interfaceorg.pentaho.platform.api.engine.IPentahoObjectFactory
-
getObjectReference
public <T> org.pentaho.platform.api.engine.IPentahoObjectReference<T> getObjectReference(Class<T> interfaceClass, org.pentaho.platform.api.engine.IPentahoSession curSession, Map<String,String> properties) throws org.pentaho.platform.api.engine.ObjectFactoryException
- Specified by:
getObjectReference
in interfaceorg.pentaho.platform.api.engine.IPentahoObjectFactory
- Throws:
org.pentaho.platform.api.engine.ObjectFactoryException
-
clear
public void clear()
-
getObjectReferences
public <T> List<org.pentaho.platform.api.engine.IPentahoObjectReference<T>> getObjectReferences(Class<T> interfaceClass, org.pentaho.platform.api.engine.IPentahoSession curSession) throws org.pentaho.platform.api.engine.ObjectFactoryException
- Specified by:
getObjectReferences
in interfaceorg.pentaho.platform.api.engine.IPentahoObjectFactory
- Throws:
org.pentaho.platform.api.engine.ObjectFactoryException
-
getObjectReferences
public <T> List<org.pentaho.platform.api.engine.IPentahoObjectReference<T>> getObjectReferences(Class<T> interfaceClass, org.pentaho.platform.api.engine.IPentahoSession curSession, Map<String,String> properties) throws org.pentaho.platform.api.engine.ObjectFactoryException
- Specified by:
getObjectReferences
in interfaceorg.pentaho.platform.api.engine.IPentahoObjectFactory
- Throws:
org.pentaho.platform.api.engine.ObjectFactoryException
-
getName
public String getName()
- Specified by:
getName
in interfaceorg.pentaho.platform.api.engine.IPentahoObjectFactory
-
-