Remove CustomEvents - unused (#2039)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
@@ -15,6 +15,7 @@ import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import lombok.Getter;
|
||||
import org.eclipse.hawkbit.repository.ValidString;
|
||||
import org.eclipse.hawkbit.repository.model.Action.Status;
|
||||
import org.springframework.util.StringUtils;
|
||||
@@ -34,12 +35,9 @@ public abstract class AbstractActionStatusCreate<T> {
|
||||
|
||||
protected List<@ValidString String> messages;
|
||||
|
||||
@Getter
|
||||
protected Long actionId;
|
||||
|
||||
public Long getActionId() {
|
||||
return actionId;
|
||||
}
|
||||
|
||||
public T status(final Status status) {
|
||||
this.status = status;
|
||||
|
||||
@@ -59,10 +57,11 @@ public abstract class AbstractActionStatusCreate<T> {
|
||||
}
|
||||
|
||||
public T messages(final Collection<String> messages) {
|
||||
final List<String> newMessages = messages.stream().map(String::strip).toList();
|
||||
if (this.messages == null) {
|
||||
this.messages = messages.stream().map(StringUtils::trimWhitespace).collect(Collectors.toList());
|
||||
this.messages = newMessages;
|
||||
} else {
|
||||
this.messages.addAll(messages.stream().map(StringUtils::trimWhitespace).collect(Collectors.toList()));
|
||||
this.messages.addAll(newMessages);
|
||||
}
|
||||
|
||||
return (T) this;
|
||||
@@ -72,7 +71,7 @@ public abstract class AbstractActionStatusCreate<T> {
|
||||
if (this.messages == null) {
|
||||
this.messages = new ArrayList<>();
|
||||
}
|
||||
this.messages.add(StringUtils.trimWhitespace(message));
|
||||
this.messages.add(message.strip());
|
||||
|
||||
return (T) this;
|
||||
}
|
||||
@@ -80,5 +79,4 @@ public abstract class AbstractActionStatusCreate<T> {
|
||||
public Optional<Long> getOccurredAt() {
|
||||
return Optional.ofNullable(occurredAt);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user