Groovy Documentation

org.broadleafcommerce.vendor.rackspace.cloudfiles
[Groovy] Class CloudFilesFileServiceProvider

java.lang.Object
  org.broadleafcommerce.vendor.rackspace.cloudfiles.CloudFilesFileServiceProvider
All Implemented Interfaces:
FileServiceProvider

@Service("blCloudFilesFileServiceProvider")
class CloudFilesFileServiceProvider

FileServiceProvider implementation that deals with Rackspace Cloud Files

Authors:
Phillip Verheyden (phillipuniverse)


Field Summary
protected BroadleafFileService fileService

 
Method Summary
void addOrUpdateResources(FileWorkArea workArea, java.util.List files, boolean removeFilesFromWorkArea)

protected java.lang.String buildResourceName(java.lang.String name)

Responsible for sanitizing the given resource into something suitable to be placed in a Cloud Files container.

protected CloudFilesClient getClient()

Builds a CloudFilesClient based on configuration from lookupConfiguration()

java.io.File getResource(java.lang.String name)

java.io.File getResource(java.lang.String name, FileApplicationType fileApplicationType)

protected CloudFilesConfiguration lookupConfiguration()

Instantiates a new CloudFilesConfiguration based on system properties resolved from BLCSystemProperty

boolean removeResource(java.lang.String name)

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Field Detail

fileService

@Resource(name = "blFileService")
protected BroadleafFileService fileService


 
Method Detail

addOrUpdateResources

@Override
void addOrUpdateResources(FileWorkArea workArea, java.util.List files, boolean removeFilesFromWorkArea)


buildResourceName

protected java.lang.String buildResourceName(java.lang.String name)
Responsible for sanitizing the given resource into something suitable to be placed in a Cloud Files container. This will take off leading slashes and potentially prepend a CloudFilesConfiguration#getContainerSubDirectory()#getContainerSubDirectory()
Parameters:
name - the file name that we should use
Returns:
a path suitable to use in calls to a Cloud Files container


getClient

protected CloudFilesClient getClient()
Builds a CloudFilesClient based on configuration from lookupConfiguration()
Returns:
a CloudFilesClient based on configuration from lookupConfiguration()


getResource

@Override
java.io.File getResource(java.lang.String name)


getResource

@Override
java.io.File getResource(java.lang.String name, FileApplicationType fileApplicationType)


lookupConfiguration

protected CloudFilesConfiguration lookupConfiguration()
Instantiates a new CloudFilesConfiguration based on system properties resolved from BLCSystemProperty
Returns:
a new, populated CloudFilesConfiguration instance


removeResource

@Override
boolean removeResource(java.lang.String name)


 

Groovy Documentation