Repository: olingo-odata4 Updated Branches: refs/heads/master 18b126742 -> 981084fe1
OLINGO-915: Support system options with FunctionImports based the return types rather than restricting only to composable functions Project: http://git-wip-us.apache.org/repos/asf/olingo-odata4/repo Commit: http://git-wip-us.apache.org/repos/asf/olingo-odata4/commit/1a41ae8d Tree: http://git-wip-us.apache.org/repos/asf/olingo-odata4/tree/1a41ae8d Diff: http://git-wip-us.apache.org/repos/asf/olingo-odata4/diff/1a41ae8d Branch: refs/heads/master Commit: 1a41ae8d30e82cb4b0202bb79fa3ab5b541069f4 Parents: 300316d Author: Ramesh Reddy <[email protected]> Authored: Mon Mar 28 10:12:00 2016 -0500 Committer: Ramesh Reddy <[email protected]> Committed: Mon Mar 28 10:12:00 2016 -0500 ---------------------------------------------------------------------- .../server/core/uri/validator/UriValidator.java | 3 -- .../core/uri/parser/TestFullResourcePath.java | 29 ++++++-------------- 2 files changed, 8 insertions(+), 24 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/1a41ae8d/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/validator/UriValidator.java ---------------------------------------------------------------------- diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/validator/UriValidator.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/validator/UriValidator.java index cec2fc0..9c076b2 100644 --- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/validator/UriValidator.java +++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/validator/UriValidator.java @@ -255,9 +255,6 @@ public class UriValidator { private UriType getUriTypeForFunction(final UriResource lastPathSegment) throws UriValidationException { final UriResourceFunction uriFunction = (UriResourceFunction) lastPathSegment; - if (!uriFunction.getFunction().isComposable()) { - return UriType.none; - } final boolean isCollection = uriFunction.isCollection(); final EdmTypeKind typeKind = uriFunction.getFunction().getReturnType().getType().getKind(); http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/1a41ae8d/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/parser/TestFullResourcePath.java ---------------------------------------------------------------------- diff --git a/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/parser/TestFullResourcePath.java b/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/parser/TestFullResourcePath.java index 2596f5c..c2eb419 100644 --- a/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/parser/TestFullResourcePath.java +++ b/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/parser/TestFullResourcePath.java @@ -1236,27 +1236,14 @@ public class TestFullResourcePath { testUri.runEx("FICRTCollETMixPrimCollCompTwoParam(ParameterInt16=1,ParameterString='1')(0)/PropertyInt16") .isExValidation(UriValidationException.MessageKeys.UNALLOWED_RESOURCE_PATH); - testUri.runEx("FICRTCollETMixPrimCollCompTwoParam(ParameterInt16=1,ParameterString='1')", "$skip=1") - .isExValidation(UriValidationException.MessageKeys.SYSTEM_QUERY_OPTION_NOT_ALLOWED); - - testUri.runEx("FICRTCollETMixPrimCollCompTwoParam(ParameterInt16=1,ParameterString='1')", "$top=1") - .isExValidation(UriValidationException.MessageKeys.SYSTEM_QUERY_OPTION_NOT_ALLOWED); - - testUri.runEx("FICRTCollETMixPrimCollCompTwoParam(ParameterInt16=1,ParameterString='1')", - "$filter=PropertyInt16 eq 1") - .isExValidation(UriValidationException.MessageKeys.SYSTEM_QUERY_OPTION_NOT_ALLOWED); - - testUri.runEx("FICRTCollETMixPrimCollCompTwoParam(ParameterInt16=1,ParameterString='1')", "$skip=1") - .isExValidation(UriValidationException.MessageKeys.SYSTEM_QUERY_OPTION_NOT_ALLOWED); - - testUri.runEx("FICRTCollETMixPrimCollCompTwoParam(ParameterInt16=1,ParameterString='1')", "$count=true") - .isExValidation(UriValidationException.MessageKeys.SYSTEM_QUERY_OPTION_NOT_ALLOWED); - - testUri.runEx("FICRTCollETMixPrimCollCompTwoParam(ParameterInt16=1,ParameterString='1')", "$skiptoken=5") - .isExValidation(UriValidationException.MessageKeys.SYSTEM_QUERY_OPTION_NOT_ALLOWED); - - testUri.runEx("FICRTCollETMixPrimCollCompTwoParam(ParameterInt16=1,ParameterString='1')", "$search=test") - .isExValidation(UriValidationException.MessageKeys.SYSTEM_QUERY_OPTION_NOT_ALLOWED); + testUri.run("FICRTCollETMixPrimCollCompTwoParam(ParameterInt16=1,ParameterString='1')", "$skip=1"); + testUri.run("FICRTCollETMixPrimCollCompTwoParam(ParameterInt16=1,ParameterString='1')", "$top=1"); + testUri.run("FICRTCollETMixPrimCollCompTwoParam(ParameterInt16=1,ParameterString='1')", + "$filter=PropertyInt16 eq 1"); + testUri.run("FICRTCollETMixPrimCollCompTwoParam(ParameterInt16=1,ParameterString='1')", "$skip=1"); + testUri.run("FICRTCollETMixPrimCollCompTwoParam(ParameterInt16=1,ParameterString='1')", "$count=true"); + testUri.run("FICRTCollETMixPrimCollCompTwoParam(ParameterInt16=1,ParameterString='1')", "$skiptoken=5"); + testUri.run("FICRTCollETMixPrimCollCompTwoParam(ParameterInt16=1,ParameterString='1')", "$search=test"); testUri.run("ESAllPrim/olingo.odata.test1.BFNESAllPrimRTCTAllPrim()") .isKind(UriInfoKind.resource)
