Package org.apache.wicket.util.resource

Examples of org.apache.wicket.util.resource.IResourceStream.lastModifiedTime()


    {
      throw new IllegalArgumentException("resource " + fileName + " not found for scope " +
        clazz + " (path = " + path + ")");
    }

    setLastModified(stream.lastModifiedTime());

    try
    {
      if (encoding != null)
      {
View Full Code Here


      lastModifiedTimeUpdate < System.currentTimeMillis() - 5 * (1000 * 60))
    {
      IResourceStream resourceStream = getResourceStream(false);
      if (resourceStream != null)
      {
        lastModifiedTime = resourceStream.lastModifiedTime();
      }
      lastModifiedTimeUpdate = System.currentTimeMillis();
    }
    return lastModifiedTime;

View Full Code Here

    locale = resourceStream.getLocale();

    if (resourceStream != null)
    {
      lastModifiedTime = resourceStream.lastModifiedTime();
      lastModifiedTimeUpdate = System.currentTimeMillis();
    }

    return resourceStream;
  }
View Full Code Here

          // Get resource stream
          IResourceStream stream = resource.getResourceStream();

          // Get last modified time from stream
          Time time = stream.lastModifiedTime();

          try
          {
            stream.close();
          }
View Full Code Here

      return sendResourceError(resourceResponse, HttpServletResponse.SC_NOT_FOUND,
          "Unable to find resource");
    }

    // add Last-Modified header (to support HEAD requests and If-Modified-Since)
    final Time lastModified = resourceStream.lastModifiedTime();

    resourceResponse.setLastModified(lastModified);

    if (resourceResponse.dataNeedsToBeWritten(attributes))
    {
View Full Code Here

    {
      throw new IllegalArgumentException("resource " + fileName + " not found for scope " +
        clazz + " (path = " + path + ")");
    }

    setLastModified(stream.lastModifiedTime());

    try
    {
      if (encoding != null)
      {
View Full Code Here

    if (stream == null)
    {
      return null;
    }

    final Time lastModified = stream.lastModifiedTime();

    // if no timestamp is available we can not provide a version
    if (lastModified == null)
    {
      return null;
View Full Code Here

      return sendResourceError(resourceResponse, HttpServletResponse.SC_NOT_FOUND,
          "Unable to find resource");
    }

    // add Last-Modified header (to support HEAD requests and If-Modified-Since)
    final Time lastModified = resourceStream.lastModifiedTime();

    resourceResponse.setLastModified(lastModified);

    if (resourceResponse.dataNeedsToBeWritten(attributes))
    {
View Full Code Here

  @Override
  protected ResourceResponse newResourceResponse(Attributes attributes)
  {
    final IResourceStream resourceStream = internalGetResourceStream();
    ResourceResponse data = new ResourceResponse();
    Time lastModifiedTime = resourceStream.lastModifiedTime();
    if (lastModifiedTime != null)
    {
      data.setLastModified(lastModifiedTime);
    }
View Full Code Here

    locale = resourceStream.getLocale();

    if (resourceStream != null)
    {
      lastModifiedTime = resourceStream.lastModifiedTime();
      lastModifiedTimeUpdate = System.currentTimeMillis();
    }

    return resourceStream;
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.