Package org.bedework.carddav.server
Class CarddavResource
java.lang.Object
org.bedework.carddav.server.CarddavResource
- All Implemented Interfaces:
Serializable,Comparable<CarddavResource>
Represent a resource stored within the system, e.g an attachment or an
image. The actual content is stored in a BwResourceContent object to allow us
to put off retrieval of content - or maybe even store outside of the db.
- Author:
- Mike Douglass douglm - rpi.edu
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(CarddavResource that) Get the contentlongGet the lengthGet the valueTypeGet the encodinggetName()Get the nameorg.bedework.access.AccessPrincipalgetOwner()Get the resource's previous lastmod - used to allow if none matchintGet the event's previous seq - used to allow if none matchintGet the sequenceinthashCode()voidSet the contentvoidsetContentLength(long val) Set the lengthvoidsetContentType(String val) Set the contentType - may be null for unknownvoidsetCreated(String val) voidsetEncoding(String val) Set the encodingvoidsetLastmod(String val) voidSet the namevoidsetOwner(org.bedework.access.AccessPrincipal val) voidvoidsetPrevLastmod(String val) Set the resource's previous lastmod - used to allow if none matchvoidsetPrevSeq(int val) Set the event's previous seq - used to allow if none matchvoidsetSequence(int val) Set the sequencetoString()voidUpdate last mod fields
-
Constructor Details
-
CarddavResource
public CarddavResource()Constructor
-
-
Method Details
-
setOwner
public void setOwner(org.bedework.access.AccessPrincipal val) - Parameters:
val- owner principal
-
getOwner
public org.bedework.access.AccessPrincipal getOwner()- Returns:
- AccessPrincipal
-
setParent
- Parameters:
val- CarddavCollection
-
getParent
- Returns:
- CarddavCollection
-
setName
Set the name- Parameters:
val- String name
-
getName
Get the name- Returns:
- String name
-
setCreated
- Parameters:
val- create date
-
getCreated
- Returns:
- String created
-
setLastmod
- Parameters:
val- last modified
-
getLastmod
- Returns:
- String lastmod
-
setSequence
public void setSequence(int val) Set the sequence- Parameters:
val- sequence number
-
getSequence
public int getSequence()Get the sequence- Returns:
- int the sequence
-
setContentType
Set the contentType - may be null for unknown- Parameters:
val- String contentType
-
getContentType
Get the valueType- Returns:
- String contentType
-
setEncoding
Set the encoding- Parameters:
val- String encoding
-
getEncoding
Get the encoding- Returns:
- String encoding
-
setContentLength
public void setContentLength(long val) Set the length- Parameters:
val- long
-
getContentLength
public long getContentLength()Get the length- Returns:
- long length
-
updateLastmod
public void updateLastmod()Update last mod fields -
setPrevLastmod
Set the resource's previous lastmod - used to allow if none match- Parameters:
val- lastmod
-
getPrevLastmod
Get the resource's previous lastmod - used to allow if none match- Returns:
- the event's lastmod
-
setPrevSeq
public void setPrevSeq(int val) Set the event's previous seq - used to allow if none match- Parameters:
val- sequence number
-
getPrevSeq
public int getPrevSeq()Get the event's previous seq - used to allow if none match- Returns:
- the event's seq
-
setContent
Set the content- Parameters:
val- BwResourceContent
-
getContent
Get the content- Returns:
- BwResourceContent content
-
hashCode
public int hashCode() -
compareTo
- Specified by:
compareToin interfaceComparable<CarddavResource>
-
toString
-