AssetRequestContext.excludeJs
Code IndexAdd Codota to your IDE (free)

Best code snippets using com.github.dandelion.core.web.AssetRequestContext.excludeJs(Showing top 8 results out of 315)

origin: dandelion/dandelion

public AssetRequestContext excludeJs(Collection<String> jsToExclude) {
 for (String js : jsToExclude) {
   excludeJs(js);
 }
 return this;
}
origin: dandelion/dandelion

public int doEndTag() throws JspException {
 AssetRequestContext.get(pageContext.getRequest()).excludeJs(jsExcludes);
 AssetRequestContext.get(pageContext.getRequest()).excludeCss(cssExcludes);
 return EVAL_PAGE;
}
origin: com.github.dandelion/dandelion-core

/**
* Fluent exclude for asset names
* 
* @param jsNames
*           asset names (separated by comma)
* @return this context
*/
public AssetRequestContext excludeJs(String jsNames) {
 if (StringUtils.isNotBlank(jsNames)) {
   return excludeJs(jsNames.split(","));
 }
 else {
   return this;
 }
}
origin: dandelion/dandelion

  /**
  * {@inheritDoc}
  */
  @Override
  protected ProcessorResult doProcessAttribute(Arguments arguments, Element element, String attributeName) {

   String strippedAttributeName = AttributesUtil.stripPrefix(attributeName, DandelionDialect.DIALECT_PREFIX);
   AssetAttributeNames assetsAttributeName = (AssetAttributeNames) AttributesUtil.find(strippedAttributeName,
      AssetAttributeNames.values());

   HttpServletRequest request = ArgumentsUtil.getWebContext(arguments).getHttpServletRequest();
   AssetRequestContext arc = AssetRequestContext.get(request);
   switch (assetsAttributeName) {
   case JS_EXCLUDES:
     arc.excludeJs(element.getAttributeValue(attributeName));
     break;
   case CSS_EXCLUDES:
     arc.excludeCss(element.getAttributeValue(attributeName));
     break;
   default:
     break;
   }

   return ProcessorResult.ok();
  }
}
origin: dandelion/dandelion

/**
* <p>
* Returns the {@link AssetRequestContext} associated to the passed
* {@link ServletRequest}.
* </p>
* <p>
* If it doesn't exist, a new instance is created and stored as a request
* attribute.
* </p>
* 
* @param servletRequest
*           The servlet request in which is stored the
*           {@link AssetRequestContext}.
* @return the instance of {@link AssetRequestContext} associated with the
*         current servlet request.
*/
public static AssetRequestContext get(ServletRequest servletRequest) {
 Object attribute = servletRequest.getAttribute(AssetRequestContext.class.getCanonicalName());
 Context context = (Context) servletRequest.getAttribute(WebConstants.DANDELION_CONTEXT_ATTRIBUTE);
 if (attribute == null || !(attribute instanceof AssetRequestContext)) {
   attribute = new AssetRequestContext();
   ((AssetRequestContext) attribute).addBundles(context.getConfiguration().getBundleIncludes());
   ((AssetRequestContext) attribute).excludeBundles(context.getConfiguration().getBundleExcludes());
   ((AssetRequestContext) attribute).excludeJs(context.getConfiguration().getAssetJsExcludes());
   ((AssetRequestContext) attribute).excludeCss(context.getConfiguration().getAssetCssExcludes());
   servletRequest.setAttribute(AssetRequestContext.class.getCanonicalName(), attribute);
 }
 return AssetRequestContext.class.cast(attribute);
}
origin: com.github.dandelion/dandelion-core

public AssetRequestContext excludeJs(Collection<String> jsToExclude) {
 for (String js : jsToExclude) {
   excludeJs(js);
 }
 return this;
}
origin: dandelion/dandelion

/**
* Fluent exclude for asset names
* 
* @param jsNames
*           asset names (separated by comma)
* @return this context
*/
public AssetRequestContext excludeJs(String jsNames) {
 if (StringUtils.isNotBlank(jsNames)) {
   return excludeJs(jsNames.split(","));
 }
 else {
   return this;
 }
}
origin: com.github.dandelion/dandelion-core

/**
* <p>
* Returns the {@link AssetRequestContext} associated to the passed
* {@link ServletRequest}.
* </p>
* <p>
* If it doesn't exist, a new instance is created and stored as a request
* attribute.
* </p>
* 
* @param servletRequest
*           The servlet request in which is stored the
*           {@link AssetRequestContext}.
* @return the instance of {@link AssetRequestContext} associated with the
*         current servlet request.
*/
public static AssetRequestContext get(ServletRequest servletRequest) {
 Object attribute = servletRequest.getAttribute(AssetRequestContext.class.getCanonicalName());
 Context context = (Context) servletRequest.getAttribute(WebConstants.DANDELION_CONTEXT_ATTRIBUTE);
 if (attribute == null || !(attribute instanceof AssetRequestContext)) {
   attribute = new AssetRequestContext();
   ((AssetRequestContext) attribute).addBundles(context.getConfiguration().getBundleIncludes());
   ((AssetRequestContext) attribute).excludeBundles(context.getConfiguration().getBundleExcludes());
   ((AssetRequestContext) attribute).excludeJs(context.getConfiguration().getAssetJsExcludes());
   ((AssetRequestContext) attribute).excludeCss(context.getConfiguration().getAssetCssExcludes());
   servletRequest.setAttribute(AssetRequestContext.class.getCanonicalName(), attribute);
 }
 return AssetRequestContext.class.cast(attribute);
}
com.github.dandelion.core.webAssetRequestContextexcludeJs

Javadoc

Fluent exclude for asset names

Popular methods of AssetRequestContext

  • addBundles
    Adds the given bundle array to the current AssetRequestContext.
  • get
    Returns the AssetRequestContext associated to the passed ServletRequest. If it doesn't exist, a n
  • excludeBundles
    Fluent exclude for bundles.
  • excludeCss
  • getCssPlaceholder
  • getGenerator
    Return the AssetContentGenerator corresponding to the passed uid.
  • getJsPlaceholder
  • addGenerator
  • addParameter
    Add a parameter value on a specific asset name
  • setCssPlaceholder
    Configures a placeholder for CSS injection.
  • setJsPlaceholder
    Configures a placeholder for JavaScript injection.
  • <init>
    Private constructor.
  • setJsPlaceholder,
  • <init>,
  • addBundle,
  • getBundles,
  • getExcludedBundles,
  • getExcludedCss,
  • getExcludedJs,
  • getParameterValue,
  • getParameters

Popular classes and methods

  • requestLocationUpdates (LocationManager)
  • setContentView (Activity)
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Reference (javax.naming)

For IntelliJ IDEA,
Android Studio or Eclipse

  • Codota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutContact Us
  • Terms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)