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

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


    private SyndEntry createUserSyndEntry(User user) {
        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()));
        return entry;
    }
View Full Code Here


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

        feed.setBase(uriInfo.getAbsolutePath().toString());
View Full Code Here

    public SyndEntry getSyndEntry(@Context Providers providers,
                                  @Context UriInfo uriInfo,
                                  @Context LinkBuilders linkProcessor) {
        SyndEntry entry = new SyndEntry();
        entry.setId("urn:com:hp:qadefects:defect:" + defect.getId());
        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 SyndEntry getSyndEntry(@Context Providers providers,
                                  @Context UriInfo uriInfo,
                                  @Context LinkBuilders linkBuilders) {
        SyndEntry entry = new SyndEntry();
        entry.setId("urn:com:hp:qadefects:defect:" + defect.getId());
        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 SyndEntry getSyndEntry(@Context Providers providers,
                                  @Context UriInfo uriInfo,
                                  @Context LinkBuilders linkProcessor) {
        SyndEntry entry = new SyndEntry();
        entry.setId("urn:com:hp:qadefects:test:" + test.getId());
        entry.setTitle(new SyndText(test.getName()));
        entry.setSummary(new SyndText(test.getDescription()));
        entry.addAuthor(new SyndPerson(test.getAuthor()));
        if (test.getCreated() != null) {
            entry.setPublished(new Date(test.getCreated().getTime()));
        }
View Full Code Here

    @GET
    @Produces( {MediaType.APPLICATION_ATOM_XML, MediaType.APPLICATION_JSON})
    public SyndFeed getBookmarks(@Context LinkBuilders linksBuilders, @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

    }

    private SyndEntry createEntry(String bookmarkId, String content, UriInfo uriInfo) {
        SyndEntry entry = new SyndEntry();
        entry.setId(bookmarkId);
        entry.setTitle(new SyndText("My Bookmark " + bookmarkId));
        entry.setPublished(new Date());
        entry.setBase(uriInfo.getAbsolutePath().toString());

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

            : null);
        value.setIcon(getIcon());
        value.setId(getId());
        value.setItemsPerPage(getItemsPerPage());
        value.setLogo(getLogo());
        value.setRights(getRights() != null ? getRights().toSynd(new SyndText()) : null);
        value.setStartIndex(getStartIndex());
        value.setSubtitle(getSubtitle() != null ? getSubtitle().toSynd(new SyndText()) : null);
        value.setTitle(getTitle() != null ? getTitle().toSynd(new SyndText()) : null);
        value.setTotalResults(getTotalResults());
        value.getAuthors().addAll(getAuthorsAsSynd());
        value.getCategories().addAll(getCategoriesAsSynd());
        value.getLinks().addAll(getLinksAsSynd());
        value.getEntries().addAll(getEntriesAsSynd());
View Full Code Here

                                                              provider);
    }

    protected SyndFeed getSyndFeed(String path) {
        SyndFeed feed = new SyndFeed();
        feed.setTitle(new SyndText(""));
        feed.addLink(new SyndLink(AtomConstants.ATOM_REL_EDIT, null, path));
        return feed;
    }
View Full Code Here

            for (ServiceDocumentCollectionData subCollection : WebDAVRootResource.this
                .getCollections(uriInfo)) {
                // only collection without template URI
                if (!isTemplateUri(subCollection.getUri())) {
                    SyndFeed subFeed = new SyndFeed();
                    subFeed.setTitle(new SyndText(subCollection.getTitle()));
                    subFeed.addLink(new SyndLink(AtomConstants.ATOM_REL_EDIT, null, subCollection
                        .getUri()));
                    collectionsList.add(subFeed);
                }
            }
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.