Package com.trsst.client

Examples of com.trsst.client.Client.pull()


                    signatureElement.getAttributeValue("id"));
            assertEquals("Entry predecessor signature matches", signatureValue,
                    signatureElement.getText());

            // pull both entries
            feed = client.pull(feedId);
            assertEquals("Feed contains two entries", 2, feed.getEntries()
                    .size());
            entry = feed.getEntries().get(0);

            // mark both entries as deleted
View Full Code Here


                                            secondIdToDelete }),
                            new FeedOptions());
            assertNotNull("Delete operation succeeded", feed);
            entry = feed.getEntries().get(0);

            feed = client.pull(firstIdToDelete);
            entry = feed.getEntries().get(0);
            assertEquals("First entry was deleted", "deleted",
                    entry.getSimpleExtension(new QName(
                            "http://activitystrea.ms/spec/1.0/", "verb")));
            feed = client.pull(secondIdToDelete);
View Full Code Here

            feed = client.pull(firstIdToDelete);
            entry = feed.getEntries().get(0);
            assertEquals("First entry was deleted", "deleted",
                    entry.getSimpleExtension(new QName(
                            "http://activitystrea.ms/spec/1.0/", "verb")));
            feed = client.pull(secondIdToDelete);
            entry = feed.getEntries().get(0);
            assertEquals("First entry was deleted", "deleted",
                    entry.getSimpleExtension(new QName(
                            "http://activitystrea.ms/spec/1.0/", "verb")));
View Full Code Here

                                        new String[] { "fitter", "happier",
                                                "more productive" }),
                        new FeedOptions());
                entry = feed.getEntries().get(0);
            }
            feed = client.pull(Common.fromFeedUrn(feed.getId()));
            assertTrue("Feed has all entries", (5 == feed.getEntries().size()));

            // make sure server is paginating
            for (int i = 0; i < 5; i++) {
                feed = client.post(
View Full Code Here

                                        new String[] { "fitter", "happier",
                                                "more productive" }),
                        new FeedOptions());
                entry = feed.getEntries().get(0);
            }
            feed = client.pull(Common.fromFeedUrn(feed.getId()) + "?count=3");
            assertTrue("Feed has only first page of entries", (3 == feed
                    .getEntries().size()));

            // test pull of a single entry
            long existingId = Common.toEntryId(entry.getId());
View Full Code Here

            assertTrue("Feed has only first page of entries", (3 == feed
                    .getEntries().size()));

            // test pull of a single entry
            long existingId = Common.toEntryId(entry.getId());
            feed = client.pull(entry.getId().toString());
            assertNotNull("Single entry feed result", feed);
            assertEquals("Single entry feed retains id", feedId,
                    Common.fromFeedUrn(feed.getId()));
            assertEquals("Single entry feed contains one entry", 1, feed
                    .getEntries().size());
View Full Code Here

                                                    .setStatus(
                                                            "Unencrypted title with encrypted entry")),
                            new FeedOptions());
            entry = feed.getEntries().get(0);
            // pull and decrypt the entry
            feed = client.pull(entry.getId().toString(),
                    new PrivateKey[] { encryptionKeys.getPrivate() });
            assertNotNull("Generated encrypted entry", feed);
            entry = feed.getEntries().get(0);
            assertFalse("Entry does not retain status",
                    "This is the encrypted entry".equals(entry.getTitle()));
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.