Class RemoteFileResolverImpl
- java.lang.Object
-
- org.craftercms.commons.file.stores.impl.RemoteFileResolverImpl
-
- All Implemented Interfaces:
RemoteFileResolver
public class RemoteFileResolverImpl extends Object implements RemoteFileResolver
Default implementation ofRemoteFileResolver. UsesRemotePathParserto parse the path and determine the store type, and then resolves the file using the actualRemoteFileStore.- Author:
- avasquez
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,RemotePathParser>pathParsersprotected Map<String,RemoteFileStore>stores
-
Constructor Summary
Constructors Constructor Description RemoteFileResolverImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RemoteFileresolve(String path)Given the specified path, returns aRemoteFileassociated to the path.voidsetPathParsers(Map<String,RemotePathParser> pathParsers)voidsetStores(Map<String,RemoteFileStore> stores)
-
-
-
Field Detail
-
pathParsers
protected Map<String,RemotePathParser> pathParsers
-
stores
protected Map<String,RemoteFileStore> stores
-
-
Method Detail
-
setPathParsers
public void setPathParsers(Map<String,RemotePathParser> pathParsers)
-
setStores
public void setStores(Map<String,RemoteFileStore> stores)
-
resolve
public RemoteFile resolve(String path) throws IOException, IllegalArgumentException
Description copied from interface:RemoteFileResolverGiven the specified path, returns aRemoteFileassociated to the path.- Specified by:
resolvein interfaceRemoteFileResolver- Parameters:
path- the path to the remote file- Returns:
- the remote file
- Throws:
IOException- if an IO error occurs while trying to resolve the fileIllegalArgumentException- if the path can't be recognized as a remote path
-
-