public abstract class AbstractProfileAwareRemoteFileStore<T extends ConfigurationProfile> extends Object implements RemoteFileStore
RemoteFileStore
for stores that are aware of configuration profiles that should be used to connect
to the remote store.Modifier and Type | Field and Description |
---|---|
protected ConfigurationProfileLoader<T> |
profileLoader |
Constructor and Description |
---|
AbstractProfileAwareRemoteFileStore() |
Modifier and Type | Method and Description |
---|---|
protected abstract RemoteFile |
doGetFile(ProfileAwareRemotePath path,
T profile) |
RemoteFile |
getFile(RemotePath path)
Resolves the given
RemotePath as a RemoteFile . |
protected T |
loadProfile(String profile) |
void |
setProfileLoader(ConfigurationProfileLoader<T> profileLoader) |
protected ConfigurationProfileLoader<T extends ConfigurationProfile> profileLoader
public void setProfileLoader(ConfigurationProfileLoader<T> profileLoader)
public RemoteFile getFile(RemotePath path) throws IOException
RemoteFileStore
RemotePath
as a RemoteFile
.getFile
in interface RemoteFileStore
path
- the path to the file in the remote storeIOException
- if an IO error occurs while trying to resolve the remote fileprotected abstract RemoteFile doGetFile(ProfileAwareRemotePath path, T profile) throws IOException
IOException
protected T loadProfile(String profile) throws IOException
IOException
Copyright © 2023 CrafterCMS. All rights reserved.