Package org.jasig.portal.utils

Examples of org.jasig.portal.utils.XSLT


      if (set == null) {
          throw  new GeneralRenderingException("Unable to determine the stylesheet list");
      }
      String xslURI = set.getStylesheetURI("editGPrefs", runtimeData.getBrowserInfo());
      if (xslURI != null) {
        XSLT xslt = XSLT.getTransformer(this, runtimeData.getLocales());
        xslt.setXML(doc);
        xslt.setXSL(this.getClass().getResource(xslURI).toString());
        xslt.setTarget(out);
        xslt.setStylesheetParameter("baseActionURL", runtimeData.getBaseActionURL());
        xslt.transform();
      } else {
          throw  new ResourceMissingException("", "stylesheet", "Unable to find stylesheet to display content for this media");
      }
    }
View Full Code Here


      InputStream xmlStream = null;
    try {
      xmlStream = PortalSessionManager.getResourceAsStream(SKINS_PATH + "/skinList.xml");
      String currentSkin = userPrefs.getThemeStylesheetUserPreferences().getParameterValue("skin");

      XSLT xslt = XSLT.getTransformer(this, runtimeData.getLocales());
      xslt.setXML(xmlStream);
      xslt.setXSL(sslLocation, "skinList", runtimeData.getBrowserInfo());
      xslt.setTarget(out);
      xslt.setStylesheetParameter("skinsPath", SKINS_PATH);
      xslt.setStylesheetParameter("baseActionURL", runtimeData.getBaseActionURL());
      if(currentSkin!=null)
        xslt.setStylesheetParameter("currentSkin", currentSkin);
      xslt.transform();
      } finally {
        try {
          if (xmlStream != null)
            xmlStream.close();
        } catch (IOException exception) {
View Full Code Here

    public void renderXML (ContentHandler out) throws PortalException
    {
      Document doc = ChannelRegistryManager.getChannelRegistry(staticData.getPerson());

      XSLT xslt = XSLT.getTransformer(this, runtimeData.getLocales());
      xslt.setXML(doc);
      xslt.setXSL(sslLocation, "newChannel", runtimeData.getBrowserInfo());
      xslt.setTarget(out);
      xslt.setStylesheetParameter("baseActionURL", runtimeData.getBaseActionURL());
      xslt.setStylesheetParameter("elementID", elementID);
      xslt.setStylesheetParameter("position", position);
      xslt.setStylesheetParameter("catID", catID);
      xslt.setStylesheetParameter("errorMessage", errorMessage);
      xslt.transform();
    }
View Full Code Here

      }
    }

    public void renderXML (ContentHandler out) throws PortalException
    {
      XSLT xslt = XSLT.getTransformer(this, runtimeData.getLocales());
      xslt.setXML(getParametersDoc());
      xslt.setXSL(sslLocation, "parameters", runtimeData.getBrowserInfo());
      xslt.setTarget(out);
      xslt.setStylesheetParameter("baseActionURL", runtimeData.getBaseActionURL());
      if (error)
        xslt.setStylesheetParameter("errorMessage", errorMessage);
      xslt.transform();
    }
View Full Code Here

        params.put("profileType", "system");
      } else {
        params.put("profileType", "user");
      }
      if (xslURI != null) {
        XSLT xslt = XSLT.getTransformer(this, runtimeData.getLocales());
        xslt.setXML(context.getUserLayoutManager().getUserLayoutDOM());
        xslt.setXSL(this.getClass().getResource(xslURI).toString());
        xslt.setTarget(out);
        xslt.setStylesheetParameters(params);
        xslt.transform();
      }
      else {
          throw  new ResourceMissingException("", "stylesheet", "Unable to find stylesheet to display content for this media");
      }
    }
View Full Code Here

      }
    }

    doc.appendChild(appletE);

    XSLT xslt = XSLT.getTransformer(this, runtimeData.getLocales());
    xslt.setXML(doc);
    xslt.setXSL(sslLocation, "main", runtimeData.getBrowserInfo());
    xslt.setTarget(out);
    xslt.transform();
  }
View Full Code Here

      StylesheetSet set = context.getStylesheetSet();
      if (set == null)
        throw  new GeneralRenderingException("Unable to determine the stylesheet list");
      String xslURI = set.getStylesheetURI("moveTo", runtimeData.getBrowserInfo());
      if (xslURI != null) {
        XSLT xslt = XSLT.getTransformer(this, runtimeData.getLocales());
        xslt.setXML(context.getUserLayoutManager().getUserLayoutDOM());
        xslt.setXSL(this.getClass().getResource(xslURI).toString());
        xslt.setTarget(out);
        xslt.setStylesheetParameter("baseActionURL", runtimeData.getBaseActionURL());
        xslt.transform();
      }
      else
        throw  new ResourceMissingException("", "stylesheet", "Unable to find stylesheet to display content for this media");
    }
View Full Code Here

      } else {
          params.put("profileType", "user");
      }

      if (xslURI != null) {
        XSLT xslt = XSLT.getTransformer(this, runtimeData.getLocales());
        xslt.setXML(doc);
        xslt.setXSL(this.getClass().getResource(xslURI).toString());
        xslt.setTarget(out);
        xslt.setStylesheetParameters(params);
        xslt.transform();
      } else {
          throw  new ResourceMissingException("", "stylesheet", "Unable to find stylesheet to display content for this media");
      }
    }
  }
View Full Code Here

       doc = PersonalDocument;
     }// if

     // Create a new XSLT styling engine
     XSLT xslt = XSLT.getTransformer( this, CRD.getLocales());
//     XSLT xslt = new XSLT( this );

     // we could have a blank document, help and about
     if( doc == null ) {
      doc = DocumentFactory.getNewDocument();
      doc.appendChild( doc.createElement( mode )); // null;
     }// doc null

     // pass the result XML to the styling engine.
     xslt.setXML( doc );

     // specify the stylesheet selector
     xslt.setXSL( Constants.SSLFILE, mode, CRD.getBrowserInfo());

     // set parameters that the stylesheet needs.
     xslt.setStylesheetParameter( Constants.BASEACTION, CRD.getBaseActionURL());
     xslt.setStylesheetParameter( Constants.MODE, mode );
     xslt.setStylesheetParameter(
                  Constants.DISPLAYMESSAGE, message_to_user_about_action );

     String MM = (!ManagerMode?"yes":"no");
     xslt.setStylesheetParameter( Constants.MODEUSRPWDCHNG, MM );

  /** If I write the above as shown below it does not work.  Wasted a .5hr on that! */
//     xslt.setStylesheetParameter( Constants.MODEUSRPWDCHNG, (!ManagerMode?"yes":"no"));

     // set the output Handler for the output.
     xslt.setTarget( out );

     // do the deed
     xslt.transform();

   }catch( Exception e ){
      LOG.error(e,e);

      throw new PortalException(
View Full Code Here

     InputStream xmlStream = null;
     try {
      xmlStream = PortalSessionManager.getResourceAsStream(SKIN_LIST_FILE);
      String currentSkin = userPrefs.getThemeStylesheetUserPreferences().getParameterValue("skin");

      XSLT xslt = XSLT.getTransformer(this, runtimeData.getLocales());
      ResourceBundle bundle = ResourceBundle.getBundle(bundleBaseLocation+"skinlist",
              runtimeData.getLocales()[0]);
      xslt.setResourceBundle(bundle);
      xslt.setXML(xmlStream);
      xslt.setXSL(sslLocation, "skinList", runtimeData.getBrowserInfo());
      xslt.setTarget(out);
      xslt.setStylesheetParameter("baseActionURL", runtimeData.getBaseActionURL());
      if(currentSkin!=null)
        xslt.setStylesheetParameter("currentSkin", currentSkin);
      xslt.transform();
     } finally {
       try {
         if (xmlStream != null)
           xmlStream.close();
       } catch (IOException exception) {
View Full Code Here

TOP

Related Classes of org.jasig.portal.utils.XSLT

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.