Examples of Template


Examples of org.jpublish.Template

            // execute the page actions
            if (optionalRedirect(page.executeActions(context), path, response, allowRedirect))
                return;

            // get the template
            Template template = siteContext.getTemplateManager().getTemplate(page.getFullTemplateName());

            // merge the template
            template.merge(context, page, writer);
            writer.flush();
        } catch (FileNotFoundException e) {
            throw new GeneralException("File not found", e);
        } catch (Exception e) {
            throw new GeneralException("JPublish execution error", e);
View Full Code Here

Examples of org.jsurveylib.model.question.Template

            qb.setOnAnswerChangedScript(questionRoot.getElementsByTagName("onAnswerChanged").item(0).getTextContent());
        }

        //replace with template if the type is set to a template
        if (questionRoot.getElementsByTagName("template").getLength() == 1) {
            Template template = templateMap.get(((Element) questionRoot.getElementsByTagName("template").item(0)).getAttribute("name"));
            return qb.buildTemplate(template);
        } else {
            return buildConcreteQuestion(qb, questionRoot);
        }
    }
View Full Code Here

Examples of org.lilystudio.smarty4j.Template

        .assertNull(
            "break",
            getResult("{foreach from=$array item=\"item\" key=\"key\"}{if $key==4}{break 1.0}{/if}{$key}:{$item}\n{/foreach}"));
    {
      ByteArrayOutputStream out = new ByteArrayOutputStream();
      Template template = new Template(engine, "{bytes $bytes}");
      template.merge(context, out);
      Assert.assertEquals("bytes", out.toString("UTF-8"), "测试字节数组");
    }
    Assert.assertNull("bytes", getResult("{bytes \"key\"}"));
    Assert
        .assertEquals(
View Full Code Here

Examples of org.locationtech.udig.printing.ui.Template

        Object[] allChecked = listViewer.getCheckedElements();
        if (allChecked.length == 0) {
            return;
        }
        TemplateFactory selectedFactory = (TemplateFactory)allChecked[0];
        Template selectedTemplate = selectedFactory.createTemplate();
        int orientation = selectedTemplate.getPreferredOrientation();
        if (orientation == Template.ORIENTATION_LANDSCAPE) {
            landscapeButton.setSelection(true);
            portraitButton.setSelection(false);
        }
        else {
View Full Code Here

Examples of org.mapfish.print.config.Template

            json.object();
            {
                json.key("name").value(name);
                json.key("rotation").value(true);

                Template template = configuration.getTemplates().get(name);

                // find the map attribute
                MapAttribute map = null;
                for (Attribute attribute : template.getAttributes().values()) {
                    if (attribute instanceof MapAttribute) {
                        if (map != null) {
                            throw new UnsupportedOperationException("Template '" + name + "' contains "
                                                                    + "more than one map configuration. The legacy API "
                                                                    + "supports only one map per template.");
View Full Code Here

Examples of org.mifosplatform.template.domain.Template

        return this.templateRepository.findAll();
    }

    @Override
    public Template findOneById(final Long id) {
        final Template template = this.templateRepository.findOne(id);
        if (template == null) { throw new TemplateNotFoundException(id); }
        return template;
    }
View Full Code Here

Examples of org.msgpack.Template

    }
    map.put(rawType, tmpl);
  }

  public static synchronized boolean unregister(Class<?> target) {
    Template tmpl = map.remove(target);
    return tmpl != null;
  }
View Full Code Here

Examples of org.msgpack.template.Template

        return createUnpacker(in).readValue();
    }

    public <T> T read(byte[] b, T v) throws IOException // TODO IOException
        // TODO
        Template tmpl = registry.lookup(v.getClass());
        BufferUnpacker u = createBufferUnpacker(b);
        return (T) tmpl.read(u, v);
    }
View Full Code Here

Examples of org.openiaml.docs.modeldoc.Template

    BasicJavadocParser parser = new BasicJavadocParser(getSemanticTagHandlers());
    parser.findJavadocTagsInTextFile(file, this, factory, root, new IJavadocReferenceCreator() {
     
      public JavaElement createReference(String[] lines, int line) {
        Template ref = createTemplate(factory, line, lines);
        if (ref != null) {
          templateFile.getTemplates().add(ref);
        }
        return ref;
      }
View Full Code Here

Examples of org.osforce.connect.entity.commons.Template

      @PrefParam String categoryCode, @PrefParam String templateCode,
      @ModelAttribute @Valid RegisterBean registerBean, BindingResult result,
      @RequestAttr Site site, Model model, WebRequest request) {
    ProjectCategory category = categoryService.getProjectCategory(site, categoryCode);
    //
    Template template = templateService.getTemplate(category.getId(), templateCode);
    List<ProjectFeature> modules = ModuleUtil.parseToModules(template.getContent());
    Project project = new Project();
    // set project category
    project.setCategory(category);
    // set features
    project.setFeatures(modules);
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.