Package com.linkedin.restli.internal.server.model

Examples of com.linkedin.restli.internal.server.model.AnnotationSet


        null,
        false,
        null,
        Parameter.ParamType.POST,
        false,
        new AnnotationSet(new Annotation[]{}));

    List<Parameter<?>> collectionResourceParams = new ArrayList<Parameter<?>>();
    collectionResourceParams.add(new Parameter<Integer>(
        "myComplexKeyCollectionId",
        Integer.class,
        new IntegerDataSchema(),
        false,
        null,
        Parameter.ParamType.ASSOC_KEY_PARAM,
        false,
        new AnnotationSet(new Annotation[]{})));
    collectionResourceParams.add(patchParam);

    List<Parameter<?>> simpleResourceParams = new ArrayList<Parameter<?>>();
    simpleResourceParams.add(patchParam);

    List<Parameter<?>> associationResourceParams = new ArrayList<Parameter<?>>();
    associationResourceParams.add(new Parameter<CompoundKey>(
        "myComplexKeyAssociationId",
        CompoundKey.class,
        null,
        false,
        null,
        Parameter.ParamType.ASSOC_KEY_PARAM,
        false,
        new AnnotationSet(new Annotation[]{})));
    associationResourceParams.add(patchParam);

    return new Object[][]
        {
            {
View Full Code Here


        DataTemplateUtil.getSchema(MyComplexKey.class),
        false,
        null,
        Parameter.ParamType.POST,
        false,
        new AnnotationSet(new Annotation[]{}));
    ResourceMethodDescriptor descriptor = RestLiArgumentBuilderTestHelper.getMockResourceMethodDescriptor(model, param);
    ResourceContext context = RestLiArgumentBuilderTestHelper.getMockResourceContext(null, null, null);
    RoutingResult routingResult = RestLiArgumentBuilderTestHelper.getMockRoutingResult(descriptor, 2, context, 1);

    RestLiArgumentBuilder argumentBuilder = new CreateArgumentBuilder();
View Full Code Here

  @Test(dataProvider = "argumentData")
  public void testArgumentBuilder(Set<Object> batchKeys) throws RestLiSyntaxException
  {
    @SuppressWarnings("rawtypes")
    Parameter<Set> param = new Parameter<Set>("", Set.class, null, false, null, Parameter.ParamType.BATCH, false, new AnnotationSet(new Annotation[]{}));
    ResourceMethodDescriptor descriptor = RestLiArgumentBuilderTestHelper.getMockResourceMethodDescriptor(null, param);
    ResourceContext context = RestLiArgumentBuilderTestHelper.getMockResourceContext(null, null, batchKeys);
    RoutingResult routingResult = RestLiArgumentBuilderTestHelper.getMockRoutingResult(descriptor, 1, context, 2);
    RestRequest request = RestLiArgumentBuilderTestHelper.getMockRequest(false, null, 0);
View Full Code Here

  @Test(dataProvider = "argumentData")
  public void testArgumentBuilder(Set<Object> batchKeys) throws RestLiSyntaxException
  {
    @SuppressWarnings("rawtypes")
    Parameter<Set> param = new Parameter<Set>("", Set.class, null, false, null, Parameter.ParamType.BATCH, false, new AnnotationSet(new Annotation[]{}));
    ResourceMethodDescriptor descriptor = RestLiArgumentBuilderTestHelper.getMockResourceMethodDescriptor(null, param);
    ResourceContext context = RestLiArgumentBuilderTestHelper.getMockResourceContext(null, null, batchKeys);
    RoutingResult routingResult = RestLiArgumentBuilderTestHelper.getMockRoutingResult(descriptor, 1, context, 2);

    RestRequest request = RestLiArgumentBuilderTestHelper.getMockRequest(false, null, 0);
View Full Code Here

                    new IntegerDataSchema(),
                    false,
                    null,
                    Parameter.ParamType.ASSOC_KEY_PARAM,
                    false,
                    new AnnotationSet(new Annotation[]{})),
                "myComplexKeyCollectionId",
                new Integer(123),
                new IntegerDataSchema()
            },
            {
                null, // Test for RestLiSimpleResource
                null,
                null,
                null
            },
            {
                new Parameter<CompoundKey>("myComplexKeyAssociationId",
                    CompoundKey.class,
                    null,
                    false,
                    null,
                    Parameter.ParamType.ASSOC_KEY_PARAM,
                    false,
                    new AnnotationSet(new Annotation[]{})),
                "myComplexKeyAssociationId",
                new CompoundKey().append("string1", "str1").append("string2", "str2"),
                null
            }
        };
View Full Code Here

        null,
        false,
        null,
        Parameter.ParamType.BATCH,
        false,
        new AnnotationSet(new Annotation[]{}));
    ResourceMethodDescriptor descriptor = RestLiArgumentBuilderTestHelper.getMockResourceMethodDescriptor(model, param);
    ResourceContext context = RestLiArgumentBuilderTestHelper.getMockResourceContext(null, null, null);
    RoutingResult routingResult = RestLiArgumentBuilderTestHelper.getMockRoutingResult(descriptor, 2, context, 1);

    RestLiArgumentBuilder argumentBuilder = new BatchCreateArgumentBuilder();
View Full Code Here

        null,
        false,
        new PagingContext(0, 10),
        Parameter.ParamType.PAGING_CONTEXT_PARAM,
        false,
        new AnnotationSet(new Annotation[]{}));
    getAllParams.add(pagingContextParam);
    Map<String, String> getAllContextParams = new HashMap<String, String>();
    getAllContextParams.put("start", "33");
    getAllContextParams.put("count", "444");

    List<Parameter<?>> finderParams = new ArrayList<Parameter<?>>();
    finderParams.add(pagingContextParam);
    Parameter<Integer> requiredIntParam = new Parameter<Integer>(
        "required",
        Integer.class,
        new IntegerDataSchema(),
        false,
        null,
        Parameter.ParamType.QUERY,
        true,
        new AnnotationSet(new Annotation[]{}));
    finderParams.add(requiredIntParam);
    Parameter<String> optionalStringParam = new Parameter<String>(
        "optional",
        String.class,
        new StringDataSchema(),
        true,
        null,
        Parameter.ParamType.QUERY,
        true,
        new AnnotationSet(new Annotation[]{}));
    finderParams.add(optionalStringParam);
    Map<String, String> finderContextParams = new HashMap<String, String>();
    finderContextParams.put("start", "33");
    finderContextParams.put("count", "444");
    finderContextParams.put("required", "777");
    finderContextParams.put("optional", null);

    Map<String, String> finderContextParamsWithOptionalString = new HashMap<String, String>(finderContextParams);
    finderContextParamsWithOptionalString.put("optional", "someString");

    List<Parameter<?>> finderWithAssocKeyParams = new ArrayList<Parameter<?>>();
    finderWithAssocKeyParams.add(new Parameter<String>(
        "string1",
        String.class,
        new StringDataSchema(),
        false,
        null,
        Parameter.ParamType.ASSOC_KEY_PARAM,
        true,
        new AnnotationSet(new Annotation[]{})));

    return new Object[][]
        {
            {
                getAllParams,
View Full Code Here

        null,
        false,
        null,
        Parameter.ParamType.BATCH,
        false,
        new AnnotationSet(new Annotation[]{}));
    ResourceMethodDescriptor descriptor = RestLiArgumentBuilderTestHelper.getMockResourceMethodDescriptor(model, param);
    Set<Object> batchKeys = new HashSet<Object>(Arrays.asList(keys));
    ResourceContext context = RestLiArgumentBuilderTestHelper.getMockResourceContext(null, null, batchKeys);
    RoutingResult routingResult = RestLiArgumentBuilderTestHelper.getMockRoutingResult(descriptor, 2, context, 2);
View Full Code Here

      null,
      false,
      null,
      Parameter.ParamType.BATCH,
      false,
      new AnnotationSet(new Annotation[]{}));
    ResourceMethodDescriptor descriptor = RestLiArgumentBuilderTestHelper.getMockResourceMethodDescriptor(null, param);
    Set<Object> batchKeys = new HashSet<Object>(Arrays.asList(keys));
    ResourceContext context = RestLiArgumentBuilderTestHelper.getMockResourceContext(null, null, batchKeys);
    RoutingResult routingResult = RestLiArgumentBuilderTestHelper.getMockRoutingResult(descriptor, 1, context, 2);
View Full Code Here

        new StringDataSchema(),
        false,
        null,
        Parameter.ParamType.POST,
        true,
        new AnnotationSet(new Annotation[]{})));
    params.add(new Parameter<Integer>(
        "param2",
        Integer.class,
        new IntegerDataSchema(),
        true,
        "1234",
        Parameter.ParamType.POST,
        true,
        new AnnotationSet(new Annotation[]{})));
    return params;
  }
View Full Code Here

TOP

Related Classes of com.linkedin.restli.internal.server.model.AnnotationSet

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.