Class WdEntity<T>
- java.lang.Object
-
- org.bedework.webdav.servlet.shared.WdEntity<T>
-
- Type Parameters:
T-
- All Implemented Interfaces:
Comparable<WdEntity>
- Direct Known Subclasses:
WdCollection
public abstract class WdEntity<T> extends Object implements Comparable<WdEntity>
Class to represent an entity in WebDAV- Author:
- douglm
-
-
Constructor Summary
Constructors Constructor Description WdEntity()Constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description intcompareTo(WdEntity that)abstract StringgetAliasUri()abstract booleangetCanPublish()abstract booleangetCanShare()StringgetCreated()StringgetDescription()Get the descriptionStringgetDisplayName()Get the display nameabstract StringgetEtag()Get the current etag valueStringgetLastmod()StringgetName()Get the nameorg.bedework.access.AccessPrincipalgetOwner()StringgetParentPath()Get the pathStringgetPath()Get the pathabstract StringgetPreviousEtag()Get the etag value before any changes were appliedabstract StringgetProperty(QName name)inthashCode()abstract booleanisAlias()abstract TresolveAlias(boolean resolveSubAlias)If isAlias() then resolves the alias.voidsetCreated(String val)voidsetDescription(String val)Set the descriptionvoidsetDisplayName(String val)Set the display namevoidsetLastmod(String val)voidsetName(String val)Set the namevoidsetOwner(org.bedework.access.AccessPrincipal val)voidsetParentPath(String val)Set the path to this collectionvoidsetPath(String val)Set the path to this collectionabstract voidsetProperty(QName name, String val)set/replace properties with the given name and valueStringtoString()voidtoStringSegment(org.bedework.util.misc.ToString ts)
-
-
-
Method Detail
-
getCanShare
public abstract boolean getCanShare() throws WebdavException- Returns:
- true if this can be shared.
- Throws:
WebdavException
-
getCanPublish
public abstract boolean getCanPublish() throws WebdavException- Returns:
- true if this can be published.
- Throws:
WebdavException
-
isAlias
public abstract boolean isAlias() throws WebdavException- Returns:
- true if this is an alias for another entity.
- Throws:
WebdavException
-
getAliasUri
public abstract String getAliasUri() throws WebdavException
- Returns:
- null if this is not an alias otherwise the uri of the target
- Throws:
WebdavException
-
resolveAlias
public abstract T resolveAlias(boolean resolveSubAlias) throws WebdavException
If isAlias() then resolves the alias. Otherwise just returns the parameter.- Parameters:
resolveSubAlias- - if true and the alias points to an alias, resolve down to a non-alias.- Returns:
- WdEntity or null.
- Throws:
WebdavException
-
setProperty
public abstract void setProperty(QName name, String val) throws WebdavException
set/replace properties with the given name and value- Parameters:
name-val-- Throws:
WebdavException
-
getProperty
public abstract String getProperty(QName name) throws WebdavException
- Parameters:
name-- Returns:
- null if not set otherwise value of first property found with name
- Throws:
WebdavException
-
setName
public void setName(String val) throws WebdavException
Set the name- Parameters:
val- String name- Throws:
WebdavException
-
getName
public String getName() throws WebdavException
Get the name- Returns:
- String name
- Throws:
WebdavException
-
setDisplayName
public void setDisplayName(String val) throws WebdavException
Set the display name- Parameters:
val- String display name- Throws:
WebdavException
-
getDisplayName
public String getDisplayName() throws WebdavException
Get the display name- Returns:
- String display name
- Throws:
WebdavException
-
setPath
public void setPath(String val) throws WebdavException
Set the path to this collection- Parameters:
val- String path- Throws:
WebdavException
-
getPath
public String getPath() throws WebdavException
Get the path- Returns:
- String path
- Throws:
WebdavException
-
setParentPath
public void setParentPath(String val) throws WebdavException
Set the path to this collection- Parameters:
val- String path- Throws:
WebdavException
-
getParentPath
public String getParentPath() throws WebdavException
Get the path- Returns:
- String path
- Throws:
WebdavException
-
setOwner
public void setOwner(org.bedework.access.AccessPrincipal val) throws WebdavException- Parameters:
val-- Throws:
WebdavException
-
getOwner
public org.bedework.access.AccessPrincipal getOwner() throws WebdavException- Returns:
- AccessPrincipal
- Throws:
WebdavException
-
setCreated
public void setCreated(String val) throws WebdavException
- Parameters:
val-- Throws:
WebdavException
-
getCreated
public String getCreated() throws WebdavException
- Returns:
- String created
- Throws:
WebdavException
-
setLastmod
public void setLastmod(String val) throws WebdavException
- Parameters:
val-- Throws:
WebdavException
-
getLastmod
public String getLastmod() throws WebdavException
- Returns:
- String lastmod
- Throws:
WebdavException
-
getEtag
public abstract String getEtag() throws WebdavException
Get the current etag value- Returns:
- String the etag
- Throws:
WebdavException
-
getPreviousEtag
public abstract String getPreviousEtag() throws WebdavException
Get the etag value before any changes were applied- Returns:
- String the etag
- Throws:
WebdavException
-
setDescription
public void setDescription(String val) throws WebdavException
Set the description- Parameters:
val- String description- Throws:
WebdavException
-
getDescription
public String getDescription() throws WebdavException
Get the description- Returns:
- String description
- Throws:
WebdavException
-
toStringSegment
public void toStringSegment(org.bedework.util.misc.ToString ts)
- Parameters:
ts-
-
compareTo
public int compareTo(WdEntity that)
- Specified by:
compareToin interfaceComparable<T>
-
-