Package com.linkedin.restli.common

Examples of com.linkedin.restli.common.ResourceMethod


  @Test
  public void testFilterRequestContextAdapter() throws Exception
  {
    final String resourceName = "resourceName";
    final String resourceNamespace = "resourceNamespace";
    final ResourceMethod methodType = ResourceMethod.GET;
    final DataMap customAnnotations = new DataMap();
    customAnnotations.put("foo", "Bar");
    final ProjectionMode projectionMode = ProjectionMode.AUTOMATIC;
    final MaskTree maskTree = new MaskTree();
    final MutablePathKeys pathKeys = new PathKeysImpl();
View Full Code Here


  }

  private void addGetRequestData(List<List<Object>> data)
      throws URISyntaxException
  {
    ResourceMethod getMethod = ResourceMethod.GET;

    // new constructor

    GetRequest<RecordTemplateWithPrimitiveKey> getRequest1 =
        new GetRequest<RecordTemplateWithPrimitiveKey>(Collections.<String, String>emptyMap(),
View Full Code Here

    /*
    Action name: bar
    Action params: "param", a String
    Action response: "response", a String
     */
    ResourceMethod actionMethod = ResourceMethod.ACTION;
   
    FieldDef<String> actionParam = new FieldDef<String>("param", String.class, DataTemplateUtil.getSchema(String.class));
    DynamicRecordMetadata requestMetadata = new DynamicRecordMetadata("bar", Collections.singleton(actionParam));
    DataMap dataMap = new DataMap();
    dataMap.put("param", "paramValue");
View Full Code Here

  }

  private void addDeleteRequestData(List<List<Object>> data)
      throws URISyntaxException
  {
    ResourceMethod method = ResourceMethod.DELETE;

    // new constructor

    DeleteRequest<EmptyRecord> deleteRequest1 =
        new DeleteRequest<EmptyRecord>(Collections.<String, String>emptyMap(),
View Full Code Here

    Finder name: bar
    Query params (for the finder): bar -> bar
    Association key: (baz -> baz)
     */

    ResourceMethod method = ResourceMethod.FINDER;

    // new constructor

    // we have to create these two objects because the Request constructor modifies the passed in map
    Map<String, Object> queryParams1 = new HashMap<String, Object>();
View Full Code Here

  @SuppressWarnings({"unchecked", "rawtypes"})
  private void addPartialUpdateRequestData(List<List<Object>> data)
      throws URISyntaxException
  {
    ResourceMethod method = ResourceMethod.PARTIAL_UPDATE;

    // new constructor

    RecordTemplateWithPrimitiveKey record1 = new RecordTemplateWithPrimitiveKey().setId(1L).setBody("foo");
    RecordTemplateWithPrimitiveKey record2 = new RecordTemplateWithPrimitiveKey().setId(1L).setBody("bar");
View Full Code Here

  }

  private void addUpdateRequestData(List<List<Object>> data)
      throws URISyntaxException
  {
    ResourceMethod method = ResourceMethod.UPDATE;

    // new constructor

    RecordTemplateWithPrimitiveKey record1 = new RecordTemplateWithPrimitiveKey().setId(1L).setBody("foo");
    RecordTemplateWithPrimitiveKey record2 = new RecordTemplateWithPrimitiveKey(record1.data());
View Full Code Here

  private void addRequestData(List<List<Object>> data)
  {
    // NOTE: the arguments to the Request constructor here might not make sense. The point is to verify that the equals
    //       method works and nothing more.

    ResourceMethod method = ResourceMethod.GET;
    RecordTemplate input = new RecordTemplateWithPrimitiveKey().setBody("foo").setId(1L);
    Map<String, String> headers = new HashMap<String, String>();
    headers.put("foo", "bar");
    RestResponseDecoder decoder = new EntityResponseDecoder(GetRequest.class);
    ResourceSpec resourceSpec = buildResourceSpec();
View Full Code Here

  @SuppressWarnings("deprecation")
  public void testDeprecatedRequestCreation()
      throws URISyntaxException, RemoteInvocationException
  {
    URI uri = new URI("greetings/1");
    ResourceMethod method = ResourceMethod.GET;
    RecordTemplate inputRecord = null;
    Map<String, String> headers = Collections.emptyMap();
    RestResponseDecoder<Greeting> decoder = new EntityResponseDecoder<Greeting>(Greeting.class);
    ResourceSpec resourceSpec = new ResourceSpecImpl(EnumSet.of(method),
                                                     null,
View Full Code Here

TOP

Related Classes of com.linkedin.restli.common.ResourceMethod

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.