* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2019-2021 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2022 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
import java.time.Instant;
import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;
-import lombok.ToString;
import org.onap.policy.common.gson.annotation.GsonJsonIgnore;
import org.onap.policy.drools.controller.DroolsControllerConstants;
import org.onap.policy.drools.protocol.coders.EventProtocolCoder.CoderFilters;
/**
* Tools used for encoding/decoding using GSON.
*/
-@ToString(callSuper = true)
class GsonProtocolCoderToolset extends ProtocolCoderToolset {
private static final String CANNOT_FETCH_CLASS = "{}: cannot fetch application class {}";
private static final String FETCH_CLASS_EX_MSG = "cannot fetch application class ";
@GsonJsonIgnore
public static final DateTimeFormatter format = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.SSSSSSxxx");
- @GsonJsonIgnore
- public static final DateTimeFormatter zuluFormat = DateTimeFormatter.ISO_INSTANT;
-
/**
* Adapter for ZonedDateTime.
*/
}
-
/**
* decoder.
*/
} catch (final Exception e) {
logger.warn("{} cannot decode {} into {}", this, json, decoderClass.getName());
throw new UnsupportedOperationException(
- "cannont decode into " + decoderFilter.getFactClass(), e);
+ "cannot decode into " + decoderFilter.getFactClass(), e);
}
}
}
}
}
}
+
+ @Override
+ public String toString() {
+ return "GsonProtocolCoderToolset [toString()=" + super.toString() + "]";
+ }
}
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2017-2021 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2022 AT&T Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2018 Samsung Electronics Co., Ltd.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
import java.util.concurrent.CopyOnWriteArrayList;
import lombok.Getter;
import lombok.Setter;
-import lombok.ToString;
import org.onap.policy.drools.protocol.coders.EventProtocolCoder.CoderFilters;
import org.onap.policy.drools.protocol.coders.TopicCoderFilterConfiguration.CustomCoder;
import org.slf4j.Logger;
* Protocol Coding/Decoding Toolset.
*/
@Getter
-@ToString
public abstract class ProtocolCoderToolset {
/**
* Logger.
*/
- private static Logger logger = LoggerFactory.getLogger(ProtocolCoderToolset.class);
+ private static final Logger logger = LoggerFactory.getLogger(ProtocolCoderToolset.class);
/**
* topic.
* @throws UnsupportedOperationException if parsing into POJO is not possible
*/
public abstract String encode(Object event);
+
+ @Override
+ public String toString() {
+ return "ProtocolCoderToolset [topic=" + this.topic + ", controllerId="
+ + this.controllerId + ", groupId=" + groupId + ", artifactId="
+ + this.artifactId + ", coders=" + this.coders
+ + ", customCoder=" + this.customCoder + "]";
+ }
}