mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
APPS-139 fixes
This commit is contained in:
@@ -7,11 +7,12 @@
|
|||||||
|
|
||||||
<!-- Declare as Record action -->
|
<!-- Declare as Record action -->
|
||||||
<!-- TODO rename -->
|
<!-- TODO rename -->
|
||||||
<bean id="create-record" parent="action-executer" class="org.alfresco.module.org_alfresco_module_rm.action.dm.CreateRecordAction">
|
<bean id="create-record" parent="action-executer"
|
||||||
|
class="org.alfresco.module.org_alfresco_module_rm.action.dm.CreateRecordAction">
|
||||||
<property name="recordService" ref="RecordService" />
|
<property name="recordService" ref="RecordService" />
|
||||||
<property name="authenticationUtil" ref="rm.authenticationUtil" />
|
<property name="authenticationUtil" ref="rm.authenticationUtil" />
|
||||||
<property name="filePlanService" ref="FilePlanService" />
|
<property name="filePlanService" ref="FilePlanService" />
|
||||||
<property name="nodeService" ref="NodeService" />
|
<property name="nodeService" ref="NodeService" />
|
||||||
<property name="applicableTypes">
|
<property name="applicableTypes">
|
||||||
<list>
|
<list>
|
||||||
<value>{http://www.alfresco.org/model/content/1.0}content</value>
|
<value>{http://www.alfresco.org/model/content/1.0}content</value>
|
||||||
@@ -26,6 +27,7 @@
|
|||||||
<property name="filePlanService" ref="FilePlanService" />
|
<property name="filePlanService" ref="FilePlanService" />
|
||||||
<property name="dictionaryService" ref="DictionaryService" />
|
<property name="dictionaryService" ref="DictionaryService" />
|
||||||
<property name="authenticationUtil" ref="rm.authenticationUtil" />
|
<property name="authenticationUtil" ref="rm.authenticationUtil" />
|
||||||
|
<property name="recordService" ref="RecordService" />
|
||||||
<property name="applicableTypes">
|
<property name="applicableTypes">
|
||||||
<list>
|
<list>
|
||||||
<value>{http://www.alfresco.org/model/content/1.0}content</value>
|
<value>{http://www.alfresco.org/model/content/1.0}content</value>
|
||||||
|
@@ -243,7 +243,6 @@ public class DeclareAsVersionRecordAction extends AuditableActionExecuterAbstrac
|
|||||||
{
|
{
|
||||||
Map<QName, String> mapedAspects = new HashMap<>();
|
Map<QName, String> mapedAspects = new HashMap<>();
|
||||||
|
|
||||||
mapedAspects.put(ContentModel.ASPECT_VERSIONABLE, " does not have the versionable aspect applied.");
|
|
||||||
mapedAspects.put(ASPECT_RECORD, " is already a record.");
|
mapedAspects.put(ASPECT_RECORD, " is already a record.");
|
||||||
mapedAspects.put(ContentModel.ASPECT_WORKING_COPY, " is a working copy.");
|
mapedAspects.put(ContentModel.ASPECT_WORKING_COPY, " is a working copy.");
|
||||||
mapedAspects.put(ASPECT_RECORD_REJECTION_DETAILS, " has previously been rejected.");
|
mapedAspects.put(ASPECT_RECORD_REJECTION_DETAILS, " has previously been rejected.");
|
||||||
@@ -251,7 +250,7 @@ public class DeclareAsVersionRecordAction extends AuditableActionExecuterAbstrac
|
|||||||
|
|
||||||
for (Map.Entry<QName, String> aspect : mapedAspects.entrySet())
|
for (Map.Entry<QName, String> aspect : mapedAspects.entrySet())
|
||||||
{
|
{
|
||||||
if (!nodeService.hasAspect(actionedUponNodeRef, aspect.getKey()))
|
if (nodeService.hasAspect(actionedUponNodeRef, aspect.getKey()))
|
||||||
{
|
{
|
||||||
if (logger.isDebugEnabled())
|
if (logger.isDebugEnabled())
|
||||||
{
|
{
|
||||||
@@ -260,6 +259,14 @@ public class DeclareAsVersionRecordAction extends AuditableActionExecuterAbstrac
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!nodeService.hasAspect(actionedUponNodeRef, ContentModel.ASPECT_VERSIONABLE))
|
||||||
|
{
|
||||||
|
if (logger.isDebugEnabled())
|
||||||
|
{
|
||||||
|
logger.debug("Can not declare version record, because " + actionedUponNodeRef.toString() + " does not have the versionable aspect applied.");
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user