TSK-1247: Removed LoggerUtils and replaced its usages with the standard toString implementations
This commit is contained in:
parent
005075d852
commit
8832876b93
|
@ -20,7 +20,6 @@ import org.springframework.web.bind.annotation.RestController;
|
|||
|
||||
import pro.taskana.TaskanaEngineConfiguration;
|
||||
import pro.taskana.common.api.BaseQuery;
|
||||
import pro.taskana.common.api.LoggerUtils;
|
||||
import pro.taskana.common.api.TimeInterval;
|
||||
import pro.taskana.common.api.exceptions.InvalidArgumentException;
|
||||
import pro.taskana.common.rest.AbstractPagingController;
|
||||
|
@ -149,7 +148,7 @@ public class TaskHistoryEventController extends AbstractPagingController {
|
|||
public ResponseEntity<TaskHistoryEventListResource> getTaskHistoryEvents(
|
||||
@RequestParam MultiValueMap<String, String> params) throws InvalidArgumentException {
|
||||
if (LOGGER.isDebugEnabled()) {
|
||||
LOGGER.debug("Entry to getTaskHistoryEvents(params= {})", LoggerUtils.mapToString(params));
|
||||
LOGGER.debug("Entry to getTaskHistoryEvents(params= {})", params);
|
||||
}
|
||||
|
||||
HistoryQuery query = simpleHistoryService.createHistoryQuery();
|
||||
|
@ -212,7 +211,7 @@ public class TaskHistoryEventController extends AbstractPagingController {
|
|||
private HistoryQuery applySortingParams(HistoryQuery query, MultiValueMap<String, String> params)
|
||||
throws InvalidArgumentException {
|
||||
if (LOGGER.isDebugEnabled()) {
|
||||
LOGGER.debug("Entry to applySortingParams(params= {})", LoggerUtils.mapToString(params));
|
||||
LOGGER.debug("Entry to applySortingParams(params= {})", params);
|
||||
}
|
||||
|
||||
String sortBy = params.getFirst(SORT_BY);
|
||||
|
|
|
@ -29,7 +29,6 @@ import org.slf4j.Logger;
|
|||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import pro.taskana.common.api.CustomHoliday;
|
||||
import pro.taskana.common.api.LoggerUtils;
|
||||
import pro.taskana.common.api.TaskanaEngine;
|
||||
import pro.taskana.common.api.TaskanaRole;
|
||||
import pro.taskana.common.api.exceptions.SystemException;
|
||||
|
@ -558,7 +557,7 @@ public class TaskanaEngineConfiguration {
|
|||
if (LOGGER.isDebugEnabled()) {
|
||||
roleMap.forEach(
|
||||
(k, v) ->
|
||||
LOGGER.debug("Found Taskana RoleConfig {} : {} ", k, LoggerUtils.setToString(v)));
|
||||
LOGGER.debug("Found Taskana RoleConfig {} : {} ", k, v));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,6 @@ import org.slf4j.LoggerFactory;
|
|||
import pro.taskana.classification.api.ClassificationQuery;
|
||||
import pro.taskana.classification.api.ClassificationQueryColumnName;
|
||||
import pro.taskana.classification.api.models.ClassificationSummary;
|
||||
import pro.taskana.common.api.LoggerUtils;
|
||||
import pro.taskana.common.api.TimeInterval;
|
||||
import pro.taskana.common.api.exceptions.InvalidArgumentException;
|
||||
import pro.taskana.common.api.exceptions.TaskanaRuntimeException;
|
||||
|
@ -399,7 +398,7 @@ public class ClassificationQueryImpl implements ClassificationQuery {
|
|||
LOGGER.debug(
|
||||
"exit from list(). Returning {} resulting Objects: {} ",
|
||||
result.size(),
|
||||
LoggerUtils.listToString(result));
|
||||
result);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -430,7 +429,7 @@ public class ClassificationQueryImpl implements ClassificationQuery {
|
|||
LOGGER.debug(
|
||||
"exit from list(offset,limit). Returning {} resulting Objects: {} ",
|
||||
result.size(),
|
||||
LoggerUtils.listToString(result));
|
||||
result);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -453,7 +452,7 @@ public class ClassificationQueryImpl implements ClassificationQuery {
|
|||
LOGGER.debug(
|
||||
"Exit from listValues. Returning {} resulting Objects: {} ",
|
||||
result.size(),
|
||||
LoggerUtils.listToString(result));
|
||||
result);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -128,7 +128,7 @@ public class BulkOperationResults<K, V> {
|
|||
@Override
|
||||
public String toString() {
|
||||
return "BulkOperationResults [BulkOperationResults= "
|
||||
+ LoggerUtils.mapToString(this.errorMap)
|
||||
+ this.errorMap
|
||||
+ "]";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,79 +0,0 @@
|
|||
package pro.taskana.common.api;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* Utility methods for logging.
|
||||
*
|
||||
* @author bbr
|
||||
*/
|
||||
public final class LoggerUtils {
|
||||
|
||||
private LoggerUtils() {}
|
||||
|
||||
/**
|
||||
* Creating an appended log-string of a list with generic type T. The logging does append
|
||||
* informations using toString() on the entries.
|
||||
*
|
||||
* @param list the input list to be stringified
|
||||
* @param <T> the type of the objects in the input list
|
||||
* @return A String representation of the list.
|
||||
*/
|
||||
public static <T> String listToString(List<T> list) {
|
||||
if (list == null || list.isEmpty()) {
|
||||
return "[]";
|
||||
} else {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
builder.append("[");
|
||||
for (T t : list) {
|
||||
builder.append(String.valueOf(t));
|
||||
builder.append(";\n");
|
||||
}
|
||||
builder.append("]");
|
||||
return builder.toString();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Creating an appended log-string of a map with generic types K/V. The logging does append
|
||||
* informations using toString() on the entries.
|
||||
*
|
||||
* @param map the map to be stringified
|
||||
* @param <K> the type of the keys in the map
|
||||
* @param <V> the type of the values in the map
|
||||
* @return A String representation of the map.
|
||||
*/
|
||||
public static <K, V> String mapToString(Map<K, V> map) {
|
||||
if (map == null || map.isEmpty()) {
|
||||
return "[]";
|
||||
} else {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
builder.append("[");
|
||||
Set<Entry<K, V>> entrySet = map.entrySet();
|
||||
for (Entry<K, V> entry : entrySet) {
|
||||
builder.append("(");
|
||||
builder.append(entry.getKey());
|
||||
builder.append(" , ");
|
||||
builder.append(entry.getValue());
|
||||
builder.append(")");
|
||||
builder.append(" , ");
|
||||
}
|
||||
builder.append("]");
|
||||
return builder.toString();
|
||||
}
|
||||
}
|
||||
|
||||
public static <T> String setToString(Set<T> set) {
|
||||
if (set == null || set.isEmpty()) {
|
||||
return "[]";
|
||||
}
|
||||
|
||||
StringBuilder result = new StringBuilder("[");
|
||||
set.forEach(e -> result.append("(").append(e).append(") ,"));
|
||||
result.append("]");
|
||||
return result.toString();
|
||||
}
|
||||
}
|
|
@ -33,7 +33,6 @@ import pro.taskana.classification.internal.ClassificationMapper;
|
|||
import pro.taskana.classification.internal.ClassificationQueryMapper;
|
||||
import pro.taskana.classification.internal.ClassificationServiceImpl;
|
||||
import pro.taskana.common.api.JobService;
|
||||
import pro.taskana.common.api.LoggerUtils;
|
||||
import pro.taskana.common.api.TaskanaEngine;
|
||||
import pro.taskana.common.api.TaskanaRole;
|
||||
import pro.taskana.common.api.exceptions.AutocommitFailedException;
|
||||
|
@ -209,11 +208,10 @@ public class TaskanaEngineImpl implements TaskanaEngine {
|
|||
public void checkRoleMembership(TaskanaRole... roles) throws NotAuthorizedException {
|
||||
if (!isUserInRole(roles)) {
|
||||
if (LOGGER.isDebugEnabled()) {
|
||||
String accessIds = LoggerUtils.listToString(CurrentUserContext.getAccessIds());
|
||||
String rolesAsString = Arrays.toString(roles);
|
||||
LOGGER.debug(
|
||||
"Throwing NotAuthorizedException because accessIds {} are not member of roles {}",
|
||||
accessIds,
|
||||
CurrentUserContext.getAccessIds(),
|
||||
rolesAsString);
|
||||
}
|
||||
throw new NotAuthorizedException(
|
||||
|
|
|
@ -7,8 +7,6 @@ import java.util.Enumeration;
|
|||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import pro.taskana.common.api.LoggerUtils;
|
||||
|
||||
/** Represents a group with a name and a set of members. */
|
||||
public class GroupPrincipal implements Group {
|
||||
|
||||
|
@ -50,7 +48,7 @@ public class GroupPrincipal implements Group {
|
|||
return "GroupPrincipal [name="
|
||||
+ name
|
||||
+ ", members="
|
||||
+ LoggerUtils.setToString(this.members)
|
||||
+ this.members
|
||||
+ "]";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,6 @@ import java.util.Map;
|
|||
import java.util.Set;
|
||||
import java.util.function.Function;
|
||||
|
||||
import pro.taskana.common.api.LoggerUtils;
|
||||
import pro.taskana.monitor.api.reports.Report;
|
||||
import pro.taskana.monitor.api.reports.item.QueryItem;
|
||||
|
||||
|
@ -62,6 +61,6 @@ public abstract class FoldableRow<I extends QueryItem> extends SingleRow<I> {
|
|||
public String toString() {
|
||||
return String.format(
|
||||
"FoldableRow [detailRows= %s, columnSize= %d]",
|
||||
LoggerUtils.mapToString(this.foldableRows), columnSize);
|
||||
this.foldableRows, columnSize);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,7 +10,6 @@ import java.util.stream.Collectors;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import pro.taskana.common.api.LoggerUtils;
|
||||
import pro.taskana.common.api.exceptions.InvalidArgumentException;
|
||||
import pro.taskana.common.internal.util.WorkingDaysToDaysConverter;
|
||||
import pro.taskana.monitor.api.reports.header.TimeIntervalColumnHeader;
|
||||
|
@ -60,7 +59,7 @@ public class WorkingDaysToDaysReportConverter {
|
|||
if (LOGGER.isDebugEnabled()) {
|
||||
LOGGER.debug(
|
||||
"Initialize WorkingDaysToDaysConverter with columnHeaders: {}",
|
||||
LoggerUtils.listToString(columnHeaders));
|
||||
columnHeaders);
|
||||
}
|
||||
if (columnHeaders == null) {
|
||||
throw new InvalidArgumentException(
|
||||
|
|
|
@ -9,7 +9,6 @@ import org.slf4j.Logger;
|
|||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import pro.taskana.TaskanaEngineConfiguration;
|
||||
import pro.taskana.common.api.LoggerUtils;
|
||||
import pro.taskana.common.api.TaskanaRole;
|
||||
import pro.taskana.common.api.exceptions.InvalidArgumentException;
|
||||
import pro.taskana.common.api.exceptions.NotAuthorizedException;
|
||||
|
@ -119,7 +118,7 @@ abstract class TimeIntervalReportBuilderImpl<
|
|||
if (LOGGER.isDebugEnabled()) {
|
||||
LOGGER.debug(
|
||||
"entry to listTaskIdsForSelectedItems(selectedItems = {}), this = {}",
|
||||
LoggerUtils.listToString(selectedItems),
|
||||
selectedItems,
|
||||
this);
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@ import org.apache.ibatis.session.RowBounds;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import pro.taskana.common.api.LoggerUtils;
|
||||
import pro.taskana.common.api.exceptions.TaskanaRuntimeException;
|
||||
import pro.taskana.common.internal.InternalTaskanaEngine;
|
||||
import pro.taskana.task.api.ObjectReferenceQuery;
|
||||
|
@ -87,7 +86,7 @@ public class ObjectReferenceQueryImpl implements ObjectReferenceQuery {
|
|||
LOGGER.debug(
|
||||
"exit from list(). Returning {} resulting Objects: {} ",
|
||||
result.size(),
|
||||
LoggerUtils.listToString(result));
|
||||
result);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -118,7 +117,7 @@ public class ObjectReferenceQueryImpl implements ObjectReferenceQuery {
|
|||
LOGGER.debug(
|
||||
"exit from list(offset,limit). Returning {} resulting Objects: {} ",
|
||||
result.size(),
|
||||
LoggerUtils.listToString(result));
|
||||
result);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -141,7 +140,7 @@ public class ObjectReferenceQueryImpl implements ObjectReferenceQuery {
|
|||
LOGGER.debug(
|
||||
"Exit from listValues. Returning {} resulting Objects: {} ",
|
||||
result.size(),
|
||||
LoggerUtils.listToString(result));
|
||||
result);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,7 +17,6 @@ import org.slf4j.LoggerFactory;
|
|||
|
||||
import pro.taskana.classification.api.models.ClassificationSummary;
|
||||
import pro.taskana.common.api.BulkOperationResults;
|
||||
import pro.taskana.common.api.LoggerUtils;
|
||||
import pro.taskana.common.api.exceptions.InvalidArgumentException;
|
||||
import pro.taskana.common.api.exceptions.TaskanaException;
|
||||
import pro.taskana.common.internal.InternalTaskanaEngine;
|
||||
|
@ -87,14 +86,14 @@ class ServiceLevelHandler {
|
|||
BulkLog bulkLog = new BulkLog();
|
||||
List<AttachmentSummaryImpl> attachments = getAttachmentSummaries(tasks);
|
||||
if (LOGGER.isDebugEnabled()) {
|
||||
LOGGER.debug("found attachments {}.", LoggerUtils.listToString(attachments));
|
||||
LOGGER.debug("found attachments {}.", attachments);
|
||||
}
|
||||
List<ClassificationSummary> allInvolvedClassifications =
|
||||
findAllClassificationsReferencedByTasksAndAttachments(tasks, attachments);
|
||||
if (LOGGER.isDebugEnabled()) {
|
||||
LOGGER.debug(
|
||||
"found involved classifications {}.",
|
||||
LoggerUtils.listToString(allInvolvedClassifications));
|
||||
allInvolvedClassifications);
|
||||
}
|
||||
List<ClassificationWithServiceLevelResolved> allInvolvedClassificationsWithDuration =
|
||||
resolveDurationsInClassifications(allInvolvedClassifications);
|
||||
|
|
|
@ -10,7 +10,6 @@ import org.slf4j.Logger;
|
|||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import pro.taskana.common.api.KeyDomain;
|
||||
import pro.taskana.common.api.LoggerUtils;
|
||||
import pro.taskana.common.api.TaskanaRole;
|
||||
import pro.taskana.common.api.TimeInterval;
|
||||
import pro.taskana.common.api.exceptions.InvalidArgumentException;
|
||||
|
@ -980,7 +979,7 @@ public class TaskQueryImpl implements TaskQuery {
|
|||
LOGGER.debug(
|
||||
"mapper returned {} resulting Objects: {} ",
|
||||
tasks.size(),
|
||||
LoggerUtils.listToString(tasks));
|
||||
tasks);
|
||||
}
|
||||
result = taskService.augmentTaskSummariesByContainedSummaries(tasks);
|
||||
return result;
|
||||
|
@ -990,7 +989,7 @@ public class TaskQueryImpl implements TaskQuery {
|
|||
LOGGER.debug(
|
||||
"exit from list(). Returning {} resulting Objects: {} ",
|
||||
result.size(),
|
||||
LoggerUtils.listToString(result));
|
||||
result);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1025,7 +1024,7 @@ public class TaskQueryImpl implements TaskQuery {
|
|||
LOGGER.debug(
|
||||
"exit from list(offset,limit). Returning {} resulting Objects: {} ",
|
||||
result.size(),
|
||||
LoggerUtils.listToString(result));
|
||||
result);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1064,7 +1063,7 @@ public class TaskQueryImpl implements TaskQuery {
|
|||
LOGGER.debug(
|
||||
"Exit from listValues. Returning {} resulting Objects: {} ",
|
||||
result.size(),
|
||||
LoggerUtils.listToString(result));
|
||||
result);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,7 +26,6 @@ import pro.taskana.classification.api.exceptions.ClassificationNotFoundException
|
|||
import pro.taskana.classification.api.models.Classification;
|
||||
import pro.taskana.classification.api.models.ClassificationSummary;
|
||||
import pro.taskana.common.api.BulkOperationResults;
|
||||
import pro.taskana.common.api.LoggerUtils;
|
||||
import pro.taskana.common.api.TaskanaRole;
|
||||
import pro.taskana.common.api.exceptions.ConcurrencyException;
|
||||
import pro.taskana.common.api.exceptions.InvalidArgumentException;
|
||||
|
@ -481,7 +480,7 @@ public class TaskServiceImpl implements TaskService {
|
|||
public BulkOperationResults<String, TaskanaException> deleteTasks(List<String> taskIds)
|
||||
throws InvalidArgumentException, NotAuthorizedException {
|
||||
if (LOGGER.isDebugEnabled()) {
|
||||
LOGGER.debug("entry to deleteTasks(tasks = {})", LoggerUtils.listToString(taskIds));
|
||||
LOGGER.debug("entry to deleteTasks(tasks = {})", taskIds);
|
||||
}
|
||||
|
||||
taskanaEngine.getEngine().checkRoleMembership(TaskanaRole.ADMIN);
|
||||
|
@ -571,7 +570,7 @@ public class TaskServiceImpl implements TaskService {
|
|||
if (LOGGER.isDebugEnabled()) {
|
||||
LOGGER.debug(
|
||||
"updateTasks() updated the following tasks: {} ",
|
||||
LoggerUtils.listToString(changedTasks));
|
||||
changedTasks);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
@ -611,7 +610,7 @@ public class TaskServiceImpl implements TaskService {
|
|||
if (LOGGER.isDebugEnabled()) {
|
||||
LOGGER.debug(
|
||||
"updateTasks() updated the following tasks: {} ",
|
||||
LoggerUtils.listToString(changedTasks));
|
||||
changedTasks);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
@ -664,7 +663,7 @@ public class TaskServiceImpl implements TaskService {
|
|||
if (LOGGER.isDebugEnabled()) {
|
||||
LOGGER.debug(
|
||||
"entry to setCallbackStateForTasks(externalIds = {})",
|
||||
LoggerUtils.listToString(externalIds));
|
||||
externalIds);
|
||||
}
|
||||
try {
|
||||
taskanaEngine.openConnection();
|
||||
|
@ -698,7 +697,7 @@ public class TaskServiceImpl implements TaskService {
|
|||
LOGGER.debug(
|
||||
"entry to setOwnerOfTasks(owner = {}, tasks = {})",
|
||||
owner,
|
||||
LoggerUtils.listToString(argTaskIds));
|
||||
argTaskIds);
|
||||
}
|
||||
BulkOperationResults<String, TaskanaException> bulkLog = new BulkOperationResults<>();
|
||||
if (argTaskIds == null || argTaskIds.isEmpty()) {
|
||||
|
@ -751,7 +750,7 @@ public class TaskServiceImpl implements TaskService {
|
|||
LOGGER.debug(
|
||||
"entry to setPlannedPropertyOfTasks(planned = {}, tasks = {})",
|
||||
planned,
|
||||
LoggerUtils.listToString(argTaskIds));
|
||||
argTaskIds);
|
||||
}
|
||||
|
||||
BulkLog bulkLog = new BulkLog();
|
||||
|
@ -841,7 +840,7 @@ public class TaskServiceImpl implements TaskService {
|
|||
LOGGER.debug(
|
||||
"the following tasks are affected by the update of classification {} : {}",
|
||||
classificationId,
|
||||
LoggerUtils.listToString(affectedTaskIds));
|
||||
affectedTaskIds);
|
||||
}
|
||||
LOGGER.debug("exit from findTasksIdsAffectedByClassificationChange(). ");
|
||||
return affectedTaskIds;
|
||||
|
@ -852,7 +851,7 @@ public class TaskServiceImpl implements TaskService {
|
|||
if (LOGGER.isDebugEnabled()) {
|
||||
LOGGER.debug(
|
||||
"entry to refreshPriorityAndDueDateOfTasks(tasks = {})",
|
||||
LoggerUtils.listToString(taskIds));
|
||||
taskIds);
|
||||
}
|
||||
Pair<List<MinimalTaskSummary>, BulkLog> resultsPair = getMinimalTaskSummaries(taskIds);
|
||||
List<MinimalTaskSummary> tasks = resultsPair.getLeft();
|
||||
|
@ -1010,7 +1009,7 @@ public class TaskServiceImpl implements TaskService {
|
|||
if (LOGGER.isDebugEnabled()) {
|
||||
LOGGER.debug(
|
||||
"entry to augmentTaskSummariesByContainedSummaries(taskSummaries= {})",
|
||||
LoggerUtils.listToString(taskSummaries));
|
||||
taskSummaries);
|
||||
}
|
||||
|
||||
List<TaskSummary> result = new ArrayList<>();
|
||||
|
@ -1432,8 +1431,8 @@ public class TaskServiceImpl implements TaskService {
|
|||
LOGGER.debug(
|
||||
"entry to checkIfTasksMatchCompleteCriteria(taskIds = {}, "
|
||||
+ "taskSummaries = {}, bulkLog = {})",
|
||||
LoggerUtils.listToString(taskIds),
|
||||
LoggerUtils.listToString(taskSummaries),
|
||||
taskIds,
|
||||
taskSummaries,
|
||||
bulkLog);
|
||||
}
|
||||
|
||||
|
@ -1477,8 +1476,8 @@ public class TaskServiceImpl implements TaskService {
|
|||
if (LOGGER.isDebugEnabled()) {
|
||||
LOGGER.debug(
|
||||
"entry to updateTasksToBeCompleted(taskIds = {}, taskSummaries = {})",
|
||||
LoggerUtils.listToString(taskIds),
|
||||
LoggerUtils.listToString(taskSummaries));
|
||||
taskIds,
|
||||
taskSummaries);
|
||||
}
|
||||
|
||||
if (!taskIds.isEmpty() && !taskSummaries.isEmpty()) {
|
||||
|
@ -1495,8 +1494,7 @@ public class TaskServiceImpl implements TaskService {
|
|||
if (LOGGER.isDebugEnabled()) {
|
||||
LOGGER.debug(
|
||||
"entry to addClassificationSummariesToTaskSummaries(tasks = {}, classifications = {})",
|
||||
LoggerUtils.listToString(tasks),
|
||||
LoggerUtils.listToString(classifications));
|
||||
tasks, classifications);
|
||||
}
|
||||
|
||||
if (tasks == null || tasks.isEmpty()) {
|
||||
|
@ -1619,9 +1617,9 @@ public class TaskServiceImpl implements TaskService {
|
|||
LOGGER.debug(
|
||||
"entry to addAttachmentSummariesToTaskSummaries(taskSummaries = {}, "
|
||||
+ "attachmentSummaries = {}, classifications = {})",
|
||||
LoggerUtils.listToString(taskSummaries),
|
||||
LoggerUtils.listToString(attachmentSummaries),
|
||||
LoggerUtils.listToString(classifications));
|
||||
taskSummaries,
|
||||
attachmentSummaries,
|
||||
classifications);
|
||||
}
|
||||
|
||||
if (taskSummaries == null || taskSummaries.isEmpty()) {
|
||||
|
@ -1680,8 +1678,8 @@ public class TaskServiceImpl implements TaskService {
|
|||
if (LOGGER.isDebugEnabled()) {
|
||||
LOGGER.debug(
|
||||
"entry to addClassificationSummariesToAttachments(targetWbId = {}, taskIds = {})",
|
||||
LoggerUtils.listToString(attachmentImpls),
|
||||
LoggerUtils.listToString(classifications));
|
||||
attachmentImpls,
|
||||
classifications);
|
||||
}
|
||||
|
||||
if (attachmentImpls == null || attachmentImpls.isEmpty()) {
|
||||
|
@ -1717,7 +1715,7 @@ public class TaskServiceImpl implements TaskService {
|
|||
if (LOGGER.isDebugEnabled()) {
|
||||
LOGGER.debug(
|
||||
"entry to initUpdatedTask(customFieldsToUpdate = {}, fieldSelector = {})",
|
||||
LoggerUtils.mapToString(customFieldsToUpdate),
|
||||
customFieldsToUpdate,
|
||||
fieldSelector);
|
||||
}
|
||||
|
||||
|
@ -1741,7 +1739,7 @@ public class TaskServiceImpl implements TaskService {
|
|||
if (LOGGER.isDebugEnabled()) {
|
||||
LOGGER.debug(
|
||||
"entry to validateCustomFields(customFieldsToUpdate = {})",
|
||||
LoggerUtils.mapToString(customFieldsToUpdate));
|
||||
customFieldsToUpdate);
|
||||
}
|
||||
|
||||
if (customFieldsToUpdate == null || customFieldsToUpdate.isEmpty()) {
|
||||
|
|
|
@ -11,7 +11,6 @@ import org.slf4j.Logger;
|
|||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import pro.taskana.common.api.BulkOperationResults;
|
||||
import pro.taskana.common.api.LoggerUtils;
|
||||
import pro.taskana.common.api.exceptions.InvalidArgumentException;
|
||||
import pro.taskana.common.api.exceptions.NotAuthorizedException;
|
||||
import pro.taskana.common.api.exceptions.TaskanaException;
|
||||
|
@ -188,7 +187,7 @@ public class TaskTransferrer {
|
|||
"entry to transferTasks(targetWbKey = {}, domain = {}, taskIds = {})",
|
||||
destinationWorkbasketKey,
|
||||
destinationWorkbasketDomain,
|
||||
LoggerUtils.listToString(taskIds));
|
||||
taskIds);
|
||||
}
|
||||
|
||||
// Check pre-conditions with trowing Exceptions
|
||||
|
@ -207,7 +206,7 @@ public class TaskTransferrer {
|
|||
+ "destination taskIds = {})",
|
||||
destinationWorkbasketKey,
|
||||
destinationWorkbasketDomain,
|
||||
LoggerUtils.listToString(taskIds));
|
||||
taskIds);
|
||||
}
|
||||
|
||||
taskanaEngine.returnConnection();
|
||||
|
@ -223,7 +222,7 @@ public class TaskTransferrer {
|
|||
LOGGER.debug(
|
||||
"entry to transferTasks(targetWbId = {}, taskIds = {})",
|
||||
destinationWorkbasketId,
|
||||
LoggerUtils.listToString(taskIds));
|
||||
taskIds);
|
||||
}
|
||||
|
||||
// Check pre-conditions with trowing Exceptions
|
||||
|
@ -238,7 +237,7 @@ public class TaskTransferrer {
|
|||
LOGGER.debug(
|
||||
"exit from transferTasks(targetWbKey = {}, taskIds = {})",
|
||||
destinationWorkbasketId,
|
||||
LoggerUtils.listToString(taskIds));
|
||||
taskIds);
|
||||
}
|
||||
|
||||
taskanaEngine.returnConnection();
|
||||
|
@ -251,7 +250,7 @@ public class TaskTransferrer {
|
|||
if (LOGGER.isDebugEnabled()) {
|
||||
LOGGER.debug(
|
||||
"entry to transferTasks(taskIdsToBeTransferred = {}, destinationWorkbasket = {})",
|
||||
LoggerUtils.listToString(taskIdsToBeTransferred),
|
||||
taskIdsToBeTransferred,
|
||||
destinationWorkbasket);
|
||||
}
|
||||
|
||||
|
@ -292,8 +291,8 @@ public class TaskTransferrer {
|
|||
LOGGER.debug(
|
||||
"entry to checkIfTransferConditionsAreFulfilled(taskIds = {}, "
|
||||
+ "taskSummaries = {}, bulkLog = {})",
|
||||
LoggerUtils.listToString(taskIds),
|
||||
LoggerUtils.listToString(taskSummaries),
|
||||
taskIds,
|
||||
taskSummaries,
|
||||
bulkLog);
|
||||
}
|
||||
|
||||
|
@ -324,9 +323,9 @@ public class TaskTransferrer {
|
|||
LOGGER.debug(
|
||||
"entry to checkIfTasksMatchTransferCriteria(taskIds = {}, taskSummaries = {}, "
|
||||
+ "sourceWorkbaskets = {}, bulkLog = {})",
|
||||
LoggerUtils.listToString(taskIds),
|
||||
LoggerUtils.listToString(taskSummaries),
|
||||
LoggerUtils.listToString(sourceWorkbaskets),
|
||||
taskIds,
|
||||
taskSummaries,
|
||||
sourceWorkbaskets,
|
||||
bulkLog);
|
||||
}
|
||||
|
||||
|
@ -378,8 +377,8 @@ public class TaskTransferrer {
|
|||
LOGGER.debug(
|
||||
"entry to updateTasksToBeTransferred(taskIds = {}, taskSummaries = {}, "
|
||||
+ "destinationWorkbasket = {})",
|
||||
LoggerUtils.listToString(taskIds),
|
||||
LoggerUtils.listToString(taskSummaries),
|
||||
taskIds,
|
||||
taskSummaries,
|
||||
destinationWorkbasket.getId());
|
||||
}
|
||||
|
||||
|
|
|
@ -12,7 +12,6 @@ import org.slf4j.LoggerFactory;
|
|||
|
||||
import pro.taskana.common.api.BaseQuery.SortDirection;
|
||||
import pro.taskana.common.api.BulkOperationResults;
|
||||
import pro.taskana.common.api.LoggerUtils;
|
||||
import pro.taskana.common.api.ScheduledJob;
|
||||
import pro.taskana.common.api.TaskanaEngine;
|
||||
import pro.taskana.common.api.TimeInterval;
|
||||
|
@ -135,7 +134,7 @@ public class TaskCleanupJob extends AbstractTaskanaJob {
|
|||
|
||||
if (LOGGER.isDebugEnabled()) {
|
||||
LOGGER.debug(
|
||||
"exit from getTasksCompletedBefore(), returning {}", LoggerUtils.listToString(taskList));
|
||||
"exit from getTasksCompletedBefore(), returning {}", taskList);
|
||||
}
|
||||
|
||||
return taskList;
|
||||
|
@ -145,7 +144,7 @@ public class TaskCleanupJob extends AbstractTaskanaJob {
|
|||
if (LOGGER.isDebugEnabled()) {
|
||||
LOGGER.debug(
|
||||
"entry to deleteTasksTransactionally(tasksToBeDeleted = {})",
|
||||
LoggerUtils.listToString(tasksToBeDeleted));
|
||||
tasksToBeDeleted);
|
||||
}
|
||||
|
||||
int deletedTaskCount = 0;
|
||||
|
|
|
@ -6,7 +6,6 @@ import java.util.Map;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import pro.taskana.common.api.LoggerUtils;
|
||||
import pro.taskana.common.api.ScheduledJob;
|
||||
import pro.taskana.common.api.TaskanaEngine;
|
||||
import pro.taskana.common.api.exceptions.TaskanaException;
|
||||
|
@ -54,6 +53,6 @@ public class TaskRefreshJob extends AbstractTaskanaJob {
|
|||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "TaskRefreshJob [affectedTaskIds= " + LoggerUtils.listToString(affectedTaskIds) + "]";
|
||||
return "TaskRefreshJob [affectedTaskIds= " + affectedTaskIds + "]";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,6 @@ import org.apache.ibatis.session.RowBounds;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import pro.taskana.common.api.LoggerUtils;
|
||||
import pro.taskana.common.api.exceptions.TaskanaRuntimeException;
|
||||
import pro.taskana.common.internal.InternalTaskanaEngine;
|
||||
import pro.taskana.workbasket.api.AbstractWorkbasketAccessItemQuery;
|
||||
|
@ -95,7 +94,7 @@ abstract class AbstractWorkbasketAccessItemQueryImpl<
|
|||
LOGGER.debug(
|
||||
"exit from list(). Returning {} resulting Objects: {} ",
|
||||
result.size(),
|
||||
LoggerUtils.listToString(result));
|
||||
result);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -126,7 +125,7 @@ abstract class AbstractWorkbasketAccessItemQueryImpl<
|
|||
LOGGER.debug(
|
||||
"exit from list(offset,limit). Returning {} resulting Objects: {} ",
|
||||
result.size(),
|
||||
LoggerUtils.listToString(result));
|
||||
result);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -150,7 +149,7 @@ abstract class AbstractWorkbasketAccessItemQueryImpl<
|
|||
LOGGER.debug(
|
||||
"Exit from listValues. Returning {} resulting Objects: {} ",
|
||||
numberOfResultObjects,
|
||||
LoggerUtils.listToString(result));
|
||||
result);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,6 @@ import org.apache.ibatis.session.RowBounds;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import pro.taskana.common.api.LoggerUtils;
|
||||
import pro.taskana.common.api.exceptions.TaskanaRuntimeException;
|
||||
import pro.taskana.common.internal.InternalTaskanaEngine;
|
||||
import pro.taskana.workbasket.api.AccessItemQueryColumnName;
|
||||
|
@ -111,7 +110,7 @@ public class WorkbasketAccessItemQueryImpl implements WorkbasketAccessItemQuery
|
|||
LOGGER.debug(
|
||||
"exit from list(). Returning {} resulting Objects: {} ",
|
||||
result.size(),
|
||||
LoggerUtils.listToString(result));
|
||||
result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -142,7 +141,7 @@ public class WorkbasketAccessItemQueryImpl implements WorkbasketAccessItemQuery
|
|||
LOGGER.debug(
|
||||
"exit from list(offset,limit). Returning {} resulting Objects: {} ",
|
||||
result.size(),
|
||||
LoggerUtils.listToString(result));
|
||||
result);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -166,7 +165,7 @@ public class WorkbasketAccessItemQueryImpl implements WorkbasketAccessItemQuery
|
|||
LOGGER.debug(
|
||||
"Exit from listValues. Returning {} resulting Objects: {} ",
|
||||
numberOfResultObjects,
|
||||
LoggerUtils.listToString(result));
|
||||
result);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,7 +9,6 @@ import org.slf4j.Logger;
|
|||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import pro.taskana.TaskanaEngineConfiguration;
|
||||
import pro.taskana.common.api.LoggerUtils;
|
||||
import pro.taskana.common.api.TaskanaRole;
|
||||
import pro.taskana.common.api.TimeInterval;
|
||||
import pro.taskana.common.api.exceptions.InvalidArgumentException;
|
||||
|
@ -398,7 +397,7 @@ public class WorkbasketQueryImpl implements WorkbasketQuery {
|
|||
LOGGER.debug(
|
||||
"exit from list(). Returning {} resulting Objects: {} ",
|
||||
numberOfResultObjects,
|
||||
LoggerUtils.listToString(workbaskets));
|
||||
workbaskets);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -428,7 +427,7 @@ public class WorkbasketQueryImpl implements WorkbasketQuery {
|
|||
LOGGER.debug(
|
||||
"exit from list(offset,limit). Returning {} resulting Objects: {} ",
|
||||
workbaskets.size(),
|
||||
LoggerUtils.listToString(workbaskets));
|
||||
workbaskets);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -450,7 +449,7 @@ public class WorkbasketQueryImpl implements WorkbasketQuery {
|
|||
LOGGER.debug(
|
||||
"Exit from listValues. Returning {} resulting Objects: {} ",
|
||||
result.size(),
|
||||
LoggerUtils.listToString(result));
|
||||
result);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,7 +14,6 @@ import org.slf4j.LoggerFactory;
|
|||
|
||||
import pro.taskana.TaskanaEngineConfiguration;
|
||||
import pro.taskana.common.api.BulkOperationResults;
|
||||
import pro.taskana.common.api.LoggerUtils;
|
||||
import pro.taskana.common.api.TaskanaRole;
|
||||
import pro.taskana.common.api.exceptions.ConcurrencyException;
|
||||
import pro.taskana.common.api.exceptions.DomainNotFoundException;
|
||||
|
@ -428,7 +427,7 @@ public class WorkbasketServiceImpl implements WorkbasketService {
|
|||
LOGGER.debug(
|
||||
"exit from getWorkbasketAccessItems(workbasketId). Returning {} resulting Objects: {} ",
|
||||
result.size(),
|
||||
LoggerUtils.listToString(result));
|
||||
result);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -532,7 +531,7 @@ public class WorkbasketServiceImpl implements WorkbasketService {
|
|||
LOGGER.debug(
|
||||
"exit from getDistributionTargets(workbasketId). Returning {} resulting Objects: {} ",
|
||||
numberOfResultObjects,
|
||||
LoggerUtils.listToString(result));
|
||||
result);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -563,7 +562,7 @@ public class WorkbasketServiceImpl implements WorkbasketService {
|
|||
LOGGER.debug(
|
||||
"exit from getDistributionTargets(workbasketId). Returning {} resulting Objects: {} ",
|
||||
numberOfResultObjects,
|
||||
LoggerUtils.listToString(result));
|
||||
result);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -575,7 +574,7 @@ public class WorkbasketServiceImpl implements WorkbasketService {
|
|||
LOGGER.debug(
|
||||
"entry to setDistributionTargets(sourceWorkbasketId = {}, targetWorkazketIds = {})",
|
||||
sourceWorkbasketId,
|
||||
LoggerUtils.listToString(targetWorkbasketIds));
|
||||
targetWorkbasketIds);
|
||||
}
|
||||
taskanaEngine.getEngine().checkRoleMembership(TaskanaRole.BUSINESS_ADMIN, TaskanaRole.ADMIN);
|
||||
try {
|
||||
|
@ -746,7 +745,7 @@ public class WorkbasketServiceImpl implements WorkbasketService {
|
|||
if (LOGGER.isDebugEnabled()) {
|
||||
LOGGER.debug(
|
||||
"entry to deleteWorkbaskets(workbasketId = {})",
|
||||
LoggerUtils.listToString(workbasketsIds));
|
||||
workbasketsIds);
|
||||
}
|
||||
|
||||
taskanaEngine.getEngine().checkRoleMembership(TaskanaRole.BUSINESS_ADMIN, TaskanaRole.ADMIN);
|
||||
|
@ -817,7 +816,7 @@ public class WorkbasketServiceImpl implements WorkbasketService {
|
|||
LOGGER.debug(
|
||||
"exit from getDistributionSources(workbasketId). Returning {} resulting Objects: {} ",
|
||||
numberOfResultObjects,
|
||||
LoggerUtils.listToString(result));
|
||||
result);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -846,7 +845,7 @@ public class WorkbasketServiceImpl implements WorkbasketService {
|
|||
LOGGER.debug(
|
||||
"exit from getDistributionSources(workbasketId). Returning {} resulting Objects: {} ",
|
||||
numberOfResultObjects,
|
||||
LoggerUtils.listToString(result));
|
||||
result);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,7 +11,6 @@ import org.springframework.test.context.ActiveProfiles;
|
|||
import org.springframework.test.context.junit.jupiter.SpringExtension;
|
||||
|
||||
import pro.taskana.RestConfiguration;
|
||||
import pro.taskana.common.api.LoggerUtils;
|
||||
import pro.taskana.common.api.exceptions.InvalidArgumentException;
|
||||
import pro.taskana.common.rest.ldap.LdapClient;
|
||||
import pro.taskana.common.rest.models.AccessIdRepresentationModel;
|
||||
|
@ -30,7 +29,7 @@ class LdapTest {
|
|||
void testFindUsers() throws InvalidArgumentException {
|
||||
if (ldapClient.useLdap()) {
|
||||
List<AccessIdRepresentationModel> usersAndGroups = ldapClient.searchUsersAndGroups("ser0");
|
||||
System.out.println("#### found " + LoggerUtils.listToString(usersAndGroups));
|
||||
System.out.println("#### found " + usersAndGroups);
|
||||
assertThat(usersAndGroups).hasSize(50);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,7 +34,6 @@ import pro.taskana.classification.api.models.Classification;
|
|||
import pro.taskana.classification.api.models.ClassificationSummary;
|
||||
import pro.taskana.classification.rest.assembler.ClassificationRepresentationModelAssembler;
|
||||
import pro.taskana.classification.rest.models.ClassificationRepresentationModel;
|
||||
import pro.taskana.common.api.LoggerUtils;
|
||||
import pro.taskana.common.api.exceptions.ConcurrencyException;
|
||||
import pro.taskana.common.api.exceptions.DomainNotFoundException;
|
||||
import pro.taskana.common.api.exceptions.InvalidArgumentException;
|
||||
|
@ -178,7 +177,7 @@ public class ClassificationDefinitionController {
|
|||
if (LOGGER.isDebugEnabled()) {
|
||||
LOGGER.debug(
|
||||
"Exit from mapChildrenToParentKeys(), returning {}",
|
||||
LoggerUtils.mapToString(childrenInFile));
|
||||
childrenInFile);
|
||||
}
|
||||
|
||||
return childrenInFile;
|
||||
|
|
|
@ -22,7 +22,6 @@ import org.springframework.ldap.filter.OrFilter;
|
|||
import org.springframework.ldap.filter.WhitespaceWildcardsFilter;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import pro.taskana.common.api.LoggerUtils;
|
||||
import pro.taskana.common.api.exceptions.InvalidArgumentException;
|
||||
import pro.taskana.common.api.exceptions.SystemException;
|
||||
import pro.taskana.common.rest.models.AccessIdRepresentationModel;
|
||||
|
@ -86,7 +85,7 @@ public class LdapClient {
|
|||
"exit from searchUsersAndGroups(name = {}). Returning {} users and groups: {}",
|
||||
name,
|
||||
accessIds.size(),
|
||||
LoggerUtils.listToString(result));
|
||||
result);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
@ -119,7 +118,7 @@ public class LdapClient {
|
|||
new UserContextMapper());
|
||||
LOGGER.debug(
|
||||
"exit from searchUsersByName. Retrieved the following users: {}.",
|
||||
LoggerUtils.listToString(accessIds));
|
||||
accessIds);
|
||||
return accessIds;
|
||||
}
|
||||
|
||||
|
@ -147,7 +146,7 @@ public class LdapClient {
|
|||
new GroupContextMapper());
|
||||
LOGGER.debug(
|
||||
"Exit from searchGroupsByName. Retrieved the following groups: {}",
|
||||
LoggerUtils.listToString(accessIds));
|
||||
accessIds);
|
||||
return accessIds;
|
||||
}
|
||||
|
||||
|
@ -189,7 +188,7 @@ public class LdapClient {
|
|||
new GroupContextMapper());
|
||||
LOGGER.debug(
|
||||
"exit from searchGroupsofUsersIsMember. Retrieved the following users: {}.",
|
||||
LoggerUtils.listToString(accessIds));
|
||||
accessIds);
|
||||
return accessIds;
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,6 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
import org.springframework.hateoas.RepresentationModel;
|
||||
|
||||
import pro.taskana.common.api.LoggerUtils;
|
||||
import pro.taskana.common.api.TaskanaRole;
|
||||
|
||||
/** EntityModel class for user information. */
|
||||
|
@ -45,9 +44,9 @@ public class TaskanaUserInfoRepresentationModel
|
|||
+ "userId= "
|
||||
+ this.userId
|
||||
+ "groupIds= "
|
||||
+ LoggerUtils.listToString(this.groupIds)
|
||||
+ groupIds
|
||||
+ "roles= "
|
||||
+ LoggerUtils.listToString(this.roles)
|
||||
+ this.roles
|
||||
+ "]";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,7 +22,6 @@ import org.springframework.web.bind.annotation.RequestParam;
|
|||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import pro.taskana.common.api.BaseQuery.SortDirection;
|
||||
import pro.taskana.common.api.LoggerUtils;
|
||||
import pro.taskana.common.api.exceptions.ConcurrencyException;
|
||||
import pro.taskana.common.api.exceptions.DomainNotFoundException;
|
||||
import pro.taskana.common.api.exceptions.InvalidArgumentException;
|
||||
|
@ -305,7 +304,7 @@ public class WorkbasketController extends AbstractPagingController {
|
|||
LOGGER.debug(
|
||||
"Entry to getTasksStatusReport(workbasketId= {}, targetWorkbasketIds´= {})",
|
||||
sourceWorkbasketId,
|
||||
LoggerUtils.listToString(targetWorkbasketIds));
|
||||
targetWorkbasketIds);
|
||||
}
|
||||
|
||||
workbasketService.setDistributionTargets(sourceWorkbasketId, targetWorkbasketIds);
|
||||
|
|
Loading…
Reference in New Issue