Package org.apache.wicket.util.resource

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


  @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


      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

      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

    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

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

      setLastModified(stream.lastModifiedTime());

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

      // set Content-Type (may be null)
      resourceResponse.setContentType(contentType);

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

      if (lastModified != null)
        resourceResponse.setLastModified(lastModified);

      try
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

      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

    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

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

    setLastModified(stream.lastModifiedTime());

    try
    {
      if (encoding != null)
      {
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.