return new DefaultDavProperty<List<XmlSerializable>>(localName, val, ItemResourceConstants.NAMESPACE, false);
}
private Set<String> getDavComplianceClasses(SessionInfo sessionInfo) throws RepositoryException {
if (this.remoteDavComplianceClasses == null) {
OptionsMethod method = new OptionsMethod(uriResolver.getWorkspaceUri(sessionInfo.getWorkspaceName()));
try {
getClient(sessionInfo).executeMethod(method);
method.checkSuccess();
Header davHeader = method.getResponseHeader("DAV");
if (davHeader!= null) {
// TODO: think about coded-URLs containing a comma
String[] classes = davHeader.getValue().split(",");
this.remoteDavComplianceClasses = new HashSet<String>();
for (String c : classes) {
this.remoteDavComplianceClasses.add(c.trim());
}
}
} catch (IOException e) {
throw new RepositoryException(e);
} catch (DavException e) {
throw ExceptionConverter.generate(e);
} finally {
method.releaseConnection();
}
}
return this.remoteDavComplianceClasses;
}