Package org.pentaho.platform.api.engine

Examples of org.pentaho.platform.api.engine.IServiceManager


  private static final Log logger = LogFactory.getLog( GwtRpcPluginProxyServlet.class );
  private static final Pattern pentahoBasePattern = Pattern.compile( "^/.*/WEBAPP_ROOT/" ); //$NON-NLS-1$

  @Override
  protected Object resolveDispatchTarget( String servletContextPath ) {
    IServiceManager serviceManager = PentahoSystem.get( IServiceManager.class, PentahoSessionHolder.getSession() );

    String key = getDispatchKey();

    if ( null == serviceManager.getServiceConfig( "gwt", key ) ) { //$NON-NLS-1$
      String errMsg =
          Messages.getInstance().getErrorString( "GwtRpcPluginProxyServlet.ERROR_0001_SERVICE_NOT_FOUND", key ); //$NON-NLS-1$
      logger.error( errMsg );
      throw new GwtRpcProxyException( errMsg );
    }

    Object targetBean = null;
    try {
      targetBean = serviceManager.getServiceBean( "gwt", key ); //$NON-NLS-1$
    } catch ( ServiceException e ) {
      throw new GwtRpcProxyException( Messages.getInstance().getErrorString(
          "GwtRpcPluginProxyServlet.ERROR_0002_FAILED_TO_GET_BEAN_REFERENCE", key ), e ); //$NON-NLS-1$
    }

View Full Code Here


          PluginMessageLogger.add( msg );
        }
      }
    }

    IServiceManager svcManager = PentahoSystem.get( IServiceManager.class, null );
    if ( svcManager != null ) {
      try {
        svcManager.initServices();
      } catch ( ServiceInitializationException e ) {
        String msg = Messages.getInstance()
          .getErrorString( "PluginManager.ERROR_0022_SERVICE_INITIALIZATION_FAILED" ); //$NON-NLS-1$
        Logger.error( getClass().toString(), msg, e );
        PluginMessageLogger.add( msg );
View Full Code Here

    }
  }

  private void registerServices( IPlatformPlugin plugin, ClassLoader loader )
    throws PlatformPluginRegistrationException {
    IServiceManager svcManager = PentahoSystem.get( IServiceManager.class, null );

    for ( PluginServiceDefinition pws : plugin.getServices() ) {
      for ( ServiceConfig ws : createServiceConfigs( pws, plugin, loader ) ) {
        try {
          svcManager.registerService( ws );
        } catch ( ServiceException e ) {
          throw new PlatformPluginRegistrationException( Messages.getInstance().getErrorString(
            "PluginManager.ERROR_0025_SERVICE_REGISTRATION_FAILED", ws.getId(), plugin.getId() ), e ); //$NON-NLS-1$
        }
      }
View Full Code Here

TOP

Related Classes of org.pentaho.platform.api.engine.IServiceManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.