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 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="folderQnameId" 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
|
||||
from alf_node alfn,
|
||||
alf_store alfs
|
||||
where alfn.id in (
|
||||
select node_id
|
||||
from alf_node_properties
|
||||
where qname_id = ?
|
||||
and boolean_value = true
|
||||
and node_id not in (
|
||||
where alfn.id not in (
|
||||
select node_id
|
||||
from alf_node_aspects
|
||||
where qname_id = ? ))
|
||||
where qname_id = ? )
|
||||
and type_qname_id = ?
|
||||
and alfn.store_id = alfs.id
|
||||
and alfn.id between ? and ?
|
||||
|
@@ -109,8 +109,6 @@ public class RecordsManagementQueryDAOImpl implements RecordsManagementQueryDAO,
|
||||
public List<NodeRef> getRecordFoldersWithSchedules(Long start, Long end)
|
||||
{
|
||||
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)
|
||||
.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 MODEL_STATUS = "responsestatus";
|
||||
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.";
|
||||
|
||||
/** services */
|
||||
@@ -204,7 +204,7 @@ public class UpdateRecordScheduleGet extends AbstractWebScript implements Record
|
||||
break;
|
||||
}
|
||||
}
|
||||
message = MessageFormat.format(MESSAGE_ALL_TEMPLATE, processedRecords);
|
||||
message = MessageFormat.format(MESSAGE_ALL_TEMPLATE, processedRecords, processedRecordFolders);
|
||||
}
|
||||
|
||||
model.put(MODEL_STATUS, SUCCESS_STATUS);
|
||||
@@ -374,13 +374,15 @@ public class UpdateRecordScheduleGet extends AbstractWebScript implements Record
|
||||
{
|
||||
DispositionSchedule schedule = dispositionService.getDispositionSchedule(recordFolder);
|
||||
int innerRecordCount = 0;
|
||||
if (schedule.isRecordLevelDisposition())
|
||||
if (schedule != null && schedule.isRecordLevelDisposition())
|
||||
{
|
||||
|
||||
List<NodeRef> records = recordService.getRecords(recordFolder);
|
||||
for (NodeRef record : records)
|
||||
{
|
||||
if (!nodeService.hasAspect(record, ASPECT_DISPOSITION_LIFECYCLE))
|
||||
{
|
||||
if (recordFolder.equals(nodeService.getPrimaryParent(record).getParentRef()))
|
||||
{
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
@@ -390,6 +392,7 @@ public class UpdateRecordScheduleGet extends AbstractWebScript implements Record
|
||||
dispositionService.updateNextDispositionAction(record, schedule);
|
||||
innerRecordCount++;
|
||||
behaviourFilter.enableBehaviour(record);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user