Package com.iqser.core.model

Examples of com.iqser.core.model.Attribute


    String STATUS_FBID = "122788341354";

    // create facebook post
    String contentUrl = URLUtils.makeContentURL(STATUS_FBID, ContentTypeEnum.STATUS.name());
    Content content = createDummyContentFromUrl(contentUrl);
    content.addAttribute(new Attribute("message", "test status message",
        Attribute.ATTRIBUTE_TYPE_TEXT));

    // check if documents exists in object graph
    assertTrue(repo.getContentByProvider(providerID, true).size() == 0);
View Full Code Here


    // create facebook post
    String contentUrl = URLUtils.makeContentURL(STATUS_FBID,
        ContentTypeEnum.EVENT.name());
    Content content = createDummyContentFromUrl(contentUrl);
    content.addAttribute(new Attribute("owner", "George Boosley",
        Attribute.ATTRIBUTE_TYPE_TEXT));
    content.addAttribute(new Attribute("name", "TestEvent",
        Attribute.ATTRIBUTE_TYPE_TEXT));
    content.addAttribute(new Attribute("description", "some test event",
        Attribute.ATTRIBUTE_TYPE_TEXT));
    content.addAttribute(new Attribute("startTime", tomorrow + "",
        Attribute.ATTRIBUTE_TYPE_TEXT));
    content.addAttribute(new Attribute("endTime", tomorrowX2 + "",
        Attribute.ATTRIBUTE_TYPE_TEXT));

    // check if documents exists in object graph
    assertTrue(repo.getContentByProvider(providerID, true).size() == 0);
View Full Code Here

        providerID, true);
    assertEquals(4, contentList.size());

    for (Content c : contentList) {
      if (c.getAttributeByName("attending") != null) {
        Attribute attribute = c.getAttributeByName("attending");
        assertTrue(attribute.isMultiValue());
        assertEquals(8, attribute.getValues().size());

      }
    }
  }
View Full Code Here

   
    //attribute is present
    String[] attribuetNames = new String[]{"from_id","owner_id"};
    for (String name : attribuetNames) {
      content = new Content();
      content.addAttribute(new Attribute(name, "100", Attribute.ATTRIBUTE_TYPE_TEXT));       
      action = FacebookContentProvider.ACTION_DELETE;
      isAllowed = securityFilter.canExecuteAction(user, password, action, content);   
      assertEquals(true, isAllowed);     
    }
       
    //attribute is present , wrong value
    content = new Content();
    content.addAttribute(new Attribute("from_id", "123", Attribute.ATTRIBUTE_TYPE_TEXT));       
    action = FacebookContentProvider.ACTION_DELETE;
    isAllowed = securityFilter.canExecuteAction(user, password, action, content);   
    assertEquals(false, isAllowed);
       
    //no attributes
View Full Code Here

    String POST_FBID = "122788341354";

    // create facebook post
    String contentUrl = URLUtils.makeContentURL(POST_FBID, "post");
    Content content = createDummyContentFromUrl(contentUrl);
    content.addAttribute(new Attribute("from_id", "friendId",
        Attribute.ATTRIBUTE_TYPE_TEXT));
    content.addAttribute(new Attribute("name", "post name",
        Attribute.ATTRIBUTE_TYPE_TEXT));
    content.addAttribute(new Attribute("message", "post message",
        Attribute.ATTRIBUTE_TYPE_TEXT));

    // check if documents exists in object graph
    assertTrue(repo.getContentByProvider(providerID, true).size() == 0);
View Full Code Here

TOP

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

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.