// Path: janos-api/src/main/java/org/apache/olingo/odata2/janos/processor/api/extension/ExtensionContext.java
// public interface ExtensionContext {
//   String PARA_URI_INFO = "~uriinfo";
//   String PARA_ACCEPT_HEADER = "~acceptheader";
//   String PARA_REQUEST_BODY = "~requestbody";
//   String PARA_REQUEST_TYPE = "~requesttype";
// 
//   ExtensionContext addParameter(String name, Object value);
// 
//   Object getParameter(String name);
// 
//   UriInfo getUriInfo();
// 
//   String getAcceptHeader();
// 
//   InputStream getRequestBody();
// 
//   Extension.Method getRequestType();
// 
//   ODataResponse proceed() throws Exception;
// }


import org.apache.olingo.odata2.api.processor.ODataResponse;
import org.apache.olingo.odata2.api.uri.UriInfo;
import org.apache.olingo.odata2.janos.processor.api.extension.Extension;
import org.apache.olingo.odata2.janos.processor.api.extension.Extension.Method;
import org.apache.olingo.odata2.janos.processor.api.extension.ExtensionContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
      LOG.info("Finished READ access for Employees.");
    } else {
      LOG.info("Start READ access for Employee.");
      res = context.proceed();
      res = ODataResponse.fromResponse(res).header(EXTENSION_TEST, "READ EMPLOYEE").build();
      LOG.info("Finished READ access for Employee.");
    }
    return res;
  }

  @Extension(entitySetNames="Employees", methods={Method.POST})
  public Object createEmployee(ExtensionContext context) throws Exception {
    LOG.info("Start CREATE for Employee.");
    ODataResponse res = context.proceed();
    res = ODataResponse.fromResponse(res).header(EXTENSION_TEST, "CREATE").build();
    LOG.info("Finished CREATE for Employee.");
    return res;
  }

  @Extension(entitySetNames="Employees", methods={Method.PUT})
  public Object updateEmployee(ExtensionContext context) throws Exception {
    LOG.info("Start UPDATE for Employee.");
    ODataResponse res = context.proceed();
    res = ODataResponse.fromResponse(res).header(EXTENSION_TEST, "UPDATE").build();
    LOG.info("Finished UPDATE for Employee.");
    return res;
  }

  @Extension(entitySetNames="Employees", methods={Method.DELETE})
  public Object deleteEmployee(ExtensionContext context) throws Exception {
// Path: janos-api/src/main/java/org/apache/olingo/odata2/janos/processor/api/extension/ExtensionContext.java
// public interface ExtensionContext {
//   String PARA_URI_INFO = "~uriinfo";
//   String PARA_ACCEPT_HEADER = "~acceptheader";
//   String PARA_REQUEST_BODY = "~requestbody";
//   String PARA_REQUEST_TYPE = "~requesttype";
// 
//   ExtensionContext addParameter(String name, Object value);
// 
//   Object getParameter(String name);
// 
//   UriInfo getUriInfo();
// 
//   String getAcceptHeader();
// 
//   InputStream getRequestBody();
// 
//   Extension.Method getRequestType();
// 
//   ODataResponse proceed() throws Exception;
// }


// Path: janos-ref/src/main/java/org/apache/olingo/odata2/janos/processor/ref/model/RefExtensions.java
import org.apache.olingo.odata2.api.processor.ODataResponse;
import org.apache.olingo.odata2.api.uri.UriInfo;
import org.apache.olingo.odata2.janos.processor.api.extension.Extension;
import org.apache.olingo.odata2.janos.processor.api.extension.Extension.Method;
import org.apache.olingo.odata2.janos.processor.api.extension.ExtensionContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

      LOG.info("Finished READ access for Employees.");
    } else {
      LOG.info("Start READ access for Employee.");
      res = context.proceed();
      res = ODataResponse.fromResponse(res).header(EXTENSION_TEST, "READ EMPLOYEE").build();
      LOG.info("Finished READ access for Employee.");
    }
    return res;
  }

  @Extension(entitySetNames="Employees", methods={Method.POST})
  public Object createEmployee(ExtensionContext context) throws Exception {
    LOG.info("Start CREATE for Employee.");
    ODataResponse res = context.proceed();
    res = ODataResponse.fromResponse(res).header(EXTENSION_TEST, "CREATE").build();
    LOG.info("Finished CREATE for Employee.");
    return res;
  }

  @Extension(entitySetNames="Employees", methods={Method.PUT})
  public Object updateEmployee(ExtensionContext context) throws Exception {
    LOG.info("Start UPDATE for Employee.");
    ODataResponse res = context.proceed();
    res = ODataResponse.fromResponse(res).header(EXTENSION_TEST, "UPDATE").build();
    LOG.info("Finished UPDATE for Employee.");
    return res;
  }

  @Extension(entitySetNames="Employees", methods={Method.DELETE})
  public Object deleteEmployee(ExtensionContext context) throws Exception {
    LOG.info("Start DELETE for Employee.");