Merged V2.0 to HEAD

5497: cwd variable and forminstancedata
   5512: AR-1303 MLPropertyInterceptor
   5527: CIFS invalid characters


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5543 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2007-04-25 02:13:55 +00:00
parent 766c19b128
commit a85bc773c3
5 changed files with 71 additions and 11 deletions

View File

@@ -216,8 +216,10 @@ public class MLPropertyInterceptor implements MethodInterceptor
NodeRef nodeRef = (NodeRef) args[0];
QName propertyQName = (QName) args[1];
Serializable inboundValue = (Serializable) args[2];
// Convert the property
inboundValue = convertInboundProperty(contentLocale, nodeRef, propertyQName, inboundValue, null);
// Pass this through to the node service
directNodeService.setProperty(nodeRef, propertyQName, inboundValue);
// Done
@@ -261,21 +263,18 @@ public class MLPropertyInterceptor implements MethodInterceptor
{
currentValue = directNodeService.getProperty(nodeRef, propertyQName);
}
MLText currentMLValue = null;
if (currentValue == null)
MLText returnMLValue = new MLText();
if (currentValue != null)
{
currentMLValue = new MLText();
}
else
{
currentMLValue = DefaultTypeConverter.INSTANCE.convert(MLText.class, currentValue);
MLText currentMLValue = DefaultTypeConverter.INSTANCE.convert(MLText.class, currentValue);
returnMLValue.putAll(currentMLValue);
}
// Force the inbound value to be a String (it isn't MLText)
String inboundValueStr = DefaultTypeConverter.INSTANCE.convert(String.class, inboundValue);
// Add it to the current MLValue
currentMLValue.put(contentLocale, inboundValueStr);
returnMLValue.put(contentLocale, inboundValueStr);
// Done
ret = currentMLValue;
ret = returnMLValue;
}
}
else // It is not defined as d:mltext in the dictionary