Class PentahoSystem


  • public class PentahoSystem
    extends Object
    • Constructor Detail

      • PentahoSystem

        public PentahoSystem()
    • Method Detail

      • setBundleContext

        public static void setBundleContext​(org.osgi.framework.BundleContext context)
      • init

        public static boolean init()
      • init

        public static boolean init​(org.pentaho.platform.api.engine.IApplicationContext pApplicationContext)
      • init

        public static boolean init​(org.pentaho.platform.api.engine.IApplicationContext pApplicationContext,
                                   Map listenerMap)
      • getInitializedOK

        public static boolean getInitializedOK()
      • getInitializedStatus

        public static int getInitializedStatus()
      • getInitializationFailureMessages

        public static List<String> getInitializationFailureMessages()
      • addInitializationFailureMessage

        public static void addInitializationFailureMessage​(int failureBit,
                                                           String message)
      • getOutputDestinationFromContentRef

        public static org.pentaho.platform.api.engine.IContentOutputHandler getOutputDestinationFromContentRef​(String contentTag,
                                                                                                               org.pentaho.platform.api.engine.IPentahoSession session)
      • get

        public static <T> T get​(Class<T> interfaceClass)
        A convenience method for retrieving Pentaho system objects from the object factory. Looks up an object by using the name of the interfaceClass as the object key in get(Class, String, IPentahoSession). NOTE: session will be derived for you by using PentahoSessionHolder, so a session must already have been bound to the thread local in PentahoSessionHolder in order for you to be able to access session-bound objects.
      • get

        public static <T> T get​(Class<T> interfaceClass,
                                org.pentaho.platform.api.engine.IPentahoSession session,
                                Map<String,​String> properties)
        A convenience method for retrieving Pentaho system objects from the object factory. Looks up an object by using the name of the interfaceClass as the object key in get(Class, IPentahoSession, Map) . NOTE: session will be derived for you by using PentahoSessionHolder, so a session must already have been bound to the thread local in PentahoSessionHolder in order for you to be able to access session-bound objects.
      • getAll

        public static <T> List<T> getAll​(Class<T> interfaceClass)
        A convenience method for retrieving Pentaho system objects from the object factory. Looks up an object by using the name of the interfaceClass as the object key in getAll(Class, IPentahoSession). NOTE: session will be derived for you by using PentahoSessionHolder, so a session must already have been bound to the thread local in PentahoSessionHolder in order for you to be able to access session-bound objects.
      • getAll

        public static <T> List<T> getAll​(Class<T> interfaceClass,
                                         org.pentaho.platform.api.engine.IPentahoSession session)
        A convenience method for retrieving Pentaho system objects from the object factory. Looks up an object by using the name of the interfaceClass as the object key in getAll(Class, IPentahoSession). NOTE: session will be derived for you by using PentahoSessionHolder, so a session must already have been bound to the thread local in PentahoSessionHolder in order for you to be able to access session-bound objects.
      • getAll

        public static <T> List<T> getAll​(Class<T> interfaceClass,
                                         org.pentaho.platform.api.engine.IPentahoSession session,
                                         Map<String,​String> props)
        Retrieves objects from the object factory registered to the PentahoSystem implementing or extending the given Class literal
      • get

        public static <T> T get​(Class<T> interfaceClass,
                                org.pentaho.platform.api.engine.IPentahoSession session)
        A convenience method for retrieving Pentaho system objects from the object factory implementing or extending the given Class literal

        get(Class, String, IPentahoSession).

      • get

        public static <T> T get​(Class<T> interfaceClass,
                                String key,
                                org.pentaho.platform.api.engine.IPentahoSession session)
        A convenience method for retrieving Pentaho system objects from the object factory. Returns an instance of a configured object of the Pentaho system. This method will return null if the object could not be retrieved for any reason. If the object is defined but for some reason can not be retrieved, an error message will be logged.
        Returns:
        An instance of the requested object or null if either the object was not configured or it was configured but there was a problem retrieving it.
        See Also:
        getObjectFactory(), IPentahoObjectFactory.get(Class, String, IPentahoSession)
      • getObjectReference

        public static <T> org.pentaho.platform.api.engine.IPentahoObjectReference<T> getObjectReference​(Class<T> interfaceClass,
                                                                                                        org.pentaho.platform.api.engine.IPentahoSession curSession)
        Returns an IPentahoObjectReference for the requested Object containing registered Object Properties.
        Parameters:
        interfaceClass - Interface or Class literal for which implementations of will be found
        curSession - current session to be used for session-based implementations
        Returns:
        IPentahoObjectReference for the matching Object or null if no Object is found
      • getObjectReference

        public static <T> org.pentaho.platform.api.engine.IPentahoObjectReference<T> getObjectReference​(Class<T> interfaceClass,
                                                                                                        org.pentaho.platform.api.engine.IPentahoSession curSession,
                                                                                                        Map<String,​String> properties)
        Returns an IPentahoObjectReference for the requested Object containing registered Object Properties.
        Parameters:
        interfaceClass - Interface or Class literal for which implementations of will be found
        curSession - current session to be used for session-based implementations
        properties - Map of properties to filter matches in the ObjectFactory by
        Returns:
        IPentahoObjectReference for the matching Object or null if no Object is found
      • getObjectReferences

        public static <T> List<org.pentaho.platform.api.engine.IPentahoObjectReference<T>> getObjectReferences​(Class<T> interfaceClass,
                                                                                                               org.pentaho.platform.api.engine.IPentahoSession curSession)
      • getObjectReferences

        public static <T> List<org.pentaho.platform.api.engine.IPentahoObjectReference<T>> getObjectReferences​(Class<T> interfaceClass,
                                                                                                               org.pentaho.platform.api.engine.IPentahoSession curSession,
                                                                                                               Map<String,​String> properties)
      • getSystemName

        public static String getSystemName()
      • getGlobalParameters

        public static org.pentaho.platform.api.engine.IParameterProvider getGlobalParameters()
      • sessionStartup

        public static void sessionStartup​(org.pentaho.platform.api.engine.IPentahoSession session)
      • clearGlobals

        public static void clearGlobals()
      • putInGlobalAttributesMap

        public static Object putInGlobalAttributesMap​(Object key,
                                                      Object value)
      • removeFromGlobalAttributesMap

        public static Object removeFromGlobalAttributesMap​(Object key)
      • sessionStartup

        public static void sessionStartup​(org.pentaho.platform.api.engine.IPentahoSession session,
                                          org.pentaho.platform.api.engine.IParameterProvider sessionParameters)
      • globalStartup

        public static void globalStartup()
      • globalStartup

        public static void globalStartup​(org.pentaho.platform.api.engine.IPentahoSession session)
      • shutdown

        public static void shutdown()
      • getApplicationContext

        public static org.pentaho.platform.api.engine.IApplicationContext getApplicationContext()
      • setApplicationContext

        public static void setApplicationContext​(org.pentaho.platform.api.engine.IApplicationContext pApplicationContext)
      • createObject

        @Deprecated
        public static Object createObject​(String className,
                                          org.pentaho.platform.api.engine.ILogger logger)
        Deprecated.
      • getSystemSetting

        public static String getSystemSetting​(String settingName,
                                              String defaultValue)
      • getSystemSettings

        public static org.pentaho.platform.api.engine.ISystemSettings getSystemSettings()
      • refreshSettings

        public static void refreshSettings()
      • publish

        public static String publish​(org.pentaho.platform.api.engine.IPentahoSession session,
                                     String className)
      • getPublisherList

        public static List getPublisherList()
      • getPublishersDocument

        public static org.dom4j.Document getPublishersDocument()
      • systemEntryPoint

        public static void systemEntryPoint()
      • systemExitPoint

        public static void systemExitPoint()
      • getCacheManager

        public static org.pentaho.platform.api.engine.ICacheManager getCacheManager​(org.pentaho.platform.api.engine.IPentahoSession session)
      • getACLFileExtensionList

        public static List getACLFileExtensionList()
      • getDownloadRolesList

        public static List getDownloadRolesList()
      • addLogoutListener

        public static void addLogoutListener​(org.pentaho.platform.api.engine.ILogoutListener listener)
      • remove

        public static org.pentaho.platform.api.engine.ILogoutListener remove​(org.pentaho.platform.api.engine.ILogoutListener listener)
      • invokeLogoutListeners

        public static void invokeLogoutListeners​(org.pentaho.platform.api.engine.IPentahoSession session)
      • getObjectFactory

        public static org.pentaho.platform.api.engine.IPentahoObjectFactory getObjectFactory()
        Gets the factory that will create and manage Pentaho system objects.
        Returns:
        the factory
      • registerObjectFactory

        public static void registerObjectFactory​(org.pentaho.platform.api.engine.IPentahoObjectFactory pentahoObjectFactory)
        Registers the factory that will create and manage Pentaho system objects.
        Parameters:
        pentahoObjectFactory - the factory
      • deregisterObjectFactory

        public static 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.
      • registerPrimaryObjectFactory

        public static void registerPrimaryObjectFactory​(org.pentaho.platform.api.engine.IPentahoObjectFactory pentahoObjectFactory)
        Registers the primary factory that will create and manage Pentaho system objects.
        Parameters:
        pentahoObjectFactory - the factory
      • setAdministrationPlugins

        public static void setAdministrationPlugins​(List<org.pentaho.platform.api.engine.IPentahoPublisher> administrationPlugins)
        Registers administrative capabilities that can be invoked later via publish(IPentahoSession, String)
        Parameters:
        administrationPlugins - a list of admin functions to register
      • setSystemListeners

        public static void setSystemListeners​(List<org.pentaho.platform.api.engine.IPentahoSystemListener> systemListeners)
        Registers custom handlers that are notified of both system startup and system shutdown events.
        Parameters:
        systemListeners - the system event handlers
      • setSessionStartupActions

        public static void setSessionStartupActions​(List<org.pentaho.platform.api.engine.ISessionStartupAction> actions)
        Registers server actions that will be invoked when a session is created. NOTE: it is completely up to the IPentahoSession implementation whether to advise the system of it's creation via sessionStartup(IPentahoSession).
        Parameters:
        actions - the server actions to execute on session startup
      • setSystemSettingsService

        public static void setSystemSettingsService​(org.pentaho.platform.api.engine.ISystemSettings systemSettingsService)
        Sets the system settings service: the means by which the platform obtains it's overall system settings.
        Parameters:
        systemSettingsService - the settings service
      • clearObjectFactory

        public static void clearObjectFactory()
      • registerReference

        public static <T> org.pentaho.platform.api.engine.IPentahoObjectRegistration registerReference​(org.pentaho.platform.api.engine.IPentahoObjectReference<T> reference,
                                                                                                       org.pentaho.platform.api.engine.IPentahoRegistrableObjectFactory.Types types)
        This static method shadows the one defined here: .IPentahoRegistrableObjectFactory#registerReference(org.pentaho.platform.api.engine.IPentahoObjectReference, org.pentaho.platform.api.engine .IPentahoRegistrableObjectFactory.Types)
        Type Parameters:
        T -
        Parameters:
        reference -
        types -
      • registerObject

        public static org.pentaho.platform.api.engine.IPentahoObjectRegistration registerObject​(Object obj)
        This static method shadows the one defined here: .IPentahoRegistrableObjectFactory#registerObject(Object)
        Parameters:
        obj -
      • registerObject

        public static org.pentaho.platform.api.engine.IPentahoObjectRegistration registerObject​(Object obj,
                                                                                                org.pentaho.platform.api.engine.IPentahoRegistrableObjectFactory.Types types)
        This static method shadows the one defined here: .IPentahoRegistrableObjectFactory#registerObject(Object, org.pentaho.platform.api.engine .IPentahoRegistrableObjectFactory.Types)
        Parameters:
        obj -
        types -
      • registerReference

        public static <T> org.pentaho.platform.api.engine.IPentahoObjectRegistration registerReference​(org.pentaho.platform.api.engine.IPentahoObjectReference<T> reference)
        IPentahoRegistrableObjectFactory.registerReference(org.pentaho.platform.api.engine.IPentahoObjectReference)
        Type Parameters:
        T -
        Parameters:
        reference -
      • registerObject

        public static <T> org.pentaho.platform.api.engine.IPentahoObjectRegistration registerObject​(T obj,
                                                                                                    Class<?>... classes)
        This static method shadows the one defined here: .IPentahoRegistrableObjectFactory#registerObject(Object, Class[])
        Parameters:
        obj -
        classes -
      • registerReference

        public static <T> org.pentaho.platform.api.engine.IPentahoObjectRegistration registerReference​(org.pentaho.platform.api.engine.IPentahoObjectReference<T> reference,
                                                                                                       Class<?>... classes)
        This static method shadows the one defined here: .IPentahoRegistrableObjectFactory#registerReference(org.pentaho.platform.api.engine.IPentahoObjectReference, Class[])
        Type Parameters:
        T -
        Parameters:
        reference -
        classes -