Package org.apache.wink.common.model.synd

Examples of org.apache.wink.common.model.synd.SyndFeed.addEntry()


        // set the entries
        for (TestBean test : tests) {
            TestAsset testAsset = new TestAsset(test, true);
            SyndEntry entry = testAsset.getSyndEntry(providers, uriInfo, linkProcessor);
            synd.addEntry(entry);
        }

        synd.setBase(uriInfo.getAbsolutePath().toString());
        linkProcessor.createSystemLinksBuilder().build(synd.getLinks());
        return synd;
View Full Code Here


        SystemLinksBuilder entryLinksBuilder = linkBuilders.createSystemLinksBuilder();
        for (String key : bookmarks.keySet()) {
            // set the sub-resource state of the builder for this entry
            entryLinksBuilder.subResource(key);
            SyndEntry entry = createEntry(key, bookmarks.get(key), entryLinksBuilder, null);
            feed.addEntry(entry);
        }
        // generate collection links in the response
        linkBuilders.createSystemLinksBuilder().build(feed.getLinks());
        return feed;
    }
View Full Code Here

        // set the entries
        for (DefectBean defect : defects) {
            DefectAsset defectAsset = new DefectAsset(defect, true);
            SyndEntry entry = defectAsset.getSyndEntry(providers, uriInfo, linkProcessor);
            synd.addEntry(entry);
        }

        synd.setBase(uriInfo.getAbsolutePath().toString());
        linkProcessor.createSystemLinksBuilder().build(synd.getLinks());
        return synd;
View Full Code Here

        // set the entries
        for (DefectBean defect : getDefects()) {
            DefectAsset defectAsset = new DefectAsset(defect, true);
            SyndEntry entry = defectAsset.getSyndEntry(providers, uriInfo, linkBuilders);
            synd.addEntry(entry);
        }

        synd.setBase(uriInfo.getAbsolutePath().toString());
        linkBuilders.createSystemLinksBuilder().build(synd.getLinks());
        return synd;
View Full Code Here

            // "alternate"
            // all link must be relative to users collection URI "users"
            linkBuilders.createSystemLinksBuilder().subResource(userSyndEntry.getId())
                .build(userSyndEntry.getLinks());

            usersSyndFeed.addEntry(userSyndEntry);
        }
        return usersSyndFeed;
    }

    /**
 
View Full Code Here

            // set whether to generate the edit link or not
            defectAsset.setEditable(editable);
            SyndEntry entry = defectAsset.getSyndEntry(providers, uriInfo, linkBuilders);
            // we don't want content for entries
            entry.setContent(null);
            feed.addEntry(entry);
        }

        return feed;
    }
}
View Full Code Here

            // Generate system links to sub-resource
            linksBuilders.createSystemLinksBuilder().subResource(SUB_RESOURCE_PATH)
                .pathParam(BOOKMARK, key).build(entry.getLinks());

            // Add entry to Feed
            feed.addEntry(entry);
        }

        // Generate system links for the resource;
        linksBuilders.createSystemLinksBuilder().build(feed.getLinks());
View Full Code Here

            // "alternate"
            // all link must be relative to users collection URI "users"
            linkBuilders.createSystemLinksBuilder().subResource(userSyndEntry.getId())
                .build(userSyndEntry.getLinks());

            usersSyndFeed.addEntry(userSyndEntry);
        }
        return usersSyndFeed;
    }

    /**
 
View Full Code Here

            SyndEntry entry = new SyndEntry();
            entry.setId(Integer.toString(user.getId()));
            entry.setPublished(new Date(System.currentTimeMillis()));
            entry.setUpdated(new Date(System.currentTimeMillis()));
            entry.setTitle(new SyndText(user.getLastName() + " " + user.getFirstName()));
            synd.addEntry(entry);
        }
        synd.setBase(uriInfo.getAbsolutePath().toString());
        return synd;
    }
View Full Code Here

        // set the entries
        for (DefectBean defect : getDefects()) {
            DefectAsset defectAsset = new DefectAsset(defect, true);
            SyndEntry entry = defectAsset.getSyndEntry(providers, uriInfo, linkBuilders);
            synd.addEntry(entry);
        }

        synd.setBase(uriInfo.getAbsolutePath().toString());
        linkBuilders.createSystemLinksBuilder().build(synd.getLinks());
        return synd;
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.