RM-2193 (Cannot classify non electronic document)

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@102702 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Tuna Aksoy
2015-04-26 20:02:30 +00:00
parent 07fc43cf29
commit 899cf5fad1
2 changed files with 9 additions and 5 deletions

View File

@@ -18,6 +18,7 @@
*/
package org.alfresco.module.org_alfresco_module_rm.classification;
import static org.alfresco.module.org_alfresco_module_rm.util.RMParameterCheck.checkNotBlank;
import static org.alfresco.util.ParameterCheck.mandatory;
import java.io.Serializable;
@@ -221,12 +222,12 @@ public class ClassificationServiceImpl extends ServiceBaseImpl
public void classifyContent(String classificationLevelId, String classificationAuthority,
Set<String> classificationReasonIds, NodeRef content)
{
mandatory("classificationLevelId", classificationLevelId);
mandatory("classificationAuthority", classificationAuthority);
checkNotBlank("classificationLevelId", classificationLevelId);
checkNotBlank("classificationAuthority", classificationAuthority);
mandatory("classificationReasonIds", classificationReasonIds);
mandatory("content", content);
if (!nodeService.getType(content).equals(ContentModel.TYPE_CONTENT))
if (!dictionaryService.isSubClass(nodeService.getType(content), ContentModel.TYPE_CONTENT))
{
throw new InvalidNode(content, "The supplied node is not a content node.");
}