public class VfsResourceReference extends org.xwiki.resource.entity.EntityResourceReference
Modifier and Type | Field and Description |
---|---|
static ResourceType |
TYPE
Represents a VFS Resource Type.
|
Constructor and Description |
---|
VfsResourceReference(String fullReference) |
VfsResourceReference(URI fullURI)
Deprecated.
Since 12.4RC1, this constructor shouldn't be used anymore, in particular not for internal
references such as
attach:space.page@attachment/path/to/file , VfsResourceReference(String)
should be used instead |
VfsResourceReference(URI uri,
List<String> pathSegments) |
VfsResourceReference(URI uri,
String pathSegments) |
VfsResourceReference(VfsResourceReference reference)
Create a new reference by copying the passed one.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object object) |
String |
getContentType() |
String |
getPath() |
List<String> |
getPathSegments() |
String |
getReference() |
String |
getScheme() |
URI |
getURI()
Deprecated.
Since 12.4RC1 this method shouldn't be used anymore, in favor of
getReference() . |
int |
hashCode() |
void |
setContentType(String contentType) |
String |
toString() |
URI |
toURI() |
getAction, getEntityReference, getLocale, getRevision, setAction, setEntityReference, setLocale, setRevision
addParameter, getParameters, getParameterValue, getParameterValues, getType, setParameter, setType
public static final ResourceType TYPE
@Unstable public VfsResourceReference(VfsResourceReference reference)
reference
- the reference to copypublic VfsResourceReference(URI uri, List<String> pathSegments)
uri
- the URI pointing to the archive (without the path inside the archive),
e.g. attach:space.page@attachment
pathSegments
- see getPathSegments()
public VfsResourceReference(URI uri, String pathSegments)
uri
- the URI pointing to the archive (without the path inside the archive),
e.g. attach:space.page@attachment
pathSegments
- see getPathSegments()
, specified as "/"-separated string (e.g. "path/to/file")@Deprecated public VfsResourceReference(URI fullURI)
attach:space.page@attachment/path/to/file
, VfsResourceReference(String)
should be used insteadfullURI
- the full opaque URI containing both the reference to the archive and the path to the entry inside
it, e.g. attach:space.page@attachment/path/to/file
. Note that this constructor requires that the
full URL to be URL-encoded.@Unstable public VfsResourceReference(String fullReference)
fullReference
- the full opaque reference containing both the reference to the archive and the path to the
entry inside it, e.g. attach:space.page@attachment/path/to/file
.@Deprecated public URI getURI()
getReference()
.attach:space.page@file.zip
, http://server/path/to/zip
)@Unstable public String getReference()
attach:space.page@file.zip
).@Unstable public String getScheme()
attach
).public List<String> getPathSegments()
{"some",
"directory", "file.txt"}
for some/directory/file.txt
public String getPath()
some/directory/file.txt
public int hashCode()
hashCode
in class org.xwiki.resource.entity.EntityResourceReference
public boolean equals(Object object)
equals
in class org.xwiki.resource.entity.EntityResourceReference
public String toString()
toString
in class org.xwiki.resource.entity.EntityResourceReference
public URI toURI()
@Unstable public String getContentType()
@Unstable public void setContentType(String contentType)
contentType
- the Content-Type to return with the responseCopyright © 2004–2022 XWiki. All rights reserved.