Package org.apache.wicket.request.resource.caching

Examples of org.apache.wicket.request.resource.caching.ResourceUrl


        // remove caching information
        if (i + 1 == segmentsSize && Strings.isEmpty(segment) == false)
        {
          // The filename + parameters eventually contain caching
          // related information which needs to be removed
          ResourceUrl resourceUrl = new ResourceUrl(segment, pageParameters);
          getCachingStrategy().undecorateUrl(resourceUrl);
          segment = resourceUrl.getFileName();

          Checks.notEmpty(segment, "Caching strategy returned empty name for '%s'", resourceUrl);
        }
        if (name.length() > 0)
        {
View Full Code Here


           
            // is caching enabled?
            if(cacheable.isCachingEnabled())
            {
              // apply caching scheme to resource url
              final ResourceUrl resourceUrl = new ResourceUrl(token, parameters);
              getCachingStrategy().decorateUrl(resourceUrl, cacheable);
              token = resourceUrl.getFileName();
 
              Checks.notEmpty(token, "Caching strategy returned empty name for '%s'", resource);
            }
          }
        }
View Full Code Here

        // remove caching information
        if (i + 1 == segmentsSize && Strings.isEmpty(segment) == false)
        {
          // The filename + parameters eventually contain caching
          // related information which needs to be removed
          ResourceUrl resourceUrl = new ResourceUrl(segment, pageParameters);
          getCachingStrategy().undecorateUrl(resourceUrl);
          segment = resourceUrl.getFileName();

          if (Strings.isEmpty(segment))
          {
            throw new IllegalStateException(
              "caching strategy returned empty name for " + resourceUrl);
View Full Code Here

           
            // is caching enabled?
            if(cacheable.isCachingEnabled())
            {
              // apply caching scheme to resource url
              final ResourceUrl resourceUrl = new ResourceUrl(token, parameters);
              getCachingStrategy().decorateUrl(resourceUrl, cacheable);
              token = resourceUrl.getFileName();
 
              if (Strings.isEmpty(token))
              {
                throw new IllegalStateException(
                  "caching strategy returned empty name for " + resource);
View Full Code Here

      {
        final IStaticCacheableResource cacheable = (IStaticCacheableResource)resource;
       
        if(cacheable.isCachingEnabled())
        {
          final ResourceUrl cacheUrl = new ResourceUrl(filename, parameters);
 
          getCachingStrategy().decorateUrl(cacheUrl, cacheable);
 
          if (Strings.isEmpty(cacheUrl.getFileName()))
          {
            if (Application.exists() && Application.get().usesDeploymentConfig())
            {
              throw new AbortWithHttpErrorCodeException(HttpServletResponse.SC_NOT_FOUND,
                "caching strategy returned empty name for " + resource);
            }
            else
            {
              throw new IllegalStateException(
                  "caching strategy returned empty name for " + resource);
            }
          }
          segments.set(lastSegmentAt, cacheUrl.getFileName());
        }
      }
    }
  }
View Full Code Here

      {
        return;
      }

      // create resource url from filename and query parameters
      final ResourceUrl resourceUrl = new ResourceUrl(filename, parameters);

      // remove caching information from request
      getCachingStrategy().undecorateUrl(resourceUrl);

      // check for broken caching strategy (this must never happen)
      if (Strings.isEmpty(resourceUrl.getFileName()))
      {
        throw new IllegalStateException("caching strategy returned empty name for " +
          resourceUrl);
      }

      segments.set(lastSegmentAt, resourceUrl.getFileName());
    }
  }
View Full Code Here

      final IResource resource = resourceReference.getResource();

      if (resource instanceof IStaticCacheableResource)
      {
        final IStaticCacheableResource cacheable = (IStaticCacheableResource)resource;
        final ResourceUrl cacheUrl = new ResourceUrl(filename, parameters);

        getCachingStrategy().decorateUrl(cacheUrl, cacheable);

        if (Strings.isEmpty(cacheUrl.getFileName()))
        {
          throw new IllegalStateException("caching strategy returned empty name for " +
            resource);
        }
        segments.set(lastSegmentAt, cacheUrl.getFileName());
      }
    }
  }
View Full Code Here

      {
        return;
      }

      // create resource url from filename and query parameters
      final ResourceUrl resourceUrl = new ResourceUrl(filename, parameters);

      // remove caching information from request
      getCachingStrategy().undecorateUrl(resourceUrl);

      // check for broken caching strategy (this must never happen)
      if (Strings.isEmpty(resourceUrl.getFileName()))
      {
        throw new IllegalStateException("caching strategy returned empty name for " +
          resourceUrl);
      }

      segments.set(lastSegmentAt, resourceUrl.getFileName());
    }
  }
View Full Code Here

        // remove caching information
        if (i + 1 == segmentsSize && Strings.isEmpty(segment) == false)
        {
          // The filename + parameters eventually contain caching
          // related information which needs to be removed
          ResourceUrl resourceUrl = new ResourceUrl(segment, pageParameters);
          getCachingStrategy().undecorateUrl(resourceUrl);
          segment = resourceUrl.getFileName();

          if (Strings.isEmpty(segment))
          {
            throw new IllegalStateException("caching strategy returned empty name for " + resourceUrl);
          }
View Full Code Here

          // apply caching if required
          if (resource instanceof IStaticCacheableResource)
          {
            // add caching related information to filename + query parameters
            final IStaticCacheableResource cacheable = (IStaticCacheableResource)resource;
            final ResourceUrl resourceUrl = new ResourceUrl(token, parameters);
            getCachingStrategy().decorateUrl(resourceUrl, cacheable);
            token = resourceUrl.getFileName();

            if (Strings.isEmpty(token))
            {
              throw new IllegalStateException("caching strategy returned empty name for " + resource);
            }
View Full Code Here

TOP

Related Classes of org.apache.wicket.request.resource.caching.ResourceUrl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.