Class WebdavPrincipalNode

java.lang.Object
org.bedework.webdav.servlet.shared.WebdavNsNode
org.bedework.webdav.servlet.shared.WebdavPrincipalNode
All Implemented Interfaces:
Serializable, org.bedework.util.logging.Logged

public class WebdavPrincipalNode extends WebdavNsNode
Class to represent a principal in webdav.
Author:
Mike Douglass douglm rpi.edu
See Also:
  • Constructor Details

    • WebdavPrincipalNode

      public WebdavPrincipalNode(WdSysIntf sysi, UrlHandler urlHandler, String path, org.bedework.access.AccessPrincipal account, boolean collection, String uri)
      Parameters:
      sysi - system interface
      urlHandler - - needed for building hrefs.
      path - - resource path
      account - - the principal
      collection - - true if this is a collection
      uri - of request
  • Method Details

    • getOwner

      public org.bedework.access.AccessPrincipal getOwner()
      Description copied from class: WebdavNsNode
      Should return a value suitable for WebdavNsIntf.makeUserHref
      Specified by:
      getOwner in class WebdavNsNode
      Returns:
      AccessPrincipal owner
    • update

      public void update()
      Description copied from class: WebdavNsNode
      Update this node after changes.
      Specified by:
      update in class WebdavNsNode
    • getCurrentAccess

      public org.bedework.access.CurrentAccess getCurrentAccess()
      Description copied from class: WebdavNsNode
      Get the current access granted to this principal for this node.
      Specified by:
      getCurrentAccess in class WebdavNsNode
      Returns:
      CurrentAccess
    • getEtagValue

      public String getEtagValue(boolean strong)
      Description copied from class: WebdavNsNode
      Entity tags are defined in RFC2068 - they are supposed to provide some sort of indication the data has changed - e.g. a checksum.

      There are weak and strong tags

      This methods should return a suitable value for that tag.

      Specified by:
      getEtagValue in class WebdavNsNode
      Returns:
      String
    • trailSlash

      public boolean trailSlash()
      Description copied from class: WebdavNsNode
      Trailing "/" on uri?
      Specified by:
      trailSlash in class WebdavNsNode
      Returns:
      boolean
    • getChildren

      public Collection<? extends WdEntity<?>> getChildren(Supplier<Object> filterGetter)
      Description copied from class: WebdavNsNode
      Return a collection of children objects. For example, this is object represents a folder, they may be file objects or a mix of file and folder objects. These are not node objects.

      Default is to return null

      Specified by:
      getChildren in class WebdavNsNode
      Parameters:
      filterGetter - non-null if there is a filter
      Returns:
      Collection of children
    • getCollection

      public WdCollection<?> getCollection(boolean deref)
      Description copied from class: WebdavNsNode
      The node may refer to a collection object which may in fact be an alias to another. For deletions we want to remove the alias itself.

      Move and rename are also targetted at the alias.

      Other operations are probably intended to work on the underlying target of the alias.

      Specified by:
      getCollection in class WebdavNsNode
      Parameters:
      deref - true if we want to act upon the target of an alias.
      Returns:
      Collection this node represents
    • getImmediateTargetCollection

      public WdCollection<?> getImmediateTargetCollection()
      Specified by:
      getImmediateTargetCollection in class WebdavNsNode
    • allowsSyncReport

      public boolean allowsSyncReport()
      Specified by:
      allowsSyncReport in class WebdavNsNode
      Returns:
      true if this node allows a sync-report.
    • getDeleted

      public boolean getDeleted()
      Specified by:
      getDeleted in class WebdavNsNode
      Returns:
      true if this represents a deleted resource.
    • getSyncToken

      public String getSyncToken()
      Specified by:
      getSyncToken in class WebdavNsNode
      Returns:
      String sync-token, a URI
    • writeContent

      public String writeContent(org.bedework.util.xml.XmlEmit xml, Writer wtr, String contentType)
      Description copied from class: WebdavNsNode
      Called during xml emission to write the content for the node.
      Specified by:
      writeContent in class WebdavNsNode
      Parameters:
      xml - - if this is embedded in an xml stream
      wtr - - if standalone output or no xml stream initialized.
      contentType - desired content type or null for default.
      Returns:
      actual contentType
    • getContentBinary

      public boolean getContentBinary()
      Specified by:
      getContentBinary in class WebdavNsNode
      Returns:
      boolean true if this is binary content
    • getContentLang

      public String getContentLang()
      Specified by:
      getContentLang in class WebdavNsNode
      Returns:
      String lang
    • getContentLen

      public long getContentLen()
      Specified by:
      getContentLen in class WebdavNsNode
      Returns:
      long content length
    • getContentType

      public String getContentType()
      Description copied from class: WebdavNsNode
      A content type of null implies no content (or we don't know)
      Specified by:
      getContentType in class WebdavNsNode
      Returns:
      String content type
    • getCreDate

      public String getCreDate()
      Specified by:
      getCreDate in class WebdavNsNode
      Returns:
      String credate
    • getDisplayname

      public String getDisplayname()
      Specified by:
      getDisplayname in class WebdavNsNode
      Returns:
      String name
    • getLastmodDate

      public String getLastmodDate()
      Specified by:
      getLastmodDate in class WebdavNsNode
      Returns:
      String last mod date
    • removeProperty

      public boolean removeProperty(Element val, WebdavNsNode.SetPropertyResult spr)
      Description copied from class: WebdavNsNode
      Remove the given property for this node.
      Overrides:
      removeProperty in class WebdavNsNode
      Parameters:
      val - Element defining property to remove
      spr - Holds reult of removing property
      Returns:
      boolean true if property recognized.
    • setProperty

      public boolean setProperty(Element val, WebdavNsNode.SetPropertyResult spr)
      Description copied from class: WebdavNsNode
      Set the given property for this node.
      Overrides:
      setProperty in class WebdavNsNode
      Parameters:
      val - Element defining property to set
      spr - Holds result of setting property
      Returns:
      boolean true if property recognized and processed.
    • knownProperty

      public boolean knownProperty(QName tag)
      Description copied from class: WebdavNsNode
      Return true if a call to generatePropertyValue will return a value.
      Overrides:
      knownProperty in class WebdavNsNode
      Returns:
      boolean
    • generatePropertyValue

      public boolean generatePropertyValue(QName tag, WebdavNsIntf intf, boolean allProp)
      Description copied from class: WebdavNsNode
      Emit the property indicated by the tag.
      Overrides:
      generatePropertyValue in class WebdavNsNode
      Parameters:
      tag - QName defining property
      intf - WebdavNsIntf
      allProp - true if we're doing allprop
      Returns:
      boolean true if emitted
    • getLogger

      public org.bedework.util.logging.BwLogger getLogger()
      Specified by:
      getLogger in interface org.bedework.util.logging.Logged
      Overrides:
      getLogger in class WebdavNsNode