public class ObjectStorageImpl extends Object implements ObjectStorage
| Constructor and Description |
|---|
ObjectStorageImpl(org.uberfire.io.IOService ioService) |
| Modifier and Type | Method and Description |
|---|---|
void |
delete(String path)
Delete a path from the object storage if exists.
|
boolean |
exists(String path)
Checks if a path exists into the object storage.
|
Path |
getPath(String first,
String... paths)
Return a path based on the filesystem that is implemented for storage
|
void |
init(String rootPath)
Initialize the object storage.
|
<T> T |
read(String path)
Read the content of the path given
|
<T> void |
write(String path,
T value)
Write an object into the object storage.
|
@Inject
public ObjectStorageImpl(@Named(value="configIO")
org.uberfire.io.IOService ioService)
public void init(String rootPath)
ObjectStorageinit in interface ObjectStoragerootPath - The root path where is going to create the file systempublic boolean exists(String path)
ObjectStorageexists in interface ObjectStoragepath - the path to the stored object.public <T> T read(String path)
ObjectStorageread in interface ObjectStoragepath - The path where the content is storedpublic <T> void write(String path, T value)
ObjectStoragewrite in interface ObjectStoragepath - The path where the object is going to be writtenvalue - The object itselfpublic void delete(String path)
ObjectStoragedelete in interface ObjectStoragepath - The path to deletepublic Path getPath(String first, String... paths)
ObjectStoragegetPath in interface ObjectStoragefirst - the path string or initial part of the path stringpaths - additional strings to be joined to form the path stringCopyright © 2012–2017 JBoss by Red Hat. All rights reserved.