Merged FILE-FOLDER-API (5.2.0) to HEAD (5.2)

123163 jvonka: RA-706, ACE-5113: Platform - OwnableService - when setting owner check that username currently exists (at time of property update)
   - update Nodes API (remove extra check)


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@126531 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jamal Kaabi-Mofrad
2016-05-10 11:21:42 +00:00
parent 071f8481d6
commit 11177795e8
3 changed files with 2 additions and 19 deletions

View File

@@ -1266,8 +1266,6 @@ public class NodesImpl implements Nodes
}
props.put(ContentModel.PROP_NAME, nodeName);
validatePropValues(props);
QName assocQName = QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, QName.createValidLocalName(nodeName));
try
{
@@ -1294,20 +1292,6 @@ public class NodesImpl implements Nodes
}
}
// special cases: additional validation of property values (if not done by underlying foundation services)
private void validatePropValues(Map<QName, Serializable> props)
{
String newOwner = (String)props.get(ContentModel.PROP_OWNER);
if (newOwner != null)
{
// validate that user exists
if (! personService.personExists(newOwner))
{
throw new InvalidArgumentException("Unknown owner: "+newOwner);
}
}
}
@Override
public Node updateNode(String nodeId, Node nodeInfo, Parameters parameters)
{
@@ -1439,8 +1423,6 @@ public class NodesImpl implements Nodes
if (props.size() > 0)
{
validatePropValues(props);
try
{
// update node properties - note: null will unset the specified property