Class OSGIObjectFactory

  • All Implemented Interfaces:
    org.pentaho.platform.api.engine.IPentahoObjectFactory

    public class OSGIObjectFactory
    extends Object
    implements org.pentaho.platform.api.engine.IPentahoObjectFactory
    This IPentahoObjectFactory implementation looks up objects in a configured OSGI BundleContext.

    Parameterized get() calls will have their values converted to an OSGI service Filter with all parameters combined with boolean "&".

    User: nbaker Date: 10/31/13 Time: 11:43 AM

    • Constructor Detail

      • OSGIObjectFactory

        public OSGIObjectFactory​(org.osgi.framework.BundleContext context)
    • Method Detail

      • get

        public <T> T get​(Class<T> tClass,
                         org.pentaho.platform.api.engine.IPentahoSession session)
                  throws org.pentaho.platform.api.engine.ObjectFactoryException
        Specified by:
        get in interface org.pentaho.platform.api.engine.IPentahoObjectFactory
        Throws:
        org.pentaho.platform.api.engine.ObjectFactoryException
      • 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 interface org.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,
                         Map<String,​String> properties)
                  throws org.pentaho.platform.api.engine.ObjectFactoryException
        Specified by:
        get in interface org.pentaho.platform.api.engine.IPentahoObjectFactory
        Throws:
        org.pentaho.platform.api.engine.ObjectFactoryException
      • objectDefined

        public boolean objectDefined​(String clazz)
        Specified by:
        objectDefined in interface org.pentaho.platform.api.engine.IPentahoObjectFactory
      • objectDefined

        public boolean objectDefined​(Class<?> clazz)
        Specified by:
        objectDefined in interface org.pentaho.platform.api.engine.IPentahoObjectFactory
      • getImplementingClass

        public Class<?> getImplementingClass​(String key)
        Specified by:
        getImplementingClass in interface org.pentaho.platform.api.engine.IPentahoObjectFactory
      • init

        public void init​(String configFile,
                         Object context)
        Specified by:
        init in interface org.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 interface org.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 session,
                                  Map<String,​String> properties)
                           throws org.pentaho.platform.api.engine.ObjectFactoryException
        Specified by:
        getAll in interface org.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> interfaceClass,
                                                                                                 org.pentaho.platform.api.engine.IPentahoSession curSession)
                                                                                          throws org.pentaho.platform.api.engine.ObjectFactoryException
        Specified by:
        getObjectReference in interface org.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> interfaceClass,
                                                                                                 org.pentaho.platform.api.engine.IPentahoSession curSession,
                                                                                                 Map<String,​String> properties)
                                                                                          throws org.pentaho.platform.api.engine.ObjectFactoryException
        Specified by:
        getObjectReference in interface org.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)
                                                                                                 throws org.pentaho.platform.api.engine.ObjectFactoryException
        Specified by:
        getObjectReferences in interface org.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 interface org.pentaho.platform.api.engine.IPentahoObjectFactory
        Throws:
        org.pentaho.platform.api.engine.ObjectFactoryException
      • getName

        public String getName()
        Specified by:
        getName in interface org.pentaho.platform.api.engine.IPentahoObjectFactory