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:
  • 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

      public void setParent(CarddavCollection val)
      Parameters:
      val - CarddavCollection
    • 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 - create date
    • getCreated

      public String getCreated()
      Returns:
      String created
    • setLastmod

      public void setLastmod(String val)
      Parameters:
      val - last modified
    • 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
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • compareTo

      public int compareTo(CarddavResource that)
      Specified by:
      compareTo in interface Comparable<CarddavResource>
    • toString

      public String toString()
      Overrides:
      toString in class Object