/** * Retrieves the property with the specified <code>name</code> and the * default WebDAV {@link org.apache.jackrabbit.webdav.DavConstants#NAMESPACE namespace}. * * @param name The name of the property to retrieve * * @return The desired property or <code>null</code> */ public DavProperty<?> get(String name) { return get(DavPropertyName.create(name)); }
public void setContentLength(long contentLength) { if (contentLength > IOUtil.UNDEFINED_LENGTH) { properties.add(new DefaultDavProperty<String>(DavPropertyName.GETCONTENTLENGTH, contentLength + "")); } }
/** * Removes the property with the specified <code>name</code> and * <code>namespace</code> from this set. * * @param name The name of the property to remove * @param namespace The namespace of the property to remove * * @return The removed property or <code>null</code> */ public DavProperty<?> remove(String name, Namespace namespace) { return remove(DavPropertyName.create(name, namespace)); }
DavProperty getProperty(final URLFileName fileName, final DavPropertyName name) throws FileSystemException { final DavPropertyNameSet nameSet = new DavPropertyNameSet(); nameSet.add(name); final DavPropertySet propertySet = getProperties(fileName, nameSet, false); return propertySet.get(name); }
@Override public MultiStatusResponse alterProperties(DavPropertySet setProperties, DavPropertyNameSet removePropertyNames) throws DavException { getProperties().addAll(setProperties); DavPropertyNameIterator it = removePropertyNames.iterator(); while (it.hasNext()) { removeProperty(it.nextPropertyName()); } return createPropStat(); }
/** * Creates a new <code>DavPropertyName</code> with the given local name * and the default WebDAV {@link DavConstants#NAMESPACE namespace}. * * @param name The local name of the new property name * * @return The WebDAV property name */ public synchronized static DavPropertyName create(String name) { return create(name, NAMESPACE); }
/** * Create a new <code>DavPropertyNameSet</code> with the given initial values. * * @param initialSet */ public DavPropertyNameSet(DavPropertyNameSet initialSet) { addAll(initialSet); }
/** * Returns an iterator over all those property in this set, that have the * indicated <code>namespace</code>. * * @param namespace The namespace of the property in the iteration. * * @return An iterator over {@link DavProperty}. */ public DavPropertyIterator iterator(Namespace namespace) { return new PropIter(namespace); }
/** * Retrieves the property with the specified <code>name</code> and the * default WebDAV {@link org.apache.jackrabbit.webdav.DavConstants#NAMESPACE namespace}. * * @param name The name of the property to retrieve * * @return The desired property or <code>null</code> */ public DavProperty<?> get(String name) { return get(DavPropertyName.create(name)); }
public void setContentLanguage(String contentLanguage) { if (contentLanguage != null) { properties.add(new DefaultDavProperty<String>(DavPropertyName.GETCONTENTLANGUAGE, contentLanguage)); } }
/** * Removes the property with the specified <code>name</code> and the * default WebDAV {@link org.apache.jackrabbit.webdav.DavConstants#NAMESPACE namespace}. * * @param name The name of the property to remove * * @return The removed property or <code>null</code> */ public DavProperty<?> remove(String name) { return remove(DavPropertyName.create(name)); }
/** * Retrieves the property with the specified <code>name</code> and * <code>namespace</code>. * * @param name The name of the property to retrieve * @param namespace The namespace of the property to retrieve * * @return The desired property or <code>null</code> */ public DavProperty get(String name, Namespace namespace) { return get(DavPropertyName.create(name, namespace)); }
public void setETag(String etag) { if (etag != null) { properties.add(new DefaultDavProperty<String>(DavPropertyName.GETETAG, etag)); } }
/** * Removes the property with the specified <code>name</code> and * <code>namespace</code> from this set. * * @param name The name of the property to remove * @param namespace The namespace of the property to remove * * @return The removed property or <code>null</code> */ public DavProperty<?> remove(String name, Namespace namespace) { return remove(DavPropertyName.create(name, namespace)); }
/** * Retrieves the property with the specified <code>name</code> and * <code>namespace</code>. * * @param name The name of the property to retrieve * @param namespace The namespace of the property to retrieve * * @return The desired property or <code>null</code> */ public DavProperty<?> get(String name, Namespace namespace) { return get(DavPropertyName.create(name, namespace)); }
/** * Removes the property with the specified <code>name</code> and the * default WebDAV {@link org.apache.jackrabbit.webdav.DavConstants#NAMESPACE namespace}. * * @param name The name of the property to remove * * @return The removed property or <code>null</code> */ public DavProperty remove(String name) { return remove(DavPropertyName.create(name)); }
/** * Retrieves the property with the specified <code>name</code> and the * default WebDAV {@link org.apache.jackrabbit.webdav.DavConstants#NAMESPACE namespace}. * * @param name The name of the property to retrieve * * @return The desired property or <code>null</code> */ public DavProperty get(String name) { return get(DavPropertyName.create(name)); }
/** * Removes the property with the specified <code>name</code> and * <code>namespace</code> from this set. * * @param name The name of the property to remove * @param namespace The namespace of the property to remove * * @return The removed property or <code>null</code> */ public DavProperty remove(String name, Namespace namespace) { return remove(DavPropertyName.create(name, namespace)); }
/** * Retrieves the property with the specified <code>name</code> and * <code>namespace</code>. * * @param name The name of the property to retrieve * @param namespace The namespace of the property to retrieve * * @return The desired property or <code>null</code> */ public DavProperty<?> get(String name, Namespace namespace) { return get(DavPropertyName.create(name, namespace)); }
/** * Removes the property with the specified <code>name</code> and the * default WebDAV {@link org.apache.jackrabbit.webdav.DavConstants#NAMESPACE namespace}. * * @param name The name of the property to remove * * @return The removed property or <code>null</code> */ public DavProperty<?> remove(String name) { return remove(DavPropertyName.create(name)); }