Package org.pentaho.platform.api.engine.perspective.pojo

Examples of org.pentaho.platform.api.engine.perspective.pojo.IPluginPerspective


    printCommand.execute();
  }

  @Bindable
  public void showSchedules() {
    IPluginPerspective perspective = PerspectiveManager.getInstance().getActivePerspective();
    boolean showing = perspective.getId().equalsIgnoreCase( PerspectiveManager.SCHEDULES_PERSPECTIVE );
    if ( !showing || !this.showBrowserSelected ) {
      PerspectiveManager.getInstance().setPerspective( PerspectiveManager.SCHEDULES_PERSPECTIVE );
    }
  }
View Full Code Here


    }
  }

  @Bindable
  public void showBrowser() {
    IPluginPerspective perspective = PerspectiveManager.getInstance().getActivePerspective();
    boolean showing = perspective.getId().equalsIgnoreCase( PerspectiveManager.OPENED_PERSPECTIVE );
    if ( !showing ) {
      PerspectiveManager.getInstance().setPerspective( PerspectiveManager.OPENED_PERSPECTIVE );
    }
  }
View Full Code Here

    // TODO Auto-generated method stub
    List<?> nodes = doc.selectNodes( "/*/perspective" ); //$NON-NLS-1$
    for ( Object obj : nodes ) {
      Element node = (Element) obj;
      if ( node != null ) {
        IPluginPerspective perspective = PerspectiveUtil.createPerspective( node );
        plugin.addPluginPerspective( perspective );
      }
    }
  }
View Full Code Here

        }
      }

      ArrayList<XulOverlay> overlays = processOverlays( perspectiveNode ); //$NON-NLS-1$

      IPluginPerspective perspective = new DefaultPluginPerspective();
      perspective.setTitle( title );
      perspective.setId( id );
      perspective.setContentUrl( contentUrl );
      perspective.setLayoutPriority( layoutPriority );
      perspective.setOverlays( overlays );
      perspective.setRequiredSecurityActions( actions );
      perspective.setResourceBundleUri( resourceBundleUri );

      return perspective;
    }
    return null;
  }
View Full Code Here

  protected void performOperation() {
    performOperation( true );
  }

  protected void performOperation( boolean feedback ) {
    final IPluginPerspective activePerspective = PerspectiveManager.getInstance().getActivePerspective();

    final SolutionBrowserPanel solutionBrowserPerspective = SolutionBrowserPanel.getInstance();
    boolean forceReload = false;
    if ( FileChooserDialog.getIsDirty() ) {
      forceReload = true;
      WaitPopup.getInstance().setVisibleById( true, spinnerId );
      FileChooserDialog.setIsDirty( Boolean.FALSE );
    }

    RepositoryFileTreeManager.getInstance().fetchRepositoryFileTree( new AsyncCallback<RepositoryFileTree>() {
      public void onFailure( Throwable caught ) {
      }

      public void onSuccess( RepositoryFileTree tree ) {
        // TODO Uncomment the line below and delete the line after that once gwtwidets have been branched
        WaitPopup.getInstance().setVisibleById( false, spinnerId );
        final FileChooserDialog dialog =
            new FileChooserDialog( FileChooserMode.OPEN, lastPath, tree, false, true, solutionBrowserPerspective
                .getSolutionTree().isShowHiddenFiles() );
        dialog.setSubmitOnEnter( MantleApplication.submitOnEnter );
        dialog.addFileChooserListener( new FileChooserListener() {

          public void dialogCanceled() {
            // retain current active perspective
            PerspectiveManager.getInstance().setPerspective( activePerspective.getId() );
          }

          @Override
          public void fileSelected( RepositoryFile repositoryFile, String filePath, String fileName, String title ) {
            dialog.hide();
View Full Code Here

    MicroPlatform microPlatform = new MicroPlatform( "test-res/PluginManagerTest" );
    microPlatform.define( IPluginPerspectiveManager.class, DefaultPluginPerspectiveManager.class );
  }

  private IPluginPerspective createTestPerspective( final String id, final String title ) {
    IPluginPerspective perspective = new DefaultPluginPerspective();
    perspective.setId( id );
    perspective.setTitle( title );
    perspective.setContentUrl( "test-content-url" );
    perspective.setLayoutPriority( 500 );
    return perspective;
  }
View Full Code Here

  @Test
  public void testPerspectiveManager() {
    IPluginPerspectiveManager manager = PentahoSystem.get( IPluginPerspectiveManager.class );
    assertNotNull( manager );

    IPluginPerspective testPerspective = createTestPerspective( "test-perspective-id", "test-perspective-title" );
    manager.addPluginPerspective( testPerspective );

    assertEquals( 1, manager.getPluginPerspectives().size() );
    assertEquals( "test-perspective-id", manager.getPluginPerspectives().get( 0 ).getId() );
    assertEquals( "test-perspective-title", manager.getPluginPerspectives().get( 0 ).getTitle() );
View Full Code Here

    IPlatformPlugin plugin =
        (IPlatformPlugin) CollectionUtils.find( plugins, new PluginNameMatcherPredicate( "Plugin 1" ) );
    assertNotNull( "Plugin 1 should have been found", plugin );

    assertEquals( 2, plugin.getPluginPerspectives().size() );
    IPluginPerspective perspective = plugin.getPluginPerspectives().get( 0 );
    assertEquals( perspective.getId(), "perspective1" );
    assertEquals( perspective.getTitle(), "Test Perspective 1" );
    assertEquals( perspective.getLayoutPriority(), 500 );
  }
View Full Code Here

TOP

Related Classes of org.pentaho.platform.api.engine.perspective.pojo.IPluginPerspective

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.