portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Sean Taylor" <da...@bluesunrise.com>
Subject RE: What is the scoop on the Category interface?
Date Thu, 09 May 2002 16:15:41 GMT
See the org.apache.jetspeed.om.registry.PortletRegistry interface, which
extends registry.
There are interfaces for searching and listing.
Group are used to make a hiearchy of categories. 

 Group1
    Category1
        Category1.SubCategoryA
        Category1.SubCategoryB
    Category2
        Category2.SubCategoryA
        Category2.SubCategoryB
  Group2
....

This provides for two sets of functionality:

- searching for portlets in the registry by group, category, and
subcategory criteria
- building hiearchical portlet registry browsers

public interface PortletRegistry extends Registry
{

    /*
     * List all portlets in this registry, sorted by category
     *
     * @return Iterator The result as an iterator.
     */
    public Iterator listByCategory();

    /*
     * Find portlets in this registry, looking up by category in the
default category group.
     *
     * @param category The category and optional subcategories.
     * @return Iterator The result as an iterator.
     */
    public Iterator findPortletsByCategory(String category);

    /*
     * Find portlets in this registry, looking up by category and
category group.
     *
     * @param group The group to search for categories in.
     * @param category The category and optional subcategories.
     * @return Iterator The result as an iterator.
     */
    public Iterator findPortletsByGroupCategory(String group, String
category);

    /*
     * Returns the category key for a given Portlet Registry entry's
category object.
     * This key is used to look up entries in the Portlet Registry by
category.
     *
     * @param category The registry portlet entry category sub-object.
     * @return String The category key for looking up this entry by
category.
     */
    public String getCategoryKey( Category category );

}



> -----Original Message-----
> From: Setera, Craig [mailto:Craig.Setera@Kingland.com] 
> Sent: Thursday, May 09, 2002 6:38 AM
> To: 'Jetspeed Developers List'
> Subject: What is the scoop on the Category interface?
> 
> 
> David (or anyone else that might know),
> 
> I see that you've added a Category interface to current CVS.  
> I'm very glad to see that.  Can you explain way that the 
> Category is supposed to work? What is the difference between 
> the group and name fields?  It almost looks like I should be 
> doing a resource lookup given the group and name to get a 
> value, but I couldn't find the name "keys" anywhere.  Is that 
> the intention of the interface/implementation?
> 
> Thanks,
> Craig
> 
> --
> To unsubscribe, e-mail:   
> <mailto:jetspeed-dev-> unsubscribe@jakarta.apache.org>
> For 
> additional commands, 
> e-mail: <mailto:jetspeed-dev-help@jakarta.apache.org>
> 
> 



--
To unsubscribe, e-mail:   <mailto:jetspeed-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:jetspeed-dev-help@jakarta.apache.org>


Mime
View raw message