Class RemoteFileResolverImpl
java.lang.Object
org.craftercms.commons.file.stores.impl.RemoteFileResolverImpl
- All Implemented Interfaces:
RemoteFileResolver
Default implementation of
RemoteFileResolver
. Uses RemotePathParser
to parse the path and determine
the store type, and then resolves the file using the actual RemoteFileStore
.- Author:
- avasquez
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Map<String,
RemotePathParser> protected Map<String,
RemoteFileStore> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGiven the specified path, returns aRemoteFile
associated to the path.void
setPathParsers
(Map<String, RemotePathParser> pathParsers) void
setStores
(Map<String, RemoteFileStore> stores)
-
Field Details
-
pathParsers
-
stores
-
-
Constructor Details
-
RemoteFileResolverImpl
public RemoteFileResolverImpl()
-
-
Method Details
-
setPathParsers
-
setStores
-
resolve
Description copied from interface:RemoteFileResolver
Given the specified path, returns aRemoteFile
associated to the path.- Specified by:
resolve
in 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
-