congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
ResourceHandlerWrapper
Code IndexAdd Tabnine to your IDE (free)

How to use
ResourceHandlerWrapper
in
javax.faces.application

Best Java code snippets using javax.faces.application.ResourceHandlerWrapper (Showing top 20 results out of 315)

origin: primefaces/primefaces

@Override
public Resource createResource(String resourceName, String libraryName, String contentType) {
  Resource resource = super.createResource(resourceName, libraryName, contentType);
  if (resource != null && libraryName != null && libraryName.equalsIgnoreCase(Constants.LIBRARY)) {
    return new PrimeResource(resource);
  }
  else {
    return resource;
  }
}
origin: primefaces/primefaces

@Override
public void handleResourceRequest(FacesContext context) throws IOException {
  Map<String, String> params = context.getExternalContext().getRequestParameterMap();
  String handlerType = params.get(Constants.DYNAMIC_CONTENT_TYPE_PARAM);
  if (LangUtils.isValueBlank(handlerType)) {
    super.handleResourceRequest(context);
  }
  else {
    DynamicContentHandler handler = handlers.get(handlerType);
    if (handler == null) {
      LOGGER.warning("No dynamic resource handler registered for: " + handlerType + ". Do you miss a dependency?");
      super.handleResourceRequest(context);
    }
    else {
      handler.handle(context);
    }
  }
}
origin: javax/javaee-web-api

/**
 * <p class="changed_added_2_2">The default behavior of this method
 * is to call {@link ResourceHandler#createViewResource} on the wrapped
 * {@link ResourceHandler} object.</p>
 */
@Override
public ViewResource createViewResource(FacesContext context, String resourceName) {
  return getWrapped().createViewResource(context, resourceName);
}
origin: com.liferay.faces/liferay-faces-portal

@Override
public boolean libraryExists(String libraryName) {
  if (LIBRARY_NAME.equals(libraryName)) {
    return true;
  }
  else {
    return super.libraryExists(libraryName);
  }
}
origin: org.apache.myfaces.extensions.scripting/extscript-core

@Override
public boolean isResourceRequest(FacesContext context)
{
  return super.isResourceRequest(context);
}
origin: javax/javaee-web-api

/**
 * <p class="changed_added_2_3">The default behavior of this method
 * is to call {@link ResourceHandler#getViewResources(FacesContext, String, int, ResourceVisitOption...)} on the wrapped
 * {@link ResourceHandler} object.</p>
 *
 * @since 2.3
 */
@Override
public Stream<String> getViewResources(FacesContext facesContext, String path, int maxDepth, ResourceVisitOption... options) {
  return getWrapped().getViewResources(facesContext, path, maxDepth, options);
}
origin: liferay/liferay-faces

@Override
public boolean libraryExists(String libraryName) {
  if (LIBRARY_NAME.equals(libraryName)) {
    return true;
  }
  else {
    return super.libraryExists(libraryName);
  }
}
origin: org.apache.myfaces.commons/myfaces-resourcehandler20

@Override
public boolean isResourceRequest(FacesContext facesContext)
{
  // Since this method could be called many times we save it
  //on request map so the first time is calculated it remains
  //alive until the end of the request
  Boolean value = (Boolean) facesContext.getAttributes().get(IS_RESOURCE_REQUEST);
  if (value != null && value)
  {
    //return the saved value
    return value;
  }
  else
  {
    String resourceBasePath = getResourceHandlerSupport()
        .calculateResourceBasePath(facesContext);
    if (resourceBasePath != null
        && resourceBasePath.startsWith(getResourceHandlerSupport().getResourceIdentifier()))
    {
      facesContext.getAttributes().put(IS_RESOURCE_REQUEST, Boolean.TRUE);
      return true;
    }
    else
    {
      value = super.isResourceRequest(facesContext); 
      facesContext.getAttributes().put(IS_RESOURCE_REQUEST, value);
      return value;
    }
  }
}
origin: primefaces/primefaces

@Override
public Resource createResource(String resourceName, String libraryName) {
  Resource resource = super.createResource(resourceName, libraryName);
  if (resource != null && libraryName != null && libraryName.equalsIgnoreCase(Constants.LIBRARY)) {
    return new PrimeResource(resource);
  }
  else {
    return resource;
  }
}
origin: javax/javaee-web-api

/**
 * <p class="changed_added_2_3">The default behavior of this method
 * is to call {@link ResourceHandler#getViewResources(FacesContext, String, ResourceVisitOption...)} on the wrapped
 * {@link ResourceHandler} object.</p>
 *
 * @since 2.3
 */
public Stream<String> getViewResources(FacesContext facesContext, String path, ResourceVisitOption... options) {
  return getWrapped().getViewResources(facesContext, path, options);
}
origin: org.primefaces/primefaces

@Override
public void handleResourceRequest(FacesContext context) throws IOException {
  Map<String, String> params = context.getExternalContext().getRequestParameterMap();
  String handlerType = params.get(Constants.DYNAMIC_CONTENT_TYPE_PARAM);
  if (ComponentUtils.isValueBlank(handlerType)) {
    super.handleResourceRequest(context);
  }
  else {
    DynamicContentHandler handler = handlers.get(handlerType);
    if (handler == null) {
      LOG.warning("No dynamic resource handler registered for: " + handlerType + ". Do you miss a dependency?");
      super.handleResourceRequest(context);
    }
    else {
      handler.handle(context);
    }
  }
}
origin: org.apache.myfaces.commons/myfaces-resourcehandler20

super.libraryExists(libraryName);
origin: org.primefaces.extensions/primefaces-extensions

@Override
public Resource createResource(final String resourceName, final String libraryName) {
  if (Constants.LIBRARY.equalsIgnoreCase(libraryName)) {
    Resource resource = super.createResource(resourceName, libraryName);
    return resource != null ? new PrimeFacesExtensionsResource(resource) : null;
  }
  return super.createResource(resourceName, libraryName);
}
origin: javax/javaee-web-api

/**
 * <p class="changed_added_2_0">The default behavior of this method
 * is to call {@link ResourceHandler#getRendererTypeForResourceName(String)} on the
 * wrapped {@link ResourceHandler} object.</p>
 */
@Override
public String getRendererTypeForResourceName(String resourceName) {
  return getWrapped().getRendererTypeForResourceName(resourceName);
}
origin: TheCoder4eu/BootsFaces-OSP

super.handleResourceRequest(context);
return;
origin: org.icefaces/icefaces-compat

public Resource createResource(String resourceName, String libraryName, String contentType) {
  if (codeResource != null && codeResource.localPath != null && codeResource.localPath.equals(resourceName)) {
    //serving up the mapping as a referenced JS resource
    return codeResource;
  } else if (cssResources != null && cssResources.containsKey(resourceName)) {
    //serve the modified CSS resources
    return cssResources.get(resourceName);
  } else {
    //let JSF serve the rest of resources
    return super.createResource(resourceName, libraryName, contentType);
  }
}
origin: com.sun.faces/jsf-api

/**
 * <p class="changed_added_2_0">The default behavior of this method
 * is to call {@link ResourceHandler#createResource(String)} on the
 * wrapped {@link ResourceHandler} object.</p>
 */
@Override
public Resource createResource(String resourceName) {
  return getWrapped().createResource(resourceName);
}
origin: net.bootsfaces/bootsfaces

super.handleResourceRequest(context);
return;
origin: org.primefaces.extensions/primefaces-extensions

  @Override
  public Resource createResource(String resourceName, String libraryName, String contentType) {
    if (Constants.LIBRARY.equalsIgnoreCase(libraryName)) {
      Resource resource = super.createResource(resourceName, libraryName, contentType);
      return resource != null ? new PrimeFacesExtensionsResource(resource) : null;
    }

    return super.createResource(resourceName, libraryName, contentType);
  }
}
origin: com.sun.faces/jsf-api

/**
 * <p class="changed_added_2_0">The default behavior of this method
 * is to call {@link ResourceHandler#isResourceRequest(javax.faces.context.FacesContext)} on the
 * wrapped {@link ResourceHandler} object.</p>
 */
@Override
public boolean isResourceRequest(FacesContext context) {
  return getWrapped().isResourceRequest(context);
}
javax.faces.applicationResourceHandlerWrapper

Javadoc

Provides a simple implementation of ResourceHandler that can be subclassed by developers wishing to provide specialized behavior to an existing ResourceHandler instance. The default implementation of all methods is to call through to the wrapped ResourceHandler.

Usage: extend this class and push the implementation being wrapped to the constructor and use #getWrapped to access the instance being wrapped.

Most used methods

  • createResource
    The default behavior of this method is to call ResourceHandler#createResource(String,String,String)
  • getWrapped
  • handleResourceRequest
    The default behavior of this method is to call ResourceHandler#handleResourceRequest(javax.faces.con
  • isResourceRequest
    The default behavior of this method is to call ResourceHandler#isResourceRequest(javax.faces.context
  • libraryExists
    The default behavior of this method is to call ResourceHandler#libraryExists(String) on the wrapped
  • createViewResource
    The default behavior of this method is to call ResourceHandler#createViewResource on the wrapped Res

Popular in Java

  • Reading from database using SQL prepared statement
  • findViewById (Activity)
  • compareTo (BigDecimal)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • Socket (java.net)
    Provides a client-side TCP socket.
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • JTextField (javax.swing)
  • Option (scala)
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now