Class Principal

java.lang.Object
org.apache.jackrabbit.webdav.security.Principal
All Implemented Interfaces:
SecurityConstants, XmlSerializable

public class Principal extends Object implements XmlSerializable, SecurityConstants
Principal encapsulates the DAV:principal element which identifies the principal to which this ACE applies. RFC 3744 defines the following structure for this element:
 <!ELEMENT principal (href | all | authenticated | unauthenticated | property | self)>
 
  • Field Details

  • Method Details

    • getHref

      public String getHref()
      Returns:
      href if this Principal is a href-typed principal, null otherwise.
    • getPropertyName

      public DavPropertyName getPropertyName()
      Returns:
      propertyName if this Principal is a property-principal, null otherwise.
    • toXml

      public Element toXml(Document document)
      Description copied from interface: XmlSerializable
      Returns the xml representation of the implementing object as Element. The given Document is used as factory and represents the owner document of the returned DOM element.
      Specified by:
      toXml in interface XmlSerializable
      Parameters:
      document - to be used as factory.
      Returns:
      a w3c element representing this object
      See Also:
    • getAllPrincipal

      public static Principal getAllPrincipal()
    • getAuthenticatedPrincipal

      public static Principal getAuthenticatedPrincipal()
    • getUnauthenticatedPrincipal

      public static Principal getUnauthenticatedPrincipal()
    • getSelfPrincipal

      public static Principal getSelfPrincipal()
    • getPropertyPrincipal

      public static Principal getPropertyPrincipal(DavPropertyName propertyName)
    • getHrefPrincipal

      public static Principal getHrefPrincipal(String href)
    • createFromXml

      public static Principal createFromXml(Element principalElement) throws DavException
      Throws:
      DavException