Examples of loadElementById()


Examples of org.pentaho.platform.api.repository.IRuntimeRepository.loadElementById()

    startTest();
    StandaloneSession session =
        new StandaloneSession( Messages.getInstance().getString( "BaseTest.DEBUG_JUNIT_SESSION" ) ); //$NON-NLS-1$
    IRuntimeRepository srr = new SimpleRuntimeRepository();
    srr.setSession( session );
    IRuntimeElement ele1 = srr.loadElementById( "instanceid", null ); //$NON-NLS-1$
    IRuntimeElement ele2 = srr.newRuntimeElement( "parent", "parentType", true ); //$NON-NLS-1$ //$NON-NLS-2$
    IRuntimeElement ele3 = srr.newRuntimeElement( "parentid", "parentType", "solutionId", true ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$

    SimpleRuntimeElement sre = (SimpleRuntimeElement) srr.loadElementById( "instanceid", null ); //$NON-NLS-1$
    List list = sre.getMessages();
View Full Code Here

Examples of org.pentaho.platform.api.repository.IRuntimeRepository.loadElementById()

    srr.setSession( session );
    IRuntimeElement ele1 = srr.loadElementById( "instanceid", null ); //$NON-NLS-1$
    IRuntimeElement ele2 = srr.newRuntimeElement( "parent", "parentType", true ); //$NON-NLS-1$ //$NON-NLS-2$
    IRuntimeElement ele3 = srr.newRuntimeElement( "parentid", "parentType", "solutionId", true ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$

    SimpleRuntimeElement sre = (SimpleRuntimeElement) srr.loadElementById( "instanceid", null ); //$NON-NLS-1$
    List list = sre.getMessages();
    if ( list != null ) {
      for ( int i = 0; i < list.size(); i++ ) {
        System.out.println( "Message " + ( i + 1 ) + list.get( i ) ); //$NON-NLS-1$
      }
View Full Code Here

Examples of org.pentaho.platform.api.repository.IRuntimeRepository.loadElementById()

          status = IRuntimeContext.RUNTIME_STATUS_SETUP_FAIL;
          return null;
        }
      } else {
        try {
          runtimeData = runtimeRepository.loadElementById( instanceId, null );
        } catch ( Throwable t ) {
          error( Messages.getInstance().getErrorString( "SolutionEngine.ERROR_0008_INVALID_INSTANCE", instanceId ), t ); //$NON-NLS-1$
          status = IRuntimeContext.RUNTIME_STATUS_SETUP_FAIL;
          return null;
        }
View Full Code Here

Examples of org.pentaho.platform.api.repository.IRuntimeRepository.loadElementById()

    info( Messages.getInstance().getString( "RUNTIMEREPOTEST.USER_TESTINGREADONLY" ) ); //$NON-NLS-1$
    HibernateUtil.beginTransaction();
    try {
      IRuntimeRepository repo = new RuntimeRepository();
      repo.setSession( getPentahoSession() );
      RuntimeElement baseElement = (RuntimeElement) repo.loadElementById( elementId, null );
      info( Messages.getInstance().getString( "RUNTIMEREPOTEST.USER_SETTINGELEMENTTOREADONLY" ) ); //$NON-NLS-1$
      baseElement.setReadOnly( true );
    } finally {
      HibernateUtil.commitTransaction();
    }
View Full Code Here

Examples of org.pentaho.platform.api.repository.IRuntimeRepository.loadElementById()

    HibernateUtil.beginTransaction();
    try {
      info( Messages.getInstance().getString( "RUNTIMEREPOTEST.USER_LOADINGREADONLY" ) ); //$NON-NLS-1$
      IRuntimeRepository repo = new RuntimeRepository();
      repo.setSession( getPentahoSession() );
      RuntimeElement baseElement = (RuntimeElement) repo.loadElementById( elementId, null );
      boolean caughtException = false;
      try {
        info( Messages.getInstance().getString( "RUNTIMEREPOTEST.USER_TRYINGSETSTRINGPROPERTY" ) ); //$NON-NLS-1$
        baseElement
            .setStringProperty(
View Full Code Here

Examples of org.pentaho.platform.api.repository.IRuntimeRepository.loadElementById()

  @SuppressWarnings( "unused" )
  private void cleanupElement( String elementId ) {
    HibernateUtil.beginTransaction();
    IRuntimeRepository repo = new RuntimeRepository();
    repo.setSession( getPentahoSession() );
    RuntimeElement re = (RuntimeElement) repo.loadElementById( elementId, null );
    HibernateUtil.makeTransient( re );
    HibernateUtil.commitTransaction();
    HibernateUtil.flushSession();
    HibernateUtil.clear();
  }
View Full Code Here

Examples of org.pentaho.platform.api.repository.IRuntimeRepository.loadElementById()

  @SuppressWarnings( "unused" )
  private void readElementTest( String instanceId ) {
    HibernateUtil.beginTransaction();
    IRuntimeRepository repo = new RuntimeRepository();
    repo.setSession( getPentahoSession() );
    RuntimeElement re = (RuntimeElement) repo.loadElementById( instanceId, null );
    checkValue( Messages.getInstance().getString( "RUNTIMEREPOTEST.SALES_SOLUTION" ), re.getSolutionId() ); //$NON-NLS-1$
    checkValue( longString.toString(), re.getStringProperty( Messages.getInstance().getString(
        "RUNTIMEREPOTEST.LONG_STRING_KEY" ) ) ); //$NON-NLS-1$
    checkValue(
        Messages.getInstance().getString( "RUNTIMEREPOTEST.SHORT_STRING_VALUE" ), re.getStringProperty( Messages.getInstance().getString( "RUNTIMEREPOTEST.SHORT_STRING_KEY" ) ) ); //$NON-NLS-1$ //$NON-NLS-2$
View Full Code Here

Examples of org.pentaho.platform.repository.SimpleRuntimeRepository.loadElementById()

    startTest();
    StandaloneSession session =
        new StandaloneSession( Messages.getInstance().getString( "BaseTest.DEBUG_JUNIT_SESSION" ) ); //$NON-NLS-1$
    IRuntimeRepository srr = new SimpleRuntimeRepository();
    srr.setSession( session );
    IRuntimeElement ele1 = srr.loadElementById( "instanceid", null ); //$NON-NLS-1$
    IRuntimeElement ele2 = srr.newRuntimeElement( "parent", "parentType", true ); //$NON-NLS-1$ //$NON-NLS-2$
    IRuntimeElement ele3 = srr.newRuntimeElement( "parentid", "parentType", "solutionId", true ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$

    SimpleRuntimeElement sre = (SimpleRuntimeElement) srr.loadElementById( "instanceid", null ); //$NON-NLS-1$
    List list = sre.getMessages();
View Full Code Here

Examples of org.pentaho.platform.repository.SimpleRuntimeRepository.loadElementById()

    srr.setSession( session );
    IRuntimeElement ele1 = srr.loadElementById( "instanceid", null ); //$NON-NLS-1$
    IRuntimeElement ele2 = srr.newRuntimeElement( "parent", "parentType", true ); //$NON-NLS-1$ //$NON-NLS-2$
    IRuntimeElement ele3 = srr.newRuntimeElement( "parentid", "parentType", "solutionId", true ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$

    SimpleRuntimeElement sre = (SimpleRuntimeElement) srr.loadElementById( "instanceid", null ); //$NON-NLS-1$
    List list = sre.getMessages();
    if ( list != null ) {
      for ( int i = 0; i < list.size(); i++ ) {
        System.out.println( "Message " + ( i + 1 ) + list.get( i ) ); //$NON-NLS-1$
      }
View Full Code Here

Examples of org.pentaho.platform.repository.runtime.RuntimeRepository.loadElementById()

    info( Messages.getInstance().getString( "RUNTIMEREPOTEST.USER_TESTINGREADONLY" ) ); //$NON-NLS-1$
    HibernateUtil.beginTransaction();
    try {
      IRuntimeRepository repo = new RuntimeRepository();
      repo.setSession( getPentahoSession() );
      RuntimeElement baseElement = (RuntimeElement) repo.loadElementById( elementId, null );
      info( Messages.getInstance().getString( "RUNTIMEREPOTEST.USER_SETTINGELEMENTTOREADONLY" ) ); //$NON-NLS-1$
      baseElement.setReadOnly( true );
    } finally {
      HibernateUtil.commitTransaction();
    }
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.