use of org.finos.waltz.model.changelog.ChangeLog in project waltz by khartec.
the class ScenarioService method writeLogEntriesForCloningOperation.
private void writeLogEntriesForCloningOperation(CloneScenarioCommand command, Scenario clonedScenario) {
String message = String.format("Created cloned scenario: '%s'", command.newName());
ChangeLog logEntry = mkBasicLogEntry(command.scenarioId(), message, command.userId());
changeLogService.write(logEntry);
changeLogService.write(ImmutableChangeLog.copyOf(logEntry).withParentReference(EntityReference.mkRef(EntityKind.ROADMAP, clonedScenario.roadmapId())));
}
use of org.finos.waltz.model.changelog.ChangeLog in project waltz by khartec.
the class DataTypeUsageService method logChange.
private void logChange(String userId, EntityReference ref, String message) {
ChangeLog changeLogEntry = ImmutableChangeLog.builder().parentReference(ref).message(message).severity(Severity.INFORMATION).userId(userId).childKind(EntityKind.LOGICAL_DATA_FLOW).operation(Operation.UPDATE).build();
changeLogService.write(changeLogEntry);
}
use of org.finos.waltz.model.changelog.ChangeLog in project waltz by khartec.
the class CustomEnvironmentService method remove.
public Boolean remove(Long envId, String username) throws InsufficientPrivelegeException {
CustomEnvironment env = customEnvironmentDao.getById(envId);
ensureUserHasPermission(env, username, Operation.REMOVE);
boolean removed = customEnvironmentDao.remove(envId);
if (removed) {
String message = format("Deleted custom environment: %s/%s and any mappings to assets", env.groupName(), env.name());
ChangeLog changeLog = mkChangeLog(env.owningEntity(), username, message, Operation.REMOVE);
changeLogService.write(changeLog);
}
return removed;
}
use of org.finos.waltz.model.changelog.ChangeLog in project waltz by khartec.
the class FlowClassificationRuleService method multiLog.
private void multiLog(String username, Long classificationRuleId, EntityReference parentRef, DataType dataType, Application app, String msg, Operation operation) {
ChangeLog parentLog = ImmutableChangeLog.builder().message(msg).severity(Severity.INFORMATION).userId(username).parentReference(parentRef).childKind(EntityKind.FLOW_CLASSIFICATION_RULE).operation(operation).build();
ChangeLog appLog = ImmutableChangeLog.copyOf(parentLog).withParentReference(app.entityReference());
ChangeLog dtLog = ImmutableChangeLog.copyOf(parentLog).withParentReference(dataType.entityReference());
ChangeLog authLog = ImmutableChangeLog.copyOf(parentLog).withParentReference(mkRef(EntityKind.FLOW_CLASSIFICATION_RULE, classificationRuleId));
changeLogService.write(parentLog);
changeLogService.write(appLog);
changeLogService.write(dtLog);
changeLogService.write(authLog);
}
use of org.finos.waltz.model.changelog.ChangeLog in project waltz by khartec.
the class EntityNamedNoteTypeService method logMsg.
private void logMsg(Long id, String username, Operation op, String msg) {
ChangeLog logEntry = ImmutableChangeLog.builder().userId(username).parentReference(EntityReference.mkRef(EntityKind.ENTITY_NAMED_NOTE_TYPE, id)).operation(op).message(msg).severity(Severity.INFORMATION).build();
changeLogService.write(logEntry);
}
Aggregations