Package com.iqser.core.model

Examples of com.iqser.core.model.Content.addAttribute()


   
    //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);     
    }
       
View Full Code Here


      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));
View Full Code Here

    // 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
View Full Code Here

    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
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.