public interface WebFileBundle
Modifier and Type | Method and Description |
---|---|
WebFile |
create(String absPath,
Binary content)
Creates a new
WebFile at the given location. |
String |
createTag()
Creates a new tag for this entire
WebFileBundle |
void |
delete(String absPath)
Removes the
WebFile at absPath |
boolean |
exists(String absPath) |
WebFile |
get(String absPath) |
WebFile |
get(String absPath,
String tagName) |
String |
getAntiCacheValue() |
String |
getLatestTagName()
e
|
List<String> |
getTagNames() |
WebFile |
update(String absPath,
Binary content)
Updates the content of this
WebFile . |
boolean exists(String absPath)
WebFile get(String absPath) throws WebFileNotFoundException
absPath
- the absolute path starting with a slash to the WebFile
, relative to this WebFileBundle
WebFile
head located at the given path.WebFileNotFoundException
- if no WebFile
exists at the given path.WebFile create(String absPath, Binary content) throws WebFileException, IllegalArgumentException
WebFile
at the given location.absPath
- the absolute path starting with a slash to the WebFile
, relative to this WebFileBundle
content
- the content of the new WebFile
.WebFile
.WebFileException
- if another (web) resource already exists at the given location.IllegalArgumentException
- if the given binary is null
.WebFileException
- in case of insufficient authorizationWebFile update(String absPath, Binary content) throws WebFileNotFoundException, IllegalArgumentException
WebFile
.absPath
- the absolute path starting with a slash to the WebFile
, relative to this WebFileBundle
content
- the binary data to store.WebFile
WebFileNotFoundException
- if no WebFile
exists at the given path.IllegalArgumentException
- if the given binary is null
.WebFileException
- in case of insufficient authorizationvoid delete(String absPath) throws WebFileException
WebFile
at absPathabsPath
- the absolute path starting with a slash to the WebFile
, relative to this WebFileBundle
WebFileException
- in case the delete did not occur, for example because the resource is not there any more,
insufficient authorization, locking, etcString getLatestTagName() throws WebFileException
null
WebFileException
List<String> getTagNames() throws WebFileException
List
ordered list of tag names for this WebFileBundle
or empty List in case
there are no tags for this WebFileBundle
or tagging is not supported (for this WebFileBundle
)WebFileException
WebFile get(String absPath, String tagName) throws WebFileNotFoundException, WebFileTagNotFoundException
absPath
- the absolute path to the WebFile
, starting at the WebFile
s root. The path must start
with a slash when not null
.tagName
- the WebFile
for tagName. When tagName
is null, the head
WebFile
is returned, the same as get(String)
WebFile
tag located at the given path for tagName
.WebFileNotFoundException
- if no WebFile
exists at the given path for tagName
.WebFileTagNotFoundException
String createTag() throws WebFileException
WebFileBundle
WebFileException
String getAntiCacheValue()
WebFileBundle
, useful to be able to cache resources in the
client (browser) : Whenever the client needs new resources, the anti cache value changes resulting in different
URLs for the resources. Only chars allowed are [a-z] and [0-9] to avoid encoding/decoding problems when used in
URLsCopyright © 2012–2015 Hippo B.V. (http://www.onehippo.com). All rights reserved.