remove unnecessary dependency on commons-lang

git-svn-id: https://svn.apache.org/repos/asf/archiva/branches/MRM-1025@888603 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Porter 2009-12-08 22:31:37 +00:00
parent ebaee33d1e
commit 4ea422a9d1
1 changed files with 5 additions and 4 deletions

View File

@ -22,10 +22,11 @@ package org.apache.archiva.rss.processor;
import java.util.Calendar;
import java.util.List;
import java.util.Map;
import java.util.TimeZone;
import com.sun.syndication.feed.synd.SyndFeed;
import org.apache.archiva.rss.RssFeedEntry;
import org.apache.archiva.rss.RssFeedGenerator;
import org.apache.commons.lang.time.DateUtils;
import org.apache.maven.archiva.database.ArchivaDatabaseException;
import org.apache.maven.archiva.database.ArtifactDAO;
import org.apache.maven.archiva.database.Constraint;
@ -34,8 +35,6 @@ import org.apache.maven.archiva.model.ArchivaArtifact;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.sun.syndication.feed.synd.SyndFeed;
/**
* Retrieve and process all artifacts of a repository from the database and generate a rss feed.
* The artifacts will be grouped by the date when the artifacts were gathered.
@ -65,6 +64,8 @@ public class NewArtifactsRssFeedProcessor
*/
private ArtifactDAO artifactDAO;
private static final TimeZone GMT_TIME_ZONE = TimeZone.getTimeZone( "GMT" );
/**
* Process the newly discovered artifacts in the repository. Generate feeds for new artifacts in the repository and
* new versions of artifact.
@ -85,7 +86,7 @@ public class NewArtifactsRssFeedProcessor
private SyndFeed processNewArtifactsInRepo( String repoId ) throws ArchivaDatabaseException
{
Calendar greaterThanThisDate = Calendar.getInstance( DateUtils.UTC_TIME_ZONE );
Calendar greaterThanThisDate = Calendar.getInstance( GMT_TIME_ZONE );
greaterThanThisDate.add( Calendar.DATE, -( getNumberOfDaysBeforeNow() ) );
Constraint artifactsByRepo = new ArtifactsByRepositoryConstraint( repoId, greaterThanThisDate.getTime(), "whenGathered", false );