Class ResourceType

All Implemented Interfaces:
DavConstants, DavProperty<Set<XmlSerializable>>, PropEntry, XmlSerializable

public class ResourceType extends AbstractDavProperty<Set<XmlSerializable>>
The ResourceType class represents the webdav resource type property. The property may contain multiple resource type values. Predefined resource types are those defined by RFC2518 and RFC3253:
  • Field Details

    • DEFAULT_RESOURCE

      public static final int DEFAULT_RESOURCE
      The default resource type
      See Also:
    • COLLECTION

      public static final int COLLECTION
      The collection resource type
      See Also:
    • VERSION_HISTORY

      public static final int VERSION_HISTORY
      The version-history resource type
      See Also:
    • ACTIVITY

      public static final int ACTIVITY
      The activity resource type
      See Also:
    • BASELINE

      public static final int BASELINE
      The baseline resource type
      See Also:
  • Constructor Details

    • ResourceType

      public ResourceType(int resourceType)
      Create a single-valued resource type property
    • ResourceType

      public ResourceType(int[] resourceTypes)
      Create a multi-valued resource type property
  • Method Details

    • getValue

      public Set<XmlSerializable> getValue()
      Returns a Set of resource types each implementing the XmlSerializable interface.
      Returns:
      a Set of resource types representing this property.
      See Also:
    • getResourceTypes

      public int[] getResourceTypes()
      Returns the resource types specified with the constructor.
      Returns:
      resourceTypes
    • registerResourceType

      public static int registerResourceType(String name, Namespace namespace)
      Register an additional resource type
      Parameters:
      name -
      namespace -
      Returns:
      int to be used for creation of a new ResourceType property that contains this type.
      Throws:
      IllegalArgumentException - if the given element is null or if the registration fails for another reason.