org.broadleafcommerce.cms.web.file
Class StaticAssetViewController

java.lang.Object
  extended by org.broadleafcommerce.cms.web.file.StaticAssetViewController

@Controller(value="blStaticAssetViewController")
public class StaticAssetViewController
extends java.lang.Object

Created by jfischer


Nested Class Summary
static class StaticAssetViewController.CleanupOperation
           
 
Field Summary
protected  ArtifactService artifactService
           
protected  java.lang.String cacheDirectory
           
protected  java.lang.Thread cleanupThread
           
protected  SandBoxService sandBoxService
           
protected  StaticAssetService staticAssetService
           
protected  StaticAssetStorageService staticAssetStorageService
           
 
Constructor Summary
StaticAssetViewController()
           
 
Method Summary
protected  void clearObsoleteCacheFiles(StaticAsset staticAsset, java.io.File cacheFile)
           
protected  java.lang.String constructCacheFileName(StaticAsset staticAsset, java.util.Map<java.lang.String,java.lang.String[]> parameterMap)
           
protected  void createCacheFile(java.io.InputStream is, java.io.File cacheFile)
           
 java.lang.String getCacheDirectory()
           
protected  java.lang.String pad(java.lang.String s, int length, char pad)
           
 void setCacheDirectory(java.lang.String cacheDirectory)
           
 org.springframework.web.servlet.ModelAndView viewItem(java.lang.String fileName, javax.servlet.http.HttpServletRequest request)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cacheDirectory

protected java.lang.String cacheDirectory

staticAssetService

protected StaticAssetService staticAssetService

staticAssetStorageService

protected StaticAssetStorageService staticAssetStorageService

artifactService

protected ArtifactService artifactService

sandBoxService

protected SandBoxService sandBoxService

cleanupThread

protected java.lang.Thread cleanupThread
Constructor Detail

StaticAssetViewController

public StaticAssetViewController()
Method Detail

viewItem

@RequestMapping(value="/**/{fileName}",
                method=GET)
public org.springframework.web.servlet.ModelAndView viewItem(@PathVariable
                                                                            java.lang.String fileName,
                                                                            javax.servlet.http.HttpServletRequest request)

clearObsoleteCacheFiles

protected void clearObsoleteCacheFiles(StaticAsset staticAsset,
                                       java.io.File cacheFile)

createCacheFile

protected void createCacheFile(java.io.InputStream is,
                               java.io.File cacheFile)
                        throws java.sql.SQLException,
                               java.io.IOException
Throws:
java.sql.SQLException
java.io.IOException

constructCacheFileName

protected java.lang.String constructCacheFileName(StaticAsset staticAsset,
                                                  java.util.Map<java.lang.String,java.lang.String[]> parameterMap)

pad

protected java.lang.String pad(java.lang.String s,
                               int length,
                               char pad)

getCacheDirectory

public java.lang.String getCacheDirectory()

setCacheDirectory

public void setCacheDirectory(java.lang.String cacheDirectory)


Copyright © 2011. All Rights Reserved.