Examples of PlainTextConstruct


Examples of com.google.gdata.data.PlainTextConstruct

  }

  public IssuesEntry createIssue(String project, String title, String content,
      Iterator<String> labels, String user) throws ServiceException, IOException {
    IssuesEntry entry = new IssuesEntry();
    entry.setTitle(new PlainTextConstruct(title));
    entry.setContent(new HtmlTextConstruct(content));
    entry.setStatus(new Status("New"));
    Owner owner = new Owner();
    owner.setUsername(new Username(user));
View Full Code Here

Examples of com.google.gdata.data.PlainTextConstruct

    protected void setUp() throws Exception {
        ServerBaseEntry entry = new ServerBaseEntry();
        entry.setVersionId("1");
        entry.setFeedId("myFeed");
        entry.setId(ID);
        entry.setContent(new PlainTextConstruct(CONTENT));
        entry.setServiceConfig(new ProvidedServiceStub());
        IndexSchema schema = new IndexSchema();
        schema.setName("mySchema");
        IndexSchemaField field = new IndexSchemaField();
        field.setName(CONTENT_FIELD);
View Full Code Here

Examples of com.google.gdata.data.PlainTextConstruct

        return feed;
    }
    /* create a simple entry */
    private Entry createEntry(){
        Entry e = new Entry();
        e.setTitle(new PlainTextConstruct("Test"));
        return e;
    }
View Full Code Here

Examples of com.google.gdata.data.PlainTextConstruct

        testInsertEntry();
        for (int i = 1; i < this.count; i++) {
            Entry e = new Entry();
            e.setId("" + i);
            String insertString = "Hello world" + i;
            e.setTitle(new PlainTextConstruct(insertString));
            ServerBaseEntry en = getServerEntry(e);
            StorageEntryWrapper wrapper = new StorageEntryWrapper(en,
                    StorageOperation.UPDATE);
            this.modifier.updateEntry(wrapper);
            ReferenceCounter<StorageQuery> innerQuery = this.controller
                    .getStorageQuery();
            BaseEntry fetchedEntry = innerQuery.get().singleEntryQuery("" + i,
                    feedId, this.configurator);
            assertEquals("updated Title:", insertString, fetchedEntry
                    .getTitle().getPlainText());
        }
        // double updates
        for (int i = 1; i < this.count; i++) {
            Entry e = new Entry();
            e.setId("" + i);
            String insertString = "Hello world" + i;
            e.setTitle(new PlainTextConstruct(insertString));
            ServerBaseEntry en = getServerEntry(e);
            StorageEntryWrapper wrapper = new StorageEntryWrapper(en,
                    StorageOperation.UPDATE);
            this.modifier.updateEntry(wrapper);

            e = new Entry();
            e.setId("" + i);
            insertString = "Foo Bar" + i;
            e.setTitle(new PlainTextConstruct(insertString));
            en = getServerEntry(e);
            wrapper = new StorageEntryWrapper(en,
                    StorageOperation.UPDATE);
            this.modifier.updateEntry(wrapper);
View Full Code Here

Examples of com.google.gdata.data.PlainTextConstruct

    public void testSaveFeed() throws IOException, StorageException {
        String title = "myTitle";
        ServerBaseFeed feed = new ServerBaseFeed();
        feed.setId(feedId);
        feed.setTitle(new PlainTextConstruct(title));
        feed.setServiceType(service);
        feed.setServiceConfig(this.configurator);
        StorageFeedWrapper wrapper = new StorageFeedWrapper(feed,username);
        this.modifier.createFeed(wrapper);
       
View Full Code Here

Examples of com.google.gdata.data.PlainTextConstruct

    }

    public void testDeleteFeed() throws IOException, StorageException {
        testSaveFeed();
        Entry e = new Entry();
        e.setTitle(new PlainTextConstruct("hello world"));
        ServerBaseEntry entry = new ServerBaseEntry(e);
        entry.setFeedId(feedId);
        entry.setId("testme");
        entry.setServiceConfig(this.configurator);
        StorageEntryWrapper entryWrapper = new StorageEntryWrapper(entry,StorageOperation.INSERT);
View Full Code Here

Examples of com.google.gdata.data.PlainTextConstruct

    public void testUpdateFeed() throws IOException, StorageException {
        testSaveFeed();
        ServerBaseFeed feed = new ServerBaseFeed();
        String title = "myTitle";
        String newusername = "doug";
        feed.setTitle(new PlainTextConstruct(title));
        feed.setId(feedId);
        feed.setServiceType(service);
        feed.setServiceConfig(this.configurator);
        StorageFeedWrapper wrapper = new StorageFeedWrapper(feed,newusername);
        this.modifier.updateFeed(wrapper);
View Full Code Here

Examples of com.google.gdata.data.PlainTextConstruct

        }// end run

        private BaseEntry buildEntry(String id) {
            Entry e = new Entry();
            e.setId(id);
            e.setTitle(new PlainTextConstruct("Monty Python"));

            e.setPublished(DateTime.now());

            e.setUpdated(DateTime.now());
            String content = "1st soldier with a keen interest in birds: Who goes there?"
                    + "King Arthur: It is I, Arthur, son of Uther Pendragon, from the castle of Camelot. King of the Britons, defeater of the Saxons, Sovereign of all England!"
                    + "1st soldier with a keen interest in birds: Pull the other one!"
                    + "King Arthur: I am, and this is my trusty servant Patsy. We have ridden the length and breadth of the land in search of knights who will join me in my court at Camelot. I must speak with your lord and master."
                    + "1st soldier with a keen interest in birds: What? Ridden on a horse?"
                    + "King Arthur: Yes!";
            e.setContent(new TextContent(new PlainTextConstruct(content)));
            e.setSummary(new PlainTextConstruct("The Holy Grail"));
            return e;
        }
View Full Code Here

Examples of com.google.gdata.data.PlainTextConstruct

    protected void setUp() throws Exception {
        ServerBaseEntry entry = new ServerBaseEntry(new Entry());
        entry.setId(ENTRYID);
       
        entry.setUpdated(new DateTime(TIMESTAMP,0));
        entry.setTitle(new PlainTextConstruct(TITLE));
        ProvidedService config = new ProvidedServiceStub();
        entry.setFeedId(FEEDID);
        entry.setServiceConfig(config);
        this.wrapper = new StorageEntryWrapper(entry,StorageOperation.INSERT);
        this.deleteWrapper = new StorageEntryWrapper(entry,StorageOperation.DELETE);
View Full Code Here

Examples of com.google.gdata.data.PlainTextConstruct

        storage = this.controller.getStorage();

        storage.storeEntry(e1);
        ServerBaseEntry e2 = createServerBaseEntry();
        e2.setId(e.getId());
        e2.setTitle(new PlainTextConstruct("new"));
        e2.setUpdated(DateTime.now());
        storage.updateEntry(e2);
        ObjectContainer container = getContainer();
        Query query = container.query();
        query.constrain(BaseEntry.class);
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.