Class PackageResourceReference

    • Constructor Detail

      • PackageResourceReference

        public PackageResourceReference​(ResourceReference.Key key)
        Construct.
        Parameters:
        key -
      • PackageResourceReference

        public PackageResourceReference​(Class<?> scope,
                                        String name,
                                        Locale locale,
                                        String style,
                                        String variation)
        Construct.
        Parameters:
        scope -
        name -
        locale -
        style -
        variation -
      • PackageResourceReference

        public PackageResourceReference​(Class<?> scope,
                                        String name)
        Construct.
        Parameters:
        scope -
        name -
      • PackageResourceReference

        public PackageResourceReference​(String name)
        Construct.
        Parameters:
        name -
    • Method Detail

      • removeCompressFlagIfUnnecessary

        protected final void removeCompressFlagIfUnnecessary​(PackageResource resource)
        Method allowing to remove the compress flag if the resource has been detected as a minified one (i.e. ending with .min.EXT) This method is to be called by subclasses overriding getResource if they want to rely on default minification detection handling see WICKET-5250 for further explanation
        Parameters:
        resource - resource to check
      • getMinifiedName

        protected String getMinifiedName()
        Returns:
        How the minified file should be named.
      • readBuffered

        public PackageResourceReference readBuffered​(boolean readBuffered)
        If the package resource should be read buffered.

        WARNING - if the stream is not read buffered compressors will not work, because they require the whole content to be read into memory.
        (IJavaScriptCompressor,
        ICssCompressor,
        IScopeAwareTextResourceProcessor)
        Parameters:
        readBuffered - if the package resource should be read buffered
        Returns:
        the current package resource