@Override public void auditDeployment(BundleResourceDeployment bundleResourceDeployment, String action, String info, BundleResourceDeploymentHistory.Category category, BundleResourceDeploymentHistory.Status status, String message, String attachment) { if (null == action || null == info) { throw new IllegalArgumentException("action or info is null"); } if (null == status) { status = BundleResourceDeploymentHistory.Status.SUCCESS; } BundleResourceDeploymentHistory history = new BundleResourceDeploymentHistory("Bundle Plugin", action, info, category, status, message, attachment); if (LOG.isDebugEnabled()) { LOG.debug("Reporting deployment step [" + history + "] to Server..."); } getBundleServerService().addDeploymentHistory(bundleResourceDeployment.getId(), history); }
public void addBundleResourceDeploymentHistory(BundleResourceDeploymentHistory history) { history.setResourceDeployment(this); this.histories.add(history); }
try { BundleResourceDeploymentHistory history = new BundleResourceDeploymentHistory(subject.getName(), "Purge Requested", "User [" + subject.getName() + "] requested to purge this deployment", null, BundleResourceDeploymentHistory.Status.SUCCESS, null, null);
BundleResourceDeploymentHistory history = new BundleResourceDeploymentHistory(subject.getName(), AUDIT_ACTION_DEPLOYMENT_REQUESTED, deployment.getName(), null, BundleResourceDeploymentHistory.Status.SUCCESS, "Requested deployment time: " history = new BundleResourceDeploymentHistory(subject.getName(), AUDIT_ACTION_DEPLOYMENT, deployment.getName(), null, BundleResourceDeploymentHistory.Status.FAILURE, response.getErrorMessage(), null); BundleResourceDeploymentHistory failureHistory = new BundleResourceDeploymentHistory(subject.getName(), AUDIT_ACTION_DEPLOYMENT, deployment.getName(), null, BundleResourceDeploymentHistory.Status.FAILURE, "Failed to schedule, agent on [" + bundleTarget bundleManager.setBundleResourceDeploymentStatusInNewTransaction(subject, resourceDeployment.getId(), BundleDeploymentStatus.FAILURE); BundleResourceDeploymentHistory history = new BundleResourceDeploymentHistory(subject.getName(), AUDIT_ACTION_DEPLOYMENT, deployment.getName(), null, BundleResourceDeploymentHistory.Status.FAILURE, "Target resource is not of a type that can have bundles deployed to it [resource="