Esempio n. 1
0
  @Override
  public void handleRead(final Context context, final ReadRequest request, final Bindings handler)
      throws ResourceException {
    super.handleRead(context, request, handler);

    handler.put("request", request);
    handler.put("resources", configuration.get("resources").copy().getObject());
  }
Esempio n. 2
0
  @Override
  public void handleAction(
      final Context context, final ActionRequest request, final Bindings handler)
      throws ResourceException {
    super.handleAction(context, request, handler);
    for (Map.Entry<String, String> entry : request.getAdditionalParameters().entrySet()) {
      if (handler.containsKey(entry.getKey())) {
        continue;
      }
      if (bindings != null) {
        bindings.put(entry.getKey(), entry.getValue());
      }
    }

    handler.put("request", request);
    handler.put("resources", configuration.get("resources").copy().getObject());
  }