All Implemented Interfaces:
Serializable, Comparable<DbCard>, org.bedework.util.logging.Logged, org.bedework.webdav.servlet.access.SharedEntity

public class DbCard extends DbNamedEntity<DbCard>
A representation of a vcard and properties for database persistance in cardDAV
Author:
douglm
See Also:
  • Constructor Details

    • DbCard

      public DbCard()
      Create DbCard with a new embedded VCard
    • DbCard

      public DbCard(String fn)
      Create DbCard with new card
      Parameters:
      fn - full name
    • DbCard

      public DbCard(net.fortuna.ical4j.vcard.VCard vcard)
      Create DbCard with supplied vcard
      Parameters:
      vcard - the card
  • Method Details

    • setFn

      public void setFn(String val)
      Set the fn
      Parameters:
      val - String fn
    • getFn

      public String getFn()
      Get the name
      Returns:
      String name
    • setUid

      public void setUid(String val)
      Parameters:
      val - uid
    • getUid

      public String getUid()
      Returns:
      String
    • setKind

      public void setKind(String val)
      Parameters:
      val - kind
    • getKind

      public String getKind()
      Returns:
      String
    • setProperties

      public void setProperties(List<DbCardProperty> val)
      Parameters:
      val - list of properties
    • getProperties

      public List<DbCardProperty> getProperties()
      Returns:
      DbCardProperty list
    • setStrForm

      public void setStrForm(String val)
      Set the string form of the card
      Parameters:
      val - String
    • getStrForm

      public String getStrForm()
      Get the name
      Returns:
      String name
    • setLastmod

      public void setLastmod(String val)
      Parameters:
      val - lastmod
    • getLastmod

      public String getLastmod()
      Returns:
      String
    • getPrevLastmod

      public String getPrevLastmod()
      Lastmod before any changes were made
      Returns:
      String
    • addProperty

      public void addProperty(net.fortuna.ical4j.vcard.Property val)
      Parameters:
      val - a property
    • findProperty

      public net.fortuna.ical4j.vcard.Property findProperty(net.fortuna.ical4j.vcard.Property.Id id)
      Parameters:
      id - of property
      Returns:
      property or null
    • findProperty

      public net.fortuna.ical4j.vcard.Property findProperty(String name)
      Parameters:
      name - of property
      Returns:
      property or null
    • findProperties

      public List<net.fortuna.ical4j.vcard.Property> findProperties(String name)
      Parameters:
      name - of property
      Returns:
      property or null
    • setVcard

      public void setVcard(net.fortuna.ical4j.vcard.VCard val)
      Parameters:
      val - the card
    • getVcard

      public net.fortuna.ical4j.vcard.VCard getVcard()
      Returns:
      vcard or null
    • parse

      public void parse(Reader rdr)
      Parameters:
      rdr - card reader
    • output

      public String output()
      Returns:
      String
    • isCollection

      public boolean isCollection()
    • setAccessState

      public void setAccessState(org.bedework.webdav.servlet.access.AccessState val)
    • getAccessState

      public org.bedework.webdav.servlet.access.AccessState getAccessState()
    • setDtstamps

      public void setDtstamps()
      Set the lastmod and created if created is not set already.
    • compareTo

      public int compareTo(DbCard that)
      Specified by:
      compareTo in interface Comparable<DbCard>
      Overrides:
      compareTo in class UnversionedDbentity<DbCard>
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class UnversionedDbentity<DbCard>
    • toString

      public String toString()
      Overrides:
      toString in class Object