Merge remote-tracking branch 'remotes/origin/feature/RM-6792_AddLocnParamToDeclareAsRec' into feature/RM-6796_DeclareAndFileTests

This commit is contained in:
cagache
2019-05-16 13:56:45 +03:00
3 changed files with 17 additions and 14 deletions

View File

@@ -213,7 +213,7 @@ public class CreateRecordAction extends AuditableActionExecuterAbstractBase
if (nodeRef == null)
{
throw new AlfrescoRuntimeException("Unable to execute " + NAME + " action, because the destination path could not be resolved.");
throw new AlfrescoRuntimeException("Unable to execute " + NAME + " action, because the destination path could not be found.");
}
else
{
@@ -251,8 +251,11 @@ public class CreateRecordAction extends AuditableActionExecuterAbstractBase
// if the file plan is still null, raise an exception
if (filePlan == null)
{
LOGGER.debug("Unable to execute " + NAME + " action, because the fileplan path could not be determined. Make sure at least one file plan has been created.");
throw new AlfrescoRuntimeException("Unable to execute " + NAME + " action, because the fileplan path could not be determined.");
if (LOGGER.isDebugEnabled())
{
LOGGER.debug("Unable to execute " + NAME + " action, because the fileplan path could not be determined. Make sure at least one file plan has been created.");
throw new AlfrescoRuntimeException("Unable to execute " + NAME + " action, because the fileplan path could not be determined.");
}
}
return filePlan;
}

View File

@@ -881,7 +881,7 @@ public class RecordServiceImpl extends BaseBehaviourBean
public void createRecord(final NodeRef filePlan, final NodeRef nodeRef, final NodeRef destinationNodeRef, final boolean isLinked)
{
// filePlan can be null. In this case the default RM site will be used.
// locationNodeRef can be null. In this case the unfiled record container will be used
// destinationNodeRef can be null. In this case the unfiled record container will be used
ParameterCheck.mandatory("nodeRef", nodeRef);
ParameterCheck.mandatory("isLinked", isLinked);
@@ -909,7 +909,7 @@ public class RecordServiceImpl extends BaseBehaviourBean
newRecordContainer = filePlanService.getUnfiledContainer(checkedFilePlan);
if (newRecordContainer == null)
{
throw new AlfrescoRuntimeException("Unable to create record, because new record container could not be found.");
throw new AlfrescoRuntimeException("Unable to create record, because record container could not be found.");
}
}
// if optional location supplied, check that it is a valid record folder