All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.jackrabbit.webdav.property.DavProperty Maven / Gradle / Ivy

/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.apache.jackrabbit.webdav.property;

import org.apache.jackrabbit.webdav.DavConstants;
import org.apache.jackrabbit.webdav.xml.XmlSerializable;

/**
 * The Property class represents a Property of a WebDAV
 * resource. The {@link Object#hashCode()} and {@link Object#equals(Object)} methods are
 * overridden in a way, such that the name and value of the property are
 * respected. This means, a property is equal to another if the names
 * and values are equal.
* The XML representation of a DavProperty: *
 * new DavProperty("displayname", "WebDAV Directory").toXml
 * gives a element like:
 * <D:displayname>WebDAV Directory</D:displayname>
 *
 * new DavProperty("resourcetype", new Element("collection")).toXml
 * gives a element like:
 * <D:resourcetype><D:collection/></D:resourcetype>
 *
 * Element[] customVals = { new Element("bla", customNamespace), new Element("bli", customNamespace) };
 * new DavProperty("custom-property", customVals, customNamespace).toXml
 * gives an element like
 * <Z:custom-property>
 *    <Z:bla/>
 *    <Z:bli/>
 * </Z:custom-property>
 * 
*/ public interface DavProperty extends XmlSerializable, DavConstants, PropEntry { /** * Returns the name of this property * * @return the name of this property */ public DavPropertyName getName(); /** * Returns the value of this property * * @return the value of this property */ public T getValue(); /** * Return true if this property should be suppressed * in a PROPFIND/{@link DavConstants#PROPFIND_ALL_PROP DAV:allprop} * response. See RFC 4918, Section 9.1. * * @return true, if this property should be suppressed in a PROPFIND/allprop response */ public boolean isInvisibleInAllprop(); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy