mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
final change after review - replace logger method
This commit is contained in:
@@ -2008,19 +2008,19 @@ public class RecordServiceImpl extends BaseBehaviourBean
|
||||
private void validateForCompletion(NodeRef nodeRef) {
|
||||
if (!nodeService.exists(nodeRef))
|
||||
{
|
||||
logError(nodeRef);
|
||||
LOGGER.warn(I18NUtil.getMessage(MSG_UNDECLARED_ONLY_RECORDS, nodeRef.toString()));
|
||||
throw new IntegrityException("The record does not exist.", null);
|
||||
}
|
||||
|
||||
if (!isRecord(nodeRef))
|
||||
{
|
||||
logError(nodeRef);
|
||||
LOGGER.warn(I18NUtil.getMessage(MSG_UNDECLARED_ONLY_RECORDS, nodeRef.toString()));
|
||||
throw new IntegrityException("The node is not a record.", null);
|
||||
}
|
||||
|
||||
if (freezeService.isFrozen(nodeRef))
|
||||
{
|
||||
logError(nodeRef);
|
||||
LOGGER.warn(I18NUtil.getMessage(MSG_UNDECLARED_ONLY_RECORDS, nodeRef.toString()));
|
||||
throw new IntegrityException("The record is frozen.", null);
|
||||
}
|
||||
|
||||
@@ -2069,18 +2069,6 @@ public class RecordServiceImpl extends BaseBehaviourBean
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper method to log a warning to the log file
|
||||
*
|
||||
* @param nodeRef node for which error occurred
|
||||
*/
|
||||
private void logError(NodeRef nodeRef) {
|
||||
if (LOGGER.isWarnEnabled())
|
||||
{
|
||||
LOGGER.warn(I18NUtil.getMessage(MSG_UNDECLARED_ONLY_RECORDS, nodeRef.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper method to build single string containing list of missing properties
|
||||
*
|
||||
|
Reference in New Issue
Block a user