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

Examples of org.apache.wink.common.model.synd.SyndText


                                  @Context UriInfo uriInfo,
                                  @Context LinkBuilders linkBuilders) {
        SyndEntry entry = new SyndEntry();
        String id = defect.getId();
        entry.setId("urn:com:hp:qadefects:defect:" + id);
        entry.setTitle(new SyndText(defect.getName()));
        entry.setSummary(new SyndText(defect.getDescription()));
        entry.addAuthor(new SyndPerson(defect.getAuthor()));
        entry.addCategory(new SyndCategory("urn:com:hp:qadefects:categories:severity", defect
            .getSeverity(), null));
        entry.addCategory(new SyndCategory("urn:com:hp:qadefects:categories:status", defect
            .getStatus(), null));
View Full Code Here


    public SyndFeed getSyndFeed(@Context Providers providers,
                                @Context LinkBuilders linkProcessor,
                                @Context UriInfo uriInfo) {
        SyndFeed synd = new SyndFeed();
        synd.setId("urn:com:hp:qadefects:tests");
        synd.setTitle(new SyndText("Tests"));
        synd.addAuthor(new SyndPerson("admin"));
        synd.setUpdated(new Date());

        // set the entries
        for (TestBean test : tests) {
View Full Code Here

    @GET
    @Produces( {MediaType.APPLICATION_ATOM_XML, MediaType.APPLICATION_JSON})
    public SyndFeed getBookmarks(@Context LinkBuilders linkBuilders, @Context UriInfo uriInfo) {
        SyndFeed feed = new SyndFeed();
        feed.setId("urn:collection:bookmarks");
        feed.setTitle(new SyndText("My Bookmarks"));
        feed.setUpdated(new Date());
        feed.setBase(uriInfo.getAbsolutePath().toString());

        // add entries to the feed, based on the existing bookmarks in the
        // memory store
View Full Code Here

                                  String content,
                                  SystemLinksBuilder entryLinksBuilder,
                                  UriInfo uriInfo) {
        SyndEntry entry = new SyndEntry();
        entry.setId(bookmarkId);
        entry.setTitle(new SyndText("My Bookmark " + bookmarkId));
        entry.setPublished(new Date());

        if (content != null) {
            entry.setContent(new SyndContent(content));
        }
View Full Code Here

    public SyndFeed getSyndFeed(@Context Providers providers,
                                @Context LinkBuilders linkProcessor,
                                @Context UriInfo uriInfo) {
        SyndFeed synd = new SyndFeed();
        synd.setId("urn:com:hp:qadefects:defects");
        synd.setTitle(new SyndText("Defects"));
        synd.addAuthor(new SyndPerson("admin"));
        synd.setUpdated(new Date());

        // set the entries
        for (DefectBean defect : defects) {
View Full Code Here

    public SyndFeed getSyndFeed(@Context Providers providers,
                                @Context LinkBuilders linkBuilders,
                                @Context UriInfo uriInfo) {
        SyndFeed synd = new SyndFeed();
        synd.setId("urn:com:hp:qadefects:defects");
        synd.setTitle(new SyndText("Defects"));
        synd.addAuthor(new SyndPerson("admin"));
        synd.setUpdated(new Date());

        // set the entries
        for (DefectBean defect : getDefects()) {
View Full Code Here

     * Get the title field
     *
     * @return the title of the resource
     */
    public String getTitle() {
        SyndText title = syndEntry.getTitle();
        if (title != null) {
            return title.getValue();
        }
        return "";
    }
View Full Code Here

            return value;
        }
        super.toSynd(value);
        value.setId(getId());
        value.setPublished(getPublished());
        value.setSummary(getSummary() != null ? getSummary().toSynd(new SyndText()) : null);
        value.setTitle(getTitle() != null ? getTitle().toSynd(new SyndText()) : null);
        value.setUpdated(getUpdated());
        value.setContent(getContent() != null ? getContent().toSynd(new SyndContent()) : null);
        value.getAuthors().addAll(getAuthorsAsSynd());
        value.getCategories().addAll(getCategoriesAsSynd());
        value.getLinks().addAll(getLinksAsSynd());
View Full Code Here

    @GET
    @Produces(MediaType.APPLICATION_ATOM_XML)
    public SyndEntry getGreeting() {
        // create and return a syndication entry with a "Hello World!" title,
        // some ID and the current time.
        SyndEntry synd = new SyndEntry(new SyndText("Hello World!"), ID, new Date());
        return synd;
    }
View Full Code Here

     * @return SyndFeed syndication feed
     */
    private SyndFeed createUsersSyndFeed(Collection<User> users, LinkBuilders linkBuilders) {
        SyndFeed usersSyndFeed = new SyndFeed();
        usersSyndFeed.setId("urn:com:hp:users");
        usersSyndFeed.setTitle(new SyndText("Users"));
        usersSyndFeed.addAuthor(new SyndPerson("admin"));
        usersSyndFeed.setUpdated(new Date());

        // 1. Generate collection system links: "edit", "alternate"
        linkBuilders.createSystemLinksBuilder(). // Create SystemLinksBuilder
View Full Code Here

TOP

Related Classes of org.apache.wink.common.model.synd.SyndText

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.