public abstract class AbstractLoader<T extends Identifiable> extends Object implements Loader<T>
| Constructor and Description |
|---|
AbstractLoader(JacksonObjectMapper objectMapper,
Class<T> type) |
| Modifier and Type | Method and Description |
|---|---|
T |
get(Path path) |
List<T> |
getAll(Path directory) |
protected List<T> |
getAll(Path directory,
String glob) |
String |
getNextAvailableObjectId(Path directory,
String objectName) |
T |
load(Path path)
Use to load the component in the path directory
|
List<T> |
loadAll(Path directory) |
protected List<T> |
loadAll(Path directory,
DirectoryStream.Filter<Path> filter) |
protected List<T> |
loadAll(Path directory,
String glob) |
Path |
resolve(Path directory,
String id) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcontains, findByObjectId, findByObjectIds, getByUUIDpublic AbstractLoader(JacksonObjectMapper objectMapper, Class<T> type)
public List<T> getAll(Path directory) throws IOException
getAll in interface Loader<T extends Identifiable>IOExceptionprotected List<T> getAll(Path directory, String glob) throws IOException
IOExceptionpublic String getNextAvailableObjectId(Path directory, String objectName) throws IOException
getNextAvailableObjectId in interface Loader<T extends Identifiable>IOExceptionpublic T load(Path path)
Loaderload in interface Loader<T extends Identifiable>public List<T> loadAll(Path directory) throws IOException
IOExceptionprotected List<T> loadAll(Path directory, String glob) throws IOException
IOExceptionprotected List<T> loadAll(Path directory, DirectoryStream.Filter<Path> filter) throws IOException
IOExceptionCopyright © 2020. All rights reserved.