rest.mustache 747 Bytes
Newer Older
René Schöne's avatar
René Schöne committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
aspect REST {
  private String {{rootNodeName}}.RestName() { return "RagConnectREST"; }
  private RestHandler {{rootNodeName}}.{{restHandlerField}} = new RestHandler(RestName());
  public void {{rootNodeName}}.{{restSetPortMethod}}(int port) {
    {{restHandlerField}}.setPort(port);
  }
  public void {{rootNodeName}}.{{restCloseMethod}}() {
    {{restHandlerField}}.close();
  }

  {{#getRootTypeComponents}}
  {{#first}}inh RestHandler ASTNode.{{restHandlerAttribute}}();{{/first}}
  eq {{rootNodeName}}.get{{name}}().{{restHandlerAttribute}}() = {{restHandlerField}};
  {{/getRootTypeComponents}}
  {{^getRootTypeComponents}}
  syn RestHandler {{rootNodeName}}.{{restHandlerAttribute}}() = {{restHandlerField}};
  {{/getRootTypeComponents}}
}