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
ConstructorsConstructorDescriptionRemoteFileResolverImpl(Map<String, RemotePathParser> pathParsers, Map<String, RemoteFileStore> stores) -
Method Summary
Modifier and TypeMethodDescriptionGiven the specified path, returns aRemoteFileassociated to the path.
-
Field Details
-
pathParsers
-
stores
-
-
Constructor Details
-
RemoteFileResolverImpl
public RemoteFileResolverImpl(Map<String, RemotePathParser> pathParsers, Map<String, RemoteFileStore> stores)
-
-
Method Details
-
resolve
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
-