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()
- Returns:
- true if this can be shared.
-
getCanPublish
public abstract boolean getCanPublish()
- Returns:
- true if this can be published.
-
isAlias
public abstract boolean isAlias()
- Returns:
- true if this is an alias for another entity.
-
getAliasUri
public abstract String getAliasUri()
- Returns:
- null if this is not an alias otherwise the uri of the target
-
resolveAlias
public abstract T resolveAlias(boolean resolveSubAlias)
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.
-
setProperty
public abstract void setProperty(QName name, String val)
set/replace properties with the given name and value- Parameters:
name- of propertyval- of property
-
getProperty
public abstract String getProperty(QName name)
- Parameters:
name- of property- Returns:
- null if not set otherwise value of first property found with name
-
setName
public void setName(String val)
Set the name- Parameters:
val- String name
-
getName
public String getName()
Get the name- Returns:
- String name
-
setDisplayName
public void setDisplayName(String val)
Set the display name- Parameters:
val- String display name
-
getDisplayName
public String getDisplayName()
Get the display name- Returns:
- String display name
-
setPath
public void setPath(String val)
Set the path to this collection- Parameters:
val- String path
-
getPath
public String getPath()
Get the path- Returns:
- String path
-
setParentPath
public void setParentPath(String val)
Set the path to this collection- Parameters:
val- String path
-
getParentPath
public String getParentPath()
Get the path- Returns:
- String path
-
setOwner
public void setOwner(org.bedework.access.AccessPrincipal val)
- Parameters:
val- AccessPrincipal
-
getOwner
public org.bedework.access.AccessPrincipal getOwner()
- Returns:
- AccessPrincipal
-
setCreated
public void setCreated(String val)
- Parameters:
val- create date
-
getCreated
public String getCreated()
- Returns:
- String created
-
setLastmod
public void setLastmod(String val)
- Parameters:
val- lastmod
-
getLastmod
public String getLastmod()
- Returns:
- String lastmod
-
getEtag
public abstract String getEtag()
Get the current etag value- Returns:
- String the etag
-
getPreviousEtag
public abstract String getPreviousEtag()
Get the etag value before any changes were applied- Returns:
- String the etag
-
setDescription
public void setDescription(String val)
Set the description- Parameters:
val- String description
-
getDescription
public String getDescription()
Get the description- Returns:
- String description
-
toStringSegment
public void toStringSegment(org.bedework.util.misc.ToString ts)
- Parameters:
ts- ToString object
-
compareTo
public int compareTo(WdEntity that)
- Specified by:
compareToin interfaceComparable<T>
-
-