Package org.pentaho.platform.api.engine

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


      IBackgroundExecution backgroundExecutionHandler = PentahoSystem.get( IBackgroundExecution.class, userSession );
      if ( backgroundExecutionHandler != null ) {
        HttpRequestParameterProvider parameterProvider = new HttpRequestParameterProvider( request );
        String intro = ""; //$NON-NLS-1$
        String footer = ""; //$NON-NLS-1$
        IUITemplater templater = PentahoSystem.get( IUITemplater.class, userSession );
        if ( templater != null ) {
          String[] sections = templater.breakTemplate( "template-dialog.html", "", userSession ); //$NON-NLS-1$ //$NON-NLS-2$
          if ( ( sections != null ) && ( sections.length > 0 ) ) {
            intro = sections[0];
          }
          if ( ( sections != null ) && ( sections.length > 1 ) ) {
            footer = sections[1];
View Full Code Here


      content = buffer.toString();
    }

    String intro = ""; //$NON-NLS-1$
    String footer = ""; //$NON-NLS-1$
    IUITemplater templater = PentahoSystem.get( IUITemplater.class, userSession );
    if ( templater != null ) {
      String[] sections = templater.breakTemplate( "template.html", "", userSession ); //$NON-NLS-1$ //$NON-NLS-2$
      if ( sections != null && sections.length > 0 ) {
        intro = sections[0];
      }
      if ( sections != null && sections.length > 1 ) {
        footer = sections[1];
View Full Code Here

        String intro = ""; //$NON-NLS-1$
        String footer = ""; //$NON-NLS-1$

        final String dashboardTemplate = "template-dashboard" + template + ".html"; //$NON-NLS-1$

        final IUITemplater templater = PentahoSystem.get(IUITemplater.class, userSession);
        ArrayList<String> i18nTagsList = new ArrayList<String>();
        if (templater != null) {
           
          String solutionPath = "system/" + PLUGIN_NAME + "/" + dashboardTemplate;
            if(!repository.resourceExists(solutionPath))
            {//then try in solution
              solutionPath = SOLUTION_DIR + "/templates/" + dashboardTemplate;
            }
             
            final ActionResource templateResource = new ActionResource("", IActionSequenceResource.SOLUTION_FILE_RESOURCE, "text/xml", solutionPath); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
            String templateContent = repository.getResourceAsString(templateResource, ISolutionRepository.ACTION_EXECUTE);
            // Process i18n on dashboard outer template
            templateContent = updateUserLanguageKey(templateContent);
            templateContent = processi18nTags(templateContent, i18nTagsList);
            // Process i18n on dashboard outer template - end
            final String[] sections = templater.breakTemplateString(templateContent, "", userSession); //$NON-NLS-1$
            if (sections != null && sections.length > 0) {
                intro = sections[0];
            }
            if (sections != null && sections.length > 1) {
                footer = sections[1];
View Full Code Here

TOP

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

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.