content.retrieve( sToken, wrpath );
NodeRevisionDescriptor wrpathNrd =
content.retrieve( sToken, wrpathNrds );
NodeProperty nextWrnProp = wrpathNrd.getProperty(I_NEXT_WORKINGRESOURCE_NAME,
NamespaceCache.SLIDE_URI);
if (nextWrnProp == null) {
// convert to slide namespace if this property is still
// in DAV: namespace
nextWrnProp = wrpathNrd.getProperty( I_NEXT_WORKINGRESOURCE_NAME );
if (nextWrnProp != null) {
wrpathNrd.removeProperty(nextWrnProp);
nextWrnProp = new NodeProperty(I_NEXT_WORKINGRESOURCE_NAME,
nextWrnProp.getValue(),
NamespaceCache.SLIDE_URI);
nextWrnProp.setKind( NodeProperty.Kind.PROTECTED );
wrpathNrd.setProperty( nextWrnProp );
}
}
if( nextWrnProp == null || nextWrnProp.getValue() == null ) {
nextWrnProp =
new NodeProperty(I_NEXT_WORKINGRESOURCE_NAME,
I_INITIAL_WORKINGRESOURCE_NAME,
NamespaceCache.SLIDE_URI );
nextWrnProp.setKind( NodeProperty.Kind.PROTECTED );
wrpathNrd.setProperty( nextWrnProp );
}
String nextWrnStr = (String)nextWrnProp.getValue();
result = new UriHandler( wrpath+"/"+nextWrnStr );
long nextWrnLong = Long.parseLong( nextWrnStr );
nextWrnProp = new NodeProperty(I_NEXT_WORKINGRESOURCE_NAME,
String.valueOf(nextWrnLong + 1),
NamespaceCache.SLIDE_URI );
wrpathNrd.setProperty( nextWrnProp );
content.store( sToken, wrpath, wrpathNrd, null ); //revisionContent = null