Examples of ISystemSettings


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

                                                    List messages ) throws Exception {
    String processId = XactionUtil.class.getName();
    String instanceId = httpServletRequest.getParameter( "instance-id" ); //$NON-NLS-1$
    SimpleUrlFactory urlFactory = new SimpleUrlFactory( "" ); //$NON-NLS-1$
    ISolutionEngine solutionEngine = PentahoSystem.get( ISolutionEngine.class, userSession );
    ISystemSettings systemSettings = PentahoSystem.getSystemSettings();

    if ( solutionEngine == null ) {
      throw new ObjectFactoryException( "No Solution Engine" );
    }

    boolean instanceEnds = "true".equalsIgnoreCase(
      requestParams.getStringParameter( "instanceends", "true" ) ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
    String parameterXsl = systemSettings
      .getSystemSetting( "default-parameter-xsl", "DefaultParameterForm.xsl" ); //$NON-NLS-1$ //$NON-NLS-2$

    solutionEngine.setLoggingLevel( 2 );
    solutionEngine.init( userSession );
    solutionEngine.setForcePrompt( forcePrompt );
View Full Code Here

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

    String actionName = requestParameters.getStringParameter( "action2", null ); //$NON-NLS-1$
    if ( actionName == null ) {
      // now look for a primary action
      actionName = requestParameters.getStringParameter( "action", null ); //$NON-NLS-1$
    }
    ISystemSettings systemSettings = PentahoSystem.getSystemSettings();
    String defaultParameterXsl = systemSettings.getSystemSetting( "default-parameter-xsl", "DefaultParameterForm.xsl"
    ); //$NON-NLS-1$ //$NON-NLS-2$
    requestHandler.setParameterXsl( defaultParameterXsl );
  }
View Full Code Here

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

   *
   *
   */
  public AclPublisher() {
    // Read the default ACLs from the pentaho.xml.
    ISystemSettings settings = PentahoSystem.getSystemSettings();
    List sysAcls = settings.getSystemSettings( "default-acls/*" ); //$NON-NLS-1$
    defaultAcls = aclFromNodeList( sysAcls );
  }
View Full Code Here

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

      }
    }
  }

  private Map<IPermissionRecipient, IPermissionMask> getOverrideAclList( final String fullPath ) {
    ISystemSettings settings = PentahoSystem.getSystemSettings();
    return aclFromNodeList( settings.getSystemSettings( "overrides/file[@path=\"" + fullPath + "\"]/*" ) ); //$NON-NLS-1$//$NON-NLS-2$;
  }
View Full Code Here

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

  }

  @Test
  public void testGetPluginSettings() {

    final ISystemSettings mockSettings = mockery.mock( ISystemSettings.class );

    final String fullPathToSettingsFile =
        resLoader.getSystemRelativePluginPath( pluginClass.getClassLoader() ) + "/settings.xml";

    mockery.checking( new Expectations() {
View Full Code Here

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

   * </ul>
   * <p>
   *
   */
  public CacheManager() {
    ISystemSettings settings = PentahoSystem.getSystemSettings();
    String s = System.getProperty( "java.io.tmpdir" ); //$NON-NLS-1$
    char c = s.charAt( s.length() - 1 );
    if ( ( c != '/' ) && ( c != '\\' ) ) {
      System.setProperty( "java.io.tmpdir", s + "/" ); //$NON-NLS-1$//$NON-NLS-2$
    }
    if ( settings != null ) {
      cacheProviderClassName = settings.getSystemSetting( "cache-provider/class", null ); //$NON-NLS-1$
      if ( cacheProviderClassName != null ) {
        Properties cacheProperties = getCacheProperties( settings );
        setupCacheProvider( cacheProperties );
        this.cacheEnabled = true;
      }
View Full Code Here

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

      session.setAuthenticated( name );
      // create authentication

      GrantedAuthority[] roles;

      ISystemSettings settings = PentahoSystem.getSystemSettings();
      String roleName = ( settings != null ) ? settings.getSystemSetting( "acl-voter/admin-role", "Admin" ) : "Admin";

      roles = new GrantedAuthority[1];
      roles[0] = new GrantedAuthorityImpl( roleName );

      User user = new User( name, "", true, true, true, true, roles );
View Full Code Here

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

  public PentahoReportConfiguration() {
    setOpeningBraceChar( '(' );
    setClosingBraceChar( ')' );
    config = new DefaultConfiguration();
    final ISystemSettings cfg = PentahoSystem.getSystemSettings();
    if ( cfg == null ) {
      return;
    }
    final List reportSettings = cfg.getSystemSettings( "report-config/entry" ); //$NON-NLS-1$
    for ( int i = 0; i < reportSettings.size(); i++ ) {
      final Element element = (Element) reportSettings.get( i );
      final Attribute name = element.attribute( "name" ); //$NON-NLS-1$
      final Attribute value = element.attribute( "value" ); //$NON-NLS-1$
      if ( ( name != null ) && ( value != null ) ) {
View Full Code Here

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

  public void setUp() throws Exception {

    String solutionsRelativePath = "test-src/org/pentaho/test/platform/plugin/chartbeans/solutions";
    MicroPlatform mp = new MicroPlatform( solutionsRelativePath );
    mp.define( ISolutionEngine.class, Object.class );
    ISystemSettings settings = new XmlSimpleSystemSettings();
    mp.setSettingsProvider( settings );
    mp.init();
  }
View Full Code Here

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

  public void setAdminRole( final GrantedAuthority value ) {
    this.adminRole = value;
  }

  public void init( final IPentahoSession session ) {
    ISystemSettings settings = PentahoSystem.getSystemSettings();
    String roleName = settings.getSystemSetting( "acl-voter/admin-role", "Administrator" ); //$NON-NLS-1$ //$NON-NLS-2$
    adminRole = new GrantedAuthorityImpl( roleName );
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.