Class Principal
- java.lang.Object
-
- org.apache.jackrabbit.webdav.security.Principal
-
- All Implemented Interfaces:
SecurityConstants,XmlSerializable
public class Principal extends java.lang.Object implements XmlSerializable, SecurityConstants
Principalencapsulates 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 Summary
Fields Modifier and Type Field Description static java.lang.StringXML_PRINCIPAL-
Fields inherited from interface org.apache.jackrabbit.webdav.security.SecurityConstants
ACL, ACL_RESTRICTIONS, ALTERNATE_URI_SET, CURRENT_USER_PRIVILEGE_SET, GROUP, GROUP_MEMBER_SET, GROUP_MEMBERSHIP, INHERITED_ACL_SET, NAMESPACE, OWNER, PRINCIPAL_COLLECTION_SET, PRINCIPAL_RESOURCETYPE, PRINCIPAL_URL, SUPPORTED_PRIVILEGE_SET
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PrincipalcreateFromXml(org.w3c.dom.Element principalElement)static PrincipalgetAllPrincipal()static PrincipalgetAuthenticatedPrincipal()java.lang.StringgetHref()static PrincipalgetHrefPrincipal(java.lang.String href)DavPropertyNamegetPropertyName()static PrincipalgetPropertyPrincipal(DavPropertyName propertyName)static PrincipalgetSelfPrincipal()static PrincipalgetUnauthenticatedPrincipal()org.w3c.dom.ElementtoXml(org.w3c.dom.Document document)Returns the xml representation of the implementing object asElement.
-
-
-
Field Detail
-
XML_PRINCIPAL
public static final java.lang.String XML_PRINCIPAL
- See Also:
- Constant Field Values
-
-
Method Detail
-
getHref
public java.lang.String getHref()
- Returns:
- href if this Principal is a href-typed principal,
nullotherwise.
-
getPropertyName
public DavPropertyName getPropertyName()
- Returns:
- propertyName if this Principal is a property-principal,
nullotherwise.
-
toXml
public org.w3c.dom.Element toXml(org.w3c.dom.Document document)
Description copied from interface:XmlSerializableReturns the xml representation of the implementing object asElement. The givenDocumentis used as factory and represents theowner documentof the returned DOM element.- Specified by:
toXmlin interfaceXmlSerializable- Parameters:
document- to be used as factory.- Returns:
- a w3c element representing this object
- See Also:
XmlSerializable.toXml(Document)
-
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(java.lang.String href)
-
createFromXml
public static Principal createFromXml(org.w3c.dom.Element principalElement) throws DavException
- Throws:
DavException
-
-