RM-6945: Display available actions on held active content inside a hold

- added actions for isFreezeActiveContent
This commit is contained in:
Ramona Popa
2019-09-16 09:08:14 +01:00
parent 79fffedd88
commit 5f95f4cbdb
3 changed files with 19 additions and 2 deletions

View File

@@ -908,7 +908,7 @@
<value>
<![CDATA[
org.alfresco.module.org_alfresco_module_rm.freeze.FreezeService.isHold=RM_ALLOW
org.alfresco.module.org_alfresco_module_rm.freeze.FreezeService.isFrozen=RM_ALLOW
org.alfresco.module.org_alfresco_module_rm.freeze.FreezeService.isFrozen=ACL_ALLOW,RM_ALLOW
org.alfresco.module.org_alfresco_module_rm.freeze.FreezeService.getFrozen=RM_ALLOW
org.alfresco.module.org_alfresco_module_rm.freeze.FreezeService.freeze=RM_ALLOW
org.alfresco.module.org_alfresco_module_rm.freeze.FreezeService.unFreeze=RM_ALLOW

View File

@@ -23,6 +23,7 @@
<property name="jsonConversionComponentCache" ref="jsonConversionComponentCache" />
<property name="mimetypeService" ref="MimetypeService" />
<property name="dispositionService" ref="dispositionService" />
<property name="freezeService" ref="freezeService" />
</bean>
<!-- extends core bean with RM extensions -->

View File

@@ -45,6 +45,7 @@ import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionService
import org.alfresco.module.org_alfresco_module_rm.event.EventCompletionDetails;
import org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanComponentKind;
import org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService;
import org.alfresco.module.org_alfresco_module_rm.freeze.FreezeService;
import org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel;
import org.alfresco.module.org_alfresco_module_rm.record.RecordService;
import org.alfresco.module.org_alfresco_module_rm.role.FilePlanRoleService;
@@ -86,6 +87,7 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JS
private static final String IS_RECORD_CONTRIBUTOR_GROUP_ENABLED = "isRecordContributorGroupEnabled";
private static final String RECORD_CONTRIBUTOR_GROUP_NAME = "recordContributorGroupName";
private static final String IS_VISIBLE_FOR_CURRENT_USER = "isVisibleForCurrentUser";
private static final String FROZEN_ACTIVE_CONTENT = "frozencontent";
/** true if record contributor group is enabled, false otherwise */
private boolean isRecordContributorsGroupEnabled = false;
@@ -111,6 +113,9 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JS
/** site service */
private SiteService siteService;
/** freeze service */
private FreezeService freezeService;
/**
* Disposition service
*/
@@ -263,6 +268,12 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JS
this.dispositionService = dispositionService;
}
/**
*
* @param freezeService
*/
public void setFreezeService(FreezeService freezeService) { this.freezeService = freezeService; }
/**
* The initialise method
*/
@@ -292,6 +303,8 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JS
// Set the base root values
super.setRootValues(nodeInfo, rootJSONObject, useShortQNames);
rootJSONObject.put("uiType", getUIType(nodeInfo.getNodeRef()));
// check the existence of the RM site
checkRmSiteExistence(rootJSONObject);
@@ -655,7 +668,10 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JS
}
}
}
else if (freezeService.isFrozen(nodeRef))
{
result = FROZEN_ACTIVE_CONTENT;
}
return result;
}