Examples of Templates


Examples of javax.xml.transform.Templates

   
    TransformerFactory tf = TransformerFactory.newInstance();
    if( !tf.getFeature( SAXSource.FEATURE) || !tf.getFeature( SAXResult.FEATURE)) return 0;
   
    SAXTransformerFactory saxtf = ( SAXTransformerFactory) tf;
    Templates templates = null;
    if( xslt!=null) {
      templates = saxtf.newTemplates( xslt);
    }
   
View Full Code Here

Examples of javax.xml.transform.Templates

     */
    public void setTransformerSource(Source source) throws TransformerConfigurationException {
        // Check that the call to newTemplates() returns a valid template instance.
        // In case of an xslt parse error, it will return null and we should stop the
        // deployment and raise an exception as the route will not be setup properly.
        Templates templates = converter.getTransformerFactory().newTemplates(source);
        if (templates != null) {
            setTemplate(templates);
        } else {
            throw new TransformerConfigurationException("Error creating XSLT template. "
                    + "This is most likely be caused by an XML parse error. "
View Full Code Here

Examples of javax.xml.transform.Templates

    @Override
    protected Object unmarshalFromInputStream(Unmarshaller unmarshaller, InputStream is, MediaType mt)
        throws JAXBException {
        try {

            Templates t = createTemplates(getInTemplates(mt), inParamsMap, inProperties);
            if (t == null && supportJaxbOnly) {
                return super.unmarshalFromInputStream(unmarshaller, is, mt);
            }
           
            if (unmarshaller.getClass().getName().contains("eclipse")) {
                //eclipse MOXy doesn't work properly with the XMLFilter/Reader thing
                //so we need to bounce through a DOM
                Source reader = new StaxSource(StaxUtils.createXMLStreamReader(is));
                DOMResult dom = new DOMResult();
                t.newTransformer().transform(reader, dom);
                return unmarshaller.unmarshal(dom.getNode());
            }
            XMLFilter filter = null;
            try {
                filter = factory.newXMLFilter(t);
View Full Code Here

Examples of javax.xml.transform.Templates

   
    @Override
    protected void marshalToOutputStream(Marshaller ms, Object obj, OutputStream os, MediaType mt)
        throws Exception {
       
        Templates t = createTemplates(getOutTemplates(mt), outParamsMap, outProperties);
        if (t == null && supportJaxbOnly) {
            super.marshalToOutputStream(ms, obj, os, mt);
            return;
        }
        TransformerHandler th = null;
View Full Code Here

Examples of oasis.names.tc.wsrp.v1.types.Templates

            // do nothing since exception has been logged already
            // continue with assumption that portlet does not support template processing
        }

        if (doesUrlTemplateProcess != null && templateComposer != null && doesUrlTemplateProcess.booleanValue()) {
            Templates templates = new Templates();
            templates.setBlockingActionTemplate(templateComposer.createBlockingActionTemplate(true, true, true, true));
            templates.setRenderTemplate(templateComposer.createRenderTemplate(true, true, true, true));
            templates.setDefaultTemplate(templateComposer.createDefaultTemplate(true, true, true, true));
            templates.setResourceTemplate(templateComposer.createResourceTemplate(true, true, true, true));
            templates.setSecureBlockingActionTemplate(
                templateComposer.createSecureBlockingActionTemplate(true, true, true, true));
            templates.setSecureRenderTemplate(templateComposer.createSecureRenderTemplate(true, true, true, true));
            templates.setSecureDefaultTemplate(templateComposer.createSecureDefaultTemplate(true, true, true, true));
            templates.setSecureResourceTemplate(templateComposer.createSecureResourceTemplate(true, true, true, true));
            runtimeContext.setTemplates(templates);
        }

        runtimeContext.setSessionID(request.getSessionID());
        runtimeContext.setExtensions(null);
View Full Code Here

Examples of org.apache.trax.Templates

    // Parse the stylesheet.                      
    reader.parse(args[0]);

    //Get the Templates object from the ContentHandler.
    Templates templates = templatesBuilder.getTemplates();

    // III. Use the Templates object to instantiate a Transformer.
    Transformer transformer = templates.newTransformer();

    // IV. Perform the transformation.

    // Set up the ContentHandler for the output.
  FileOutputStream fos = new FileOutputStream(args[2]);
View Full Code Here

Examples of org.cruxframework.crux.core.client.screen.DeviceAdaptive.Templates

    }
  }

  public static Templates getChildTagTemplatesAnnotation(Class<?> templateClass)
  {
    Templates attributes = templateClass.getAnnotation(Templates.class);
    if (attributes == null)
    {
      if(templateClass.getGenericInterfaces() != null)
      {
        for(Type type : templateClass.getGenericInterfaces())
View Full Code Here

Examples of org.oasis.wsrp.v2.Templates

         String resourceTemplate = v1Templates.getResourceTemplate();
         String secureDefaultTemplate = v1Templates.getSecureDefaultTemplate();
         String secureBlockingActionTemplate = v1Templates.getSecureBlockingActionTemplate();
         String secureRenderTemplate = v1Templates.getSecureRenderTemplate();
         String secureResourceTemplate = v1Templates.getSecureResourceTemplate();
         Templates templates = WSRPTypeFactory.createTemplates(defaultTemplate, blockingActionTemplate, renderTemplate, resourceTemplate, secureDefaultTemplate, secureBlockingActionTemplate, secureRenderTemplate, secureResourceTemplate);

         List<V1Extension> extensions = v1Templates.getExtensions();
         if (extensions != null)
         {
            templates.getExtensions().addAll(WSRPUtils.transform(extensions, EXTENSION));
         }

         return templates;
      }
      else
View Full Code Here

Examples of org.xrace.desjardins.trx.Templates

    {
      @Override
      public java.lang.Object getValue(java.lang.Object object)
          throws IllegalStateException
      {
        Templates target = (Templates) object;
        return target.getTemplate();
      }

      @Override
      public void setValue(java.lang.Object object, java.lang.Object value)
          throws IllegalStateException, IllegalArgumentException
      {
        try
        {
          Templates target = (Templates) object;
          target
              .addTemplate((org.xrace.desjardins.trx.Template) value);
        }
        catch (java.lang.Exception ex)
        {
          throw new IllegalStateException(ex.toString());
        }
      }

      @Override
      public void resetValue(Object object) throws IllegalStateException,
          IllegalArgumentException
      {
        try
        {
          Templates target = (Templates) object;
          target.removeAllTemplate();
        }
        catch (java.lang.Exception ex)
        {
          throw new IllegalStateException(ex.toString());
        }
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.