public List<Attachment> execute(CommandContext commandContext) { return commandContext .getAttachmentManager() .findAttachmentsByProcessInstanceId(processInstanceId); } }
public List<Attachment> execute(CommandContext commandContext) { return commandContext .getAttachmentManager() .findAttachmentsByTaskId(taskId); } }
public List<Attachment> execute(CommandContext commandContext) { return commandContext .getAttachmentManager() .findAttachmentsByTaskId(taskId); } }
public Attachment execute(CommandContext commandContext) { return commandContext .getAttachmentManager() .findAttachmentByTaskIdAndAttachmentId(taskId, attachmentId); }
public List<Attachment> execute(CommandContext commandContext) { return commandContext .getAttachmentManager() .findAttachmentsByProcessInstanceId(processInstanceId); } }
public Attachment execute(CommandContext commandContext) { return commandContext .getAttachmentManager() .findAttachmentByTaskIdAndAttachmentId(taskId, attachmentId); }
public Void execute(CommandContext commandContext) { commandContext.getAttachmentManager().delete((AttachmentEntity) attachment); return null; } });
public Object execute(CommandContext commandContext) { commandContext.getAttachmentManager().delete((AttachmentEntity) attachment); return null; } });
public InputStream execute(CommandContext commandContext) { AttachmentEntity attachment = (AttachmentEntity) commandContext .getAttachmentManager() .findAttachmentByTaskIdAndAttachmentId(taskId, attachmentId); if (attachment == null) { return null; } String contentId = attachment.getContentId(); if (contentId==null) { return null; } ByteArrayEntity byteArray = commandContext .getDbEntityManager() .selectById(ByteArrayEntity.class, contentId); byte[] bytes = byteArray.getBytes(); return new ByteArrayInputStream(bytes); }
public InputStream execute(CommandContext commandContext) { AttachmentEntity attachment = (AttachmentEntity) commandContext .getAttachmentManager() .findAttachmentByTaskIdAndAttachmentId(taskId, attachmentId); if (attachment == null) { return null; } String contentId = attachment.getContentId(); if (contentId==null) { return null; } ByteArrayEntity byteArray = commandContext .getDbEntityManager() .selectById(ByteArrayEntity.class, contentId); byte[] bytes = byteArray.getBytes(); return new ByteArrayInputStream(bytes); }
DbOperation deleteAttachments = commandContext.getAttachmentManager() .deleteAttachmentsByRemovalTime(removalTime, minuteFrom, minuteTo, batchSize);
DbOperation deleteAttachments = commandContext.getAttachmentManager() .deleteAttachmentsByRemovalTime(removalTime, minuteFrom, minuteTo, batchSize);
.addRemovalTimeToCommentsByRootProcessInstanceId(rootProcessInstanceId, removalTime); commandContext.getAttachmentManager() .addRemovalTimeToAttachmentsByRootProcessInstanceId(rootProcessInstanceId, removalTime);
.addRemovalTimeToCommentsByRootProcessInstanceId(rootProcessInstanceId, removalTime); commandContext.getAttachmentManager() .addRemovalTimeToAttachmentsByRootProcessInstanceId(rootProcessInstanceId, removalTime);
public void deleteHistoricTaskInstanceById(final String taskId) { if (isHistoryEnabled()) { HistoricTaskInstanceEntity historicTaskInstance = findHistoricTaskInstanceById(taskId); if (historicTaskInstance != null) { CommandContext commandContext = Context.getCommandContext(); commandContext .getHistoricDetailManager() .deleteHistoricDetailsByTaskId(taskId); commandContext .getHistoricVariableInstanceManager() .deleteHistoricVariableInstancesByTaskId(taskId); commandContext .getCommentManager() .deleteCommentsByTaskId(taskId); commandContext .getAttachmentManager() .deleteAttachmentsByTaskId(taskId); commandContext .getHistoricIdentityLinkManager() .deleteHistoricIdentityLinksLogByTaskId(taskId); getDbEntityManager().delete(historicTaskInstance); } } }
public void deleteHistoricTaskInstanceById(final String taskId) { if (isHistoryEnabled()) { HistoricTaskInstanceEntity historicTaskInstance = findHistoricTaskInstanceById(taskId); if (historicTaskInstance != null) { CommandContext commandContext = Context.getCommandContext(); commandContext .getHistoricDetailManager() .deleteHistoricDetailsByTaskId(taskId); commandContext .getHistoricVariableInstanceManager() .deleteHistoricVariableInstancesByTaskId(taskId); commandContext .getCommentManager() .deleteCommentsByTaskId(taskId); commandContext .getAttachmentManager() .deleteAttachmentsByTaskId(taskId); commandContext .getHistoricIdentityLinkManager() .deleteHistoricIdentityLinksLogByTaskId(taskId); getDbEntityManager().delete(historicTaskInstance); } } }
public Object execute(CommandContext commandContext) { AttachmentEntity attachment = (AttachmentEntity) commandContext .getAttachmentManager() .findAttachmentByTaskIdAndAttachmentId(taskId, attachmentId); ensureNotNull("No attachment exist for task id '" + taskId + " and attachmentId '" + attachmentId + "'.", "attachment", attachment); commandContext .getDbEntityManager() .delete(attachment); if (attachment.getContentId() != null) { commandContext .getByteArrayManager() .deleteByteArrayById(attachment.getContentId()); } if (attachment.getTaskId() != null) { TaskEntity task = commandContext .getTaskManager() .findTaskById(attachment.getTaskId()); PropertyChange propertyChange = new PropertyChange("name", null, attachment.getName()); commandContext.getOperationLogManager() .logAttachmentOperation(UserOperationLogEntry.OPERATION_TYPE_DELETE_ATTACHMENT, task, propertyChange); } return null; }
public void deleteHistoricProcessInstanceByIds(List<String> processInstanceIds) { CommandContext commandContext = Context.getCommandContext(); commandContext.getHistoricDetailManager().deleteHistoricDetailsByProcessInstanceIds(processInstanceIds); commandContext.getHistoricVariableInstanceManager().deleteHistoricVariableInstanceByProcessInstanceIds(processInstanceIds); commandContext.getCommentManager().deleteCommentsByProcessInstanceIds(processInstanceIds); commandContext.getAttachmentManager().deleteAttachmentsByProcessInstanceIds(processInstanceIds); commandContext.getHistoricTaskInstanceManager().deleteHistoricTaskInstancesByProcessInstanceIds(processInstanceIds, false); commandContext.getHistoricActivityInstanceManager().deleteHistoricActivityInstancesByProcessInstanceIds(processInstanceIds); commandContext.getHistoricIncidentManager().deleteHistoricIncidentsByProcessInstanceIds(processInstanceIds); commandContext.getHistoricJobLogManager().deleteHistoricJobLogsByProcessInstanceIds(processInstanceIds); commandContext.getHistoricExternalTaskLogManager().deleteHistoricExternalTaskLogsByProcessInstanceIds(processInstanceIds); commandContext.getDbEntityManager().deletePreserveOrder(HistoricProcessInstanceEntity.class, "deleteHistoricProcessInstances", processInstanceIds); }
public void deleteHistoricProcessInstanceByIds(List<String> processInstanceIds) { CommandContext commandContext = Context.getCommandContext(); commandContext.getHistoricDetailManager().deleteHistoricDetailsByProcessInstanceIds(processInstanceIds); commandContext.getHistoricVariableInstanceManager().deleteHistoricVariableInstanceByProcessInstanceIds(processInstanceIds); commandContext.getCommentManager().deleteCommentsByProcessInstanceIds(processInstanceIds); commandContext.getAttachmentManager().deleteAttachmentsByProcessInstanceIds(processInstanceIds); commandContext.getHistoricTaskInstanceManager().deleteHistoricTaskInstancesByProcessInstanceIds(processInstanceIds, false); commandContext.getHistoricActivityInstanceManager().deleteHistoricActivityInstancesByProcessInstanceIds(processInstanceIds); commandContext.getHistoricIncidentManager().deleteHistoricIncidentsByProcessInstanceIds(processInstanceIds); commandContext.getHistoricJobLogManager().deleteHistoricJobLogsByProcessInstanceIds(processInstanceIds); commandContext.getHistoricExternalTaskLogManager().deleteHistoricExternalTaskLogsByProcessInstanceIds(processInstanceIds); commandContext.getDbEntityManager().deletePreserveOrder(HistoricProcessInstanceEntity.class, "deleteHistoricProcessInstances", processInstanceIds); }
public Object execute(CommandContext commandContext) { AttachmentEntity attachment = (AttachmentEntity) commandContext .getAttachmentManager() .findAttachmentByTaskIdAndAttachmentId(taskId, attachmentId); ensureNotNull("No attachment exist for task id '" + taskId + " and attachmentId '" + attachmentId + "'.", "attachment", attachment); commandContext .getDbEntityManager() .delete(attachment); if (attachment.getContentId() != null) { commandContext .getByteArrayManager() .deleteByteArrayById(attachment.getContentId()); } if (attachment.getTaskId() != null) { TaskEntity task = commandContext .getTaskManager() .findTaskById(attachment.getTaskId()); PropertyChange propertyChange = new PropertyChange("name", null, attachment.getName()); commandContext.getOperationLogManager() .logAttachmentOperation(UserOperationLogEntry.OPERATION_TYPE_DELETE_ATTACHMENT, task, propertyChange); } return null; }