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

How to use
registerNewBundleId
method
in
jodd.htmlstapler.HtmlStaplerBundlesManager

Best Java code snippets using jodd.htmlstapler.HtmlStaplerBundlesManager.registerNewBundleId (Showing top 2 results out of 315)

origin: oblac/jodd

/**
 * Process links. Returns bundle link if this is the first resource
 * of the same type. Otherwise, returns <code>null</code> indicating
 * that collection is going on and the original link should be removed.
 */
public String processLink(final String src) {
  if (newAction) {
    if (bundleId == null) {
      bundleId = bundlesManager.registerNewBundleId();
      bundleId += '.' + bundleContentType;
    }
    sources.add(src);
  }
  if (firstScriptTag) {
    // this is the first tag, change the url to point to the bundle
    firstScriptTag = false;
    return buildStaplerUrl();
  } else {
    // ignore all other script tags
    return null;
  }
}
origin: org.jodd/jodd-htmlstapler

/**
 * Process links. Returns bundle link if this is the first resource
 * of the same type. Otherwise, returns <code>null</code> indicating
 * that collection is going on and the original link should be removed.
 */
public String processLink(final String src) {
  if (newAction) {
    if (bundleId == null) {
      bundleId = bundlesManager.registerNewBundleId();
      bundleId += '.' + bundleContentType;
    }
    sources.add(src);
  }
  if (firstScriptTag) {
    // this is the first tag, change the url to point to the bundle
    firstScriptTag = false;
    return buildStaplerUrl();
  } else {
    // ignore all other script tags
    return null;
  }
}
jodd.htmlstaplerHtmlStaplerBundlesManagerregisterNewBundleId

Javadoc

Registers new, temporary bundle id for given action path. This id is used on first bundle usage, later it will be replaces with real bundle id.

Popular methods of HtmlStaplerBundlesManager

  • <init>
    Creates new instance and initialize it.
  • createDigest
    Creates digest i.e. bundle id from given string. Returned digest must be filename safe, for all plat
  • fixCssRelativeUrls
    Returns the content with all relative URLs fixed.
  • createBundle
    Creates bundle file by loading resource files content. If bundle file already exist it will not be r
  • createBundleFile
    Creates bundle file in bundleFolder/staplerPath. Only file object is created, not the file content.
  • fixRelativeUrl
    For a given URL (optionally quoted), produces CSS URL where relative paths are fixed and prefixed wi
  • getStaplerPath
    Returns stapler path. It is both the file system folder name and the web folder name.
  • getStrategy
    Returns current Strategy.
  • isCssResource
    Returns true if resource is CSS, so the CSS urls can be fixed.
  • isExternalResource
    Returns true if resource link has to be downloaded. By default, if resource link starts with "http:/
  • lookupBundleFile
    Lookups for bundle file.
  • lookupBundleId
    Lookups for a bundle id for a given action. Returns null if action still has no bundle. Returns an e
  • lookupBundleFile,
  • lookupBundleId,
  • lookupGzipBundleFile,
  • onResourceContent,
  • registerBundle,
  • reset,
  • resolveRealActionPath,
  • start,
  • setRandomDigestChars

Popular in Java

  • Creating JSON documents from java classes using gson
  • addToBackStack (FragmentTransaction)
  • requestLocationUpdates (LocationManager)
  • findViewById (Activity)
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • Top plugins for WebStorm
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