wro4j-core/src/main/java/ro/isdc/wro/model/group/DefaultGroupExtractor.java
public ResourceType getResourceType(final HttpServletRequest request) {
    Validate.notNull(request);
    final String uri = request.getRequestURI();
    Validate.notNull(uri);
    ResourceType type = null;
    try {
      type = ResourceType.get(FilenameUtils.getExtension(stripSessionID(uri)));
    } catch (final IllegalArgumentException e) {
      LOG.debug("[FAIL] Cannot identify resourceType for uri: {}", uri);
    }
    return type;
  }
public ResourceType getResourceType(final HttpServletRequest request) {
    Validate.notNull(request);
    final String uri = request.getRequestURI();
    Validate.notNull(uri);
    ResourceType type = null;
    try {
      type = ResourceType.get(FilenameUtils.getExtension(stripSessionID(uri)));
    } catch (final IllegalArgumentException e) {
      LOG.debug("[FAIL] Cannot identify resourceType for uri: {}", uri);
    }
    return type;
  }
public ResourceType getResourceType ( final HttpServletRequest request ) { Validate . notNull ( request ) ; final String uri = request . getRequestURI ( ) ; Validate . notNull ( uri ) ; ResourceType type = null ; try { type = ResourceType . get ( FilenameUtils . getExtension ( stripSessionID ( uri ) ) ) ; } catch ( final IllegalArgumentException e ) { LOG . debug ( "[FAIL] Cannot identify resourceType for uri: {}" , uri ) ; } return type ; }
Extracts the resource type, by parsing the uri & finds the extension. If extension is valid ('css' or 'js'),
returns corresponding ResourceType, otherwise throws exception.
<p>
Valid examples of uri are: <code>/context/somePath/test.js</code> or <code>/context/somePath/test.css</code>
{@inheritDoc}
Extracts the resource type by parsing the uri & finds the extension . If extension is valid ( css or js ) returns corresponding ResourceType otherwise throws exception . <p > Valid examples of uri are : <code > / context / somePath / test . js< / code > or <code > / context / somePath / test . css< / code > {