mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Created a property for AlfrescoRuntimeException instead ot the message.
This commit is contained in:
committed by
Roy Wetherall
parent
32bd60328f
commit
c0c0c225c0
@@ -36,4 +36,5 @@ rm.action.records_only_undeclared=Only records can be completed.
|
||||
rm.action.event-not-undone=The event {0} can't be undone, because it's not defined on the disposition lifecycle.
|
||||
rm.action.node-not-record-category=The disposition schedule could not be created, because the actioned upon node ({0}) was not a record category.
|
||||
rm.action.parameter-not-supplied=The parameter ''{0}'' has not been supplied.
|
||||
rm.action.delete-not-hold-type=The hold couldn't be deleted, because the node isn't of type {0}. (actionedUponNodeRef={1})
|
||||
rm.action.delete-not-hold-type=The hold couldn't be deleted, because the node isn't of type {0}. (actionedUponNodeRef={1})
|
||||
rm.action.record-folder-create=Operation failed, because you can't place a record folder into another record folder.
|
||||
|
@@ -50,6 +50,7 @@ import org.alfresco.service.cmr.repository.ChildAssociationRef;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.apache.commons.lang.ArrayUtils;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
/**
|
||||
* rma:recordFolder behaviour bean
|
||||
@@ -74,6 +75,9 @@ public class RecordFolderType extends AbstractDisposableItem
|
||||
/** vital record service */
|
||||
protected VitalRecordService vitalRecordService;
|
||||
|
||||
/** I18N */
|
||||
private static final String MSG_CANNOT_CREATE_RECORD_FOLDER = "rm.action.record-folder-create";
|
||||
|
||||
/**
|
||||
* @param recordService record service
|
||||
*/
|
||||
@@ -243,7 +247,7 @@ public class RecordFolderType extends AbstractDisposableItem
|
||||
// only records can be added in a record folder or hidden folders(is the case of e-mail attachments)
|
||||
if (!instanceOf(recordFolder, ContentModel.TYPE_CONTENT) && !nodeService.hasAspect(recordFolder, ContentModel.ASPECT_HIDDEN))
|
||||
{
|
||||
throw new AlfrescoRuntimeException("Operation failed, because you can only place content into a record folder.");
|
||||
throw new AlfrescoRuntimeException(I18NUtil.getMessage(MSG_CANNOT_CREATE_RECORD_FOLDER));
|
||||
}
|
||||
|
||||
behaviourFilter.disableBehaviour();
|
||||
|
Reference in New Issue
Block a user