public abstract class WebdavNsNode extends Object implements Serializable, org.bedework.util.logging.Logged
| Modifier and Type | Class and Description |
|---|---|
static class |
WebdavNsNode.PropertyTagEntry |
static class |
WebdavNsNode.PropVal |
static class |
WebdavNsNode.SetPropertyResult
Result from setting or removing property
|
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
alias
true if this is an alias
|
protected boolean |
allowsGet
True if GET is allowed
|
protected boolean |
collection
True if this node is a collection
|
protected boolean |
exists
Does the resource exist?
|
protected boolean |
groupPrincipal
True if this node is a group
|
protected String |
path
Suitable for display
|
protected int |
status
Can be set to indicate some sort of abnormal condition on this node,
e.g.
|
protected String |
targetUri |
protected String |
uri
Uri of the node.
|
protected UrlHandler |
urlHandler |
protected boolean |
userPrincipal
True if this node is a user
|
protected WdSysIntf |
wdSysIntf |
| Constructor and Description |
|---|
WebdavNsNode(WdSysIntf sysi,
UrlHandler urlHandler,
String path,
boolean collection,
String uri)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
protected static void |
addPropEntry(HashMap<QName,WebdavNsNode.PropertyTagEntry> propertyNames,
QName tag) |
protected static void |
addPropEntry(HashMap<QName,WebdavNsNode.PropertyTagEntry> propertyNames,
QName tag,
boolean inAllProp) |
abstract boolean |
allowsSyncReport() |
boolean |
equals(Object o) |
void |
generateHref(org.bedework.util.xml.XmlEmit xml) |
void |
generateHref(org.bedework.util.xml.XmlEmit xml,
String uri) |
boolean |
generatePropertyValue(QName tag,
WebdavNsIntf intf,
boolean allProp)
Emit the property indicated by the tag.
|
void |
generateUrl(org.bedework.util.xml.XmlEmit xml,
QName tag,
String uri,
boolean exists) |
boolean |
getAlias() |
boolean |
getAllowsGet() |
abstract Collection<? extends WdEntity> |
getChildren(java.util.function.Supplier<Object> filterGetter)
Return a collection of children objects.
|
abstract WdCollection |
getCollection(boolean deref)
The node may refer to a collection object which may in fact be an alias to
another.
|
WebdavNsIntf.Content |
getContent(String contentType)
Returns the content.
|
abstract boolean |
getContentBinary() |
abstract String |
getContentLang() |
abstract long |
getContentLen() |
InputStream |
getContentStream()
Returns an InputStream for the content.
|
String |
getContentString(String contentType)
Return string content
|
abstract String |
getContentType()
A content type of null implies no content (or we don't know)
|
abstract String |
getCreDate() |
abstract org.bedework.access.CurrentAccess |
getCurrentAccess()
Get the current access granted to this principal for this node.
|
abstract boolean |
getDeleted() |
abstract String |
getDisplayname() |
String |
getEncodedUri() |
String |
getEncodedUri(String uri) |
abstract String |
getEtagValue(boolean strong)
Entity tags are defined in RFC2068 - they are supposed to provide some
sort of indication the data has changed - e.g.
|
boolean |
getExists() |
abstract WdCollection |
getImmediateTargetCollection() |
abstract String |
getLastmodDate() |
org.bedework.util.logging.BwLogger |
getLogger() |
abstract org.bedework.access.AccessPrincipal |
getOwner()
Should return a value suitable for WebdavNsIntf.makeUserHref
|
String |
getPath() |
String |
getPrefixedUri() |
String |
getPrefixedUri(String uri) |
Collection<WebdavNsNode.PropertyTagEntry> |
getPropertyNames()
Return a set of PropertyTagEntry defining properties this node supports.
|
int |
getStatus() |
Collection<QName> |
getSupportedReports()
Return a set of QName defining reports this node supports.
|
abstract String |
getSyncToken() |
String |
getTargetUri() |
String |
getUri()
Get uri
|
int |
hashCode() |
void |
init(boolean content)
This method is called before each setter/getter takes any action.
|
boolean |
isCollection() |
boolean |
isPrincipal()
Return true if this represents a principal
|
boolean |
knownProperty(QName tag)
Return true if a call to generatePropertyValue will return a value.
|
boolean |
removeProperty(Element val,
WebdavNsNode.SetPropertyResult spr)
Remove the given property for this node.
|
void |
setAlias(boolean val) |
void |
setAllowsGet(boolean val) |
void |
setDefaults(QName methodTag) |
void |
setExists(boolean val) |
boolean |
setProperty(Element val,
WebdavNsNode.SetPropertyResult spr)
Set the given property for this node.
|
void |
setStatus(int val) |
void |
setTargetUri(String val) |
void |
setUri(String val)
Set uri
|
abstract boolean |
trailSlash()
Trailing "/" on uri?
|
abstract void |
update()
Update this node after changes.
|
abstract String |
writeContent(org.bedework.util.xml.XmlEmit xml,
Writer wtr,
String contentType)
Called during xml emission to write the content for the node.
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitaudit, debug, debug, enableAuditLogger, enableErrorLogger, enableMetricsLogger, error, error, error, info, isAuditLoggerEnabled, isErrorLoggerEnabled, isMetricsDebugEnabled, isMetricsLoggerEnabled, metrics, setLoggerClass, setLoggerClass, trace, trace, warnprotected boolean exists
protected WdSysIntf wdSysIntf
protected String uri
protected String path
protected boolean collection
protected boolean userPrincipal
protected boolean groupPrincipal
protected boolean allowsGet
protected int status
protected boolean alias
protected String targetUri
protected UrlHandler urlHandler
public WebdavNsNode(WdSysIntf sysi, UrlHandler urlHandler, String path, boolean collection, String uri)
sysi - system interfaceurlHandler - - needed for building hrefs.path - - resource pathcollection - - true if this is a collectionuri - - the uri (XXX is that the same as the path?)public abstract org.bedework.access.CurrentAccess getCurrentAccess()
throws WebdavException
WebdavExceptionpublic abstract void update()
throws WebdavException
WebdavExceptionpublic abstract boolean trailSlash()
public abstract Collection<? extends WdEntity> getChildren(java.util.function.Supplier<Object> filterGetter) throws WebdavException
Default is to return null
filterGetter - non-null if there is a filterWebdavException - on fatal errorpublic String getPath()
public void generateHref(org.bedework.util.xml.XmlEmit xml)
throws WebdavException
xml - emitterWebdavExceptionpublic void generateHref(org.bedework.util.xml.XmlEmit xml,
String uri)
throws WebdavException
xml - emitteruri - WebdavExceptionpublic String getPrefixedUri() throws WebdavException
WebdavExceptionpublic String getPrefixedUri(String uri) throws WebdavException
uri - WebdavExceptionpublic void generateUrl(org.bedework.util.xml.XmlEmit xml,
QName tag,
String uri,
boolean exists)
throws WebdavException
xml - emittertag - uri - exists - - true if we KNOW it existsWebdavExceptionpublic boolean removeProperty(Element val, WebdavNsNode.SetPropertyResult spr) throws WebdavException
val - Element defining property to removespr - Holds reult of removing propertyWebdavExceptionpublic boolean setProperty(Element val, WebdavNsNode.SetPropertyResult spr) throws WebdavException
val - Element defining property to setspr - Holds result of setting propertyWebdavExceptionpublic boolean knownProperty(QName tag)
tag - public boolean generatePropertyValue(QName tag, WebdavNsIntf intf, boolean allProp) throws WebdavException
tag - QName defining propertyintf - WebdavNsIntfallProp - true if we're doing allpropWebdavExceptionpublic void init(boolean content)
throws WebdavException
content - boolean flag indicating if this is a content related
property - that is a property which requires fetching
and/or rendering the contentWebdavExceptionpublic boolean isPrincipal()
throws WebdavException
WebdavExceptionpublic Collection<WebdavNsNode.PropertyTagEntry> getPropertyNames() throws WebdavException
WebdavExceptionpublic Collection<QName> getSupportedReports() throws WebdavException
WebdavExceptionpublic void setExists(boolean val)
throws WebdavException
val - boolean true if node existsWebdavExceptionpublic boolean getExists()
throws WebdavException
WebdavExceptionpublic void setUri(String val) throws WebdavException
val - WebdavExceptionpublic String getUri() throws WebdavException
WebdavExceptionpublic String getEncodedUri() throws WebdavException
WebdavExceptionpublic String getEncodedUri(String uri) throws WebdavException
uri - to be encodedWebdavExceptionpublic boolean isCollection()
throws WebdavException
WebdavExceptionpublic void setAllowsGet(boolean val)
throws WebdavException
val - boolean true if node allows getWebdavExceptionpublic boolean getAllowsGet()
throws WebdavException
WebdavExceptionpublic void setStatus(int val)
val - in statuspublic int getStatus()
public void setAlias(boolean val)
throws WebdavException
val - WebdavExceptionpublic boolean getAlias()
throws WebdavException
WebdavExceptionpublic void setTargetUri(String val) throws WebdavException
val - WebdavExceptionpublic String getTargetUri() throws WebdavException
WebdavExceptionpublic WebdavNsIntf.Content getContent(String contentType) throws WebdavException
contentType - WebdavExceptionpublic InputStream getContentStream() throws WebdavException
WebdavExceptionpublic String getContentString(String contentType) throws WebdavException
WebdavExceptionpublic void setDefaults(QName methodTag) throws WebdavException
methodTag - - acts as a flag for the method typeWebdavExceptionpublic abstract String writeContent(org.bedework.util.xml.XmlEmit xml, Writer wtr, String contentType) throws WebdavException
xml - - if this is embedded in an xml streamwtr - - if standalone output or no xml stream initialized.contentType - desired content type or null for default.WebdavExceptionpublic abstract boolean getContentBinary()
throws WebdavException
WebdavExceptionpublic abstract String getContentLang() throws WebdavException
WebdavExceptionpublic abstract long getContentLen()
throws WebdavException
WebdavExceptionpublic abstract String getContentType() throws WebdavException
WebdavExceptionpublic abstract String getCreDate() throws WebdavException
WebdavExceptionpublic abstract String getDisplayname() throws WebdavException
WebdavExceptionpublic abstract String getEtagValue(boolean strong) throws WebdavException
There are weak and strong tags
This methods should return a suitable value for that tag.
strong - WebdavExceptionpublic abstract String getLastmodDate() throws WebdavException
WebdavExceptionpublic abstract org.bedework.access.AccessPrincipal getOwner()
throws WebdavException
WebdavExceptionpublic abstract WdCollection getCollection(boolean deref) throws WebdavException
Move and rename are also targetted at the alias.
Other operations are probably intended to work on the underlying target of the alias.
deref - true if we want to act upon the target of an alias.WebdavExceptionpublic abstract WdCollection getImmediateTargetCollection() throws WebdavException
WebdavExceptionpublic abstract boolean allowsSyncReport()
throws WebdavException
WebdavExceptionpublic abstract boolean getDeleted()
throws WebdavException
WebdavExceptionpublic abstract String getSyncToken() throws WebdavException
WebdavExceptionprotected static void addPropEntry(HashMap<QName,WebdavNsNode.PropertyTagEntry> propertyNames, QName tag)
protected static void addPropEntry(HashMap<QName,WebdavNsNode.PropertyTagEntry> propertyNames, QName tag, boolean inAllProp)
public org.bedework.util.logging.BwLogger getLogger()
getLogger in interface org.bedework.util.logging.LoggedCopyright © 2018 Bedework. All rights reserved.