Package org.bedework.carddav.server
Class CarddavResource
- java.lang.Object
-
- org.bedework.carddav.server.CarddavResource
-
- All Implemented Interfaces:
Serializable,Comparable<CarddavResource>
public class CarddavResource extends Object implements Comparable<CarddavResource>, Serializable
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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CarddavResource()Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(CarddavResource that)CarddavResourceContentgetContent()Get the contentlonggetContentLength()Get the lengthStringgetContentType()Get the valueTypeStringgetCreated()StringgetEncoding()Get the encodingStringgetLastmod()StringgetName()Get the nameorg.bedework.access.AccessPrincipalgetOwner()CarddavCollectiongetParent()StringgetPrevLastmod()Get the resource's previous lastmod - used to allow if none matchintgetPrevSeq()Get the event's previous seq - used to allow if none matchintgetSequence()Get the sequenceinthashCode()voidsetContent(CarddavResourceContent val)Set 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)voidsetName(String val)Set the namevoidsetOwner(org.bedework.access.AccessPrincipal val)voidsetParent(CarddavCollection val)voidsetPrevLastmod(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 sequenceStringtoString()voidupdateLastmod()Update last mod fields
-
-
-
Method Detail
-
setOwner
public void setOwner(org.bedework.access.AccessPrincipal val)
- Parameters:
val-
-
getOwner
public org.bedework.access.AccessPrincipal getOwner()
- Returns:
- AccessPrincipal
-
setParent
public void setParent(CarddavCollection val)
- Parameters:
val-
-
getParent
public CarddavCollection getParent()
- Returns:
- CarddavCollection
-
setName
public void setName(String val)
Set the name- Parameters:
val- String name
-
getName
public String getName()
Get the name- Returns:
- String name
-
setCreated
public void setCreated(String val)
- Parameters:
val-
-
getCreated
public String getCreated()
- Returns:
- String created
-
setLastmod
public void setLastmod(String val)
- Parameters:
val-
-
getLastmod
public String 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
public void setContentType(String val)
Set the contentType - may be null for unknown- Parameters:
val- String contentType
-
getContentType
public String getContentType()
Get the valueType- Returns:
- String contentType
-
setEncoding
public void setEncoding(String val)
Set the encoding- Parameters:
val- String encoding
-
getEncoding
public String 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
public void setPrevLastmod(String val)
Set the resource's previous lastmod - used to allow if none match- Parameters:
val- lastmod
-
getPrevLastmod
public String 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
public void setContent(CarddavResourceContent val)
Set the content- Parameters:
val- BwResourceContent
-
getContent
public CarddavResourceContent getContent()
Get the content- Returns:
- BwResourceContent content
-
compareTo
public int compareTo(CarddavResource that)
- Specified by:
compareToin interfaceComparable<CarddavResource>
-
-