ro.isdc.wro.model.group
Interface GroupExtractor

All Known Implementing Classes:
DefaultGroupExtractor, GroupExtractorDecorator

public interface GroupExtractor

Perform processing of the uri and extracts group & resource related informations: name of the group, resource type and whether the result should produce minimized version.

Author:
Alex Objelean

Method Summary
 String encodeGroupUrl(String groupName, ResourceType resourceType, boolean minimize)
          This method is a opposite of the other 3 methods.
 String getGroupName(javax.servlet.http.HttpServletRequest request)
          Retrieves a set of group names from supplied uri.
 ResourceType getResourceType(javax.servlet.http.HttpServletRequest request)
           
 boolean isMinimized(javax.servlet.http.HttpServletRequest request)
           
 

Method Detail

getGroupName

String getGroupName(javax.servlet.http.HttpServletRequest request)
Retrieves a set of group names from supplied uri.

Parameters:
request - to check.
Returns:
found group name. If no group is found, null is returned.

getResourceType

ResourceType getResourceType(javax.servlet.http.HttpServletRequest request)
Parameters:
request - to check.
Returns:
requested ResourceType.

isMinimized

boolean isMinimized(javax.servlet.http.HttpServletRequest request)
Parameters:
request - HttpServletRequest object.
Returns:
true if the expected result must be minimized.

encodeGroupUrl

String encodeGroupUrl(String groupName,
                      ResourceType resourceType,
                      boolean minimize)
This method is a opposite of the other 3 methods. Instead of decoding, it encodes groupName, resourceType and minimize option into url. It should not return entire url, but only the last part.

Returns:
a part of the url path which encodes the groupName, resourceType and minimize option.


Copyright © 2008-2013. All Rights Reserved.