Merged BRANCHES/V2.2 to BRANCHES/V2.3:

99087: Upgrade Alfresco version to 4.2.4.6
   99088: RM-2026: Unable to complete historical records when mandatory meta-data missing
   99089: Merged HEAD to V2.2:
        89735: RM-1677- No items error for RM Admin if record was declared from moderated/private site



git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/BRANCHES/V2.3@112663 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Tom Page
2015-09-23 08:33:16 +00:00
parent 494e90d6d8
commit 3b7bad9dfa
10 changed files with 286 additions and 6 deletions

View File

@@ -54,6 +54,17 @@ public class DeclareRecordAction extends RMActionExecuterAbstractBase
/** Logger */
private static Log logger = LogFactory.getLog(DeclareRecordAction.class);
/** check mandatory properties */
private boolean checkMandatoryPropertiesEnabled = true;
/**
* @param checkMandatoryPropertiesEnabled true if check mandatory properties is enabled, false otherwise
*/
public void setCheckMandatoryPropertiesEnabled(boolean checkMandatoryPropertiesEnabled)
{
this.checkMandatoryPropertiesEnabled = checkMandatoryPropertiesEnabled;
}
/**
* @see org.alfresco.repo.action.executer.ActionExecuterAbstractBase#executeImpl(org.alfresco.service.cmr.action.Action, org.alfresco.service.cmr.repository.NodeRef)
@@ -69,7 +80,8 @@ public class DeclareRecordAction extends RMActionExecuterAbstractBase
{
List<String> missingProperties = new ArrayList<String>(5);
// Aspect not already defined - check mandatory properties then add
if (mandatoryPropertiesSet(actionedUponNodeRef, missingProperties))
if (!checkMandatoryPropertiesEnabled ||
mandatoryPropertiesSet(actionedUponNodeRef, missingProperties))
{
getRecordService().disablePropertyEditableCheck();
try

View File

@@ -347,6 +347,23 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JS
rootJSONObject.put("originatingLocationPath", originatingLocationPath.toString());
}
}
/**
* Helper method to get the display path.
*
* @param nodeRef node reference
* @return String display path
*/
private String getDisplayPath(final NodeRef nodeRef)
{
return AuthenticationUtil.runAs(new RunAsWork<String>()
{
public String doWork() throws Exception
{
return PathUtil.getDisplayPath(nodeService.getPath(nodeRef), true);
}
}, AuthenticationUtil.getAdminUserName());
}
/**
* Helper method to get the display path.