Changeset 2541


Ignore:
Timestamp:
02/04/13 12:36:06 (11 years ago)
Author:
olhsha
Message:

RSS item sorting problem is fixed (it is the ticket: sorting criterion "names" instead of "dates")

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ComponentRegistry/trunk/ComponentRegistry/src/main/java/clarin/cmdi/componentregistry/rest/ComponentRegistryRestService.java

    r2531 r2541  
    10061006    public Rss getRssComponent(@QueryParam(USERSPACE_PARAM) @DefaultValue("false") boolean userspace, @QueryParam(NUMBER_OF_RSSITEMS) @DefaultValue("20") String limit) throws ComponentRegistryException, ParseException {
    10071007        final List<ComponentDescription> components = getRegistry(getStatus(userspace)).getComponentDescriptions();
    1008         final RssCreatorDescriptions instance = new RssCreatorDescriptions(userspace, getApplicationBaseURI(), "components", Integer.parseInt(limit), components, AbstractDescription.COMPARE_ON_NAME);
     1008        final RssCreatorDescriptions instance = new RssCreatorDescriptions(userspace, getApplicationBaseURI(), "components", Integer.parseInt(limit), components, AbstractDescription.COMPARE_ON_DATE);
    10091009        final Rss rss = instance.getRss();
    10101010        LOG.info("Releasing RSS of " + limit + " most recently registered components");
     
    10251025    public Rss getRssProfile(@QueryParam(USERSPACE_PARAM) @DefaultValue("false") boolean userspace, @QueryParam(NUMBER_OF_RSSITEMS) @DefaultValue("20") String limit) throws ComponentRegistryException, ParseException {
    10261026        final List<ProfileDescription> profiles = getRegistry(getStatus(userspace)).getProfileDescriptions();
    1027         // LOG.debug("passed getting profile description");
    1028         final RssCreatorDescriptions instance = new RssCreatorDescriptions(userspace, getApplicationBaseURI(), "profiles", Integer.parseInt(limit), profiles, AbstractDescription.COMPARE_ON_NAME);
    1029         // LOG.debug("passed constructing Rss creator");
     1027        final RssCreatorDescriptions instance = new RssCreatorDescriptions(userspace, getApplicationBaseURI(), "profiles", Integer.parseInt(limit), profiles, AbstractDescription.COMPARE_ON_DATE);
    10301028        final Rss rss = instance.getRss();
    1031         // int limitInt = Integer.parseInt(limit);
    1032         // int length = ( limitInt< profiles.size()) ? limitInt : profiles.size();
    1033         //LOG.debug("userspace= "+userspace);
    1034         //LOG.debug("Releasing RSS of " + Integer.toString(length) + " most recently registered profiles");
     1029        LOG.info("Releasing RSS of " + limit + " most recently registered profiles");
    10351030        return rss;
    10361031    }
Note: See TracChangeset for help on using the changeset viewer.