org.broadleafcommerce.common.file.service
Interface FileServiceProvider

All Known Implementing Classes:
FileSystemFileServiceProvider

public interface FileServiceProvider

Interface to be implemented by a FileProvider. This could be a local FileProvider or a remote service like Amazon S3.

Author:
bpolster

Method Summary
 void addOrUpdateResources(FileWorkArea workArea, List<File> files, boolean removeFilesFromWorkArea)
          Takes in a work area and application type and moves all of the files to the configured FileProvider.
 File getResource(String name)
          Returns a File representing the passed in name.
 File getResource(String name, FileApplicationType fileApplicationType)
          Returns a File representing the passed in name and application type.
 boolean removeResource(String name)
          Removes the resource from the file service.
 

Method Detail

getResource

File getResource(String name)
Returns a File representing the passed in name.

Parameters:
name - - fully qualified path to the resource
Returns:

getResource

File getResource(String name,
                 FileApplicationType fileApplicationType)
Returns a File representing the passed in name and application type. Providers may choose to cache certain FileApplicationType(s) locally rather than retrieve them from a remote source.

Parameters:
name - - fully qualified path to the resource
fileApplicationType - - applicationType
Returns:

addOrUpdateResources

void addOrUpdateResources(FileWorkArea workArea,
                          List<File> files,
                          boolean removeFilesFromWorkArea)
Takes in a work area and application type and moves all of the files to the configured FileProvider.

Parameters:
workArea -
applicationType -

removeResource

boolean removeResource(String name)
Removes the resource from the file service.

Parameters:
name - - fully qualified path to the resource
Returns:
true if the resource was removed


Copyright © 2013. All Rights Reserved.