Package com.iqser.core.model

Examples of com.iqser.core.model.Content


  public Content getContent(String url, String provider)
      throws IQserTechnicalException {
    logger.debug("getContent() called for " + url + " and " + provider);
   
    Iterator iter = cl.iterator();
    Content c = null;
   
    while (iter.hasNext()) {
      c = (Content)iter.next();
      if (c.getContentUrl().equals(url) && c.getProvider().equals(provider))
          return c;
    }
   
    if (c == null)
      throw new IQserTechnicalException(
View Full Code Here


   
    Iterator iter = cl.iterator();
    ArrayList out = new ArrayList();
   
    while (iter.hasNext()) {
      Content c = (Content)iter.next();
      if (c.getProvider().equals(provider))
        out.add(c);
    }
   
    return out;
View Full Code Here

        .andReturn(expectedUser);

    // register behavior
    EasyMock.replay(mockFbClient);

    Content content = builder.getContent(contentUrl);

    // verify
    EasyMock.verify();

    // assertions
    assertNotNull(content);
    assertNotNull(content.getModificationDate());
    assertEquals(ContentTypeEnum.USER.name(), content.getType());
    assertEquals(providerID, content.getProvider());

    assertTrue(content.getAttributes().size() > 0);

    // test all attributes
    assertEquals("Baban Robert", content.getAttributeByName("name")
        .getValue());

    assertNotNull(content.getAttributeByName("education"));
  }
View Full Code Here

   
    Iterator iter = cl.iterator();
    boolean updated = false;
   
    while (iter.hasNext()) {
      Content oldc = (Content)iter.next();
     
      if (oldc.getContentUrl().equalsIgnoreCase(newc.getContentUrl()) &&
          oldc.getProvider().equalsIgnoreCase(newc.getProvider())) {
        int index = cl.indexOf(oldc);
        cl.set(index, newc);
        updated = true;
      }
    }
View Full Code Here

TOP

Related Classes of com.iqser.core.model.Content

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.