* @param optionsInfo
* @return object to be used in the OPTIONS response body or <code>null</code>
* @see DeltaVResource#getOptionResponse(org.apache.jackrabbit.webdav.version.OptionsInfo)
*/
public OptionsResponse getOptionResponse(OptionsInfo optionsInfo) {
OptionsResponse oR = null;
if (optionsInfo != null) {
oR = new OptionsResponse();
// currently only DAV:version-history-collection-set and
// DAV:workspace-collection-set is supported.
if (optionsInfo.containsElement(DeltaVConstants.XML_VH_COLLECTION_SET, DeltaVConstants.NAMESPACE)) {
String[] hrefs = new String[] {
getLocatorFromItemPath(ItemResourceConstants.VERSIONSTORAGE_PATH).getHref(true)
};
oR.addEntry(DeltaVConstants.XML_VH_COLLECTION_SET, DeltaVConstants.NAMESPACE, hrefs);
}
if (optionsInfo.containsElement(DeltaVConstants.XML_WSP_COLLECTION_SET, DeltaVConstants.NAMESPACE)) {
// workspaces cannot be created anywhere.
oR.addEntry(DeltaVConstants.XML_WSP_COLLECTION_SET, DeltaVConstants.NAMESPACE, new String[0]);
}
}
return oR;
}