mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-08 14:51:49 +00:00
RM-7051 simplyfing sql and adding check for links
This commit is contained in:
@@ -9,7 +9,6 @@
|
|||||||
</parameterMap>
|
</parameterMap>
|
||||||
|
|
||||||
<parameterMap id="parameter_folderPatchPaging" type="map">
|
<parameterMap id="parameter_folderPatchPaging" type="map">
|
||||||
<parameter property="dispositionQnameId" jdbcType="BIGINT" javaType="java.lang.Long"/>
|
|
||||||
<parameter property="processed" jdbcType="BIGINT" javaType="java.lang.Long"/>
|
<parameter property="processed" jdbcType="BIGINT" javaType="java.lang.Long"/>
|
||||||
<parameter property="folderQnameId" jdbcType="BIGINT" javaType="java.lang.Long"/>
|
<parameter property="folderQnameId" jdbcType="BIGINT" javaType="java.lang.Long"/>
|
||||||
<parameter property="start" jdbcType="BIGINT" javaType="java.lang.Long"/>
|
<parameter property="start" jdbcType="BIGINT" javaType="java.lang.Long"/>
|
||||||
@@ -42,15 +41,10 @@
|
|||||||
select alfn.id , alfs.protocol, alfs.identifier, alfn.uuid
|
select alfn.id , alfs.protocol, alfs.identifier, alfn.uuid
|
||||||
from alf_node alfn,
|
from alf_node alfn,
|
||||||
alf_store alfs
|
alf_store alfs
|
||||||
where alfn.id in (
|
where alfn.id not in (
|
||||||
select node_id
|
|
||||||
from alf_node_properties
|
|
||||||
where qname_id = ?
|
|
||||||
and boolean_value = true
|
|
||||||
and node_id not in (
|
|
||||||
select node_id
|
select node_id
|
||||||
from alf_node_aspects
|
from alf_node_aspects
|
||||||
where qname_id = ? ))
|
where qname_id = ? )
|
||||||
and type_qname_id = ?
|
and type_qname_id = ?
|
||||||
and alfn.store_id = alfs.id
|
and alfn.store_id = alfs.id
|
||||||
and alfn.id between ? and ?
|
and alfn.id between ? and ?
|
||||||
|
@@ -109,8 +109,6 @@ public class RecordsManagementQueryDAOImpl implements RecordsManagementQueryDAO,
|
|||||||
public List<NodeRef> getRecordFoldersWithSchedules(Long start, Long end)
|
public List<NodeRef> getRecordFoldersWithSchedules(Long start, Long end)
|
||||||
{
|
{
|
||||||
Map<String, Object> params = new HashMap<String, Object>(2);
|
Map<String, Object> params = new HashMap<String, Object>(2);
|
||||||
params.put("dispositionQnameId", qnameDAO.getQName(PROP_RS_HAS_DISPOITION_SCHEDULE)
|
|
||||||
.getFirst());
|
|
||||||
params.put("processed", qnameDAO.getQName(ASPECT_DISPOSITION_PROCESSED)
|
params.put("processed", qnameDAO.getQName(ASPECT_DISPOSITION_PROCESSED)
|
||||||
.getFirst());
|
.getFirst());
|
||||||
params.put("folderQnameId",qnameDAO.getQName(TYPE_RECORD_FOLDER).getFirst());
|
params.put("folderQnameId",qnameDAO.getQName(TYPE_RECORD_FOLDER).getFirst());
|
||||||
|
@@ -96,7 +96,7 @@ public class UpdateRecordScheduleGet extends AbstractWebScript implements Record
|
|||||||
private static final String SUCCESS_STATUS = "success";
|
private static final String SUCCESS_STATUS = "success";
|
||||||
private static final String MODEL_STATUS = "responsestatus";
|
private static final String MODEL_STATUS = "responsestatus";
|
||||||
private static final String MODEL_MESSAGE = "message";
|
private static final String MODEL_MESSAGE = "message";
|
||||||
private static final String MESSAGE_ALL_TEMPLATE = "Updated {0} records with updated disposition instructions.";
|
private static final String MESSAGE_ALL_TEMPLATE = "Updated {0} records from {1} folders with updated disposition instructions.";
|
||||||
private static final String MESSAGE_FOLDER_TEMPLATE = "Updated records in folder {0} with updated disposition instructions.";
|
private static final String MESSAGE_FOLDER_TEMPLATE = "Updated records in folder {0} with updated disposition instructions.";
|
||||||
|
|
||||||
/** services */
|
/** services */
|
||||||
@@ -204,7 +204,7 @@ public class UpdateRecordScheduleGet extends AbstractWebScript implements Record
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
message = MessageFormat.format(MESSAGE_ALL_TEMPLATE, processedRecords);
|
message = MessageFormat.format(MESSAGE_ALL_TEMPLATE, processedRecords, processedRecordFolders);
|
||||||
}
|
}
|
||||||
|
|
||||||
model.put(MODEL_STATUS, SUCCESS_STATUS);
|
model.put(MODEL_STATUS, SUCCESS_STATUS);
|
||||||
@@ -374,13 +374,15 @@ public class UpdateRecordScheduleGet extends AbstractWebScript implements Record
|
|||||||
{
|
{
|
||||||
DispositionSchedule schedule = dispositionService.getDispositionSchedule(recordFolder);
|
DispositionSchedule schedule = dispositionService.getDispositionSchedule(recordFolder);
|
||||||
int innerRecordCount = 0;
|
int innerRecordCount = 0;
|
||||||
if (schedule.isRecordLevelDisposition())
|
if (schedule != null && schedule.isRecordLevelDisposition())
|
||||||
{
|
{
|
||||||
|
|
||||||
List<NodeRef> records = recordService.getRecords(recordFolder);
|
List<NodeRef> records = recordService.getRecords(recordFolder);
|
||||||
for (NodeRef record : records)
|
for (NodeRef record : records)
|
||||||
{
|
{
|
||||||
if (!nodeService.hasAspect(record, ASPECT_DISPOSITION_LIFECYCLE))
|
if (!nodeService.hasAspect(record, ASPECT_DISPOSITION_LIFECYCLE))
|
||||||
|
{
|
||||||
|
if (recordFolder.equals(nodeService.getPrimaryParent(record).getParentRef()))
|
||||||
{
|
{
|
||||||
if (logger.isDebugEnabled())
|
if (logger.isDebugEnabled())
|
||||||
{
|
{
|
||||||
@@ -390,6 +392,7 @@ public class UpdateRecordScheduleGet extends AbstractWebScript implements Record
|
|||||||
dispositionService.updateNextDispositionAction(record, schedule);
|
dispositionService.updateNextDispositionAction(record, schedule);
|
||||||
innerRecordCount++;
|
innerRecordCount++;
|
||||||
behaviourFilter.enableBehaviour(record);
|
behaviourFilter.enableBehaviour(record);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user