Package org.apache.archiva.rss

Examples of org.apache.archiva.rss.RssFeedEntry


            throw new FeedException( "Unable to construct feed, metadata could not be retrieved: " + e.getMessage(),
                                     e );
        }

        long tmp = 0;
        RssFeedEntry entry = null;
        List<RssFeedEntry> entries = new ArrayList<>();
        String description = "";
        int idx = 0;
        for ( ArtifactMetadata artifact : artifacts )
        {
            long whenGathered = artifact.getWhenGathered().getTime();

            String id = artifact.getNamespace() + "/" + artifact.getProject() + "/" + artifact.getId();
            if ( tmp != whenGathered )
            {
                if ( entry != null )
                {
                    entry.setDescription( description );
                    entries.add( entry );
                    entry = null;
                }

                String repoId1 = artifact.getRepositoryId();
                entry = new RssFeedEntry( this.getTitle() + "\'" + repoId1 + "\'" + " as of " + new Date(
                    whenGathered ) );
                entry.setPublishedDate( artifact.getWhenGathered() );
                description = this.getDescription() + "\'" + repoId1 + "\'" + ": \n" + id + " | ";
            }
            else
            {
                description = description + id + " | ";
            }

            if ( idx == ( artifacts.size() - 1 ) )
            {
                entry.setDescription( description );
                entries.add( entry );
            }

            tmp = whenGathered;
            idx++;
View Full Code Here


            throw new FeedException( "Unable to construct feed, metadata could not be retrieved: " + e.getMessage(),
                                     e );
        }

        long tmp = 0;
        RssFeedEntry entry = null;
        List<RssFeedEntry> entries = new ArrayList<>();
        String description = "";
        int idx = 0;
        for ( ArtifactMetadata artifact : artifacts )
        {
            long whenGathered = artifact.getWhenGathered().getTime();

            if ( tmp != whenGathered )
            {
                if ( entry != null )
                {
                    entry.setDescription( description );
                    entries.add( entry );
                    entry = null;
                }

                entry = new RssFeedEntry(
                    this.getTitle() + "\'" + groupId + ":" + artifactId + "\'" + " as of " + new Date( whenGathered ) );
                entry.setPublishedDate( artifact.getWhenGathered() );
                description =
                    this.getDescription() + "\'" + groupId + ":" + artifactId + "\'" + ": \n" + artifact.getId() +
                        " | ";
            }
            else
            {
                description = description + artifact.getId() + " | ";
            }

            if ( idx == ( artifacts.size() - 1 ) )
            {
                entry.setDescription( description );
                entries.add( entry );
            }

            tmp = whenGathered;
            idx++;
View Full Code Here

    public abstract SyndFeed process( Map<String, String> reqParams ) throws ArchivaDatabaseException;

    protected List<RssFeedEntry> processData( List<ArchivaArtifact> artifacts, boolean isRepoLevel )
    {
        long tmp = 0;
        RssFeedEntry entry = null;
        List<RssFeedEntry> entries = new ArrayList<RssFeedEntry>();
        String description = "";
        int idx = 0;
        for ( ArchivaArtifact artifact : artifacts )
        {
            long whenGathered = artifact.getModel().getWhenGathered().getTime();
           
            if ( tmp != whenGathered )
            {
                if ( entry != null )
                {                   
                    entry.setDescription( description );
                    entries.add( entry );
                    entry = null;
                }
               
                if ( !isRepoLevel )
                {
                    entry =
                        new RssFeedEntry( getTitle() + "\'" + artifact.getGroupId() + ":" + artifact.getArtifactId() +
                            "\'" + " as of " + new Date( whenGathered ) );
                    entry.setPublishedDate( artifact.getModel().getWhenGathered() );
                    description = getDescription() + "\'" + artifact.getGroupId() + ":" + artifact.getArtifactId() +
                        "\'" + ": \n" + artifact.toString() + " | ";
                }
                else
                {
                    String repoId = artifact.getModel().getRepositoryId();
                    entry = new RssFeedEntry( getTitle() + "\'" + repoId + "\'" + " as of " + new Date( whenGathered ) );
                    entry.setPublishedDate( artifact.getModel().getWhenGathered() );
                    description = getDescription() + "\'" + repoId + "\'" + ": \n" + artifact.toString() + " | ";
                }
            }
            else
            {
                description = description + artifact.toString() + " | ";
            }

            if ( idx == ( artifacts.size() - 1 ) )
            {               
                entry.setDescription( description );
                entries.add( entry );
            }

            tmp = whenGathered;
            idx++;
View Full Code Here

    public abstract SyndFeed process( Map<String, String> reqParams ) throws ArchivaDatabaseException;

    protected List<RssFeedEntry> processData( List<ArchivaArtifact> artifacts, boolean isRepoLevel )
    {
        long tmp = 0;
        RssFeedEntry entry = null;
        List<RssFeedEntry> entries = new ArrayList<RssFeedEntry>();
        String description = "";
        int idx = 0;
        for ( ArchivaArtifact artifact : artifacts )
        {
            long whenGathered = artifact.getModel().getWhenGathered().getTime();
           
            if ( tmp != whenGathered )
            {
                if ( entry != null )
                {                   
                    entry.setDescription( description );
                    entries.add( entry );
                    entry = null;
                }
               
                if ( !isRepoLevel )
                {
                    entry =
                        new RssFeedEntry( getTitle() + "\'" + artifact.getGroupId() + ":" + artifact.getArtifactId() +
                            "\'" + " as of " + new Date( whenGathered ) );
                    entry.setPublishedDate( artifact.getModel().getWhenGathered() );
                    description = getDescription() + "\'" + artifact.getGroupId() + ":" + artifact.getArtifactId() +
                        "\'" + ": \n" + artifact.toString() + " | ";
                }
                else
                {
                    String repoId = artifact.getModel().getRepositoryId();
                    entry = new RssFeedEntry( getTitle() + "\'" + repoId + "\'" + " as of " + new Date( whenGathered ) );
                    entry.setPublishedDate( artifact.getModel().getWhenGathered() );
                    description = getDescription() + "\'" + repoId + "\'" + ": \n" + artifact.toString() + " | ";
                }
            }
            else
            {
                description = description + artifact.toString() + " | ";
            }

            if ( idx == ( artifacts.size() - 1 ) )
            {               
                entry.setDescription( description );
                entries.add( entry );
            }

            tmp = whenGathered;
            idx++;
View Full Code Here

            throw new FeedException( "Unable to construct feed, metadata could not be retrieved: " + e.getMessage(),
                                     e );
        }

        long tmp = 0;
        RssFeedEntry entry = null;
        List<RssFeedEntry> entries = new ArrayList<RssFeedEntry>();
        String description = "";
        int idx = 0;
        for ( ArtifactMetadata artifact : artifacts )
        {
            long whenGathered = artifact.getWhenGathered().getTime();

            String id = artifact.getNamespace() + "/" + artifact.getProject() + "/" + artifact.getId();
            if ( tmp != whenGathered )
            {
                if ( entry != null )
                {
                    entry.setDescription( description );
                    entries.add( entry );
                    entry = null;
                }

                String repoId1 = artifact.getRepositoryId();
                entry = new RssFeedEntry( this.getTitle() + "\'" + repoId1 + "\'" + " as of " + new Date(
                    whenGathered ) );
                entry.setPublishedDate( artifact.getWhenGathered() );
                description = this.getDescription() + "\'" + repoId1 + "\'" + ": \n" + id + " | ";
            }
            else
            {
                description = description + id + " | ";
            }

            if ( idx == ( artifacts.size() - 1 ) )
            {
                entry.setDescription( description );
                entries.add( entry );
            }

            tmp = whenGathered;
            idx++;
View Full Code Here

            throw new FeedException( "Unable to construct feed, metadata could not be retrieved: " + e.getMessage(),
                                     e );
        }

        long tmp = 0;
        RssFeedEntry entry = null;
        List<RssFeedEntry> entries = new ArrayList<RssFeedEntry>();
        String description = "";
        int idx = 0;
        for ( ArtifactMetadata artifact : artifacts )
        {
            long whenGathered = artifact.getWhenGathered().getTime();

            if ( tmp != whenGathered )
            {
                if ( entry != null )
                {
                    entry.setDescription( description );
                    entries.add( entry );
                    entry = null;
                }

                entry = new RssFeedEntry(
                    this.getTitle() + "\'" + groupId + ":" + artifactId + "\'" + " as of " + new Date( whenGathered ) );
                entry.setPublishedDate( artifact.getWhenGathered() );
                description =
                    this.getDescription() + "\'" + groupId + ":" + artifactId + "\'" + ": \n" + artifact.getId() +
                        " | ";
            }
            else
            {
                description = description + artifact.getId() + " | ";
            }

            if ( idx == ( artifacts.size() - 1 ) )
            {
                entry.setDescription( description );
                entries.add( entry );
            }

            tmp = whenGathered;
            idx++;
View Full Code Here

TOP

Related Classes of org.apache.archiva.rss.RssFeedEntry

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.