olingo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject olingo-odata4 git commit: [OLINGO-507] Added methods and tests for ActionImports support
Date Mon, 12 Jan 2015 14:28:29 GMT
Repository: olingo-odata4
Updated Branches:
  refs/heads/OLINGO-507_MinorRefactoring 186d67241 -> 2f6b35ff5


[OLINGO-507] Added methods and tests for ActionImports support


Project: http://git-wip-us.apache.org/repos/asf/olingo-odata4/repo
Commit: http://git-wip-us.apache.org/repos/asf/olingo-odata4/commit/2f6b35ff
Tree: http://git-wip-us.apache.org/repos/asf/olingo-odata4/tree/2f6b35ff
Diff: http://git-wip-us.apache.org/repos/asf/olingo-odata4/diff/2f6b35ff

Branch: refs/heads/OLINGO-507_MinorRefactoring
Commit: 2f6b35ff5980bfb36a299cc2ae4891e43d5f4853
Parents: 186d672
Author: Michael Bolz <michael.bolz@sap.com>
Authored: Mon Jan 12 14:48:14 2015 +0100
Committer: Michael Bolz <michael.bolz@sap.com>
Committed: Mon Jan 12 15:20:57 2015 +0100

----------------------------------------------------------------------
 .../processor/EntityCollectionProcessor.java    |  16 +++
 .../server/api/processor/EntityProcessor.java   |  15 +++
 .../apache/olingo/server/core/ODataHandler.java |  23 +++-
 .../processor/TechnicalEntityProcessor.java     |  18 +++
 .../server/tecsvc/provider/ActionProvider.java  | 119 ++++++++++---------
 .../tecsvc/provider/ContainerProvider.java      |  72 ++++++-----
 .../server/tecsvc/provider/SchemaProvider.java  |  13 +-
 .../olingo/server/core/ODataHandlerTest.java    |  55 +++++++--
 .../serializer/xml/MetadataDocumentTest.java    |   6 +-
 .../server/core/uri/UriResourceImplTest.java    |   8 +-
 .../core/uri/antlr/TestFullResourcePath.java    |  11 +-
 .../core/uri/antlr/TestUriParserImpl.java       |  38 +++---
 .../queryoption/expression/ExpressionTest.java  |   8 +-
 .../core/uri/validator/UriValidatorTest.java    |   7 +-
 .../server/sample/processor/CarsProcessor.java  |  24 +++-
 15 files changed, 287 insertions(+), 146 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/2f6b35ff/lib/server-api/src/main/java/org/apache/olingo/server/api/processor/EntityCollectionProcessor.java
----------------------------------------------------------------------
diff --git a/lib/server-api/src/main/java/org/apache/olingo/server/api/processor/EntityCollectionProcessor.java b/lib/server-api/src/main/java/org/apache/olingo/server/api/processor/EntityCollectionProcessor.java
index d1c927c..91fb94c 100644
--- a/lib/server-api/src/main/java/org/apache/olingo/server/api/processor/EntityCollectionProcessor.java
+++ b/lib/server-api/src/main/java/org/apache/olingo/server/api/processor/EntityCollectionProcessor.java
@@ -22,6 +22,7 @@ import org.apache.olingo.commons.api.format.ContentType;
 import org.apache.olingo.server.api.ODataApplicationException;
 import org.apache.olingo.server.api.ODataRequest;
 import org.apache.olingo.server.api.ODataResponse;
+import org.apache.olingo.server.api.deserializer.DeserializerException;
 import org.apache.olingo.server.api.serializer.SerializerException;
 import org.apache.olingo.server.api.uri.UriInfo;
 
@@ -41,4 +42,19 @@ public interface EntityCollectionProcessor extends Processor {
    */
   void readEntityCollection(ODataRequest request, ODataResponse response, UriInfo uriInfo, ContentType responseFormat)
       throws ODataApplicationException, SerializerException;
+
+  /**
+   * Process an action which has as return type a collection of entities.
+   * @param request  OData request object containing raw HTTP information
+   * @param response OData response object for collecting response data
+   * @param uriInfo  information of a parsed OData URI
+   * @param requestFormat   content type of body sent with request
+   * @param responseFormat   requested content type after content negotiation
+   * @throws ODataApplicationException if the service implementation encounters a failure
+   * @throws org.apache.olingo.server.api.deserializer.DeserializerException     if deserialization failed
+   * @throws SerializerException       if serialization failed
+   */
+  void processEntityCollection(ODataRequest request, ODataResponse response, UriInfo uriInfo, ContentType requestFormat,
+                      ContentType responseFormat)
+          throws ODataApplicationException, DeserializerException, SerializerException;
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/2f6b35ff/lib/server-api/src/main/java/org/apache/olingo/server/api/processor/EntityProcessor.java
----------------------------------------------------------------------
diff --git a/lib/server-api/src/main/java/org/apache/olingo/server/api/processor/EntityProcessor.java b/lib/server-api/src/main/java/org/apache/olingo/server/api/processor/EntityProcessor.java
index 6e4610b..06d88f3 100644
--- a/lib/server-api/src/main/java/org/apache/olingo/server/api/processor/EntityProcessor.java
+++ b/lib/server-api/src/main/java/org/apache/olingo/server/api/processor/EntityProcessor.java
@@ -81,4 +81,19 @@ public interface EntityProcessor extends Processor {
    * @throws ODataApplicationException if the service implementation encounters a failure
    */
   void deleteEntity(ODataRequest request, ODataResponse response, UriInfo uriInfo) throws ODataApplicationException;
+
+  /**
+   * Process an action which has as return type an entity.
+   * @param request  OData request object containing raw HTTP information
+   * @param response OData response object for collecting response data
+   * @param uriInfo  information of a parsed OData URI
+   * @param requestFormat   content type of body sent with request
+   * @param responseFormat   requested content type after content negotiation
+   * @throws ODataApplicationException if the service implementation encounters a failure
+   * @throws DeserializerException     if deserialization failed
+   * @throws SerializerException       if serialization failed
+   */
+  void processEntity(ODataRequest request, ODataResponse response, UriInfo uriInfo, ContentType requestFormat,
+                      ContentType responseFormat)
+          throws ODataApplicationException, DeserializerException, SerializerException;
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/2f6b35ff/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataHandler.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataHandler.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataHandler.java
index dc78647..d14717c 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataHandler.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataHandler.java
@@ -334,7 +334,7 @@ public class ODataHandler {
 
     switch (edmReturnTypeKind.getType().getKind()) {
       case ENTITY:
-        handleEntityDispatching(request, response, edmReturnTypeKind.isCollection(), false);
+        handleEntityDispatching(request, response, edmReturnTypeKind.isCollection(), false, isAction);
         break;
       case PRIMITIVE:
         handlePrimitivePropertyDispatching(request, response, isAction, edmReturnTypeKind.isCollection());
@@ -480,7 +480,7 @@ public class ODataHandler {
                 .processComplex(request, response, uriInfo, requestFormat, responseFormat);
       } else {
         selectProcessor(ComplexCollectionProcessor.class)
-                .updateComplexCollection(request, response, uriInfo, requestFormat, responseFormat);
+                .processComplexCollection(request, response, uriInfo, requestFormat, responseFormat);
       }
     } else if (method == HttpMethod.DELETE) {
       if (complexRepresentationType == RepresentationType.COMPLEX) {
@@ -574,11 +574,11 @@ public class ODataHandler {
                                        final UriResourcePartTyped uriResourcePart)
           throws ContentNegotiatorException, ODataApplicationException, SerializerException, ODataHandlerException,
           DeserializerException {
-    handleEntityDispatching(request, response, uriResourcePart.isCollection(), isMedia(uriResourcePart));
+    handleEntityDispatching(request, response, uriResourcePart.isCollection(), isMedia(uriResourcePart), false);
   }
 
   private void handleEntityDispatching(final ODataRequest request, final ODataResponse response,
-                                       final boolean isCollection, final boolean isMedia)
+                                       final boolean isCollection, final boolean isMedia, boolean isAction)
           throws ContentNegotiatorException, ODataApplicationException, SerializerException, ODataHandlerException,
           DeserializerException {
 
@@ -591,14 +591,19 @@ public class ODataHandler {
         selectProcessor(EntityCollectionProcessor.class)
                 .readEntityCollection(request, response, uriInfo, requestedContentType);
       } else if (method == HttpMethod.POST) {
-        if (isMedia) {
           final ContentType requestFormat = ContentType.parse(request.getHeader(HttpHeader.CONTENT_TYPE));
+        if (isMedia) {
           final ContentType responseFormat = ContentNegotiator.doContentNegotiation(uriInfo.getFormatOption(),
                   request, customContentTypeSupport, RepresentationType.ENTITY);
           selectProcessor(MediaEntityProcessor.class)
                   .createMediaEntity(request, response, uriInfo, requestFormat, responseFormat);
+        } else if(isAction) {
+          checkContentTypeSupport(requestFormat, RepresentationType.ENTITY);
+          final ContentType responseFormat = ContentNegotiator.doContentNegotiation(uriInfo.getFormatOption(),
+                  request, customContentTypeSupport, RepresentationType.ENTITY);
+          selectProcessor(EntityCollectionProcessor.class)
+                  .processEntityCollection(request, response, uriInfo, requestFormat, responseFormat);
         } else {
-          final ContentType requestFormat = ContentType.parse(request.getHeader(HttpHeader.CONTENT_TYPE));
           checkContentTypeSupport(requestFormat, RepresentationType.ENTITY);
           final ContentType responseFormat = ContentNegotiator.doContentNegotiation(uriInfo.getFormatOption(),
                   request, customContentTypeSupport, RepresentationType.ENTITY);
@@ -621,6 +626,12 @@ public class ODataHandler {
         final ContentType responseFormat = ContentNegotiator.doContentNegotiation(uriInfo.getFormatOption(),
                 request, customContentTypeSupport, RepresentationType.ENTITY);
         selectProcessor(EntityProcessor.class).updateEntity(request, response, uriInfo, requestFormat, responseFormat);
+      } else if (method == HttpMethod.POST && isAction) {
+        final ContentType requestFormat = ContentType.parse(request.getHeader(HttpHeader.CONTENT_TYPE));
+        checkContentTypeSupport(requestFormat, RepresentationType.ENTITY);
+        final ContentType responseFormat = ContentNegotiator.doContentNegotiation(uriInfo.getFormatOption(),
+                request, customContentTypeSupport, RepresentationType.ENTITY);
+        selectProcessor(EntityProcessor.class).processEntity(request, response, uriInfo, requestFormat, responseFormat);
       } else if (method == HttpMethod.DELETE) {
         selectProcessor(isMedia ? MediaEntityProcessor.class : EntityProcessor.class)
                 .deleteEntity(request, response, uriInfo);

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/2f6b35ff/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/processor/TechnicalEntityProcessor.java
----------------------------------------------------------------------
diff --git a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/processor/TechnicalEntityProcessor.java b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/processor/TechnicalEntityProcessor.java
index b1f3ba4..e5bd0ff 100644
--- a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/processor/TechnicalEntityProcessor.java
+++ b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/processor/TechnicalEntityProcessor.java
@@ -90,6 +90,15 @@ public class TechnicalEntityProcessor extends TechnicalProcessor
   }
 
   @Override
+  public void processEntityCollection(final ODataRequest request, final ODataResponse response,
+                                      final UriInfo uriInfo,
+                                      final ContentType requestFormat, final ContentType  responseFormat)
+          throws ODataApplicationException, DeserializerException, SerializerException {
+    throw new ODataApplicationException("Process entity collection is not supported yet.",
+            HttpStatusCode.NOT_IMPLEMENTED.getStatusCode(), Locale.ROOT);
+  }
+
+  @Override
   public void countEntityCollection(final ODataRequest request, ODataResponse response, final UriInfo uriInfo)
           throws ODataApplicationException, SerializerException {
     validateOptions(uriInfo.asUriInfoResource());
@@ -247,6 +256,15 @@ public class TechnicalEntityProcessor extends TechnicalProcessor
     }
   }
 
+  @Override
+  public void processEntity(final ODataRequest request, final ODataResponse response,
+                            final UriInfo uriInfo, final ContentType requestFormat,
+                            final ContentType responseFormat)
+          throws ODataApplicationException, DeserializerException, SerializerException {
+    throw new ODataApplicationException("Process entity is not supported yet.",
+            HttpStatusCode.NOT_IMPLEMENTED.getStatusCode(), Locale.ROOT);
+  }
+
   private void blockNavigation(final UriInfo uriInfo) throws ODataApplicationException {
     final List<UriResource> parts = uriInfo.asUriInfoResource().getUriResourceParts();
     if (parts.size() > 2

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/2f6b35ff/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/ActionProvider.java
----------------------------------------------------------------------
diff --git a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/ActionProvider.java b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/ActionProvider.java
index d204bf4..5ff2db5 100644
--- a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/ActionProvider.java
+++ b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/ActionProvider.java
@@ -21,6 +21,7 @@ package org.apache.olingo.server.tecsvc.provider;
 import org.apache.olingo.commons.api.ODataException;
 import org.apache.olingo.commons.api.edm.FullQualifiedName;
 import org.apache.olingo.server.api.edm.provider.Action;
+import org.apache.olingo.server.api.edm.provider.ComplexType;
 import org.apache.olingo.server.api.edm.provider.Parameter;
 import org.apache.olingo.server.api.edm.provider.ReturnType;
 
@@ -48,83 +49,89 @@ public class ActionProvider {
   // Unbound Actions
   public static final FullQualifiedName nameUARTString = new FullQualifiedName(SchemaProvider.NAMESPACE,
           "UARTString");
-  public static final FullQualifiedName nameUARTCompCollParam = new FullQualifiedName(SchemaProvider.NAMESPACE,
-      "UARTCompCollParam");
-  public static final FullQualifiedName nameUARTCompParam = new FullQualifiedName(SchemaProvider.NAMESPACE,
-      "UARTCompParam");
-  public static final FullQualifiedName nameUARTESParam =
-      new FullQualifiedName(SchemaProvider.NAMESPACE, "UARTESParam");
+  public static final FullQualifiedName nameUARTCollStringTwoParam = new FullQualifiedName(SchemaProvider.NAMESPACE,
+          "UARTCollStringTwoParam");
+  public static final FullQualifiedName nameUARTCollCTTwoPrimParam = new FullQualifiedName(SchemaProvider.NAMESPACE,
+      "UARTCollCTTwoPrimParam");
+  public static final FullQualifiedName nameUARTCTTwoPrimParam = new FullQualifiedName(SchemaProvider.NAMESPACE,
+      "UARTCTTwoPrimParam");
+  public static final FullQualifiedName nameUARTETTwoKeyTwoPrimParam =
+      new FullQualifiedName(SchemaProvider.NAMESPACE, "UARTETTwoKeyTwoPrimParam");
+  public static final FullQualifiedName nameUARTCollETKeyNavParam =
+          new FullQualifiedName(SchemaProvider.NAMESPACE, "UARTCollETKeyNavParam");
+  public static final FullQualifiedName nameUARTETAllPrimParam =
+          new FullQualifiedName(SchemaProvider.NAMESPACE, "UARTETAllPrimParam");
+  public static final FullQualifiedName nameUARTCollETAllPrimParam =
+      new FullQualifiedName(SchemaProvider.NAMESPACE, "UARTCollETAllPrimParam");
 
-  public static final FullQualifiedName nameUARTETParam =
-      new FullQualifiedName(SchemaProvider.NAMESPACE, "UARTETParam");
-
-  public static final FullQualifiedName nameUARTPrimParam = new FullQualifiedName(SchemaProvider.NAMESPACE,
-      "UARTPrimParam");
-  public static final FullQualifiedName nameUARTPrimCollParam = new FullQualifiedName(SchemaProvider.NAMESPACE,
-      "UARTPrimCollParam");
 
   public List<Action> getActions(final FullQualifiedName actionName) throws ODataException {
     if (actionName.equals(nameUARTString)) {
       return Arrays.asList(
               new Action().setName(nameUARTString.getName())
-                      .setReturnType(new ReturnType().setType(PropertyProvider.nameString))
+                          .setReturnType(new ReturnType().setType(PropertyProvider.nameString))
       );
-    } else if (actionName.equals(nameUARTPrimParam)) {
+    } else if (actionName.equals(nameUARTCollStringTwoParam)) {
         return Arrays.asList(
-          new Action().setName("UARTPrimParam")
-              .setParameters(Arrays.asList(
-                  new Parameter().setName("ParameterInt16").setType(PropertyProvider.nameInt16)))
-
-              .setReturnType(new ReturnType().setType(PropertyProvider.nameString))
-          );
+              new Action().setName(nameUARTCollStringTwoParam.getName())
+                          .setParameters(Arrays.asList(
+                                  new Parameter().setName("ParameterInt16").setType(PropertyProvider.nameInt16)))
+                          .setReturnType(new ReturnType().setType(PropertyProvider.nameString).setCollection(true))
+              );
 
-    } else if (actionName.equals(nameUARTPrimCollParam)) {
+    } else if (actionName.equals(nameUARTCTTwoPrimParam)) {
       return Arrays.asList(
-          new Action().setName("UARTPrimCollParam")
-              .setParameters(Arrays.asList(
-                  new Parameter().setName("ParameterInt16").setType(PropertyProvider.nameInt16)))
-
-              .setReturnType(
-                  new ReturnType().setType(PropertyProvider.nameString).setCollection(true))
-          );
+              new Action().setName(nameUARTCTTwoPrimParam.getName())
+                          .setParameters(Arrays.asList(
+                                  new Parameter().setName("ParameterInt16").setType(PropertyProvider.nameInt16)))
+                          .setReturnType(
+                                  new ReturnType().setType(ComplexTypeProvider.nameCTTwoPrim))
+      );
 
-    } else if (actionName.equals(nameUARTCompParam)) {
+    } else if (actionName.equals(nameUARTCollCTTwoPrimParam)) {
       return Arrays.asList(
-          new Action().setName("UARTCompParam")
-              .setParameters(Arrays.asList(
-                  new Parameter().setName("ParameterInt16").setType(PropertyProvider.nameInt16)))
-
-              .setReturnType(
-                  new ReturnType().setType(ComplexTypeProvider.nameCTTwoPrim))
-          );
+              new Action().setName(nameUARTCollCTTwoPrimParam.getName())
+                          .setParameters(Arrays.asList(
+                                  new Parameter().setName("ParameterInt16").setType(PropertyProvider.nameInt16)))
+                          .setReturnType(
+                                  new ReturnType().setType(ComplexTypeProvider.nameCTTwoPrim).setCollection(true))
+      );
 
-    } else if (actionName.equals(nameUARTCompCollParam)) {
+    } else if (actionName.equals(nameUARTETTwoKeyTwoPrimParam)) {
       return Arrays.asList(
-          new Action().setName("UARTCompCollParam")
-              .setParameters(Arrays.asList(
-                  new Parameter().setName("ParameterInt16").setType(PropertyProvider.nameInt16)))
+              new Action().setName(nameUARTETTwoKeyTwoPrimParam.getName())
+                          .setParameters(Arrays.asList(
+                                  new Parameter().setName("ParameterInt16").setType(PropertyProvider.nameInt16)))
+                          .setReturnType(
+                                  new ReturnType().setType(EntityTypeProvider.nameETTwoKeyTwoPrim))
+      );
 
-              .setReturnType(
-                  new ReturnType().setType(ComplexTypeProvider.nameCTTwoPrim).setCollection(true))
+    } else if (actionName.equals(nameUARTCollETKeyNavParam)) {
+      return Arrays.asList(
+              new Action().setName(nameUARTCollETKeyNavParam.getName())
+                          .setParameters(Arrays.asList(
+                                  new Parameter().setName("ParameterInt16").setType(PropertyProvider.nameInt16)))
+                          .setReturnType(
+                                  new ReturnType().setType(EntityTypeProvider.nameETKeyNav).setCollection(true))
           );
 
-    } else if (actionName.equals(nameUARTETParam)) {
+    } else if (actionName.equals(nameUARTETAllPrimParam)) {
       return Arrays.asList(
-          new Action().setName("UARTETParam")
-              .setParameters(Arrays.asList(
-                  new Parameter().setName("ParameterInt16").setType(PropertyProvider.nameInt16)))
-              .setReturnType(
-                  new ReturnType().setType(EntityTypeProvider.nameETTwoKeyTwoPrim))
+              new Action().setName(nameUARTETAllPrimParam.getName())
+                          .setParameters(Arrays.asList(
+                              new Parameter().setName("ParameterDate").setType(PropertyProvider.nameDate)))
+                          .setReturnType(
+                              new ReturnType().setType(EntityTypeProvider.nameETAllPrim))
           );
 
-    } else if (actionName.equals(nameUARTESParam)) {
+    } else if (actionName.equals(nameUARTCollETAllPrimParam)) {
       return Arrays.asList(
-          new Action().setName("UARTESParam")
-              .setParameters(Arrays.asList(
-                  new Parameter().setName("ParameterInt16").setType(PropertyProvider.nameInt16)))
-              .setReturnType(
-                  new ReturnType().setType(EntityTypeProvider.nameETKeyNav).setCollection(true))
-          );
+              new Action().setName(nameUARTCollETAllPrimParam.getName())
+                          .setParameters(Arrays.asList(
+                                  new Parameter().setName("ParameterTimeOfDay").setType(PropertyProvider.nameInt16)))
+                          .setReturnType(
+                                  new ReturnType().setType(EntityTypeProvider.nameETAllPrim).setCollection(true))
+      );
 
     } else if (actionName.equals(nameBAETTwoKeyNavRTETTwoKeyNav)) {
       return Arrays.asList(

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/2f6b35ff/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/ContainerProvider.java
----------------------------------------------------------------------
diff --git a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/ContainerProvider.java b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/ContainerProvider.java
index dfdd4e2..84ec4c4 100644
--- a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/ContainerProvider.java
+++ b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/ContainerProvider.java
@@ -36,6 +36,14 @@ import java.util.List;
 public class ContainerProvider {
 
   public static final FullQualifiedName nameContainer = new FullQualifiedName(SchemaProvider.NAMESPACE, "Container");
+  public static final String AIRT_STRING = "AIRTString";
+  public static final String AIRT_COLL_STRING_TWO_PARAM = "AIRTCollStringTwoParam";
+  public static final String AIRTCT_TWO_PRIM_PARAM = "AIRTCTTwoPrimParam";
+  public static final String AIRT_COLL_CT_TWO_PRIM_PARAM = "AIRTCollCTTwoPrimParam";
+  public static final String AIRTET_TWO_KEY_TWO_PRIM_PARAM = "AIRTETTwoKeyTwoPrimParam";
+  public static final String AIRT_COLL_ET_KEY_NAV_PARAM = "AIRTCollETKeyNavParam";
+  public static final String AIRTES_ALL_PRIM_PARAM = "AIRTESAllPrimParam";
+  public static final String AIRT_COLL_ES_ALL_PRIM_PARAM = "AIRTCollESAllPrimParam";
 
   EntityContainerInfo entityContainerInfoTest1 =
       new EntityContainerInfo().setContainerName(nameContainer);
@@ -98,13 +106,14 @@ public class ContainerProvider {
     // ActionImports
     List<ActionImport> actionImports = new ArrayList<ActionImport>();
     container.setActionImports(actionImports);
-    actionImports.add(prov.getActionImport(ContainerProvider.nameContainer, "AIRTString"));
-    actionImports.add(prov.getActionImport(ContainerProvider.nameContainer, "AIRTPrimParam"));
-    actionImports.add(prov.getActionImport(ContainerProvider.nameContainer, "AIRTPrimCollParam"));
-    actionImports.add(prov.getActionImport(ContainerProvider.nameContainer, "AIRTCompParam"));
-    actionImports.add(prov.getActionImport(ContainerProvider.nameContainer, "AIRTCompCollParam"));
-    actionImports.add(prov.getActionImport(ContainerProvider.nameContainer, "AIRTETParam"));
-    actionImports.add(prov.getActionImport(ContainerProvider.nameContainer, "AIRTETCollAllPrimParam"));
+    actionImports.add(prov.getActionImport(ContainerProvider.nameContainer, AIRT_STRING));
+    actionImports.add(prov.getActionImport(ContainerProvider.nameContainer, AIRT_COLL_STRING_TWO_PARAM));
+    actionImports.add(prov.getActionImport(ContainerProvider.nameContainer, AIRTCT_TWO_PRIM_PARAM));
+    actionImports.add(prov.getActionImport(ContainerProvider.nameContainer, AIRT_COLL_CT_TWO_PRIM_PARAM));
+    actionImports.add(prov.getActionImport(ContainerProvider.nameContainer, AIRTET_TWO_KEY_TWO_PRIM_PARAM));
+    actionImports.add(prov.getActionImport(ContainerProvider.nameContainer, AIRT_COLL_ET_KEY_NAV_PARAM));
+    actionImports.add(prov.getActionImport(ContainerProvider.nameContainer, AIRTES_ALL_PRIM_PARAM));
+    actionImports.add(prov.getActionImport(ContainerProvider.nameContainer, AIRT_COLL_ES_ALL_PRIM_PARAM));
 
     // FunctionImports
     List<FunctionImport> functionImports = new ArrayList<FunctionImport>();
@@ -259,43 +268,48 @@ public class ContainerProvider {
     return null;
   }
 
-  public ActionImport getActionImport(final FullQualifiedName entityContainer, final String name) throws ODataException
-  {
+  public ActionImport getActionImport(final FullQualifiedName entityContainer, final String name)
+          throws ODataException {
     if (entityContainer.equals(nameContainer)) {
-      if (name.equals("AIRTString")) {
+      if (name.equals(AIRT_STRING)) {
         return new ActionImport()
-                .setName("AIRTString")
+                .setName(AIRT_STRING)
                 .setAction(ActionProvider.nameUARTString);
 
-      } else if (name.equals("AIRTPrimParam")) {
+      } else if (name.equals(AIRT_COLL_STRING_TWO_PARAM)) {
         return new ActionImport()
-            .setName("AIRTPrimParam")
-            .setAction(ActionProvider.nameUARTPrimParam);
+            .setName(AIRT_COLL_STRING_TWO_PARAM)
+            .setAction(ActionProvider.nameUARTCollStringTwoParam);
 
-      } else if (name.equals("AIRTPrimCollParam")) {
+      } else if (name.equals(AIRTCT_TWO_PRIM_PARAM)) {
         return new ActionImport()
-            .setName("AIRTPrimCollParam")
-            .setAction(ActionProvider.nameUARTPrimCollParam);
+            .setName(AIRTCT_TWO_PRIM_PARAM)
+            .setAction(ActionProvider.nameUARTCTTwoPrimParam);
 
-      } else if (name.equals("AIRTCompParam")) {
+      } else if (name.equals(AIRT_COLL_CT_TWO_PRIM_PARAM)) {
         return new ActionImport()
-            .setName("AIRTCompParam")
-            .setAction(ActionProvider.nameUARTCompParam);
+            .setName(AIRT_COLL_CT_TWO_PRIM_PARAM)
+            .setAction(ActionProvider.nameUARTCollCTTwoPrimParam);
 
-      } else if (name.equals("AIRTCompCollParam")) {
+      } else if (name.equals(AIRTET_TWO_KEY_TWO_PRIM_PARAM)) {
         return new ActionImport()
-            .setName("AIRTCompCollParam")
-            .setAction(ActionProvider.nameUARTCompCollParam);
+            .setName(AIRTET_TWO_KEY_TWO_PRIM_PARAM)
+            .setAction(ActionProvider.nameUARTETTwoKeyTwoPrimParam);
 
-      } else if (name.equals("AIRTETParam")) {
+      } else if (name.equals(AIRT_COLL_ET_KEY_NAV_PARAM)) {
         return new ActionImport()
-            .setName("AIRTETParam")
-            .setAction(ActionProvider.nameUARTETParam);
+            .setName(AIRT_COLL_ET_KEY_NAV_PARAM)
+            .setAction(ActionProvider.nameUARTCollETKeyNavParam);
 
-      } else if (name.equals("AIRTETCollAllPrimParam")) {
+      } else if (name.equals(AIRTES_ALL_PRIM_PARAM)) {
         return new ActionImport()
-            .setName("AIRTETCollAllPrimParam")
-            .setAction(ActionProvider.nameUARTESParam);
+            .setName(AIRTES_ALL_PRIM_PARAM)
+            .setAction(ActionProvider.nameUARTETAllPrimParam);
+
+      } else if (name.equals(AIRT_COLL_ES_ALL_PRIM_PARAM)) {
+        return new ActionImport()
+            .setName(AIRT_COLL_ES_ALL_PRIM_PARAM)
+            .setAction(ActionProvider.nameUARTCollETAllPrimParam);
       }
     }
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/2f6b35ff/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/SchemaProvider.java
----------------------------------------------------------------------
diff --git a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/SchemaProvider.java b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/SchemaProvider.java
index 4806857..d2c1955 100644
--- a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/SchemaProvider.java
+++ b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/SchemaProvider.java
@@ -108,12 +108,13 @@ public class SchemaProvider {
     actions.addAll(prov.getActions(ActionProvider.nameBAETBaseTwoKeyNavRTETBaseTwoKeyNav));
     actions.addAll(prov.getActions(ActionProvider.nameBAETTwoBaseTwoKeyNavRTETBaseTwoKeyNav));
     actions.addAll(prov.getActions(ActionProvider.nameUARTString));
-    actions.addAll(prov.getActions(ActionProvider.nameUARTPrimParam));
-    actions.addAll(prov.getActions(ActionProvider.nameUARTPrimCollParam));
-    actions.addAll(prov.getActions(ActionProvider.nameUARTCompParam));
-    actions.addAll(prov.getActions(ActionProvider.nameUARTCompCollParam));
-    actions.addAll(prov.getActions(ActionProvider.nameUARTETParam));
-    actions.addAll(prov.getActions(ActionProvider.nameUARTESParam));
+    actions.addAll(prov.getActions(ActionProvider.nameUARTCollStringTwoParam));
+    actions.addAll(prov.getActions(ActionProvider.nameUARTCTTwoPrimParam));
+    actions.addAll(prov.getActions(ActionProvider.nameUARTCollCTTwoPrimParam));
+    actions.addAll(prov.getActions(ActionProvider.nameUARTETTwoKeyTwoPrimParam));
+    actions.addAll(prov.getActions(ActionProvider.nameUARTCollETKeyNavParam));
+    actions.addAll(prov.getActions(ActionProvider.nameUARTETAllPrimParam));
+    actions.addAll(prov.getActions(ActionProvider.nameUARTCollETAllPrimParam));
 
     // Functions
     List<Function> functions = new ArrayList<Function>();

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/2f6b35ff/lib/server-test/src/test/java/org/apache/olingo/server/core/ODataHandlerTest.java
----------------------------------------------------------------------
diff --git a/lib/server-test/src/test/java/org/apache/olingo/server/core/ODataHandlerTest.java b/lib/server-test/src/test/java/org/apache/olingo/server/core/ODataHandlerTest.java
index 03e5213..c7181d8 100644
--- a/lib/server-test/src/test/java/org/apache/olingo/server/core/ODataHandlerTest.java
+++ b/lib/server-test/src/test/java/org/apache/olingo/server/core/ODataHandlerTest.java
@@ -67,6 +67,7 @@ import org.apache.olingo.server.api.processor.ReferenceCollectionProcessor;
 import org.apache.olingo.server.api.processor.ReferenceProcessor;
 import org.apache.olingo.server.api.processor.ServiceDocumentProcessor;
 import org.apache.olingo.server.api.uri.UriInfo;
+import org.apache.olingo.server.tecsvc.provider.ContainerProvider;
 import org.apache.olingo.server.tecsvc.provider.EdmTechProvider;
 import org.junit.Test;
 
@@ -318,21 +319,57 @@ public class ODataHandlerTest {
 
   @Test
   public void dispatchAction() throws Exception {
-    final String uri = "AIRTString";
+    PrimitiveProcessor primitiveProcessor = mock(PrimitiveProcessor.class);
+    dispatch(HttpMethod.POST, ContainerProvider.AIRT_STRING, primitiveProcessor);
+    verify(primitiveProcessor).processPrimitive(
+            any(ODataRequest.class), any(ODataResponse.class), any(UriInfo.class),
+            any(ContentType.class), any(ContentType.class));
 
-    PrimitiveProcessor processor = mock(PrimitiveProcessor.class);
-    dispatch(HttpMethod.POST, uri, processor);
-    verify(processor).processPrimitive(
+    PrimitiveCollectionProcessor primitiveCollectionProcessor = mock(PrimitiveCollectionProcessor.class);
+    dispatch(HttpMethod.POST, ContainerProvider.AIRT_COLL_STRING_TWO_PARAM, primitiveCollectionProcessor);
+    verify(primitiveCollectionProcessor).processPrimitiveCollection(
+            any(ODataRequest.class), any(ODataResponse.class), any(UriInfo.class),
+            any(ContentType.class), any(ContentType.class));
+
+    ComplexProcessor complexProcessor = mock(ComplexProcessor.class);
+    dispatch(HttpMethod.POST, ContainerProvider.AIRTCT_TWO_PRIM_PARAM, complexProcessor);
+    verify(complexProcessor).processComplex(
             any(ODataRequest.class), any(ODataResponse.class), any(UriInfo.class),
             any(ContentType.class), any(ContentType.class));
 
-//    dispatch(HttpMethod.POST, uri, processor);
-//    verify(processor).readEntity(
-//            any(ODataRequest.class), any(ODataResponse.class), any(UriInfo.class), any(ContentType.class));
+    ComplexCollectionProcessor complexCollectionProcessor = mock(ComplexCollectionProcessor.class);
+    dispatch(HttpMethod.POST, ContainerProvider.AIRT_COLL_CT_TWO_PRIM_PARAM, complexCollectionProcessor);
+    verify(complexCollectionProcessor).processComplexCollection(
+            any(ODataRequest.class), any(ODataResponse.class), any(UriInfo.class),
+            any(ContentType.class), any(ContentType.class));
 
-    dispatchMethodNotAllowed(HttpMethod.GET, uri, processor);
-  }
+    EntityProcessor entityProcessor = mock(EntityProcessor.class);
+    dispatch(HttpMethod.POST, ContainerProvider.AIRTET_TWO_KEY_TWO_PRIM_PARAM, entityProcessor);
+    verify(entityProcessor).processEntity(
+            any(ODataRequest.class), any(ODataResponse.class), any(UriInfo.class),
+            any(ContentType.class), any(ContentType.class));
+
+    EntityCollectionProcessor entityCollectionProcessor = mock(EntityCollectionProcessor.class);
+    dispatch(HttpMethod.POST, ContainerProvider.AIRT_COLL_ET_KEY_NAV_PARAM, entityCollectionProcessor);
+    verify(entityCollectionProcessor).processEntityCollection(
+            any(ODataRequest.class), any(ODataResponse.class), any(UriInfo.class),
+            any(ContentType.class), any(ContentType.class));
 
+    EntityProcessor entityProcessorEs = mock(EntityProcessor.class);
+    dispatch(HttpMethod.POST, ContainerProvider.AIRTES_ALL_PRIM_PARAM, entityProcessorEs);
+    verify(entityProcessorEs).processEntity(
+            any(ODataRequest.class), any(ODataResponse.class), any(UriInfo.class),
+            any(ContentType.class), any(ContentType.class));
+
+    EntityCollectionProcessor entityCollectionProcessorEs = mock(EntityCollectionProcessor.class);
+    dispatch(HttpMethod.POST, ContainerProvider.AIRT_COLL_ES_ALL_PRIM_PARAM, entityCollectionProcessorEs);
+    verify(entityCollectionProcessorEs).processEntityCollection(
+            any(ODataRequest.class), any(ODataResponse.class), any(UriInfo.class),
+            any(ContentType.class), any(ContentType.class));
+
+    dispatchMethodNotAllowed(HttpMethod.GET, "AIRTString", mock(Processor.class));
+  }
+  
   @Test
   public void dispatchEntity() throws Exception {
     final String uri = "ESAllPrim(0)";

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/2f6b35ff/lib/server-test/src/test/java/org/apache/olingo/server/core/serializer/xml/MetadataDocumentTest.java
----------------------------------------------------------------------
diff --git a/lib/server-test/src/test/java/org/apache/olingo/server/core/serializer/xml/MetadataDocumentTest.java b/lib/server-test/src/test/java/org/apache/olingo/server/core/serializer/xml/MetadataDocumentTest.java
index 5055b6b..2ee6320 100644
--- a/lib/server-test/src/test/java/org/apache/olingo/server/core/serializer/xml/MetadataDocumentTest.java
+++ b/lib/server-test/src/test/java/org/apache/olingo/server/core/serializer/xml/MetadataDocumentTest.java
@@ -89,9 +89,9 @@ public class MetadataDocumentTest {
     // TODO: TypeDefinition
     // assertThat(metadata, containsString("<TypeDefinition Name=\"typeDef\" Type=\"Edm.Int16\"/>"));
 
-    assertThat(metadata, containsString("<Action Name=\"UARTPrimParam\" IsBound=\"false\">"
+    assertThat(metadata, containsString("<Action Name=\"UARTCTTwoPrimParam\" IsBound=\"false\">"
         + "<Parameter Name=\"ParameterInt16\" Type=\"Edm.Int16\"/>"
-        + "<ReturnType Type=\"Edm.String\"/></Action>"));
+        + "<ReturnType Type=\"Namespace1_Alias.CTTwoPrim\"/></Action>"));
 
     assertThat(metadata,
         containsString("<Action Name=\"BAESAllPrimRTETAllPrim\" IsBound=\"true\">"
@@ -120,7 +120,7 @@ public class MetadataDocumentTest {
             + "</Singleton>"));
 
     assertThat(metadata,
-        containsString("<ActionImport Name=\"AIRTPrimParam\" Action=\"Namespace1_Alias.UARTPrimParam\"/>"));
+        containsString("<ActionImport Name=\"AIRTCTTwoPrimParam\" Action=\"Namespace1_Alias.UARTCTTwoPrimParam\"/>"));
 
     assertThat(metadata,
         containsString("<FunctionImport Name=\"FINInvisible2RTInt16\" Function=\"Namespace1_Alias.UFNRTInt16\" "

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/2f6b35ff/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/UriResourceImplTest.java
----------------------------------------------------------------------
diff --git a/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/UriResourceImplTest.java b/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/UriResourceImplTest.java
index ba808ee..c08e37f 100644
--- a/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/UriResourceImplTest.java
+++ b/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/UriResourceImplTest.java
@@ -76,19 +76,19 @@ public class UriResourceImplTest {
     assertEquals("", impl.toString());
 
     // action
-    EdmAction action = edm.getUnboundAction(ActionProvider.nameUARTETParam);
+    EdmAction action = edm.getUnboundAction(ActionProvider.nameUARTETTwoKeyTwoPrimParam);
     impl.setAction(action);
     assertEquals(action, impl.getAction());
-    assertEquals(ActionProvider.nameUARTETParam.getName(), impl.toString());
+    assertEquals(ActionProvider.nameUARTETTwoKeyTwoPrimParam.getName(), impl.toString());
 
     // action import
     impl = new UriResourceActionImpl();
-    EdmActionImport actionImport = edm.getEntityContainer(null).getActionImport("AIRTPrimParam");
+    EdmActionImport actionImport = edm.getEntityContainer(null).getActionImport("AIRTCTTwoPrimParam");
     impl.setActionImport(actionImport);
     assertEquals(actionImport, impl.getActionImport());
     assertEquals(actionImport.getUnboundAction(), impl.getAction());
     assertEquals(false, impl.isCollection());
-    assertEquals("AIRTPrimParam", impl.toString());
+    assertEquals("AIRTCTTwoPrimParam", impl.toString());
     assertEquals(actionImport.getUnboundAction().getReturnType().getType(), impl.getType());
   }
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/2f6b35ff/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/antlr/TestFullResourcePath.java
----------------------------------------------------------------------
diff --git a/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/antlr/TestFullResourcePath.java b/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/antlr/TestFullResourcePath.java
index 0243452..81235ab 100644
--- a/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/antlr/TestFullResourcePath.java
+++ b/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/antlr/TestFullResourcePath.java
@@ -35,10 +35,13 @@ import org.apache.olingo.server.core.uri.testutil.EdmTechTestProvider;
 import org.apache.olingo.server.core.uri.testutil.FilterValidator;
 import org.apache.olingo.server.core.uri.testutil.ResourceValidator;
 import org.apache.olingo.server.core.uri.testutil.TestUriValidator;
+import org.apache.olingo.server.tecsvc.provider.ActionProvider;
 import org.apache.olingo.server.tecsvc.provider.ComplexTypeProvider;
+import org.apache.olingo.server.tecsvc.provider.ContainerProvider;
 import org.apache.olingo.server.tecsvc.provider.EntityTypeProvider;
 import org.apache.olingo.server.tecsvc.provider.EnumTypeProvider;
 import org.apache.olingo.server.tecsvc.provider.PropertyProvider;
+import org.apache.olingo.server.tecsvc.provider.SchemaProvider;
 import org.junit.Ignore;
 import org.junit.Test;
 
@@ -2724,15 +2727,15 @@ public class TestFullResourcePath {
         .isType(PropertyProvider.nameString)
         .isParameter(0, "ParameterInt16", "1");
 
-    testUri.run("AIRTETParam")
+    testUri.run(ContainerProvider.AIRT_STRING)
         .isKind(UriInfoKind.resource)
         .goPath().first()
-        .isActionImport("AIRTETParam");
+        .isActionImport(ContainerProvider.AIRT_STRING);
 
-    testUri.run("AIRTPrimParam")
+    testUri.run(ContainerProvider.AIRT_COLL_ES_ALL_PRIM_PARAM)
         .isKind(UriInfoKind.resource)
         .goPath().first()
-        .isActionImport("AIRTPrimParam");
+        .isActionImport(ContainerProvider.AIRT_COLL_ES_ALL_PRIM_PARAM);
 
     testUri.run("ESKeyNav/$count")
         .isKind(UriInfoKind.resource)

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/2f6b35ff/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/antlr/TestUriParserImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/antlr/TestUriParserImpl.java b/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/antlr/TestUriParserImpl.java
index a9a05d4..9157d2a 100644
--- a/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/antlr/TestUriParserImpl.java
+++ b/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/antlr/TestUriParserImpl.java
@@ -36,7 +36,9 @@ import org.apache.olingo.server.core.uri.testutil.FilterValidator;
 import org.apache.olingo.server.core.uri.testutil.ResourceValidator;
 import org.apache.olingo.server.core.uri.testutil.TestUriValidator;
 import org.apache.olingo.server.core.uri.validator.UriValidationException;
+import org.apache.olingo.server.tecsvc.provider.ActionProvider;
 import org.apache.olingo.server.tecsvc.provider.ComplexTypeProvider;
+import org.apache.olingo.server.tecsvc.provider.ContainerProvider;
 import org.apache.olingo.server.tecsvc.provider.EntityTypeProvider;
 import org.apache.olingo.server.tecsvc.provider.PropertyProvider;
 import org.junit.Test;
@@ -160,37 +162,37 @@ public class TestUriParserImpl {
   @Test
   public void runActionImport_VarReturnType() {
 
-    testRes.run("AIRTPrimParam").isKind(UriInfoKind.resource)
+    testRes.run(ContainerProvider.AIRT_STRING).isKind(UriInfoKind.resource)
         .first()
-        .isActionImport("AIRTPrimParam")
-        .isAction("UARTPrimParam")
+        .isActionImport(ContainerProvider.AIRT_STRING)
+        .isAction(ActionProvider.nameUARTString.getName())
         .isType(PropertyProvider.nameString, false);
 
-    testRes.run("AIRTPrimCollParam").isKind(UriInfoKind.resource)
-        .first()
-        .isActionImport("AIRTPrimCollParam")
-        .isAction("UARTPrimCollParam")
-        .isType(PropertyProvider.nameString, true);
+    testRes.run(ContainerProvider.AIRT_COLL_STRING_TWO_PARAM).isKind(UriInfoKind.resource)
+            .first()
+            .isActionImport(ContainerProvider.AIRT_COLL_STRING_TWO_PARAM)
+            .isAction(ActionProvider.nameUARTCollStringTwoParam.getName())
+            .isType(PropertyProvider.nameString, true);
 
-    testRes.run("AIRTCompParam").isKind(UriInfoKind.resource)
+    testRes.run(ContainerProvider.AIRTCT_TWO_PRIM_PARAM).isKind(UriInfoKind.resource)
         .first()
-        .isActionImport("AIRTCompParam")
-        .isAction("UARTCompParam")
+        .isActionImport(ContainerProvider.AIRTCT_TWO_PRIM_PARAM)
+        .isAction(ActionProvider.nameUARTCTTwoPrimParam.getName())
         .isType(ComplexTypeProvider.nameCTTwoPrim, false);
 
-    testRes.run("AIRTCompCollParam").isKind(UriInfoKind.resource)
+    testRes.run(ContainerProvider.AIRT_COLL_CT_TWO_PRIM_PARAM).isKind(UriInfoKind.resource)
         .first()
-        .isActionImport("AIRTCompCollParam")
-        .isAction("UARTCompCollParam")
+        .isActionImport(ContainerProvider.AIRT_COLL_CT_TWO_PRIM_PARAM)
+        .isAction(ActionProvider.nameUARTCollCTTwoPrimParam.getName())
         .isType(ComplexTypeProvider.nameCTTwoPrim, true);
 
-    testRes.run("AIRTETParam").isKind(UriInfoKind.resource)
+    testRes.run(ContainerProvider.AIRTET_TWO_KEY_TWO_PRIM_PARAM).isKind(UriInfoKind.resource)
         .first()
-        .isActionImport("AIRTETParam")
-        .isAction("UARTETParam")
+        .isActionImport(ContainerProvider.AIRTET_TWO_KEY_TWO_PRIM_PARAM)
+        .isAction(ActionProvider.nameUARTETTwoKeyTwoPrimParam.getName())
         .isType(EntityTypeProvider.nameETTwoKeyTwoPrim, false);
 
-    testUri.runEx("AIRTPrimParam/invalidElement")
+    testUri.runEx(ContainerProvider.AIRT_STRING + "/invalidElement")
         .isExSemantic(UriParserSemanticException.MessageKeys.RESOURCE_PART_MUST_BE_PRECEDED_BY_STRUCTURAL_TYPE);
   }
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/2f6b35ff/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/queryoption/expression/ExpressionTest.java
----------------------------------------------------------------------
diff --git a/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/queryoption/expression/ExpressionTest.java b/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/queryoption/expression/ExpressionTest.java
index a44c353..51e5a83 100644
--- a/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/queryoption/expression/ExpressionTest.java
+++ b/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/queryoption/expression/ExpressionTest.java
@@ -135,7 +135,7 @@ public class ExpressionTest {
     EdmEntityType entityType = edm.getEntityType(EntityTypeProvider.nameETKeyNav);
 
     // UriResourceImplTyped
-    EdmAction action = edm.getUnboundAction(ActionProvider.nameUARTPrimParam);
+    EdmAction action = edm.getUnboundAction(ActionProvider.nameUARTString);
     UriInfoResource uriInfo = new UriInfoImpl().setKind(UriInfoKind.resource).addResourcePart(
         new UriResourceActionImpl().setAction(action)).asUriInfoResource();
     expression.setResourcePath(uriInfo);
@@ -143,20 +143,20 @@ public class ExpressionTest {
 
     // check accept and path
     assertEquals(uriInfo, expression.getResourcePath());
-    assertEquals("<UARTPrimParam>", expression.accept(new FilterTreeToText()));
+    assertEquals("<UARTString>", expression.accept(new FilterTreeToText()));
 
     // UriResourceImplTyped check collection = false case
     assertEquals(false, expression.isCollection());
 
     // UriResourceImplTyped check collection = true case
-    action = edm.getUnboundAction(ActionProvider.nameUARTPrimCollParam);
+    action = edm.getUnboundAction(ActionProvider.nameUARTCollStringTwoParam);
     expression.setResourcePath(new UriInfoImpl().setKind(UriInfoKind.resource).addResourcePart(
         new UriResourceActionImpl().setAction(action))
         .asUriInfoResource());
     assertEquals(true, expression.isCollection());
 
     // UriResourceImplTyped with filter
-    action = edm.getUnboundAction(ActionProvider.nameUARTPrimParam);
+    action = edm.getUnboundAction(ActionProvider.nameUARTString);
     expression.setResourcePath(new UriInfoImpl().setKind(UriInfoKind.resource).addResourcePart(
         new UriResourceActionImpl().setAction(action).setTypeFilter(entityType))
         .asUriInfoResource());

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/2f6b35ff/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/validator/UriValidatorTest.java
----------------------------------------------------------------------
diff --git a/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/validator/UriValidatorTest.java b/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/validator/UriValidatorTest.java
index 9ad799a..bdde9ce 100644
--- a/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/validator/UriValidatorTest.java
+++ b/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/validator/UriValidatorTest.java
@@ -27,6 +27,7 @@ import org.apache.olingo.server.core.uri.parser.UriParserException;
 import org.apache.olingo.server.core.uri.parser.UriParserSemanticException;
 import org.apache.olingo.server.core.uri.parser.UriParserSyntaxException;
 import org.apache.olingo.server.core.uri.testutil.TestUriValidator;
+import org.apache.olingo.server.tecsvc.provider.ContainerProvider;
 import org.apache.olingo.server.tecsvc.provider.EdmTechProvider;
 import org.junit.Test;
 
@@ -152,9 +153,9 @@ public class UriValidatorTest {
 
       { "ESTwoKeyNav/olingo.odata.test1.BAESTwoKeyNavRTESTwoKeyNav" },
       { "ESAllPrim/olingo.odata.test1.BAESAllPrimRTETAllPrim" },
-      { "AIRTPrimCollParam" },
-      { "AIRTETParam" },
-      { "AIRTPrimParam" }
+      { ContainerProvider.AIRT_COLL_STRING_TWO_PARAM },
+      { ContainerProvider.AIRTET_TWO_KEY_TWO_PRIM_PARAM },
+      { ContainerProvider.AIRT_STRING }
   };
 
   private String[][] urisWithNonValidSystemQueryOptions = {

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/2f6b35ff/samples/server/src/main/java/org/apache/olingo/server/sample/processor/CarsProcessor.java
----------------------------------------------------------------------
diff --git a/samples/server/src/main/java/org/apache/olingo/server/sample/processor/CarsProcessor.java b/samples/server/src/main/java/org/apache/olingo/server/sample/processor/CarsProcessor.java
index f3747dc..85a8c62 100644
--- a/samples/server/src/main/java/org/apache/olingo/server/sample/processor/CarsProcessor.java
+++ b/samples/server/src/main/java/org/apache/olingo/server/sample/processor/CarsProcessor.java
@@ -55,9 +55,7 @@ import org.apache.olingo.server.api.serializer.EntityCollectionSerializerOptions
 import org.apache.olingo.server.api.serializer.EntitySerializerOptions;
 import org.apache.olingo.server.api.serializer.ODataSerializer;
 import org.apache.olingo.server.api.serializer.PrimitiveSerializerOptions;
-import org.apache.olingo.server.api.serializer.RepresentationType;
 import org.apache.olingo.server.api.serializer.SerializerException;
-import org.apache.olingo.server.api.uri.UriHelper;
 import org.apache.olingo.server.api.uri.UriInfo;
 import org.apache.olingo.server.api.uri.UriInfoResource;
 import org.apache.olingo.server.api.uri.UriResource;
@@ -123,6 +121,15 @@ public class CarsProcessor implements EntityCollectionProcessor, EntityProcessor
   }
 
   @Override
+  public void processEntityCollection(final ODataRequest request, final ODataResponse response,
+                                      final UriInfo uriInfo,
+                                      final ContentType requestFormat, final ContentType  responseFormat)
+          throws ODataApplicationException, DeserializerException, SerializerException {
+    throw new ODataApplicationException("Process entity collection is not supported yet.",
+            HttpStatusCode.NOT_IMPLEMENTED.getStatusCode(), Locale.ROOT);
+  }
+
+  @Override
   public void readEntity(final ODataRequest request, ODataResponse response, final UriInfo uriInfo,
       final ContentType requestedContentType) throws ODataApplicationException, SerializerException {
     // First we have to figure out which entity set the requested entity is in
@@ -172,6 +179,15 @@ public class CarsProcessor implements EntityCollectionProcessor, EntityProcessor
   }
 
   @Override
+  public void processEntity(final ODataRequest request, final ODataResponse response,
+                            final UriInfo uriInfo, final ContentType requestFormat,
+                            final ContentType responseFormat)
+          throws ODataApplicationException, DeserializerException, SerializerException {
+    throw new ODataApplicationException("Process entity is not supported yet.",
+            HttpStatusCode.NOT_IMPLEMENTED.getStatusCode(), Locale.ROOT);
+  }
+
+  @Override
   public void readPrimitive(ODataRequest request, ODataResponse response, UriInfo uriInfo, ContentType format)
           throws ODataApplicationException, SerializerException {
     readProperty(response, uriInfo, format, false);
@@ -341,7 +357,7 @@ public class CarsProcessor implements EntityCollectionProcessor, EntityProcessor
                              final UriInfo uriInfo, final ContentType requestFormat,
                              final ContentType responseFormat)
           throws ODataApplicationException, DeserializerException, SerializerException {
-    throw new ODataApplicationException("Process Primitive property update is not supported yet.",
+    throw new ODataApplicationException("Process Primitive property is not supported yet.",
             HttpStatusCode.NOT_IMPLEMENTED.getStatusCode(), Locale.ROOT);
   }
 
@@ -359,7 +375,7 @@ public class CarsProcessor implements EntityCollectionProcessor, EntityProcessor
                              final UriInfo uriInfo, final ContentType requestFormat,
                              final ContentType responseFormat)
           throws ODataApplicationException, DeserializerException, SerializerException {
-    throw new ODataApplicationException("Process Complex property update is not supported yet.",
+    throw new ODataApplicationException("Process Complex property is not supported yet.",
             HttpStatusCode.NOT_IMPLEMENTED.getStatusCode(), Locale.ROOT);
   }
 


Mime
View raw message