ALF-2039 : It is impossible to create/upload any content or create folder in Share into folder with any rule

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@19368 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Roy Wetherall
2010-03-18 14:40:49 +00:00
parent 5b47e4ea34
commit 53e31c826b

View File

@@ -24,6 +24,7 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.model.ContentModel; import org.alfresco.model.ContentModel;
import org.alfresco.repo.action.ParameterDefinitionImpl; import org.alfresco.repo.action.ParameterDefinitionImpl;
import org.alfresco.service.cmr.action.Action; import org.alfresco.service.cmr.action.Action;
@@ -125,6 +126,12 @@ public class LinkCategoryActionExecuter extends ActionExecuterAbstractBase
} }
} }
// Check that the category property is not null
if (categoryProperty == null)
{
throw new AlfrescoRuntimeException("The category aspect " + categoryAspect.toPrefixString() + " does not have a category property to set.");
}
if (categoryAspect != null) if (categoryAspect != null)
{ {
if (this.nodeService.hasAspect(actionedUponNodeRef, categoryAspect) == false) if (this.nodeService.hasAspect(actionedUponNodeRef, categoryAspect) == false)