@Override public void onDelete(BatchJobConfiguration configuration, JobEntity jobEntity) { String byteArrayId = configuration.getConfigurationByteArrayId(); if (byteArrayId != null) { Context.getCommandContext().getByteArrayManager() .deleteByteArrayById(byteArrayId); } }
@Override public void onDelete(BatchJobConfiguration configuration, JobEntity jobEntity) { String byteArrayId = configuration.getConfigurationByteArrayId(); if (byteArrayId != null) { Context.getCommandContext().getByteArrayManager() .deleteByteArrayById(byteArrayId); } }
public Void execute(CommandContext commandContext) { commandContext.getByteArrayManager() .deleteByteArrayById(historicByteArrayId[0]); return null; } });
protected void deleteFromExecutionAndRuntimeTable() { getExecution().removeExternalTask(this); CommandContext commandContext = Context.getCommandContext(); commandContext .getExternalTaskManager() .delete(this); // Also delete the external tasks's error details byte array if (errorDetailsByteArrayId != null) { commandContext.getByteArrayManager().deleteByteArrayById(errorDetailsByteArrayId); } }
protected void deleteFromExecutionAndRuntimeTable() { getExecution().removeExternalTask(this); CommandContext commandContext = Context.getCommandContext(); commandContext .getExternalTaskManager() .delete(this); // Also delete the external tasks's error details byte array if (errorDetailsByteArrayId != null) { commandContext.getByteArrayManager().deleteByteArrayById(errorDetailsByteArrayId); } }
@SuppressWarnings("unchecked") public void deleteAttachmentsByTaskId(String taskId) { checkHistoryEnabled(); List<AttachmentEntity> attachments = getDbEntityManager().selectList("selectAttachmentsByTaskId", taskId); for (AttachmentEntity attachment: attachments) { String contentId = attachment.getContentId(); if (contentId!=null) { getByteArrayManager().deleteByteArrayById(contentId); } getDbEntityManager().delete(attachment); } }
@SuppressWarnings("unchecked") public void deleteAttachmentsByTaskId(String taskId) { checkHistoryEnabled(); List<AttachmentEntity> attachments = getDbEntityManager().selectList("selectAttachmentsByTaskId", taskId); for (AttachmentEntity attachment: attachments) { String contentId = attachment.getContentId(); if (contentId!=null) { getByteArrayManager().deleteByteArrayById(contentId); } getDbEntityManager().delete(attachment); } }
public Void execute(CommandContext commandContext) { ensureNotNull("UserId", userId); IdentityInfoEntity infoEntity = commandContext.getIdentityInfoManager() .findUserInfoByUserIdAndKey(userId, "picture"); if(infoEntity != null) { String byteArrayId = infoEntity.getValue(); if(byteArrayId != null) { commandContext.getByteArrayManager() .deleteByteArrayById(byteArrayId); } commandContext.getIdentityInfoManager() .delete(infoEntity); } return null; }
public Void execute(CommandContext commandContext) { ensureNotNull("UserId", userId); IdentityInfoEntity infoEntity = commandContext.getIdentityInfoManager() .findUserInfoByUserIdAndKey(userId, "picture"); if(infoEntity != null) { String byteArrayId = infoEntity.getValue(); if(byteArrayId != null) { commandContext.getByteArrayManager() .deleteByteArrayById(byteArrayId); } commandContext.getIdentityInfoManager() .delete(infoEntity); } return null; }
public void delete(boolean incidentResolved) { CommandContext commandContext = Context.getCommandContext(); incrementSequenceCounter(); // clean additional data related to this job JobHandler jobHandler = getJobHandler(); if (jobHandler != null) { jobHandler.onDelete(getJobHandlerConfiguration(), this); } // fire delete event if this job is not being executed boolean executingJob = this.equals(commandContext.getCurrentJob()); commandContext.getJobManager().deleteJob(this, !executingJob); // Also delete the job's exception byte array if (exceptionByteArrayId != null) { commandContext.getByteArrayManager().deleteByteArrayById(exceptionByteArrayId); } // remove link to execution ExecutionEntity execution = getExecution(); if (execution != null) { execution.removeJob(this); } removeFailedJobIncident(incidentResolved); }
public void delete(boolean incidentResolved) { CommandContext commandContext = Context.getCommandContext(); incrementSequenceCounter(); // clean additional data related to this job JobHandler jobHandler = getJobHandler(); if (jobHandler != null) { jobHandler.onDelete(getJobHandlerConfiguration(), this); } // fire delete event if this job is not being executed boolean executingJob = this.equals(commandContext.getCurrentJob()); commandContext.getJobManager().deleteJob(this, !executingJob); // Also delete the job's exception byte array if (exceptionByteArrayId != null) { commandContext.getByteArrayManager().deleteByteArrayById(exceptionByteArrayId); } // remove link to execution ExecutionEntity execution = getExecution(); if (execution != null) { execution.removeJob(this); } removeFailedJobIncident(incidentResolved); }
public Object execute(CommandContext commandContext) { AttachmentEntity attachment = commandContext .getDbEntityManager() .selectById(AttachmentEntity.class, attachmentId); 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 Object execute(CommandContext commandContext) { AttachmentEntity attachment = commandContext .getDbEntityManager() .selectById(AttachmentEntity.class, attachmentId); 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 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 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 execute(CommandContext commandContext) { ensureNotNull("userId", userId); IdentityInfoEntity pictureInfo = commandContext.getIdentityInfoManager() .findUserInfoByUserIdAndKey(userId, "picture"); if (pictureInfo != null) { String byteArrayId = pictureInfo.getValue(); if (byteArrayId != null) { commandContext.getByteArrayManager() .deleteByteArrayById(byteArrayId); } } else { pictureInfo = new IdentityInfoEntity(); pictureInfo.setUserId(userId); pictureInfo.setKey("picture"); commandContext.getDbEntityManager().insert(pictureInfo); } ByteArrayEntity byteArrayEntity = new ByteArrayEntity(picture.getMimeType(), picture.getBytes(), ResourceTypes.REPOSITORY); commandContext.getByteArrayManager() .insertByteArray(byteArrayEntity); pictureInfo.setValue(byteArrayEntity.getId()); return null; }
public Void execute(CommandContext commandContext) { ensureNotNull("userId", userId); IdentityInfoEntity pictureInfo = commandContext.getIdentityInfoManager() .findUserInfoByUserIdAndKey(userId, "picture"); if (pictureInfo != null) { String byteArrayId = pictureInfo.getValue(); if (byteArrayId != null) { commandContext.getByteArrayManager() .deleteByteArrayById(byteArrayId); } } else { pictureInfo = new IdentityInfoEntity(); pictureInfo.setUserId(userId); pictureInfo.setKey("picture"); commandContext.getDbEntityManager().insert(pictureInfo); } ByteArrayEntity byteArrayEntity = new ByteArrayEntity(picture.getMimeType(), picture.getBytes(), ResourceTypes.REPOSITORY); commandContext.getByteArrayManager() .insertByteArray(byteArrayEntity); pictureInfo.setValue(byteArrayEntity.getId()); return null; }
public Void execute(CommandContext commandContext) { commandContext.getByteArrayManager() .deleteByteArrayById(historicByteArrayId[0]); return null; } });
protected void deleteFromExecutionAndRuntimeTable() { getExecution().removeExternalTask(this); CommandContext commandContext = Context.getCommandContext(); commandContext .getExternalTaskManager() .delete(this); // Also delete the external tasks's error details byte array if (errorDetailsByteArrayId != null) { commandContext.getByteArrayManager().deleteByteArrayById(errorDetailsByteArrayId); } }
@SuppressWarnings("unchecked") public void deleteAttachmentsByTaskId(String taskId) { checkHistoryEnabled(); List<AttachmentEntity> attachments = getDbEntityManager().selectList("selectAttachmentsByTaskId", taskId); for (AttachmentEntity attachment: attachments) { String contentId = attachment.getContentId(); if (contentId!=null) { getByteArrayManager().deleteByteArrayById(contentId); } getDbEntityManager().delete(attachment); } }