|
ModeShape Distribution 3.0.0.Beta4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.jettison.json.JSONObject
org.modeshape.web.jcr.rest.client.json.JsonNode
org.modeshape.web.jcr.rest.client.json.FileNode
@Immutable public final class FileNode
The FileNode
class is responsible for knowing how to create a URL for a file, create a JSON representation of a
file, and to create the appropriate JCR nodes for a file.
Field Summary |
---|
Fields inherited from class org.codehaus.jettison.json.JSONObject |
---|
NULL |
Constructor Summary | |
---|---|
FileNode(Workspace workspace,
String path,
File file)
|
|
FileNode(Workspace workspace,
String path,
File file,
boolean versionable)
|
Method Summary | |
---|---|
byte[] |
getContent()
|
String |
getPath()
|
URL |
getUrl()
|
Methods inherited from class org.modeshape.web.jcr.rest.client.json.JsonNode |
---|
getId, toString |
Methods inherited from class org.codehaus.jettison.json.JSONObject |
---|
accumulate, append, doubleToString, get, getBoolean, getDouble, getInt, getJSONArray, getJSONObject, getLong, getString, has, isNull, keys, length, names, numberToString, opt, optBoolean, optBoolean, optDouble, optDouble, optInt, optInt, optJSONArray, optJSONObject, optLong, optLong, optString, optString, put, put, put, put, put, put, put, putOpt, quote, remove, toJSONArray, toString, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public FileNode(Workspace workspace, String path, File file) throws Exception
workspace
- the workspace being used (never null
)path
- the path in the workspace (never null
)file
- the file on the local file system (never null
)
Exception
- if there is a problem constructing the file nodepublic FileNode(Workspace workspace, String path, File file, boolean versionable) throws Exception
workspace
- the workspace being used (never null
)path
- the path in the workspace (never null
)file
- the file on the local file system (never null
)versionable
- true if the file node should be versionable
Exception
- if there is a problem constructing the file nodeMethod Detail |
---|
public byte[] getContent() throws Exception
getContent
in class JsonNode
Exception
- if there is a problem obtaining the node contentJsonNode.getContent()
public String getPath()
public URL getUrl() throws Exception
getUrl
in class JsonNode
Exception
- if there is a problem constructing the URLJsonNode.getUrl()
|
ModeShape Distribution 3.0.0.Beta4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |