Package org.pentaho.platform.plugin.services.pluginmgr.perspective.pojo

Examples of org.pentaho.platform.plugin.services.pluginmgr.perspective.pojo.DefaultPluginPerspective


          JsArray<JsPerspective> jsperspectives =
              JsPerspective.parseJson( JsonUtils.escapeJsonForEval( response.getText() ) );
          ArrayList<IPluginPerspective> perspectives = new ArrayList<IPluginPerspective>();
          for ( int i = 0; i < jsperspectives.length(); i++ ) {
            JsPerspective jsperspective = jsperspectives.get( i );
            DefaultPluginPerspective perspective = new DefaultPluginPerspective();
            perspective.setContentUrl( jsperspective.getContentUrl() );
            perspective.setId( jsperspective.getId() );
            perspective.setLayoutPriority( Integer.parseInt( jsperspective.getLayoutPriority() ) );

            ArrayList<String> requiredSecurityActions = new ArrayList<String>();
            if ( jsperspective.getRequiredSecurityActions() != null ) {
              for ( int j = 0; j < jsperspective.getRequiredSecurityActions().length(); j++ ) {
                requiredSecurityActions.add( jsperspective.getRequiredSecurityActions().get( j ) );
              }
            }

            // will need to iterate over jsoverlays and convert to MantleXulOverlay
            ArrayList<XulOverlay> overlays = new ArrayList<XulOverlay>();
            if ( jsperspective.getOverlays() != null ) {
              for ( int j = 0; j < jsperspective.getOverlays().length(); j++ ) {
                JsXulOverlay o = jsperspective.getOverlays().get( j );
                MantleXulOverlay overlay =
                    new MantleXulOverlay( o.getId(), o.getOverlayUri(), o.getSource(), o.getResourceBundleUri() );
                overlays.add( overlay );
              }
            }
            perspective.setOverlays( overlays );

            perspective.setRequiredSecurityActions( requiredSecurityActions );
            perspective.setResourceBundleUri( jsperspective.getResourceBundleUri() );
            perspective.setTitle( jsperspective.getTitle() );

            perspectives.add( perspective );
          }

          setPluginPerspectives( perspectives );
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

    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

TOP

Related Classes of org.pentaho.platform.plugin.services.pluginmgr.perspective.pojo.DefaultPluginPerspective

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.