diff options
Diffstat (limited to 'services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event')
17 files changed, 7 insertions, 31 deletions
diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/ApexEvent.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/ApexEvent.java index 7828960b4..2364d0cb4 100644 --- a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/ApexEvent.java +++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/ApexEvent.java @@ -25,11 +25,9 @@ import java.util.HashMap; import java.util.Map; import java.util.Properties; import java.util.concurrent.atomic.AtomicLong; - import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.ToString; - import org.onap.policy.apex.model.basicmodel.concepts.AxReferenceKey; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/ApexEventConverter.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/ApexEventConverter.java index a45ba2e1e..f167d3409 100644 --- a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/ApexEventConverter.java +++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/ApexEventConverter.java @@ -21,7 +21,6 @@ package org.onap.policy.apex.service.engine.event; import java.util.List; - import org.onap.policy.apex.model.basicmodel.concepts.ApexException; /** diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/ApexEventProducer.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/ApexEventProducer.java index 1d6476837..bd6e45163 100644 --- a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/ApexEventProducer.java +++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/ApexEventProducer.java @@ -21,7 +21,6 @@ package org.onap.policy.apex.service.engine.event; import java.util.Properties; - import org.onap.policy.apex.service.parameters.eventhandler.EventHandlerParameters; import org.onap.policy.apex.service.parameters.eventhandler.EventHandlerPeeredMode; diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/ApexPeriodicEventGenerator.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/ApexPeriodicEventGenerator.java index 198e70194..dabe1fdc7 100644 --- a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/ApexPeriodicEventGenerator.java +++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/ApexPeriodicEventGenerator.java @@ -24,7 +24,6 @@ import java.util.HashMap; import java.util.Map; import java.util.Timer; import java.util.TimerTask; - import org.onap.policy.apex.service.engine.runtime.EngineServiceEventInterface; import org.slf4j.ext.XLogger; import org.slf4j.ext.XLoggerFactory; diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/ApexPluginsEventProducer.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/ApexPluginsEventProducer.java index e12633555..ebfd71f28 100644 --- a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/ApexPluginsEventProducer.java +++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/ApexPluginsEventProducer.java @@ -23,7 +23,6 @@ package org.onap.policy.apex.service.engine.event; import java.util.EnumMap; import java.util.Map; import java.util.Properties; - import org.onap.policy.apex.service.parameters.eventhandler.EventHandlerPeeredMode; public abstract class ApexPluginsEventProducer implements ApexEventProducer { diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/SynchronousEventCache.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/SynchronousEventCache.java index 0fbb009b9..1a486375d 100644 --- a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/SynchronousEventCache.java +++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/SynchronousEventCache.java @@ -26,7 +26,6 @@ import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; import java.util.Set; - import org.onap.policy.apex.core.infrastructure.threading.ThreadUtilities; import org.onap.policy.apex.service.parameters.eventhandler.EventHandlerPeeredMode; import org.slf4j.ext.XLogger; diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/apexprotocolplugin/Apex2ApexEventConverter.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/apexprotocolplugin/Apex2ApexEventConverter.java index 64b4aa88d..6e4c6d5d2 100644 --- a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/apexprotocolplugin/Apex2ApexEventConverter.java +++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/apexprotocolplugin/Apex2ApexEventConverter.java @@ -22,7 +22,6 @@ package org.onap.policy.apex.service.engine.event.impl.apexprotocolplugin; import java.util.ArrayList; import java.util.List; - import org.onap.policy.apex.service.engine.event.ApexEvent; import org.onap.policy.apex.service.engine.event.ApexEventException; import org.onap.policy.apex.service.engine.event.ApexEventList; diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/enevent/ApexEvent2EnEventConverter.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/enevent/ApexEvent2EnEventConverter.java index 14486614c..1cca52a3d 100644 --- a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/enevent/ApexEvent2EnEventConverter.java +++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/enevent/ApexEvent2EnEventConverter.java @@ -22,7 +22,6 @@ package org.onap.policy.apex.service.engine.event.impl.enevent; import java.util.ArrayList; import java.util.List; - import org.onap.policy.apex.core.engine.engine.ApexEngine; import org.onap.policy.apex.core.engine.event.EnEvent; import org.onap.policy.apex.model.basicmodel.concepts.ApexException; diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/eventrequestor/EventRequestorConsumer.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/eventrequestor/EventRequestorConsumer.java index 4581b179c..f5ceff4a7 100644 --- a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/eventrequestor/EventRequestorConsumer.java +++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/eventrequestor/EventRequestorConsumer.java @@ -26,7 +26,6 @@ import java.util.Properties; import java.util.concurrent.BlockingQueue; import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.TimeUnit; - import org.onap.policy.apex.core.infrastructure.threading.ApplicationThreadFactory; import org.onap.policy.apex.core.infrastructure.threading.ThreadUtilities; import org.onap.policy.apex.service.engine.event.ApexEventConsumer; diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/eventrequestor/EventRequestorProducer.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/eventrequestor/EventRequestorProducer.java index b08b7eca3..b1abeb527 100644 --- a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/eventrequestor/EventRequestorProducer.java +++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/eventrequestor/EventRequestorProducer.java @@ -24,7 +24,6 @@ package org.onap.policy.apex.service.engine.event.impl.eventrequestor; import java.util.EnumMap; import java.util.Map; import java.util.Properties; - import org.onap.policy.apex.service.engine.event.ApexEventConsumer; import org.onap.policy.apex.service.engine.event.ApexEventException; import org.onap.policy.apex.service.engine.event.ApexEventProducer; diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/filecarrierplugin/FileCarrierTechnologyParameters.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/filecarrierplugin/FileCarrierTechnologyParameters.java index 91551e57e..5071824ce 100644 --- a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/filecarrierplugin/FileCarrierTechnologyParameters.java +++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/filecarrierplugin/FileCarrierTechnologyParameters.java @@ -21,7 +21,6 @@ package org.onap.policy.apex.service.engine.event.impl.filecarrierplugin; import java.io.File; - import org.onap.policy.apex.service.engine.event.impl.filecarrierplugin.consumer.ApexFileEventConsumer; import org.onap.policy.apex.service.engine.event.impl.filecarrierplugin.producer.ApexFileEventProducer; import org.onap.policy.apex.service.parameters.carriertechnology.CarrierTechnologyParameters; @@ -235,9 +234,8 @@ public class FileCarrierTechnologyParameters extends CarrierTechnologyParameters // Check if the file exists, the file should be a regular file and should be readable if (theFile.exists()) { validateExistingFile(result, absoluteFileName, theFile); - } - // The path to the file should exist and should be writable - else { + } else { + // The path to the file should exist and should be writable validateNewFileParent(result, absoluteFileName, theFile); } } @@ -253,8 +251,7 @@ public class FileCarrierTechnologyParameters extends CarrierTechnologyParameters // Check that the file is a regular file if (!theFile.isFile()) { result.setResult(FILE_NAME_TOKEN, ValidationStatus.INVALID, "is not a plain file"); - } - else { + } else { fileName = absoluteFileName; if (!theFile.canRead()) { @@ -274,12 +271,10 @@ public class FileCarrierTechnologyParameters extends CarrierTechnologyParameters // Check that the parent of the file is a directory if (!theFile.getParentFile().exists()) { result.setResult(FILE_NAME_TOKEN, ValidationStatus.INVALID, "parent of file does not exist"); - } - // Check that the parent of the file is a directory - else if (!theFile.getParentFile().isDirectory()) { + } else if (!theFile.getParentFile().isDirectory()) { + // Check that the parent of the file is a directory result.setResult(FILE_NAME_TOKEN, ValidationStatus.INVALID, "parent of file is not directory"); - } - else { + } else { fileName = absoluteFileName; if (!theFile.getParentFile().canRead()) { diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/filecarrierplugin/consumer/ApexFileEventConsumer.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/filecarrierplugin/consumer/ApexFileEventConsumer.java index 7366528c7..04de6b1bc 100644 --- a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/filecarrierplugin/consumer/ApexFileEventConsumer.java +++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/filecarrierplugin/consumer/ApexFileEventConsumer.java @@ -27,7 +27,6 @@ import java.util.EnumMap; import java.util.Map; import java.util.Properties; import java.util.concurrent.atomic.AtomicLong; - import org.onap.policy.apex.core.infrastructure.threading.ApplicationThreadFactory; import org.onap.policy.apex.core.infrastructure.threading.ThreadUtilities; import org.onap.policy.apex.service.engine.event.ApexEventConsumer; @@ -198,8 +197,7 @@ public class ApexFileEventConsumer implements ApexEventConsumer, Runnable { if (textBlock.getText() != null) { eventReceiver.receiveEvent(getNextExecutionId(), new Properties(), textBlock.getText()); } - } - while (!textBlock.isEndOfText()); + } while (!textBlock.isEndOfText()); } catch (final Exception e) { LOGGER.warn("\"" + consumerName + "\" failed to read event from file: \"" + fileCarrierTechnologyParameters.getFileName() + "\"", e); diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/filecarrierplugin/consumer/CharacterDelimitedTextBlockReader.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/filecarrierplugin/consumer/CharacterDelimitedTextBlockReader.java index 243281965..85ae52702 100644 --- a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/filecarrierplugin/consumer/CharacterDelimitedTextBlockReader.java +++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/filecarrierplugin/consumer/CharacterDelimitedTextBlockReader.java @@ -22,7 +22,6 @@ package org.onap.policy.apex.service.engine.event.impl.filecarrierplugin.consume import java.io.IOException; import java.io.InputStream; - import org.onap.policy.apex.service.parameters.eventprotocol.EventProtocolTextCharDelimitedParameters; import org.slf4j.ext.XLogger; import org.slf4j.ext.XLoggerFactory; diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/filecarrierplugin/consumer/HeaderDelimitedTextBlockReader.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/filecarrierplugin/consumer/HeaderDelimitedTextBlockReader.java index eecd47c17..5531d9704 100644 --- a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/filecarrierplugin/consumer/HeaderDelimitedTextBlockReader.java +++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/filecarrierplugin/consumer/HeaderDelimitedTextBlockReader.java @@ -26,7 +26,6 @@ import java.io.InputStream; import java.io.InputStreamReader; import java.util.Queue; import java.util.concurrent.LinkedBlockingQueue; - import org.onap.policy.apex.core.infrastructure.threading.ApplicationThreadFactory; import org.onap.policy.apex.core.infrastructure.threading.ThreadUtilities; import org.onap.policy.apex.service.parameters.eventprotocol.EventProtocolTextTokenDelimitedParameters; diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/filecarrierplugin/consumer/TextBlockReaderFactory.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/filecarrierplugin/consumer/TextBlockReaderFactory.java index e48266634..fb57a2d7b 100644 --- a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/filecarrierplugin/consumer/TextBlockReaderFactory.java +++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/filecarrierplugin/consumer/TextBlockReaderFactory.java @@ -21,7 +21,6 @@ package org.onap.policy.apex.service.engine.event.impl.filecarrierplugin.consumer; import java.io.InputStream; - import org.onap.policy.apex.service.engine.event.ApexEventException; import org.onap.policy.apex.service.parameters.eventprotocol.EventProtocolParameters; import org.onap.policy.apex.service.parameters.eventprotocol.EventProtocolTextCharDelimitedParameters; diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/filecarrierplugin/producer/ApexFileEventProducer.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/filecarrierplugin/producer/ApexFileEventProducer.java index b0dac3372..da5ee025a 100644 --- a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/filecarrierplugin/producer/ApexFileEventProducer.java +++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/filecarrierplugin/producer/ApexFileEventProducer.java @@ -25,7 +25,6 @@ import java.io.FileOutputStream; import java.io.IOException; import java.io.PrintStream; import java.util.Properties; - import org.onap.policy.apex.core.infrastructure.threading.ThreadUtilities; import org.onap.policy.apex.service.engine.event.ApexEventException; import org.onap.policy.apex.service.engine.event.ApexEventRuntimeException; diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/jsonprotocolplugin/Apex2JsonEventConverter.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/jsonprotocolplugin/Apex2JsonEventConverter.java index ad0508078..459a2c4bf 100644 --- a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/jsonprotocolplugin/Apex2JsonEventConverter.java +++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/jsonprotocolplugin/Apex2JsonEventConverter.java @@ -26,11 +26,9 @@ import com.google.gson.GsonBuilder; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.internal.LinkedTreeMap; - import java.util.ArrayList; import java.util.Collection; import java.util.List; - import org.onap.policy.apex.context.SchemaHelper; import org.onap.policy.apex.context.impl.schema.SchemaHelperFactory; import org.onap.policy.apex.model.basicmodel.service.ModelService; |