Difference between revisions of "Artefact:Template/org/ooem/templates/wiml-1.0-ooem-aggregate-2.0"

From OOModels
Jump to navigationJump to search
(Created page with "{{Metabox | Meta_Type = Type:org/oogenerator/Template/2.0 | Meta_Domain = Domain:it/development/formatting | Meta_Category = Type:org/oomodels/wiki/Template | Meta_Download...")
 
Line 20: Line 20:
                               Map<String,String> conversion_arguments,
                               Map<String,String> conversion_arguments,
                               Map<String,String> request_arguments) ⊐…
                               Map<String,String> request_arguments) ⊐…
« if (wiml_code == null) {
« try {
  if (wiml_code == null) {
     throw new org.oomodels.OOMStatusCode(204);
     throw new org.oomodels.OOMStatusCode(204);
   } else {
   } else {

Revision as of 00:19, 13 December 2012

Classification
Type Type:org/oogenerator/Template/2.0
Domain Domain:it/development/formatting
Category Type:org/oomodels/wiki/Template
Maturity final
More
Download Code
Namespace (more)

OOEM main package

create new pages

Code[edit]


G-2.0-java_jppi-1.0 -*- coding: utf-8; -*-

import org.oomodels.wiml.*;
import java.util.Map;
import java.util.Vector;
▼
⊏ signature(String wiml_code, Map<String,String> page_properties,
                              Map<String,String> predefined_arguments,
                              Map<String,String> conversion_arguments,
                              Map<String,String> request_arguments) ⊐
« try {
  if (wiml_code == null) {
    throw new org.oomodels.OOMStatusCode(204);
  } else {
      boolean complete_xml = "true".equals(predefined_arguments.get("CompleteXMLDocument"));
      String xmlns = complete_xml ? " xmlns=\"http://xmlns.sphenon.com/org/ooem\"" : "";
      String indent = complete_xml ? "" : "  ";
»
«if(complete_xml) {»
  ⋮<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
«}»
«¶(indent)»
<Aggregate>
  <Name>◂conversion_arguments.get("page").replaceFirst("Artefact:Model/","").replace("/",".")▸</Name>
  <OCP CLASS="String" CONTENT="XML/Text">
    ⋮«¶("    ")»◂wiml_code▸«/¶»
  </OCP>
</Aggregate>
«/¶»
« } »
« } catch (org.oomodels.OOMStatusCode osc) {
    throw osc;
  } catch (Throwable t) {
    org.oomodels.OOMStatusCode osc = new org.oomodels.OOMStatusCode(204);
    //osc.setCause(t);
    throw osc;
  } »