Examples of ODataFeed


Examples of com.tridion.webservices.odata.model.ODataFeed

  protected ODataBase resolveRelation(ODataEntry previouslyResolvedEntry) {
    return new ODataErrorResponse("", "Relation is not supported");
  }

  private ODataFeed buildQueryEntries(List<ComponentMeta> items) throws FeedBuildingException, JPQLExecutionException {
    ODataFeed feed = new ODataFeed(ODataFeed.COMPONENT_TITLE, getRequestUrl(), getBaseUrl());
    feed.setUpdated(new Date());
    feed.setId(getRequestUrl());
    for (ComponentMeta componentMeta : items) {
      feed.addEntry(buildEntry(componentMeta, false));
    }

    return feed;
  }
View Full Code Here

Examples of com.tridion.webservices.odata.model.ODataFeed

    return new ODataErrorResponse("", "Relation is not supported");
  }

  private ODataFeed buildQueryEntries(List<ComponentPresentation> items) throws FeedBuildingException,
      JPQLExecutionException {
    ODataFeed feed = new ODataFeed(ODataFeed.COMPONENT_PRESENTATION_FEED_TITLE, getRequestUrl(), getBaseUrl());
    feed.setUpdated(new Date());
    feed.setId(getRequestUrl());
    for (ComponentPresentation item : items) {
      feed.addEntry(buildEntry(item, false));
    }

    return feed;
  }
View Full Code Here

Examples of com.tridion.webservices.odata.model.ODataFeed

  protected ODataBase resolveRelation(ODataEntry previouslyResolvedEntry) {
    return new ODataErrorResponse("", "Relation is not supported");
  }

  private ODataFeed buildQueryEntries(List<PageMeta> items) throws FeedBuildingException, JPQLExecutionException {
    ODataFeed feed = new ODataFeed(ODataFeed.PAGE_TITLE, getRequestUrl(), getBaseUrl());
    feed.setUpdated(new Date());
    feed.setId(getRequestUrl());
    for (PageMeta pageMeta : items) {
      feed.addEntry(buildEntry(pageMeta, false));
    }

    return feed;
  }
View Full Code Here

Examples of org.apache.olingo.odata2.api.ep.feed.ODataFeed

    public void testReadFeed() throws Exception {
        final TestOlingo2ResponseHandler<ODataFeed> responseHandler = new TestOlingo2ResponseHandler<ODataFeed>();

        olingoApp.read(edm, MANUFACTURERS, null, responseHandler);

        final ODataFeed dataFeed = responseHandler.await();
        assertNotNull("Data feed", dataFeed);
        LOG.info("Entries:  {}", prettyPrint(dataFeed));
    }
View Full Code Here

Examples of org.apache.olingo.odata2.api.ep.feed.ODataFeed

        final List<Olingo2BatchResponse> responseParts = responseHandler.await(15, TimeUnit.MINUTES);
        assertEquals("Batch responses expected", 8, responseParts.size());

        assertNotNull(responseParts.get(0).getBody());
        final ODataFeed feed = (ODataFeed) responseParts.get(1).getBody();
        assertNotNull(feed);
        LOG.info("Batch feed:  {}", prettyPrint(feed));

        ODataEntry dataEntry = (ODataEntry) responseParts.get(2).getBody();
        assertNotNull(dataEntry);
View Full Code Here

Examples of org.apache.olingo.odata2.api.ep.feed.ODataFeed

    // execute
    XmlEntityConsumer xec = new XmlEntityConsumer();
    EntityProviderReadProperties consumerProperties = EntityProviderReadProperties.init()
        .mergeSemantic(false).build();

    ODataFeed feed = xec.readFeed(entitySet, reqContent, consumerProperties);
    assertNotNull(feed);

    FeedMetadata feedMetadata = feed.getFeedMetadata();
    assertNotNull(feedMetadata);

    String deltaLink = feedMetadata.getDeltaLink();
    // Null means no deltaLink found
    assertNotNull(deltaLink);
View Full Code Here

Examples of org.apache.olingo.odata2.api.ep.feed.ODataFeed

    assertEquals("1", properties.get("Id"));
    assertEquals("Team 1", properties.get("Name"));
    assertEquals(Boolean.FALSE, properties.get("isScrumTeam"));
    assertNull(properties.get("nt_Employees"));
    //
    ODataFeed employeesFeed = defaultCallback.asFeed("nt_Employees");
    List<ODataEntry> employees = employeesFeed.getEntries();
    assertEquals(3, employees.size());
    //
    ODataEntry employeeNo2 = employees.get(1);
    Map<String, Object> employessNo2Props = employeeNo2.getProperties();
    assertEquals("Frederic Fall", employessNo2Props.get("EmployeeName"));
View Full Code Here

Examples of org.apache.olingo.odata2.api.ep.feed.ODataFeed

    //
    ExpandSelectTreeNode expandTree = entry.getExpandSelectTree();
    assertNotNull(expandTree);
    // TODO: do more testing here
    //
    ODataFeed employeesFeed = (ODataFeed) properties.get("nt_Employees");
    List<ODataEntry> employees = employeesFeed.getEntries();
    assertEquals(3, employees.size());
    //
    ODataEntry employeeNo2 = employees.get(1);
    Map<String, Object> employessNo2Props = employeeNo2.getProperties();
    assertEquals("Frederic Fall", employessNo2Props.get("EmployeeName"));
View Full Code Here

Examples of org.apache.olingo.odata2.api.ep.feed.ODataFeed

    Map<String, Object> properties = entry.getProperties();
    assertEquals("1", properties.get("Id"));
    assertEquals("Team 1", properties.get("Name"));
    assertEquals(Boolean.FALSE, properties.get("isScrumTeam"));
    //
    ODataFeed employeesFeed = (ODataFeed) properties.get("nt_Employees");
    List<ODataEntry> employees = employeesFeed.getEntries();
    assertEquals(3, employees.size());
    //
    ODataEntry employeeNo2 = employees.get(1);
    Map<String, Object> employessNo2Props = employeeNo2.getProperties();
    assertEquals("Frederic Fall", employessNo2Props.get("EmployeeName"));
View Full Code Here

Examples of org.apache.olingo.odata2.api.ep.feed.ODataFeed

    Map<String, Object> properties = entry.getProperties();
    assertEquals("1", properties.get("Id"));
    assertEquals("Team 1", properties.get("Name"));
    assertEquals(Boolean.FALSE, properties.get("isScrumTeam"));
    // teams has no inlined content set
    ODataFeed employeesFeed = (ODataFeed) properties.get("nt_Employees");
    assertNull(employeesFeed);

    // get inlined employees feed from callback
    employeesFeed = callbackHandler.asFeed("nt_Employees");
    List<ODataEntry> employees = employeesFeed.getEntries();
    assertEquals(3, employees.size());
    ODataEntry employeeNo2 = employees.get(1);
    Map<String, Object> employessNo2Props = employeeNo2.getProperties();
    assertEquals("Frederic Fall", employessNo2Props.get("EmployeeName"));
    assertEquals("2", employessNo2Props.get("RoomId"));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.