diff options
author | an4828 <nekrassov@att.com> | 2018-01-22 17:17:34 -0500 |
---|---|---|
committer | an4828 <nekrassov@att.com> | 2018-01-22 17:20:00 -0500 |
commit | c489a2eb22484e798c39a978bc8b61821b92322f (patch) | |
tree | 5aafe90efc15f8ced47e0d14c5f23a86a07f03e1 /dcae-analytics-model | |
parent | baaecfc19132034168beb64a0c1e7813c7c17c4a (diff) |
TCA: Replace any openecomp reference by onap
Change-Id: I7c6d812ab5c1d7b30c63653d1974b0b1abc099be
Signed-off-by: an4828 <nekrassov@att.com>
Issue-ID: DCAEGEN2-224
Signed-off-by: an4828 <nekrassov@att.com>
Diffstat (limited to 'dcae-analytics-model')
-rw-r--r-- | dcae-analytics-model/pom.xml | 258 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/BaseDynamicPropertiesProvider.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/BaseDynamicPropertiesProvider.java) | 138 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/DCAEAnalyticsModel.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/DCAEAnalyticsModel.java) | 64 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/DynamicPropertiesProvider.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/DynamicPropertiesProvider.java) | 112 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/ConfigModel.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/config/ConfigModel.java) | 66 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/BaseTCAAppConfigModel.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/config/tca/BaseTCAAppConfigModel.java) | 74 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/BaseTCAHandle.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/config/tca/BaseTCAHandle.java) | 76 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/DMAAPInfo.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/config/tca/DMAAPInfo.java) | 90 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/StreamsPublishes.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/config/tca/StreamsPublishes.java) | 74 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/StreamsSubscribes.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/config/tca/StreamsSubscribes.java) | 74 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/TCAAppConfigModel.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/config/tca/TCAAppConfigModel.java) | 68 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/TCAControllerAppConfig.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/config/tca/TCAControllerAppConfig.java) | 84 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/TCAHandleIn.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/config/tca/TCAHandleIn.java) | 78 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/TCAHandleOut.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/config/tca/TCAHandleOut.java) | 78 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/AlertAction.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/AlertAction.java) | 62 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/AlertType.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/AlertType.java) | 88 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/BaseCEFModel.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/BaseCEFModel.java) | 78 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/CEFModel.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/CEFModel.java) | 64 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/CommonEventHeader.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/CommonEventHeader.java) | 362 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/Criticality.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/Criticality.java) | 62 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/Domain.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/Domain.java) | 82 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/Event.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/Event.java) | 122 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/EventListener.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/EventListener.java) | 90 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/EventSeverity.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/EventSeverity.java) | 72 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/Field.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/Field.java) | 106 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/InternalHeaderFields.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/InternalHeaderFields.java) | 76 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/MeasurementsForVfScalingFields.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/MeasurementsForVfScalingFields.java) | 162 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/NamedArrayOfFields.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/NamedArrayOfFields.java) | 110 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/PerformanceCounter.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/PerformanceCounter.java) | 136 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/Priority.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/Priority.java) | 68 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/ThresholdCrossingAlertFields.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/ThresholdCrossingAlertFields.java) | 316 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/VNicPerformance.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/VNicPerformance.java) | 616 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/PolicyModel.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/PolicyModel.java) | 66 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/tca/BaseTCAPolicyModel.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/tca/BaseTCAPolicyModel.java) | 74 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/tca/ClosedLoopEventStatus.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/tca/ClosedLoopEventStatus.java) | 68 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/tca/ControlLoopSchemaType.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/tca/ControlLoopSchemaType.java) | 66 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/tca/Direction.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/tca/Direction.java) | 152 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/tca/MetricsPerEventName.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/tca/MetricsPerEventName.java) | 230 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/tca/TCAPolicy.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/tca/TCAPolicy.java) | 116 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/tca/TCAPolicyModel.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/tca/TCAPolicyModel.java) | 70 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/tca/Threshold.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/tca/Threshold.java) | 254 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/facade/FacadeModel.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/facade/FacadeModel.java) | 66 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/facade/tca/AAI.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/facade/tca/AAI.java) | 82 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/facade/tca/TCAFacadeModel.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/facade/tca/TCAFacadeModel.java) | 62 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/facade/tca/TCAVESResponse.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/facade/tca/TCAVESResponse.java) | 100 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/AnalyticsModelIOUtils.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/AnalyticsModelIOUtils.java) | 264 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/AnalyticsModelJsonUtils.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/AnalyticsModelJsonUtils.java) | 208 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/AnalyticsModelObjectMapperSupplier.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/AnalyticsModelObjectMapperSupplier.java) | 230 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/CommonEventFormatModule.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/CommonEventFormatModule.java) | 192 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/TCAControllerConfigModule.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/TCAControllerConfigModule.java) | 118 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/TCAFacadeModelModule.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/TCAFacadeModelModule.java) | 98 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/TCAPolicyModule.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/TCAPolicyModule.java) | 128 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/BaseDynamicPropertiesProviderMixin.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/BaseDynamicPropertiesProviderMixin.java) | 122 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/JsonMixin.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/JsonMixin.java) | 62 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/AlertActionMixin.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/AlertActionMixin.java) | 60 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/AlertTypeMixin.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/AlertTypeMixin.java) | 122 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/BaseCEFModelMixin.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/BaseCEFModelMixin.java) | 62 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/CommonEventHeaderMixin.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/CommonEventHeaderMixin.java) | 54 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/CriticalityMixin.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/CriticalityMixin.java) | 60 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/DomainMixin.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/DomainMixin.java) | 60 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/EventListenerMixin.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/EventListenerMixin.java) | 58 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/EventMixin.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/EventMixin.java) | 58 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/EventSeverityMixin.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/EventSeverityMixin.java) | 60 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/FieldMixin.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/FieldMixin.java) | 56 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/InternalHeaderFieldsMixin.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/InternalHeaderFieldsMixin.java) | 56 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/MeasurementsForVfScalingFieldsMixin.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/MeasurementsForVfScalingFieldsMixin.java) | 78 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/NamedArrayOfFieldsMixin.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/NamedArrayOfFieldsMixin.java) | 56 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/PerformanceCounterMixin.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/PerformanceCounterMixin.java) | 58 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/PriorityMixin.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/PriorityMixin.java) | 60 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/ThresholdCrossingAlertFieldsMixin.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/ThresholdCrossingAlertFieldsMixin.java) | 58 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/VNicUsageArrayMixin.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/VNicUsageArrayMixin.java) | 72 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/config/tca/BaseTCAAppConfigModelMixin.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/config/tca/BaseTCAAppConfigModelMixin.java) | 58 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/config/tca/BaseTCAHandleMixin.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/config/tca/BaseTCAHandleMixin.java) | 80 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/config/tca/DMAAPInfoMixin.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/config/tca/DMAAPInfoMixin.java) | 66 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/config/tca/StreamsPublishesMixin.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/config/tca/StreamsPublishesMixin.java) | 68 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/config/tca/StreamsSubscribesMixin.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/config/tca/StreamsSubscribesMixin.java) | 68 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/config/tca/TCAControllerAppConfigMixin.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/config/tca/TCAControllerAppConfigMixin.java) | 74 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/facade/tca/AAIMixin.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/facade/tca/AAIMixin.java) | 110 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/facade/tca/VESCEFMessageResponseMixin.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/facade/tca/VESCEFMessageResponseMixin.java) | 112 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/policy/tca/BaseTCAPolicyModelMixin.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/policy/tca/BaseTCAPolicyModelMixin.java) | 60 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/policy/tca/ClosedLoopEventStatusMixin.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/policy/tca/ClosedLoopEventStatusMixin.java) | 60 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/policy/tca/ControlLoopSchemaTypeMixin.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/policy/tca/ControlLoopSchemaTypeMixin.java) | 58 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/policy/tca/DirectionMixin.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/policy/tca/DirectionMixin.java) | 60 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/policy/tca/MetricsPerEventNameMixin.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/policy/tca/MetricsPerEventNameMixin.java) | 56 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/policy/tca/TCAPolicyMixin.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/policy/tca/TCAPolicyMixin.java) | 56 | ||||
-rw-r--r-- | dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/policy/tca/ThresholdMixin.java (renamed from dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/policy/tca/ThresholdMixin.java) | 92 | ||||
-rw-r--r-- | dcae-analytics-model/src/test/java/org/onap/dcae/apod/analytics/model/BaseAnalyticsModelUnitTest.java (renamed from dcae-analytics-model/src/test/java/org/openecomp/dcae/apod/analytics/model/BaseAnalyticsModelUnitTest.java) | 308 | ||||
-rw-r--r-- | dcae-analytics-model/src/test/java/org/onap/dcae/apod/analytics/model/domain/cef/EventSeverityTest.java (renamed from dcae-analytics-model/src/test/java/org/openecomp/dcae/apod/analytics/model/domain/cef/EventSeverityTest.java) | 142 | ||||
-rw-r--r-- | dcae-analytics-model/src/test/java/org/onap/dcae/apod/analytics/model/facade/tca/AAITest.java (renamed from dcae-analytics-model/src/test/java/org/openecomp/dcae/apod/analytics/model/facade/tca/AAITest.java) | 114 | ||||
-rw-r--r-- | dcae-analytics-model/src/test/java/org/onap/dcae/apod/analytics/model/facade/tca/TCAVESResponseTest.java (renamed from dcae-analytics-model/src/test/java/org/openecomp/dcae/apod/analytics/model/facade/tca/TCAVESResponseTest.java) | 152 | ||||
-rw-r--r-- | dcae-analytics-model/src/test/java/org/onap/dcae/apod/analytics/model/util/AnalyticsModelIOUtilsTest.java (renamed from dcae-analytics-model/src/test/java/org/openecomp/dcae/apod/analytics/model/util/AnalyticsModelIOUtilsTest.java) | 172 | ||||
-rw-r--r-- | dcae-analytics-model/src/test/java/org/onap/dcae/apod/analytics/model/util/AnalyticsModelJsonUtilsTest.java (renamed from dcae-analytics-model/src/test/java/org/openecomp/dcae/apod/analytics/model/util/AnalyticsModelJsonUtilsTest.java) | 160 | ||||
-rw-r--r-- | dcae-analytics-model/src/test/java/org/onap/dcae/apod/analytics/model/util/ConfigHolder.java (renamed from dcae-analytics-model/src/test/java/org/openecomp/dcae/apod/analytics/model/util/ConfigHolder.java) | 66 | ||||
-rw-r--r-- | dcae-analytics-model/src/test/java/org/onap/dcae/apod/analytics/model/util/TestAppConfig.java (renamed from dcae-analytics-model/src/test/java/org/openecomp/dcae/apod/analytics/model/util/TestAppConfig.java) | 76 | ||||
-rw-r--r-- | dcae-analytics-model/src/test/java/org/onap/dcae/apod/analytics/model/util/json/AnalyticsModelObjectMapperSupplierTest.java (renamed from dcae-analytics-model/src/test/java/org/openecomp/dcae/apod/analytics/model/util/json/AnalyticsModelObjectMapperSupplierTest.java) | 128 | ||||
-rw-r--r-- | dcae-analytics-model/src/test/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/AlertTypeMixinTest.java (renamed from dcae-analytics-model/src/test/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/AlertTypeMixinTest.java) | 102 | ||||
-rw-r--r-- | dcae-analytics-model/src/test/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/EventListenerMixinTest.java (renamed from dcae-analytics-model/src/test/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/EventListenerMixinTest.java) | 166 | ||||
-rw-r--r-- | dcae-analytics-model/src/test/java/org/onap/dcae/apod/analytics/model/util/json/mixin/config/tca/TCAControllerAppConfigMixinTest.java (renamed from dcae-analytics-model/src/test/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/config/tca/TCAControllerAppConfigMixinTest.java) | 126 | ||||
-rw-r--r-- | dcae-analytics-model/src/test/java/org/onap/dcae/apod/analytics/model/util/json/mixin/facade/tca/TCAVESResponseMixinTest.java (renamed from dcae-analytics-model/src/test/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/facade/tca/TCAVESResponseMixinTest.java) | 110 | ||||
-rw-r--r-- | dcae-analytics-model/src/test/java/org/onap/dcae/apod/analytics/model/util/json/mixin/policy/tca/TCAPolicyMixinTest.java (renamed from dcae-analytics-model/src/test/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/policy/tca/TCAPolicyMixinTest.java) | 102 | ||||
-rw-r--r-- | dcae-analytics-model/src/test/resources/logback-test.xml | 110 |
101 files changed, 5517 insertions, 5517 deletions
diff --git a/dcae-analytics-model/pom.xml b/dcae-analytics-model/pom.xml index 0e54923..e130edd 100644 --- a/dcae-analytics-model/pom.xml +++ b/dcae-analytics-model/pom.xml @@ -1,129 +1,129 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ ===============================LICENSE_START======================================
- ~ dcae-analytics
- ~ ================================================================================
- ~ Copyright © 2017 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.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- ~ ============================LICENSE_END===========================================
- -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <artifactId>dcae-analytics</artifactId>
- <groupId>org.onap.dcaegen2.analytics.tca</groupId>
- <version>2.1.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>dcae-analytics-model</artifactId>
- <packaging>jar</packaging>
-
- <!-- THIS MODULE CONTAINS MODELS COMMON FOR ALL DCAE ANALYTICS MODULES.
- NOTE: THIS MODULE MUST NOT DEPEND ON ANY OTHER ANALYTICS MODULE IN COMPILE SCOPE. -->
- <name>DCAE Analytics Model</name>
- <description>Contains models (e.g. Common Event Format) which are common to DCAE Analytics</description>
-
-
- <properties>
- <main.basedir>${project.parent.basedir}</main.basedir>
- <sonar.sources>target/generated-sources/delombok</sonar.sources>
- </properties>
-
- <dependencies>
-
- <!-- LOGGING -->
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </dependency>
-
- <dependency>
- <groupId>ch.qos.logback</groupId>
- <artifactId>logback-core</artifactId>
- </dependency>
-
- <dependency>
- <groupId>ch.qos.logback</groupId>
- <artifactId>logback-classic</artifactId>
- </dependency>
-
- <!-- UTILITIES -->
- <dependency>
- <groupId>com.google.guava</groupId>
- <artifactId>guava</artifactId>
- </dependency>
- <dependency>
- <groupId>com.google.code.findbugs</groupId>
- <artifactId>jsr305</artifactId>
- </dependency>
- <dependency>
- <groupId>com.google.code.findbugs</groupId>
- <artifactId>annotations</artifactId>
- </dependency>
-
- <!-- CODE GENERATION -->
- <!-- NOTE: Lombok must remain in provided scope. Use delomok to generate code -->
- <dependency>
- <groupId>org.projectlombok</groupId>
- <artifactId>lombok</artifactId>
- </dependency>
-
- <!-- JACKSON JSON -->
- <dependency>
- <groupId>com.fasterxml.jackson.core</groupId>
- <artifactId>jackson-core</artifactId>
- </dependency>
- <dependency>
- <groupId>com.fasterxml.jackson.core</groupId>
- <artifactId>jackson-databind</artifactId>
- </dependency>
- <dependency>
- <groupId>com.fasterxml.jackson.core</groupId>
- <artifactId>jackson-annotations</artifactId>
- </dependency>
-
-
- <!-- JSON PATH -->
- <dependency>
- <groupId>com.jayway.jsonpath</groupId>
- <artifactId>json-path</artifactId>
- </dependency>
-
- <!-- TEST DEPENDENCIES -->
- <dependency>
- <groupId>org.onap.dcaegen2.analytics.tca</groupId>
- <artifactId>dcae-analytics-test</artifactId>
- <version>2.1.0-SNAPSHOT</version>
- <scope>test</scope>
- </dependency>
-
- </dependencies>
-
- <build>
- <sourceDirectory>${project.build.directory}/generated-sources/delombok</sourceDirectory>
- <plugins>
- <plugin>
- <groupId>org.projectlombok</groupId>
- <artifactId>lombok-maven-plugin</artifactId>
- </plugin>
- </plugins>
- </build>
-
-
-</project>
+<?xml version="1.0" encoding="UTF-8"?> +<!-- + ~ ===============================LICENSE_START====================================== + ~ dcae-analytics + ~ ================================================================================ + ~ Copyright © 2017 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. + ~ You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, software + ~ distributed under the License is distributed on an "AS IS" BASIS, + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ~ See the License for the specific language governing permissions and + ~ limitations under the License. + ~ ============================LICENSE_END=========================================== + --> + +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + + <modelVersion>4.0.0</modelVersion> + + <parent> + <artifactId>dcae-analytics</artifactId> + <groupId>org.onap.dcaegen2.analytics.tca</groupId> + <version>2.1.0-SNAPSHOT</version> + </parent> + + <artifactId>dcae-analytics-model</artifactId> + <packaging>jar</packaging> + + <!-- THIS MODULE CONTAINS MODELS COMMON FOR ALL DCAE ANALYTICS MODULES. + NOTE: THIS MODULE MUST NOT DEPEND ON ANY OTHER ANALYTICS MODULE IN COMPILE SCOPE. --> + <name>DCAE Analytics Model</name> + <description>Contains models (e.g. Common Event Format) which are common to DCAE Analytics</description> + + + <properties> + <main.basedir>${project.parent.basedir}</main.basedir> + <sonar.sources>target/generated-sources/delombok</sonar.sources> + </properties> + + <dependencies> + + <!-- LOGGING --> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + </dependency> + + <dependency> + <groupId>ch.qos.logback</groupId> + <artifactId>logback-core</artifactId> + </dependency> + + <dependency> + <groupId>ch.qos.logback</groupId> + <artifactId>logback-classic</artifactId> + </dependency> + + <!-- UTILITIES --> + <dependency> + <groupId>com.google.guava</groupId> + <artifactId>guava</artifactId> + </dependency> + <dependency> + <groupId>com.google.code.findbugs</groupId> + <artifactId>jsr305</artifactId> + </dependency> + <dependency> + <groupId>com.google.code.findbugs</groupId> + <artifactId>annotations</artifactId> + </dependency> + + <!-- CODE GENERATION --> + <!-- NOTE: Lombok must remain in provided scope. Use delomok to generate code --> + <dependency> + <groupId>org.projectlombok</groupId> + <artifactId>lombok</artifactId> + </dependency> + + <!-- JACKSON JSON --> + <dependency> + <groupId>com.fasterxml.jackson.core</groupId> + <artifactId>jackson-core</artifactId> + </dependency> + <dependency> + <groupId>com.fasterxml.jackson.core</groupId> + <artifactId>jackson-databind</artifactId> + </dependency> + <dependency> + <groupId>com.fasterxml.jackson.core</groupId> + <artifactId>jackson-annotations</artifactId> + </dependency> + + + <!-- JSON PATH --> + <dependency> + <groupId>com.jayway.jsonpath</groupId> + <artifactId>json-path</artifactId> + </dependency> + + <!-- TEST DEPENDENCIES --> + <dependency> + <groupId>org.onap.dcaegen2.analytics.tca</groupId> + <artifactId>dcae-analytics-test</artifactId> + <version>2.1.0-SNAPSHOT</version> + <scope>test</scope> + </dependency> + + </dependencies> + + <build> + <sourceDirectory>${project.build.directory}/generated-sources/delombok</sourceDirectory> + <plugins> + <plugin> + <groupId>org.projectlombok</groupId> + <artifactId>lombok-maven-plugin</artifactId> + </plugin> + </plugins> + </build> + + +</project> diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/BaseDynamicPropertiesProvider.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/BaseDynamicPropertiesProvider.java index dc90a38..f50b859 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/BaseDynamicPropertiesProvider.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/BaseDynamicPropertiesProvider.java @@ -1,69 +1,69 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model;
-
-import lombok.Data;
-
-import java.util.LinkedHashMap;
-import java.util.Map;
-
-/**
- * <p>
- * Base Dynamic Provider provide functionality so that all the
- * additional dynamic Properties can be accumalated in a map.
- * </p>
- *
- * @author Rajiv Singla . Creation Date: 11/5/2016.
- */
-@Data
-public abstract class BaseDynamicPropertiesProvider implements DynamicPropertiesProvider {
-
- /**
- * All non-required properties should be captured in additional properties
- *
- * @param dynamicProperties Dynamic properties
- * @return dynamic properties
- */
- private Map<String, Object> dynamicProperties = new LinkedHashMap<>();
-
-
- /**
- * Add a dynamic property to Common Event Format Entity
- *
- * @param propertyName property name
- * @param propertyValue property value
- */
- @Override
- public void addDynamicProperties(String propertyName, Object propertyValue) {
- dynamicProperties.put(propertyName, propertyValue);
- }
-
- /**
- * Determines if dynamic properties are present for the CEF Entity
- *
- * @return return true if Dynamic Properties are present
- */
- public boolean isDynamicPropertiesPresent() {
- return dynamicProperties.size() == 0;
- }
-
-
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model; + +import lombok.Data; + +import java.util.LinkedHashMap; +import java.util.Map; + +/** + * <p> + * Base Dynamic Provider provide functionality so that all the + * additional dynamic Properties can be accumalated in a map. + * </p> + * + * @author Rajiv Singla . Creation Date: 11/5/2016. + */ +@Data +public abstract class BaseDynamicPropertiesProvider implements DynamicPropertiesProvider { + + /** + * All non-required properties should be captured in additional properties + * + * @param dynamicProperties Dynamic properties + * @return dynamic properties + */ + private Map<String, Object> dynamicProperties = new LinkedHashMap<>(); + + + /** + * Add a dynamic property to Common Event Format Entity + * + * @param propertyName property name + * @param propertyValue property value + */ + @Override + public void addDynamicProperties(String propertyName, Object propertyValue) { + dynamicProperties.put(propertyName, propertyValue); + } + + /** + * Determines if dynamic properties are present for the CEF Entity + * + * @return return true if Dynamic Properties are present + */ + public boolean isDynamicPropertiesPresent() { + return dynamicProperties.size() == 0; + } + + +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/DCAEAnalyticsModel.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/DCAEAnalyticsModel.java index 2573dfe..06fbea7 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/DCAEAnalyticsModel.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/DCAEAnalyticsModel.java @@ -1,32 +1,32 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model;
-
-import java.io.Serializable;
-
-/**
- * <p>
- * Marker Interface for all DCAE Analytics Model implementations
- * </p>
- * @author Rajiv Singla . Creation Date: 11/5/2016.
- */
-public interface DCAEAnalyticsModel extends Serializable {
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model; + +import java.io.Serializable; + +/** + * <p> + * Marker Interface for all DCAE Analytics Model implementations + * </p> + * @author Rajiv Singla . Creation Date: 11/5/2016. + */ +public interface DCAEAnalyticsModel extends Serializable { +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/DynamicPropertiesProvider.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/DynamicPropertiesProvider.java index 6f82a43..24b4fae 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/DynamicPropertiesProvider.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/DynamicPropertiesProvider.java @@ -1,56 +1,56 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model;
-
-import java.util.Map;
-
-/**
- * <p>
- * Problem: Many Entities have dynamic properties as well as known properties.
- * Known properites can be binded explicitly with all dynamic properties need
- * to be captured also ensuring that there must not be any loss in information
- * during deserialization / serialization process.
- * </p>
- * <p>
- * This contract allows the deserialization mechanism to catch those dynamic properties
- * in a Map so that deserialization mechanism will not loose any information and
- * can be serialized back with no loss in dynamic properties information
- * </p>
- * @author Rajiv Singla . Creation Date: 10/18/2016.
- */
-public interface DynamicPropertiesProvider extends DCAEAnalyticsModel {
-
-
- /**
- * Adds dynamic properties in a Map object
- *
- * @param propertyName property name
- * @param propertyValue property value
- */
- void addDynamicProperties(String propertyName, Object propertyValue);
-
- /**
- * Provides dynamic properties map
- *
- * @return dynamic properties map object
- */
- Map<String, Object> getDynamicProperties();
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model; + +import java.util.Map; + +/** + * <p> + * Problem: Many Entities have dynamic properties as well as known properties. + * Known properites can be binded explicitly with all dynamic properties need + * to be captured also ensuring that there must not be any loss in information + * during deserialization / serialization process. + * </p> + * <p> + * This contract allows the deserialization mechanism to catch those dynamic properties + * in a Map so that deserialization mechanism will not loose any information and + * can be serialized back with no loss in dynamic properties information + * </p> + * @author Rajiv Singla . Creation Date: 10/18/2016. + */ +public interface DynamicPropertiesProvider extends DCAEAnalyticsModel { + + + /** + * Adds dynamic properties in a Map object + * + * @param propertyName property name + * @param propertyValue property value + */ + void addDynamicProperties(String propertyName, Object propertyValue); + + /** + * Provides dynamic properties map + * + * @return dynamic properties map object + */ + Map<String, Object> getDynamicProperties(); +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/config/ConfigModel.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/ConfigModel.java index 7a595af..baa5e59 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/config/ConfigModel.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/ConfigModel.java @@ -1,33 +1,33 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.config;
-
-import org.openecomp.dcae.apod.analytics.model.DCAEAnalyticsModel;
-
-/**
- * <p>
- * Marker Interface for all Configuration Model Objects
- * </p>
- *
- * @author Rajiv Singla . Creation Date: 08/25/2017.
- */
-public interface ConfigModel extends DCAEAnalyticsModel {
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.config; + +import org.onap.dcae.apod.analytics.model.DCAEAnalyticsModel; + +/** + * <p> + * Marker Interface for all Configuration Model Objects + * </p> + * + * @author Rajiv Singla . Creation Date: 08/25/2017. + */ +public interface ConfigModel extends DCAEAnalyticsModel { +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/config/tca/BaseTCAAppConfigModel.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/BaseTCAAppConfigModel.java index fd189f4..7887756 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/config/tca/BaseTCAAppConfigModel.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/BaseTCAAppConfigModel.java @@ -1,37 +1,37 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.config.tca;
-
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.openecomp.dcae.apod.analytics.model.BaseDynamicPropertiesProvider;
-
-/**
- * <p>
- * Base TCA App Config model class
- * </p>
- *
- * @author Rajiv Singla . Creation Date: 8/25/2017.
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public abstract class BaseTCAAppConfigModel extends BaseDynamicPropertiesProvider implements TCAAppConfigModel {
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.config.tca; + +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.onap.dcae.apod.analytics.model.BaseDynamicPropertiesProvider; + +/** + * <p> + * Base TCA App Config model class + * </p> + * + * @author Rajiv Singla . Creation Date: 8/25/2017. + */ +@Data +@EqualsAndHashCode(callSuper = true) +public abstract class BaseTCAAppConfigModel extends BaseDynamicPropertiesProvider implements TCAAppConfigModel { +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/config/tca/BaseTCAHandle.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/BaseTCAHandle.java index 5763865..fa1a1c8 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/config/tca/BaseTCAHandle.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/BaseTCAHandle.java @@ -1,38 +1,38 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.config.tca;
-
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * @author Rajiv Singla . Creation Date: 8/25/2017.
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public abstract class BaseTCAHandle extends BaseTCAAppConfigModel {
-
- private String aafPassword;
- private String aafUserName;
- private DMAAPInfo dmaapInfo;
- private String type;
-
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.config.tca; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * @author Rajiv Singla . Creation Date: 8/25/2017. + */ +@Data +@EqualsAndHashCode(callSuper = true) +public abstract class BaseTCAHandle extends BaseTCAAppConfigModel { + + private String aafPassword; + private String aafUserName; + private DMAAPInfo dmaapInfo; + private String type; + +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/config/tca/DMAAPInfo.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/DMAAPInfo.java index d0ad7ad..57b9007 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/config/tca/DMAAPInfo.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/DMAAPInfo.java @@ -1,45 +1,45 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.config.tca;
-
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * DMaaP Information nested inside DMaaP Controller config
- *
- * @author Rajiv Singla . Creation Date: 8/25/2017.
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class DMAAPInfo extends BaseTCAAppConfigModel {
-
- private static final long serialVersionUID = 1L;
-
- /**
- * DMaaP Topic URL
- *
- * @param topicUrl new value for DMaaP topic URL
- * @return DMaaP Topic URL
- */
- private String topicUrl;
-
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.config.tca; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * DMaaP Information nested inside DMaaP Controller config + * + * @author Rajiv Singla . Creation Date: 8/25/2017. + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class DMAAPInfo extends BaseTCAAppConfigModel { + + private static final long serialVersionUID = 1L; + + /** + * DMaaP Topic URL + * + * @param topicUrl new value for DMaaP topic URL + * @return DMaaP Topic URL + */ + private String topicUrl; + +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/config/tca/StreamsPublishes.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/StreamsPublishes.java index debeae7..03f65c4 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/config/tca/StreamsPublishes.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/StreamsPublishes.java @@ -1,37 +1,37 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.config.tca;
-
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * @author Rajiv Singla . Creation Date: 8/25/2017.
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class StreamsPublishes extends BaseTCAAppConfigModel {
-
- private static final long serialVersionUID = 1L;
-
- private TCAHandleOut tcaHandleOut;
-
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.config.tca; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * @author Rajiv Singla . Creation Date: 8/25/2017. + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class StreamsPublishes extends BaseTCAAppConfigModel { + + private static final long serialVersionUID = 1L; + + private TCAHandleOut tcaHandleOut; + +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/config/tca/StreamsSubscribes.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/StreamsSubscribes.java index d8d140b..7f55a7c 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/config/tca/StreamsSubscribes.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/StreamsSubscribes.java @@ -1,37 +1,37 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.config.tca;
-
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * @author Rajiv Singla . Creation Date: 8/25/2017.
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class StreamsSubscribes extends BaseTCAAppConfigModel {
-
- private static final long serialVersionUID = 1L;
-
- private TCAHandleIn tcaHandleIn;
-
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.config.tca; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * @author Rajiv Singla . Creation Date: 8/25/2017. + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class StreamsSubscribes extends BaseTCAAppConfigModel { + + private static final long serialVersionUID = 1L; + + private TCAHandleIn tcaHandleIn; + +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/config/tca/TCAAppConfigModel.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/TCAAppConfigModel.java index 070a25e..c0206ef 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/config/tca/TCAAppConfigModel.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/TCAAppConfigModel.java @@ -1,34 +1,34 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.config.tca;
-
-import org.openecomp.dcae.apod.analytics.model.config.ConfigModel;
-
-/**
- * <p>
- * Marker Interface for all TCA Facade Models
- * </p>
- *
- * @author Rajiv Singla . Creation Date: 8/25/2017.
- */
-public interface TCAAppConfigModel extends ConfigModel {
-
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.config.tca; + +import org.onap.dcae.apod.analytics.model.config.ConfigModel; + +/** + * <p> + * Marker Interface for all TCA Facade Models + * </p> + * + * @author Rajiv Singla . Creation Date: 8/25/2017. + */ +public interface TCAAppConfigModel extends ConfigModel { + +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/config/tca/TCAControllerAppConfig.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/TCAControllerAppConfig.java index bdd30eb..51eb6fe 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/config/tca/TCAControllerAppConfig.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/TCAControllerAppConfig.java @@ -1,42 +1,42 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.config.tca;
-
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * Model Object Representing the App Config passed in by the controller
- *
- * @author Rajiv Singla . Creation Date: 8/25/2017.
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class TCAControllerAppConfig extends BaseTCAAppConfigModel {
-
- private static final long serialVersionUID = 1L;
-
- private String appName;
- private String appDescription;
- private StreamsPublishes streamsPublishes;
- private StreamsSubscribes streamsSubscribes;
-
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.config.tca; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * Model Object Representing the App Config passed in by the controller + * + * @author Rajiv Singla . Creation Date: 8/25/2017. + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class TCAControllerAppConfig extends BaseTCAAppConfigModel { + + private static final long serialVersionUID = 1L; + + private String appName; + private String appDescription; + private StreamsPublishes streamsPublishes; + private StreamsSubscribes streamsSubscribes; + +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/config/tca/TCAHandleIn.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/TCAHandleIn.java index 41387cf..e035b85 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/config/tca/TCAHandleIn.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/TCAHandleIn.java @@ -1,39 +1,39 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.config.tca;
-
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * <p>
- * TCA Controller App Config - TCA Handle In
- * </p>
- *
- * @author Rajiv Singla . Creation Date: 8/25/2017.
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class TCAHandleIn extends BaseTCAHandle {
-
- private static final long serialVersionUID = 1L;
-
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.config.tca; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * <p> + * TCA Controller App Config - TCA Handle In + * </p> + * + * @author Rajiv Singla . Creation Date: 8/25/2017. + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class TCAHandleIn extends BaseTCAHandle { + + private static final long serialVersionUID = 1L; + +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/config/tca/TCAHandleOut.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/TCAHandleOut.java index 56d776c..c3c1f54 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/config/tca/TCAHandleOut.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/TCAHandleOut.java @@ -1,39 +1,39 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.config.tca;
-
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * <p>
- * TCA Controller App Config - TCA Handle Out
- * </p>
- *
- * @author Rajiv Singla . Creation Date: 8/25/2017.
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class TCAHandleOut extends BaseTCAHandle {
-
- private static final long serialVersionUID = 1L;
-
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.config.tca; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * <p> + * TCA Controller App Config - TCA Handle Out + * </p> + * + * @author Rajiv Singla . Creation Date: 8/25/2017. + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class TCAHandleOut extends BaseTCAHandle { + + private static final long serialVersionUID = 1L; + +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/AlertAction.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/AlertAction.java index f6429ba..09ff85a 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/AlertAction.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/AlertAction.java @@ -1,32 +1,32 @@ -/*
- * ============LICENSE_START=========================================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.domain.cef;
-
-/**
- * Common Event Format Alert Action
- *
- * @author Rajiv Singla. Creation Date: 08/15/2017.
- */
-public enum AlertAction implements CEFModel {
-
- CLEAR, CONT, SET
-
+/* + * ============LICENSE_START========================================================= + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.dcae.apod.analytics.model.domain.cef; + +/** + * Common Event Format Alert Action + * + * @author Rajiv Singla. Creation Date: 08/15/2017. + */ +public enum AlertAction implements CEFModel { + + CLEAR, CONT, SET + } diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/AlertType.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/AlertType.java index 498049c..f42c331 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/AlertType.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/AlertType.java @@ -1,44 +1,44 @@ -/*
- * ============LICENSE_START=========================================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.domain.cef;
-
-/**
- *
- * @author Rajiv Singla. Creation Date: 08/15/2017.
- */
-public enum AlertType implements CEFModel {
-
- CARD_ANOMALY("CARD-ANOMALY"),
- ELEMENT_ANOMALY("ELEMENT-ANOMALY"),
- INTERFACE_ANOMALY("INTERFACE-ANOMALY"),
- SERVICE_ANOMALY("SERVICE-ANOMALY"),
- UNKNOWN(null);
-
- private final String name;
-
- AlertType(String name) {
- this.name = name;
- }
-
- public String getName() {
- return name;
- }
-}
+/* + * ============LICENSE_START========================================================= + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.dcae.apod.analytics.model.domain.cef; + +/** + * + * @author Rajiv Singla. Creation Date: 08/15/2017. + */ +public enum AlertType implements CEFModel { + + CARD_ANOMALY("CARD-ANOMALY"), + ELEMENT_ANOMALY("ELEMENT-ANOMALY"), + INTERFACE_ANOMALY("INTERFACE-ANOMALY"), + SERVICE_ANOMALY("SERVICE-ANOMALY"), + UNKNOWN(null); + + private final String name; + + AlertType(String name) { + this.name = name; + } + + public String getName() { + return name; + } +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/BaseCEFModel.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/BaseCEFModel.java index 21edce2..641db1e 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/BaseCEFModel.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/BaseCEFModel.java @@ -1,39 +1,39 @@ -/*
- * ============LICENSE_START=========================================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.domain.cef;
-
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.openecomp.dcae.apod.analytics.model.BaseDynamicPropertiesProvider;
-
-/**
- * <p>
- * Base CEF Model should be extended by all CEF Model Entities.
- * By extending CEF Model all the additional dynamic Properties
- * can be accumalated in a map.
- * </p>
- *
- * @author Rajiv Singla. Creation Date: 08/15/2017.
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public abstract class BaseCEFModel extends BaseDynamicPropertiesProvider implements CEFModel {
-}
+/* + * ============LICENSE_START========================================================= + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.dcae.apod.analytics.model.domain.cef; + +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.onap.dcae.apod.analytics.model.BaseDynamicPropertiesProvider; + +/** + * <p> + * Base CEF Model should be extended by all CEF Model Entities. + * By extending CEF Model all the additional dynamic Properties + * can be accumalated in a map. + * </p> + * + * @author Rajiv Singla. Creation Date: 08/15/2017. + */ +@Data +@EqualsAndHashCode(callSuper = true) +public abstract class BaseCEFModel extends BaseDynamicPropertiesProvider implements CEFModel { +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/CEFModel.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/CEFModel.java index 1e9eec8..665bd38 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/CEFModel.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/CEFModel.java @@ -1,32 +1,32 @@ -/*
- * ============LICENSE_START=========================================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.domain.cef;
-
-import org.openecomp.dcae.apod.analytics.model.DCAEAnalyticsModel;
-
-/**
- * <p>
- * Marker interface for all DCAE Analytics Common Event Format Model implementations
- * </p>
- * @author Rajiv Singla. Creation Date: 08/15/2017.
- */
-public interface CEFModel extends DCAEAnalyticsModel {
-}
+/* + * ============LICENSE_START========================================================= + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.dcae.apod.analytics.model.domain.cef; + +import org.onap.dcae.apod.analytics.model.DCAEAnalyticsModel; + +/** + * <p> + * Marker interface for all DCAE Analytics Common Event Format Model implementations + * </p> + * @author Rajiv Singla. Creation Date: 08/15/2017. + */ +public interface CEFModel extends DCAEAnalyticsModel { +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/CommonEventHeader.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/CommonEventHeader.java index 23556af..468ab91 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/CommonEventHeader.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/CommonEventHeader.java @@ -1,181 +1,181 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.domain.cef;
-
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * Fields common to all Events
- * <p>
- * @author Rajiv Singla. Creation Date: 08/15/2017.
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class CommonEventHeader extends BaseCEFModel {
-
-
- private static final long serialVersionUID = 1L;
-
- /**
- * The eventing domain associated with this event
- *
- * @param domain New value for domain
- * @return The eventing domain associated with this event
- */
- private Domain domain;
-
- /**
- * Event key that is unique to the event source
- *
- * @param eventId New value for event key
- * @return Event key that is unique to the event source
- */
- private String eventId;
-
- /**
- * Unique event name
- *
- * @param eventName New value for event name
- * @return Unique event name
- */
- private String eventName;
-
-
- /**
- * Event type e.g. applicationVnf, guestOS, hostOS, platform
- *
- * @param eventType New value for event type
- * @return Event type e.g. applicationVnf, guestOS, hostOS, platform
- */
- private String eventType;
-
-
- /**
- * Enrichment fields for internal VES Event Listener service use only, not supplied by event sources
- *
- * @param internalHeaderFields new value for internal Header Fields
- * @return Enrichment fields for internal VES Event Listener service use only, not supplied by event sources
- */
- private InternalHeaderFields internalHeaderFields;
-
-
- /**
- * The latest unix time aka epoch time associated with the event from any component--as microseconds elapsed since
- * 1 Jan 1970 not including leap seconds
- *
- * @param lastEpochMicrosec New value for last Epoc Microsec
- * @return The latest unix time associated with the event from any component
- */
- private Long lastEpochMicrosec;
-
-
- /**
- * Three character network function component type as aligned with vfc naming standards
- *
- * @param nfcNamingCode New value for nfc naming code
- * @return Three character network function component type as aligned with vfc naming standards
- */
- private String nfcNamingCode;
-
-
- /**
- * Four character network function type as aligned with vnf naming standards
- *
- * @param nfNamingCode New value for nf naming code
- * @return Four character network function type as aligned with vnf naming standards
- */
- private String nfNamingCode;
-
-
- /**
- * Processing Priority
- *
- * @param priority New value for processing Priority
- * @return Processing Priority
- */
- private Priority priority;
-
-
- /**
- * UUID identifying the entity reporting the event, for example an OAM VM; must be populated by the
- * enrichment process
- *
- * @param reportingEntityId New value for reporting entity Id. Must be populated by the enrichment process
- * @return UUID identifying the entity reporting the event populated by the enrichment process
- */
- private String reportingEntityId;
-
-
- /**
- * Name of the entity reporting the event, for example, an EMS name; may be the same as sourceName
- *
- * @param reportingEntityName New value for reporting Entity Name
- * @return Name of the entity reporting the event, may be the same as sourceName
- */
- private String reportingEntityName;
-
-
- /**
- * Ordering of events communicated by an event source instance or 0 if not needed
- *
- * @param sequence New value for Sequence
- * @return Ordering of events communicated by an event source instance or 0 if not needed
- */
- private Integer sequence;
-
-
- /**
- * UUID identifying the entity experiencing the event issue; must be populated by the enrichment process
- *
- * @param sourceId New value for source id. Must be populated by the enrichment process
- * @return UUID identifying the entity experiencing the event issue
- */
- private String sourceId;
-
-
- /**
- * Name of the entity experiencing the event issue
- *
- * @param sourceName New value for source name
- * @return Name of the entity experiencing the event issue
- */
- private String sourceName;
-
-
- /**
- * the earliest unix time aka epoch time associated with the event from any component--as microseconds elapsed
- * since 1 Jan 1970 not including leap seconds
- *
- * @param startEpochMicrosec New value for start Epoc Microsec
- * @return The earliest unix time associated with the event from any component
- */
- private Long startEpochMicrosec;
-
-
- /**
- * Version of the event header
- *
- * @param version New value for version of the event header
- * @return Version of the event header
- */
- private Float version;
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.domain.cef; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * Fields common to all Events + * <p> + * @author Rajiv Singla. Creation Date: 08/15/2017. + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class CommonEventHeader extends BaseCEFModel { + + + private static final long serialVersionUID = 1L; + + /** + * The eventing domain associated with this event + * + * @param domain New value for domain + * @return The eventing domain associated with this event + */ + private Domain domain; + + /** + * Event key that is unique to the event source + * + * @param eventId New value for event key + * @return Event key that is unique to the event source + */ + private String eventId; + + /** + * Unique event name + * + * @param eventName New value for event name + * @return Unique event name + */ + private String eventName; + + + /** + * Event type e.g. applicationVnf, guestOS, hostOS, platform + * + * @param eventType New value for event type + * @return Event type e.g. applicationVnf, guestOS, hostOS, platform + */ + private String eventType; + + + /** + * Enrichment fields for internal VES Event Listener service use only, not supplied by event sources + * + * @param internalHeaderFields new value for internal Header Fields + * @return Enrichment fields for internal VES Event Listener service use only, not supplied by event sources + */ + private InternalHeaderFields internalHeaderFields; + + + /** + * The latest unix time aka epoch time associated with the event from any component--as microseconds elapsed since + * 1 Jan 1970 not including leap seconds + * + * @param lastEpochMicrosec New value for last Epoc Microsec + * @return The latest unix time associated with the event from any component + */ + private Long lastEpochMicrosec; + + + /** + * Three character network function component type as aligned with vfc naming standards + * + * @param nfcNamingCode New value for nfc naming code + * @return Three character network function component type as aligned with vfc naming standards + */ + private String nfcNamingCode; + + + /** + * Four character network function type as aligned with vnf naming standards + * + * @param nfNamingCode New value for nf naming code + * @return Four character network function type as aligned with vnf naming standards + */ + private String nfNamingCode; + + + /** + * Processing Priority + * + * @param priority New value for processing Priority + * @return Processing Priority + */ + private Priority priority; + + + /** + * UUID identifying the entity reporting the event, for example an OAM VM; must be populated by the + * enrichment process + * + * @param reportingEntityId New value for reporting entity Id. Must be populated by the enrichment process + * @return UUID identifying the entity reporting the event populated by the enrichment process + */ + private String reportingEntityId; + + + /** + * Name of the entity reporting the event, for example, an EMS name; may be the same as sourceName + * + * @param reportingEntityName New value for reporting Entity Name + * @return Name of the entity reporting the event, may be the same as sourceName + */ + private String reportingEntityName; + + + /** + * Ordering of events communicated by an event source instance or 0 if not needed + * + * @param sequence New value for Sequence + * @return Ordering of events communicated by an event source instance or 0 if not needed + */ + private Integer sequence; + + + /** + * UUID identifying the entity experiencing the event issue; must be populated by the enrichment process + * + * @param sourceId New value for source id. Must be populated by the enrichment process + * @return UUID identifying the entity experiencing the event issue + */ + private String sourceId; + + + /** + * Name of the entity experiencing the event issue + * + * @param sourceName New value for source name + * @return Name of the entity experiencing the event issue + */ + private String sourceName; + + + /** + * the earliest unix time aka epoch time associated with the event from any component--as microseconds elapsed + * since 1 Jan 1970 not including leap seconds + * + * @param startEpochMicrosec New value for start Epoc Microsec + * @return The earliest unix time associated with the event from any component + */ + private Long startEpochMicrosec; + + + /** + * Version of the event header + * + * @param version New value for version of the event header + * @return Version of the event header + */ + private Float version; +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/Criticality.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/Criticality.java index 32c3fdc..c48159a 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/Criticality.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/Criticality.java @@ -1,31 +1,31 @@ -/*
- * ============LICENSE_START=========================================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.domain.cef;
-
-/**
- * Performance Criticality
- *
- * @author Rajiv Singla. Creation Date: 08/15/2017.
- */
-public enum Criticality implements CEFModel {
-
- CRIT, MAJ, UNKNOWN
-}
+/* + * ============LICENSE_START========================================================= + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.dcae.apod.analytics.model.domain.cef; + +/** + * Performance Criticality + * + * @author Rajiv Singla. Creation Date: 08/15/2017. + */ +public enum Criticality implements CEFModel { + + CRIT, MAJ, UNKNOWN +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/Domain.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/Domain.java index 7197b75..1cee639 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/Domain.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/Domain.java @@ -1,41 +1,41 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.domain.cef;
-
-/**
- * Eventing domain associated with the event
- * <p>
- * @author Rajiv Singla . Creation Date: 08/15/2017.
- */
-public enum Domain implements CEFModel {
-
- fault,
- heartbeat,
- measurementsForVfScaling,
- mobileFlow,
- other,
- sipSignaling,
- stateChange,
- syslog,
- thresholdCrossingAlert,
- voiceQuality;
-
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.domain.cef; + +/** + * Eventing domain associated with the event + * <p> + * @author Rajiv Singla . Creation Date: 08/15/2017. + */ +public enum Domain implements CEFModel { + + fault, + heartbeat, + measurementsForVfScaling, + mobileFlow, + other, + sipSignaling, + stateChange, + syslog, + thresholdCrossingAlert, + voiceQuality; + +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/Event.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/Event.java index ce8966f..9f13075 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/Event.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/Event.java @@ -1,61 +1,61 @@ -/*
- * ============LICENSE_START=========================================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.domain.cef;
-
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * Generic Event Format
- * <p>
- * @author Rajiv Singla. Creation Date: 08/15/2017.
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class Event extends BaseCEFModel {
-
-
- private static final long serialVersionUID = 1L;
-
- /**
- * Fields common to all Events
- *
- * @param commonEventHeader New value for common Event Header
- * @return Fields common to all Events
- */
- private CommonEventHeader commonEventHeader;
-
- /**
- * Measurements for Vf scaling fields
- *
- * @param measurementsForVfScalingFields New value for MeasurementsForVfScaling
- * @return MeasurementsForVfScaling fields
- */
- private MeasurementsForVfScalingFields measurementsForVfScalingFields;
-
- /**
- * Threshold crossing alert Fields.
- *
- * @param thresholdCrossingAlertFields New value for Threshold crossing Fields
- * @return Threshold crossing Fields
- */
- private ThresholdCrossingAlertFields thresholdCrossingAlertFields;
-}
+/* + * ============LICENSE_START========================================================= + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.dcae.apod.analytics.model.domain.cef; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * Generic Event Format + * <p> + * @author Rajiv Singla. Creation Date: 08/15/2017. + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class Event extends BaseCEFModel { + + + private static final long serialVersionUID = 1L; + + /** + * Fields common to all Events + * + * @param commonEventHeader New value for common Event Header + * @return Fields common to all Events + */ + private CommonEventHeader commonEventHeader; + + /** + * Measurements for Vf scaling fields + * + * @param measurementsForVfScalingFields New value for MeasurementsForVfScaling + * @return MeasurementsForVfScaling fields + */ + private MeasurementsForVfScalingFields measurementsForVfScalingFields; + + /** + * Threshold crossing alert Fields. + * + * @param thresholdCrossingAlertFields New value for Threshold crossing Fields + * @return Threshold crossing Fields + */ + private ThresholdCrossingAlertFields thresholdCrossingAlertFields; +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/EventListener.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/EventListener.java index 8096617..06cee58 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/EventListener.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/EventListener.java @@ -1,45 +1,45 @@ -/*
- * ============LICENSE_START=========================================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.domain.cef;
-
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * Common Event Format - Base Event Listener
- * <p>
- * @author Rajiv Singla. Creation Date: 08/15/2017.
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class EventListener extends BaseCEFModel {
-
-
- private static final long serialVersionUID = 1L;
-
- /**
- * Common Event Format - Event
- *
- * @param event New value for Event
- * @return Common Event Format Event
- */
- private Event event;
-}
+/* + * ============LICENSE_START========================================================= + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.dcae.apod.analytics.model.domain.cef; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * Common Event Format - Base Event Listener + * <p> + * @author Rajiv Singla. Creation Date: 08/15/2017. + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class EventListener extends BaseCEFModel { + + + private static final long serialVersionUID = 1L; + + /** + * Common Event Format - Event + * + * @param event New value for Event + * @return Common Event Format Event + */ + private Event event; +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/EventSeverity.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/EventSeverity.java index bbfbf37..340d0de 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/EventSeverity.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/EventSeverity.java @@ -1,36 +1,36 @@ -/*
- * ============LICENSE_START=========================================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.domain.cef;
-
-/**
- * CEF Event severity or priority
- *
- * @author Rajiv Singla. Creation Date: 08/15/2017.
- */
-public enum EventSeverity implements CEFModel {
-
- //NOTE: enum order must not be changed. Events severity is ordered from high to low
- CRITICAL,
- MAJOR,
- MINOR,
- WARNING,
- NORMAL
-}
+/* + * ============LICENSE_START========================================================= + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.dcae.apod.analytics.model.domain.cef; + +/** + * CEF Event severity or priority + * + * @author Rajiv Singla. Creation Date: 08/15/2017. + */ +public enum EventSeverity implements CEFModel { + + //NOTE: enum order must not be changed. Events severity is ordered from high to low + CRITICAL, + MAJOR, + MINOR, + WARNING, + NORMAL +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/Field.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/Field.java index e5225a6..2f2a2f0 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/Field.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/Field.java @@ -1,53 +1,53 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.domain.cef;
-
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * Name Value Pair
- * <p>
- * @author Rajiv Singla. Creation Date: 08/15/2017.
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class Field extends BaseCEFModel {
-
- private static final long serialVersionUID = 1L;
-
- /**
- * Name of the Field
- *
- * @param name New name for the Field
- * @return Name of the Field
- */
- private String name;
-
- /**
- * Value of the Field
- *
- * @param value New value for the Field
- * @return Value of the Field
- */
- private String value;
-
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.domain.cef; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * Name Value Pair + * <p> + * @author Rajiv Singla. Creation Date: 08/15/2017. + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class Field extends BaseCEFModel { + + private static final long serialVersionUID = 1L; + + /** + * Name of the Field + * + * @param name New name for the Field + * @return Name of the Field + */ + private String name; + + /** + * Value of the Field + * + * @param value New value for the Field + * @return Value of the Field + */ + private String value; + +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/InternalHeaderFields.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/InternalHeaderFields.java index 433f0cb..4007a42 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/InternalHeaderFields.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/InternalHeaderFields.java @@ -1,38 +1,38 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.domain.cef;
-
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * Enrichment fields for internal VES Event Listener service use only, not supplied by event sources
- * <p>
- *
- * @author Rajiv Singla . Creation Date: 08/15/2017.
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class InternalHeaderFields extends BaseCEFModel {
-
- private static final long serialVersionUID = 1L;
-
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.domain.cef; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * Enrichment fields for internal VES Event Listener service use only, not supplied by event sources + * <p> + * + * @author Rajiv Singla . Creation Date: 08/15/2017. + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class InternalHeaderFields extends BaseCEFModel { + + private static final long serialVersionUID = 1L; + +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/MeasurementsForVfScalingFields.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/MeasurementsForVfScalingFields.java index 69cb8ec..73b8df2 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/MeasurementsForVfScalingFields.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/MeasurementsForVfScalingFields.java @@ -1,81 +1,81 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.domain.cef;
-
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-import java.util.List;
-
-/**
- * Common Event Format - MeasurementsForVfScaling fields
- * <p>
- * @author Rajiv Singla. Creation Date: 08/15/2017.
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class MeasurementsForVfScalingFields extends BaseCEFModel {
-
- private static final long serialVersionUID = 1L;
-
- /**
- * Additional name-value-pair fields
- *
- * @param additionalFields New value for additional name-value-pair fields
- * @return Additional name-value-pair fields
- */
- private List<Field> additionalFields;
-
-
- /**
- * Array of named name-value-pair arrays for additional Measurements
- *
- * @param additionalMeasurements New value for array of named name-value-pair arrays for additional Measurements
- * @return Array of named name-value-pair arrays for additional Measurements
- */
- private List<NamedArrayOfFields> additionalMeasurements;
-
- /**
- * Interval over which measurements are being reported in seconds
- *
- * @param measurementInterval New value for measurement Interval
- * @return Interval over which measurements are being reported in seconds
- */
- private Long measurementInterval;
-
- /**
- * Version of the measurementsForVfScaling block
- *
- * @param measurementsForVfScalingVersion New value for measurementsForVfScaling block
- * @return Version of the measurementsForVfScaling block
- */
- private Float measurementsForVfScalingVersion;
-
- /**
- * Usage of an array of virtual network interface cards
- *
- * @param vNicPerformanceArray New value for Usage of an array of virtual network interface cards
- * @return Usage of an array of virtual network interface cards
- */
- private List<VNicPerformance> vNicPerformanceArray;
-
-
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.domain.cef; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.List; + +/** + * Common Event Format - MeasurementsForVfScaling fields + * <p> + * @author Rajiv Singla. Creation Date: 08/15/2017. + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class MeasurementsForVfScalingFields extends BaseCEFModel { + + private static final long serialVersionUID = 1L; + + /** + * Additional name-value-pair fields + * + * @param additionalFields New value for additional name-value-pair fields + * @return Additional name-value-pair fields + */ + private List<Field> additionalFields; + + + /** + * Array of named name-value-pair arrays for additional Measurements + * + * @param additionalMeasurements New value for array of named name-value-pair arrays for additional Measurements + * @return Array of named name-value-pair arrays for additional Measurements + */ + private List<NamedArrayOfFields> additionalMeasurements; + + /** + * Interval over which measurements are being reported in seconds + * + * @param measurementInterval New value for measurement Interval + * @return Interval over which measurements are being reported in seconds + */ + private Long measurementInterval; + + /** + * Version of the measurementsForVfScaling block + * + * @param measurementsForVfScalingVersion New value for measurementsForVfScaling block + * @return Version of the measurementsForVfScaling block + */ + private Float measurementsForVfScalingVersion; + + /** + * Usage of an array of virtual network interface cards + * + * @param vNicPerformanceArray New value for Usage of an array of virtual network interface cards + * @return Usage of an array of virtual network interface cards + */ + private List<VNicPerformance> vNicPerformanceArray; + + +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/NamedArrayOfFields.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/NamedArrayOfFields.java index 970868b..6ab9e58 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/NamedArrayOfFields.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/NamedArrayOfFields.java @@ -1,55 +1,55 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.domain.cef;
-
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-import java.util.List;
-
-/**
- * An array of name value pairs along with a name for the array
- * <p>
- * @author Rajiv Singla. Creation Date: 08/15/2017.
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class NamedArrayOfFields extends BaseCEFModel {
-
- private static final long serialVersionUID = 1L;
-
- /**
- * Name of the NamedArrayOfFields
- *
- * @param name New name for the Field
- * @return Name of the Field
- */
- private String name;
-
- /**
- * Array of name value pairs
- *
- * @param arrayOfFields New value for array of name value pairs
- * @return Array of name value pairs
- */
- private List<Field> arrayOfFields;
-
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.domain.cef; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.List; + +/** + * An array of name value pairs along with a name for the array + * <p> + * @author Rajiv Singla. Creation Date: 08/15/2017. + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class NamedArrayOfFields extends BaseCEFModel { + + private static final long serialVersionUID = 1L; + + /** + * Name of the NamedArrayOfFields + * + * @param name New name for the Field + * @return Name of the Field + */ + private String name; + + /** + * Array of name value pairs + * + * @param arrayOfFields New value for array of name value pairs + * @return Array of name value pairs + */ + private List<Field> arrayOfFields; + +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/PerformanceCounter.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/PerformanceCounter.java index c5e5801..5ab1ef8 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/PerformanceCounter.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/PerformanceCounter.java @@ -1,68 +1,68 @@ -/*
- * ============LICENSE_START=========================================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.domain.cef;
-
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * Common Event Format - Performance PerformanceCounter
- *
- * @author Rajiv Singla. Creation Date: 08/15/2017.
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class PerformanceCounter extends BaseCEFModel {
-
- private static final long serialVersionUID = 1L;
-
- /**
- * Performance Counter Criticality.
- *
- * @param criticality New value for Criticality
- * @return Performance Counter Criticality
- */
- private Criticality criticality;
-
- /**
- * Performance Counter Name
- *
- * @param name New value for Performance counter name
- * @return Performance Counter Name
- */
- private String name;
-
- /**
- * Performance Counter for Threshold Crossed.
- *
- * @param thresholdCrossed New value for Performance Counter Threshold Crossed
- * @return Performance Counter Threshold Crossed
- */
- private String thresholdCrossed;
-
- /**
- * Performance Counter Value.
- *
- * @param value New Performance Counter Value
- * @return Performance Counter Value
- */
- private String value;
-}
+/* + * ============LICENSE_START========================================================= + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.dcae.apod.analytics.model.domain.cef; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * Common Event Format - Performance PerformanceCounter + * + * @author Rajiv Singla. Creation Date: 08/15/2017. + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class PerformanceCounter extends BaseCEFModel { + + private static final long serialVersionUID = 1L; + + /** + * Performance Counter Criticality. + * + * @param criticality New value for Criticality + * @return Performance Counter Criticality + */ + private Criticality criticality; + + /** + * Performance Counter Name + * + * @param name New value for Performance counter name + * @return Performance Counter Name + */ + private String name; + + /** + * Performance Counter for Threshold Crossed. + * + * @param thresholdCrossed New value for Performance Counter Threshold Crossed + * @return Performance Counter Threshold Crossed + */ + private String thresholdCrossed; + + /** + * Performance Counter Value. + * + * @param value New Performance Counter Value + * @return Performance Counter Value + */ + private String value; +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/Priority.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/Priority.java index c056912..8b5304b 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/Priority.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/Priority.java @@ -1,34 +1,34 @@ -/*
- * ============LICENSE_START=========================================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.domain.cef;
-
-/**
- * Common Event Format - Event processing priority
- * <p>
- * @author Rajiv Singla. Creation Date: 08/15/2017.
- */
-public enum Priority implements CEFModel {
-
- High,
- Medium,
- Normal,
- Low
-}
+/* + * ============LICENSE_START========================================================= + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.dcae.apod.analytics.model.domain.cef; + +/** + * Common Event Format - Event processing priority + * <p> + * @author Rajiv Singla. Creation Date: 08/15/2017. + */ +public enum Priority implements CEFModel { + + High, + Medium, + Normal, + Low +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/ThresholdCrossingAlertFields.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/ThresholdCrossingAlertFields.java index fb9e9d2..39adbdd 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/ThresholdCrossingAlertFields.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/ThresholdCrossingAlertFields.java @@ -1,158 +1,158 @@ -/*
- * ============LICENSE_START=========================================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.domain.cef;
-
-import java.util.List;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * Common Event Format - Fields Specific to threshold crossing alert events
- *
- * @author Rajiv Singla. Creation Date: 08/15/2017.
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class ThresholdCrossingAlertFields extends BaseCEFModel {
-
- private static final long serialVersionUID = 1L;
-
- /**
- * Additional Performance counters parameters.
- *
- * @param additionalParameters New value for Additional Performance counters
- * @return Additional Performance counters
- */
- private List<PerformanceCounter> additionalParameters;
-
- /**
- * Event alert action
- *
- * @param alertAction New Event Action
- * @return Event alert action
- */
- private AlertAction alertAction;
-
- /**
- * Unique short alert description such as IF-SHUB-ERRDROP
- *
- * @param alertDescription New value for Unique short alert description
- * @return Unique short alert description
- */
- private String alertDescription;
-
- /**
- * Alert type
- *
- * @param alertType New value for Alert Type
- * @return Alert Type
- */
- private AlertType alertType;
-
- /**
- * Calculated API value (if applicable)
- *
- * @param alertValue New Calculated API value
- * @return Calculated API value (if applicable)
- */
- private String alertValue;
-
- /**
- * List of eventIds associated with the event being reported
- *
- * @param associatedAlertIdList New value for eventIds associated with the event
- * @return List of eventIds associated with the event being reported
- */
- private List<String> associatedAlertIdList;
-
- /**
- * Time when the performance collector picked up the data; with RFC 2822 compliant format:
- * ‘Sat, 13 Mar 2010 11:29:05 -0800’
- *
- * @param collectionTimestamp Set new value for time when the performance collector picked up the data
- * @return Time when the performance collector picked up the data
- */
- private String collectionTimestamp;
-
- /**
- * Specific performance collector instance used
- *
- * @param dataCollector New value for specific performance collector instance used
- * @return Specific performance collector instance used
- */
- private String dataCollector;
-
- /**
- * Type of network element
- *
- * @param elementType New value for type of network element
- * @return Type of network element
- */
- private String elementType;
-
- /**
- * Event severity or priority
- *
- * @param eventSeverity New value for event severity or priority
- * @return Event severity or priority
- */
- private EventSeverity eventSeverity;
-
- /**
- * Time closest to when the measurement was made; with RFC 2822 compliant format: ‘Sat, 13 Mar 2010 11:29:05 -0800’
- *
- * @param eventStartTimestamp New value for time closest to when the measurement was made
- * @return Time closest to when the measurement was made
- */
- private String eventStartTimestamp;
-
- /**
- * Physical or logical port or card (if applicable)
- *
- * @param interfaceName New value for Physical or logical port or card (if applicable)
- * @return Physical or logical port or card (if applicable)
- */
- private String interfaceName;
-
- /**
- * Network name
- *
- * @param networkService New value for network name
- * @return Network name
- */
- private String networkService;
-
- /**
- * Possible Root Cause (reserved for future use)
- *
- * @param possibleRootCause New value for possible root cause (reserved for future)
- * @return Possible Root Cause (reserved for future use)
- */
- private String possibleRootCause;
-
- /**
- * Version of the thresholdCrossingAlertFields block
- *
- * @param thresholdCrossingFieldsVersion New value for version of the thresholdCrossingAlertFields block
- * @return Version of the thresholdCrossingAlertFields block
- */
- private Integer thresholdCrossingFieldsVersion;
-}
+/* + * ============LICENSE_START========================================================= + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.dcae.apod.analytics.model.domain.cef; + +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * Common Event Format - Fields Specific to threshold crossing alert events + * + * @author Rajiv Singla. Creation Date: 08/15/2017. + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class ThresholdCrossingAlertFields extends BaseCEFModel { + + private static final long serialVersionUID = 1L; + + /** + * Additional Performance counters parameters. + * + * @param additionalParameters New value for Additional Performance counters + * @return Additional Performance counters + */ + private List<PerformanceCounter> additionalParameters; + + /** + * Event alert action + * + * @param alertAction New Event Action + * @return Event alert action + */ + private AlertAction alertAction; + + /** + * Unique short alert description such as IF-SHUB-ERRDROP + * + * @param alertDescription New value for Unique short alert description + * @return Unique short alert description + */ + private String alertDescription; + + /** + * Alert type + * + * @param alertType New value for Alert Type + * @return Alert Type + */ + private AlertType alertType; + + /** + * Calculated API value (if applicable) + * + * @param alertValue New Calculated API value + * @return Calculated API value (if applicable) + */ + private String alertValue; + + /** + * List of eventIds associated with the event being reported + * + * @param associatedAlertIdList New value for eventIds associated with the event + * @return List of eventIds associated with the event being reported + */ + private List<String> associatedAlertIdList; + + /** + * Time when the performance collector picked up the data; with RFC 2822 compliant format: + * ‘Sat, 13 Mar 2010 11:29:05 -0800’ + * + * @param collectionTimestamp Set new value for time when the performance collector picked up the data + * @return Time when the performance collector picked up the data + */ + private String collectionTimestamp; + + /** + * Specific performance collector instance used + * + * @param dataCollector New value for specific performance collector instance used + * @return Specific performance collector instance used + */ + private String dataCollector; + + /** + * Type of network element + * + * @param elementType New value for type of network element + * @return Type of network element + */ + private String elementType; + + /** + * Event severity or priority + * + * @param eventSeverity New value for event severity or priority + * @return Event severity or priority + */ + private EventSeverity eventSeverity; + + /** + * Time closest to when the measurement was made; with RFC 2822 compliant format: ‘Sat, 13 Mar 2010 11:29:05 -0800’ + * + * @param eventStartTimestamp New value for time closest to when the measurement was made + * @return Time closest to when the measurement was made + */ + private String eventStartTimestamp; + + /** + * Physical or logical port or card (if applicable) + * + * @param interfaceName New value for Physical or logical port or card (if applicable) + * @return Physical or logical port or card (if applicable) + */ + private String interfaceName; + + /** + * Network name + * + * @param networkService New value for network name + * @return Network name + */ + private String networkService; + + /** + * Possible Root Cause (reserved for future use) + * + * @param possibleRootCause New value for possible root cause (reserved for future) + * @return Possible Root Cause (reserved for future use) + */ + private String possibleRootCause; + + /** + * Version of the thresholdCrossingAlertFields block + * + * @param thresholdCrossingFieldsVersion New value for version of the thresholdCrossingAlertFields block + * @return Version of the thresholdCrossingAlertFields block + */ + private Integer thresholdCrossingFieldsVersion; +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/VNicPerformance.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/VNicPerformance.java index 7bf03a9..b5b7a59 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/VNicPerformance.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/VNicPerformance.java @@ -1,308 +1,308 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.domain.cef;
-
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * Describes the performance and errors of an identified virtual network interface card
- * <p>
- * @author Rajiv Singla. Creation Date: 08/15/2017.
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class VNicPerformance extends BaseCEFModel {
-
-
- private static final long serialVersionUID = 1L;
-
- /**
- * Cumulative count of broadcast packets received as read at the end of the measurement interval
- *
- * @param receivedBroadcastPacketsAccumulated New value for cumulative count of broadcast packets received as
- * read at the end of the measurement interval
- * @return Cumulative count of broadcast packets received as read at the end of the measurement interval
- */
- private Long receivedBroadcastPacketsAccumulated;
-
- /**
- * Count of broadcast packets received within the measurement interval
- *
- * @param receivedBroadcastPacketsDelta New value for count of broadcast packets received within the measurement
- * interval
- * @return Count of broadcast packets received within the measurement interval
- */
- private Long receivedBroadcastPacketsDelta;
-
- /**
- * Cumulative count of discarded packets received as read at the end of the measurement interval
- *
- * @param receivedDiscardedPacketsAccumulated New value for cumulative count of discarded packets received as read
- * at the end of the measurement interval
- * @return Cumulative count of discarded packets received as read at the end of the measurement interval
- */
- private Long receivedDiscardedPacketsAccumulated;
-
- /**
- * Count of discarded packets received within the measurement interval
- *
- * @param receivedDiscardedPacketsDelta New value for count of discarded packets received within the measurement
- * interval
- * @return Count of discarded packets received within the measurement interval
- */
- private Long receivedDiscardedPacketsDelta;
-
- /**
- * Cumulative count of error packets received as read at the end of the measurement interval
- *
- * @param receivedErrorPacketsAccumulated New value for cumulative count of error packets received as read at the
- * end of the measurement interval
- * @return Cumulative count of error packets received as read at the end of the measurement interval
- */
- private Long receivedErrorPacketsAccumulated;
-
- /**
- * Count of error packets received within the measurement interval
- *
- * @param receivedErrorPacketsDelta New value for count of error packets received within the measurement interval
- * @return Count of error packets received within the measurement interval
- */
- private Long receivedErrorPacketsDelta;
-
- /**
- * Cumulative count of multicast packets received as read at the end of the measurement interval
- *
- * @param receivedMulticastPacketsAccumulated New value for cumulative count of multicast packets received as
- * read at the end of the measurement interval
- * @return Cumulative count of multicast packets received as read at the end of the measurement interval
- */
- private Long receivedMulticastPacketsAccumulated;
-
- /**
- * Count of multicast packets received within the measurement interval
- *
- * @param receivedMulticastPacketsDelta New value for count of multicast packets received within the measurement
- * interval
- * @return Count of multicast packets received within the measurement interval
- */
- private Long receivedMulticastPacketsDelta;
-
- /**
- * Cumulative count of octets received as read at the end of the measurement interval
- *
- * @param receivedOctetsAccumulated New value for cumulative count of octets received as read at the end of the
- * measurement interval
- * @return Cumulative count of octets received as read at the end of the measurement interval
- */
- private Long receivedOctetsAccumulated;
-
- /**
- * Count of octets received within the measurement interval
- *
- * @param receivedOctetsDelta New value for count of octets received within the measurement interval
- * @return Count of octets received within the measurement interval
- */
- private Long receivedOctetsDelta;
-
- /**
- * Cumulative count of all packets received as read at the end of the measurement interval
- *
- * @param receivedTotalPacketsAccumulated New value for cumulative count of all packets received as read at the
- * end of the measurement interval
- * @return Cumulative count of all packets received as read at the end of the measurement interval
- */
- private Long receivedTotalPacketsAccumulated;
-
- /**
- * Count of all packets received within the measurement interval
- *
- * @param receivedTotalPacketsDelta New value for count of all packets received within the measurement interval
- * @return Count of all packets received within the measurement interval
- */
- private Long receivedTotalPacketsDelta;
-
- /**
- * Cumulative count of unicast packets received as read at the end of the measurement interval
- *
- * @param receivedUnicastPacketsAccumulated New value for cumulative count of unicast packets received as read at
- * the end of the measurement interval
- * @return Cumulative count of unicast packets received as read at the end of the measurement interval
- */
- private Long receivedUnicastPacketsAccumulated;
-
- /**
- * Count of unicast packets received within the measurement interval
- *
- * @param receivedUnicastPacketsDelta New value for count of unicast packets received within the measurement
- * interval
- * @return Count of unicast packets received within the measurement interval
- */
- private Long receivedUnicastPacketsDelta;
-
- /**
- * Cumulative count of broadcast packets transmitted as read at the end of the measurement interval
- *
- * @param transmittedBroadcastPacketsAccumulated New value for cumulative count of broadcast packets transmitted
- * as read at the end of the measurement interval
- * @return Cumulative count of broadcast packets transmitted as read at the end of the measurement interval
- */
- private Long transmittedBroadcastPacketsAccumulated;
-
- /**
- * Count of broadcast packets transmitted within the measurement interval
- *
- * @param transmittedBroadcastPacketsDelta New value for count of broadcast packets transmitted within the
- * measurement interval
- * @return Count of broadcast packets transmitted within the measurement interval
- */
- private Long transmittedBroadcastPacketsDelta;
-
- /**
- * Cumulative count of discarded packets transmitted as read at the end of the measurement interval
- *
- * @param transmittedDiscardedPacketsAccumulated New value for cumulative count of discarded packets transmitted
- * as read at the end of the measurement interval
- * @return Cumulative count of discarded packets transmitted as read at the end of the measurement interval
- */
- private Long transmittedDiscardedPacketsAccumulated;
-
- /**
- * Count of discarded packets transmitted within the measurement interval
- *
- * @param transmittedDiscardedPacketsDelta New value for count of discarded packets transmitted within the
- * measurement interval
- * @return Count of discarded packets transmitted within the measurement interval
- */
- private Long transmittedDiscardedPacketsDelta;
-
- /**
- * Cumulative count of error packets transmitted as read at the end of the measurement interval
- *
- * @param transmittedErrorPacketsAccumulated New value for cumulative count of error packets transmitted as read
- * at the end of the measurement interval
- * @return Cumulative count of error packets transmitted as read at the end of the measurement interval
- */
- private Long transmittedErrorPacketsAccumulated;
-
- /**
- * Count of error packets transmitted within the measurement interval
- *
- * @param transmittedErrorPacketsDelta New value for count of error packets transmitted within the measurement
- * interval
- * @return Count of error packets transmitted within the measurement interval
- */
- private Long transmittedErrorPacketsDelta;
-
- /**
- * Cumulative count of multicast packets transmitted as read at the end of the measurement interval
- *
- * @param transmittedMulticastPacketsAccumulated New value for cumulative count of multicast packets transmitted
- * as read at the end of the measurement interval
- * @return Cumulative count of multicast packets transmitted as read at the end of the measurement interval
- */
- private Long transmittedMulticastPacketsAccumulated;
-
- /**
- * Count of multicast packets transmitted within the measurement interval
- *
- * @param transmittedMulticastPacketsDelta New value for count of multicast packets transmitted within the
- * measurement interval
- * @return Count of multicast packets transmitted within the measurement interval
- */
- private Long transmittedMulticastPacketsDelta;
-
- /**
- * Cumulative count of octets transmitted as read at the end of the measurement interval
- *
- * @param transmittedOctetsAccumulated New value for cumulative count of octets transmitted as read at the end of
- * the measurement interval
- * @return Cumulative count of octets transmitted as read at the end of the measurement interval
- */
- private Long transmittedOctetsAccumulated;
-
- /**
- * Count of octets transmitted within the measurement interval
- *
- * @param transmittedOctetsDelta New value for count of octets transmitted within the measurement interval
- * @return Count of octets transmitted within the measurement interval
- */
- private Long transmittedOctetsDelta;
-
- /**
- * Cumulative count of all packets transmitted as read at the end of the measurement interval
- *
- * @param transmittedTotalPacketsAccumulated New value for cumulative count of all packets transmitted as read at
- * the end of the measurement interval
- * @return Cumulative count of all packets transmitted as read at the end of the measurement interval
- */
- private Long transmittedTotalPacketsAccumulated;
-
- /**
- * Count of all packets transmitted within the measurement interval
- *
- * @param transmittedTotalPacketsDelta New value for count of all packets transmitted within the measurement
- * interval
- * @return Count of all packets transmitted within the measurement interval
- */
- private Long transmittedTotalPacketsDelta;
-
- /**
- * Cumulative count of unicast packets transmitted as read at the end of the measurement interval
- *
- * @param transmittedUnicastPacketsAccumulated New value for cumulative count of unicast packets transmitted as
- * read at the end of the measurement interval
- * @return Cumulative count of unicast packets transmitted as read at the end of the measurement interval
- */
- private Long transmittedUnicastPacketsAccumulated;
-
-
- /**
- * Count of unicast packets transmitted within the measurement interval
- *
- * @param transmittedUnicastPacketsDelta New value for count of unicast packets transmitted within the
- * measurement interval
- * @return Count of unicast packets transmitted within the measurement interval
- */
- private Long transmittedUnicastPacketsDelta;
-
-
- /**
- * Indicates whether vNicPerformance values are likely inaccurate due to counter overflow or other conditions
- *
- * @param valuesAreSuspect New value to indicate whether vNicPerformance values are likely inaccurate due to
- * counter overflow or other conditions
- * @return Indicates whether vNicPerformance values are likely inaccurate due to counter overflow or other
- * conditions
- */
- private Boolean valuesAreSuspect;
-
-
- /**
- * Virtual Network Card Identifier
- *
- * @param vNicIdentifier New value for Virtual Network Card Identifier
- * @return Virtual Network Card Identifier
- */
- private String vNicIdentifier;
-
-
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.domain.cef; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * Describes the performance and errors of an identified virtual network interface card + * <p> + * @author Rajiv Singla. Creation Date: 08/15/2017. + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class VNicPerformance extends BaseCEFModel { + + + private static final long serialVersionUID = 1L; + + /** + * Cumulative count of broadcast packets received as read at the end of the measurement interval + * + * @param receivedBroadcastPacketsAccumulated New value for cumulative count of broadcast packets received as + * read at the end of the measurement interval + * @return Cumulative count of broadcast packets received as read at the end of the measurement interval + */ + private Long receivedBroadcastPacketsAccumulated; + + /** + * Count of broadcast packets received within the measurement interval + * + * @param receivedBroadcastPacketsDelta New value for count of broadcast packets received within the measurement + * interval + * @return Count of broadcast packets received within the measurement interval + */ + private Long receivedBroadcastPacketsDelta; + + /** + * Cumulative count of discarded packets received as read at the end of the measurement interval + * + * @param receivedDiscardedPacketsAccumulated New value for cumulative count of discarded packets received as read + * at the end of the measurement interval + * @return Cumulative count of discarded packets received as read at the end of the measurement interval + */ + private Long receivedDiscardedPacketsAccumulated; + + /** + * Count of discarded packets received within the measurement interval + * + * @param receivedDiscardedPacketsDelta New value for count of discarded packets received within the measurement + * interval + * @return Count of discarded packets received within the measurement interval + */ + private Long receivedDiscardedPacketsDelta; + + /** + * Cumulative count of error packets received as read at the end of the measurement interval + * + * @param receivedErrorPacketsAccumulated New value for cumulative count of error packets received as read at the + * end of the measurement interval + * @return Cumulative count of error packets received as read at the end of the measurement interval + */ + private Long receivedErrorPacketsAccumulated; + + /** + * Count of error packets received within the measurement interval + * + * @param receivedErrorPacketsDelta New value for count of error packets received within the measurement interval + * @return Count of error packets received within the measurement interval + */ + private Long receivedErrorPacketsDelta; + + /** + * Cumulative count of multicast packets received as read at the end of the measurement interval + * + * @param receivedMulticastPacketsAccumulated New value for cumulative count of multicast packets received as + * read at the end of the measurement interval + * @return Cumulative count of multicast packets received as read at the end of the measurement interval + */ + private Long receivedMulticastPacketsAccumulated; + + /** + * Count of multicast packets received within the measurement interval + * + * @param receivedMulticastPacketsDelta New value for count of multicast packets received within the measurement + * interval + * @return Count of multicast packets received within the measurement interval + */ + private Long receivedMulticastPacketsDelta; + + /** + * Cumulative count of octets received as read at the end of the measurement interval + * + * @param receivedOctetsAccumulated New value for cumulative count of octets received as read at the end of the + * measurement interval + * @return Cumulative count of octets received as read at the end of the measurement interval + */ + private Long receivedOctetsAccumulated; + + /** + * Count of octets received within the measurement interval + * + * @param receivedOctetsDelta New value for count of octets received within the measurement interval + * @return Count of octets received within the measurement interval + */ + private Long receivedOctetsDelta; + + /** + * Cumulative count of all packets received as read at the end of the measurement interval + * + * @param receivedTotalPacketsAccumulated New value for cumulative count of all packets received as read at the + * end of the measurement interval + * @return Cumulative count of all packets received as read at the end of the measurement interval + */ + private Long receivedTotalPacketsAccumulated; + + /** + * Count of all packets received within the measurement interval + * + * @param receivedTotalPacketsDelta New value for count of all packets received within the measurement interval + * @return Count of all packets received within the measurement interval + */ + private Long receivedTotalPacketsDelta; + + /** + * Cumulative count of unicast packets received as read at the end of the measurement interval + * + * @param receivedUnicastPacketsAccumulated New value for cumulative count of unicast packets received as read at + * the end of the measurement interval + * @return Cumulative count of unicast packets received as read at the end of the measurement interval + */ + private Long receivedUnicastPacketsAccumulated; + + /** + * Count of unicast packets received within the measurement interval + * + * @param receivedUnicastPacketsDelta New value for count of unicast packets received within the measurement + * interval + * @return Count of unicast packets received within the measurement interval + */ + private Long receivedUnicastPacketsDelta; + + /** + * Cumulative count of broadcast packets transmitted as read at the end of the measurement interval + * + * @param transmittedBroadcastPacketsAccumulated New value for cumulative count of broadcast packets transmitted + * as read at the end of the measurement interval + * @return Cumulative count of broadcast packets transmitted as read at the end of the measurement interval + */ + private Long transmittedBroadcastPacketsAccumulated; + + /** + * Count of broadcast packets transmitted within the measurement interval + * + * @param transmittedBroadcastPacketsDelta New value for count of broadcast packets transmitted within the + * measurement interval + * @return Count of broadcast packets transmitted within the measurement interval + */ + private Long transmittedBroadcastPacketsDelta; + + /** + * Cumulative count of discarded packets transmitted as read at the end of the measurement interval + * + * @param transmittedDiscardedPacketsAccumulated New value for cumulative count of discarded packets transmitted + * as read at the end of the measurement interval + * @return Cumulative count of discarded packets transmitted as read at the end of the measurement interval + */ + private Long transmittedDiscardedPacketsAccumulated; + + /** + * Count of discarded packets transmitted within the measurement interval + * + * @param transmittedDiscardedPacketsDelta New value for count of discarded packets transmitted within the + * measurement interval + * @return Count of discarded packets transmitted within the measurement interval + */ + private Long transmittedDiscardedPacketsDelta; + + /** + * Cumulative count of error packets transmitted as read at the end of the measurement interval + * + * @param transmittedErrorPacketsAccumulated New value for cumulative count of error packets transmitted as read + * at the end of the measurement interval + * @return Cumulative count of error packets transmitted as read at the end of the measurement interval + */ + private Long transmittedErrorPacketsAccumulated; + + /** + * Count of error packets transmitted within the measurement interval + * + * @param transmittedErrorPacketsDelta New value for count of error packets transmitted within the measurement + * interval + * @return Count of error packets transmitted within the measurement interval + */ + private Long transmittedErrorPacketsDelta; + + /** + * Cumulative count of multicast packets transmitted as read at the end of the measurement interval + * + * @param transmittedMulticastPacketsAccumulated New value for cumulative count of multicast packets transmitted + * as read at the end of the measurement interval + * @return Cumulative count of multicast packets transmitted as read at the end of the measurement interval + */ + private Long transmittedMulticastPacketsAccumulated; + + /** + * Count of multicast packets transmitted within the measurement interval + * + * @param transmittedMulticastPacketsDelta New value for count of multicast packets transmitted within the + * measurement interval + * @return Count of multicast packets transmitted within the measurement interval + */ + private Long transmittedMulticastPacketsDelta; + + /** + * Cumulative count of octets transmitted as read at the end of the measurement interval + * + * @param transmittedOctetsAccumulated New value for cumulative count of octets transmitted as read at the end of + * the measurement interval + * @return Cumulative count of octets transmitted as read at the end of the measurement interval + */ + private Long transmittedOctetsAccumulated; + + /** + * Count of octets transmitted within the measurement interval + * + * @param transmittedOctetsDelta New value for count of octets transmitted within the measurement interval + * @return Count of octets transmitted within the measurement interval + */ + private Long transmittedOctetsDelta; + + /** + * Cumulative count of all packets transmitted as read at the end of the measurement interval + * + * @param transmittedTotalPacketsAccumulated New value for cumulative count of all packets transmitted as read at + * the end of the measurement interval + * @return Cumulative count of all packets transmitted as read at the end of the measurement interval + */ + private Long transmittedTotalPacketsAccumulated; + + /** + * Count of all packets transmitted within the measurement interval + * + * @param transmittedTotalPacketsDelta New value for count of all packets transmitted within the measurement + * interval + * @return Count of all packets transmitted within the measurement interval + */ + private Long transmittedTotalPacketsDelta; + + /** + * Cumulative count of unicast packets transmitted as read at the end of the measurement interval + * + * @param transmittedUnicastPacketsAccumulated New value for cumulative count of unicast packets transmitted as + * read at the end of the measurement interval + * @return Cumulative count of unicast packets transmitted as read at the end of the measurement interval + */ + private Long transmittedUnicastPacketsAccumulated; + + + /** + * Count of unicast packets transmitted within the measurement interval + * + * @param transmittedUnicastPacketsDelta New value for count of unicast packets transmitted within the + * measurement interval + * @return Count of unicast packets transmitted within the measurement interval + */ + private Long transmittedUnicastPacketsDelta; + + + /** + * Indicates whether vNicPerformance values are likely inaccurate due to counter overflow or other conditions + * + * @param valuesAreSuspect New value to indicate whether vNicPerformance values are likely inaccurate due to + * counter overflow or other conditions + * @return Indicates whether vNicPerformance values are likely inaccurate due to counter overflow or other + * conditions + */ + private Boolean valuesAreSuspect; + + + /** + * Virtual Network Card Identifier + * + * @param vNicIdentifier New value for Virtual Network Card Identifier + * @return Virtual Network Card Identifier + */ + private String vNicIdentifier; + + +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/PolicyModel.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/PolicyModel.java index 7b4170a..697d966 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/PolicyModel.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/PolicyModel.java @@ -1,33 +1,33 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.domain.policy;
-
-import org.openecomp.dcae.apod.analytics.model.DCAEAnalyticsModel;
-
-/**
- * <p>
- * Marker Interface all DCAE Analytics Policy Model implementations
- * </p>
- *
- * @author Rajiv Singla . Creation Date: 11/5/2016.
- */
-public interface PolicyModel extends DCAEAnalyticsModel {
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.domain.policy; + +import org.onap.dcae.apod.analytics.model.DCAEAnalyticsModel; + +/** + * <p> + * Marker Interface all DCAE Analytics Policy Model implementations + * </p> + * + * @author Rajiv Singla . Creation Date: 11/5/2016. + */ +public interface PolicyModel extends DCAEAnalyticsModel { +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/tca/BaseTCAPolicyModel.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/tca/BaseTCAPolicyModel.java index 9783fac..016e585 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/tca/BaseTCAPolicyModel.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/tca/BaseTCAPolicyModel.java @@ -1,37 +1,37 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.domain.policy.tca;
-
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.openecomp.dcae.apod.analytics.model.BaseDynamicPropertiesProvider;
-
-/**
- * <p>
- * A Base TCA Policy Model which accumulates all dynamic properties in a dynamicProperties Map
- * </p>
- *
- * @author Rajiv Singla . Creation Date: 11/5/2016.
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public abstract class BaseTCAPolicyModel extends BaseDynamicPropertiesProvider implements TCAPolicyModel {
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.domain.policy.tca; + +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.onap.dcae.apod.analytics.model.BaseDynamicPropertiesProvider; + +/** + * <p> + * A Base TCA Policy Model which accumulates all dynamic properties in a dynamicProperties Map + * </p> + * + * @author Rajiv Singla . Creation Date: 11/5/2016. + */ +@Data +@EqualsAndHashCode(callSuper = true) +public abstract class BaseTCAPolicyModel extends BaseDynamicPropertiesProvider implements TCAPolicyModel { +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/tca/ClosedLoopEventStatus.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/tca/ClosedLoopEventStatus.java index bef7a14..4459fc3 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/tca/ClosedLoopEventStatus.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/tca/ClosedLoopEventStatus.java @@ -1,34 +1,34 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.domain.policy.tca;
-
-/**
- * TCA Policy Closed Loop Event Status
- *
- * @author Rajiv Singla . Creation Date: 9/11/2017.
- */
-public enum ClosedLoopEventStatus implements TCAPolicyModel {
-
- ONSET,
- ABATED,
- CONTINUE;
-
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.domain.policy.tca; + +/** + * TCA Policy Closed Loop Event Status + * + * @author Rajiv Singla . Creation Date: 9/11/2017. + */ +public enum ClosedLoopEventStatus implements TCAPolicyModel { + + ONSET, + ABATED, + CONTINUE; + +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/tca/ControlLoopSchemaType.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/tca/ControlLoopSchemaType.java index 235845b..b913703 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/tca/ControlLoopSchemaType.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/tca/ControlLoopSchemaType.java @@ -1,33 +1,33 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.domain.policy.tca;
-
-import org.openecomp.dcae.apod.analytics.model.domain.policy.PolicyModel;
-
-/**
- * Control Loop Schema Type
- *
- * @author Rajiv Singla . Creation Date: 8/24/2017.
- */
-public enum ControlLoopSchemaType implements PolicyModel {
-
- VNF, VM;
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.domain.policy.tca; + +import org.onap.dcae.apod.analytics.model.domain.policy.PolicyModel; + +/** + * Control Loop Schema Type + * + * @author Rajiv Singla . Creation Date: 8/24/2017. + */ +public enum ControlLoopSchemaType implements PolicyModel { + + VNF, VM; +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/tca/Direction.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/tca/Direction.java index 0d7203b..a787c4d 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/tca/Direction.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/tca/Direction.java @@ -1,76 +1,76 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.domain.policy.tca;
-
-import java.math.BigDecimal;
-
-import javax.annotation.Nonnull;
-
-/**
- * <p>
- * Enum for Threshold Direction
- * </p>
- * @author Rajiv Singla . Creation Date: 11/5/2016.
- */
-public enum Direction implements TCAPolicyModel {
-
- EQUAL {
- @Override
- public Boolean operate(@Nonnull BigDecimal value1, @Nonnull BigDecimal value2) {
- return value1.compareTo(value2) == 0;
- }
- },
- LESS {
- @Override
- public Boolean operate(@Nonnull BigDecimal value1, @Nonnull BigDecimal value2) {
- return value1.compareTo(value2) < 0;
- }
- },
- LESS_OR_EQUAL {
- @Override
- public Boolean operate(@Nonnull BigDecimal value1, @Nonnull BigDecimal value2) {
- return value1.compareTo(value2) <= 0;
- }
- },
- GREATER {
- @Override
- public Boolean operate(@Nonnull BigDecimal value1, @Nonnull BigDecimal value2) {
- return value1.compareTo(value2) > 0;
- }
- },
- GREATER_OR_EQUAL {
- @Override
- public Boolean operate(@Nonnull BigDecimal value1, @Nonnull BigDecimal value2) {
- return value1.compareTo(value2) >= 0;
- }
- };
-
- /**
- * Configure logic for a particular Direction
- *
- * @param value1 left operand for Direction operation
- * @param value2 right operand for Direction operation
- *
- * @return result of operation for the direction logic
- */
- public abstract Boolean operate(@Nonnull BigDecimal value1, @Nonnull BigDecimal value2);
-
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.domain.policy.tca; + +import java.math.BigDecimal; + +import javax.annotation.Nonnull; + +/** + * <p> + * Enum for Threshold Direction + * </p> + * @author Rajiv Singla . Creation Date: 11/5/2016. + */ +public enum Direction implements TCAPolicyModel { + + EQUAL { + @Override + public Boolean operate(@Nonnull BigDecimal value1, @Nonnull BigDecimal value2) { + return value1.compareTo(value2) == 0; + } + }, + LESS { + @Override + public Boolean operate(@Nonnull BigDecimal value1, @Nonnull BigDecimal value2) { + return value1.compareTo(value2) < 0; + } + }, + LESS_OR_EQUAL { + @Override + public Boolean operate(@Nonnull BigDecimal value1, @Nonnull BigDecimal value2) { + return value1.compareTo(value2) <= 0; + } + }, + GREATER { + @Override + public Boolean operate(@Nonnull BigDecimal value1, @Nonnull BigDecimal value2) { + return value1.compareTo(value2) > 0; + } + }, + GREATER_OR_EQUAL { + @Override + public Boolean operate(@Nonnull BigDecimal value1, @Nonnull BigDecimal value2) { + return value1.compareTo(value2) >= 0; + } + }; + + /** + * Configure logic for a particular Direction + * + * @param value1 left operand for Direction operation + * @param value2 right operand for Direction operation + * + * @return result of operation for the direction logic + */ + public abstract Boolean operate(@Nonnull BigDecimal value1, @Nonnull BigDecimal value2); + +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/tca/MetricsPerEventName.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/tca/MetricsPerEventName.java index 82024af..1b54d0a 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/tca/MetricsPerEventName.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/tca/MetricsPerEventName.java @@ -1,115 +1,115 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.domain.policy.tca;
-
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * TCA Metrics that need to applied to each Event Name
- *
- * @author Rajiv Singla . Creation Date: 11/5/2016.
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class MetricsPerEventName extends BaseTCAPolicyModel{
-
-
- private static final long serialVersionUID = 1L;
-
- /**
- * Event Name to which TCA Policy needs to applied.
- *
- * @param eventName New value for eventName to which TCA Policy needs to applied
- * @return Event Name to which TCA Policy needs to applied
- */
- private String eventName;
-
- /**
- * Control Loop Schema Type
- *
- * @param controlLoopSchemaType New value for Control Loop Schema Type
- * @return Control Loop Schema Type
- */
- private ControlLoopSchemaType controlLoopSchemaType;
-
- /**
- * Policy Scope
- *
- * @param policyScope New value for Policy Scope
- * @return Policy Scope
- */
- private String policyScope;
-
- /**
- * Policy Name
- *
- * @param policyName New value for Policy Name
- * @return Policy Name
- */
- private String policyName;
-
- /**
- * Policy Version
- *
- * @param policyVersion New value for Policy Version
- * @return Policy Version
- */
- private String policyVersion;
-
- /**
- * Policy Thresholds
- *
- * @param thresholds New value for Policy Thresholds
- * @return Policy Thresholds
- */
- private List<Threshold> thresholds;
-
-
- /**
- * Creates a deep copy of given {@link MetricsPerEventName}
- *
- * @param metricsPerEventName metrics Per Event Name that need to copied
- *
- * @return copy of new metrics per event Name with values copied from given metrics per Event Name
- */
- public static MetricsPerEventName copy(final MetricsPerEventName metricsPerEventName) {
- final MetricsPerEventName newMetricsPerEventName = new MetricsPerEventName();
- newMetricsPerEventName.setEventName(metricsPerEventName.getEventName());
- newMetricsPerEventName.setControlLoopSchemaType(metricsPerEventName.getControlLoopSchemaType());
- newMetricsPerEventName.setPolicyScope(metricsPerEventName.getPolicyScope());
- newMetricsPerEventName.setPolicyName(metricsPerEventName.getPolicyName());
- newMetricsPerEventName.setPolicyVersion(metricsPerEventName.getPolicyVersion());
- if (metricsPerEventName.getThresholds() != null) {
- List<Threshold> newThresholds = new ArrayList<>(metricsPerEventName.getThresholds().size());
- for( Threshold threshold : metricsPerEventName.getThresholds()) {
- newThresholds.add(Threshold.copy(threshold));
- }
- newMetricsPerEventName.setThresholds(newThresholds);
- }
- return newMetricsPerEventName;
- }
-
-
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.domain.policy.tca; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.ArrayList; +import java.util.List; + +/** + * TCA Metrics that need to applied to each Event Name + * + * @author Rajiv Singla . Creation Date: 11/5/2016. + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class MetricsPerEventName extends BaseTCAPolicyModel{ + + + private static final long serialVersionUID = 1L; + + /** + * Event Name to which TCA Policy needs to applied. + * + * @param eventName New value for eventName to which TCA Policy needs to applied + * @return Event Name to which TCA Policy needs to applied + */ + private String eventName; + + /** + * Control Loop Schema Type + * + * @param controlLoopSchemaType New value for Control Loop Schema Type + * @return Control Loop Schema Type + */ + private ControlLoopSchemaType controlLoopSchemaType; + + /** + * Policy Scope + * + * @param policyScope New value for Policy Scope + * @return Policy Scope + */ + private String policyScope; + + /** + * Policy Name + * + * @param policyName New value for Policy Name + * @return Policy Name + */ + private String policyName; + + /** + * Policy Version + * + * @param policyVersion New value for Policy Version + * @return Policy Version + */ + private String policyVersion; + + /** + * Policy Thresholds + * + * @param thresholds New value for Policy Thresholds + * @return Policy Thresholds + */ + private List<Threshold> thresholds; + + + /** + * Creates a deep copy of given {@link MetricsPerEventName} + * + * @param metricsPerEventName metrics Per Event Name that need to copied + * + * @return copy of new metrics per event Name with values copied from given metrics per Event Name + */ + public static MetricsPerEventName copy(final MetricsPerEventName metricsPerEventName) { + final MetricsPerEventName newMetricsPerEventName = new MetricsPerEventName(); + newMetricsPerEventName.setEventName(metricsPerEventName.getEventName()); + newMetricsPerEventName.setControlLoopSchemaType(metricsPerEventName.getControlLoopSchemaType()); + newMetricsPerEventName.setPolicyScope(metricsPerEventName.getPolicyScope()); + newMetricsPerEventName.setPolicyName(metricsPerEventName.getPolicyName()); + newMetricsPerEventName.setPolicyVersion(metricsPerEventName.getPolicyVersion()); + if (metricsPerEventName.getThresholds() != null) { + List<Threshold> newThresholds = new ArrayList<>(metricsPerEventName.getThresholds().size()); + for( Threshold threshold : metricsPerEventName.getThresholds()) { + newThresholds.add(Threshold.copy(threshold)); + } + newMetricsPerEventName.setThresholds(newThresholds); + } + return newMetricsPerEventName; + } + + +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/tca/TCAPolicy.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/tca/TCAPolicy.java index b832cc5..45559e3 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/tca/TCAPolicy.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/tca/TCAPolicy.java @@ -1,58 +1,58 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.domain.policy.tca;
-
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-import java.util.List;
-
-/**
- * <p>
- * TCA (Threshold Crossing Alert) Root
- * </p>
- *
- * @author Rajiv Singla . Creation Date: 11/5/2016.
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class TCAPolicy extends BaseTCAPolicyModel {
-
- private static final long serialVersionUID = 1L;
-
- /**
- * TCA Policy domain which is associated with TCA incoming CEF message domain
- *
- * @param domain New value for domain
- * @return Policy domain which is associated with incoming CEF message
- */
- private String domain;
-
- /**
- * Contains TCA Policy metrics that needs to be applied to each Functional Role
- *
- * @param metricsPerEventName New value for metrics that needs to be applied to each Functional Role
- * @return Contains TCA Policy metrics that needs to be applied to each Functional Role
- */
- private List<MetricsPerEventName> metricsPerEventName;
-
-
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.domain.policy.tca; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.List; + +/** + * <p> + * TCA (Threshold Crossing Alert) Root + * </p> + * + * @author Rajiv Singla . Creation Date: 11/5/2016. + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class TCAPolicy extends BaseTCAPolicyModel { + + private static final long serialVersionUID = 1L; + + /** + * TCA Policy domain which is associated with TCA incoming CEF message domain + * + * @param domain New value for domain + * @return Policy domain which is associated with incoming CEF message + */ + private String domain; + + /** + * Contains TCA Policy metrics that needs to be applied to each Functional Role + * + * @param metricsPerEventName New value for metrics that needs to be applied to each Functional Role + * @return Contains TCA Policy metrics that needs to be applied to each Functional Role + */ + private List<MetricsPerEventName> metricsPerEventName; + + +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/tca/TCAPolicyModel.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/tca/TCAPolicyModel.java index 4d551bd..fefef3c 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/tca/TCAPolicyModel.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/tca/TCAPolicyModel.java @@ -1,35 +1,35 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.domain.policy.tca;
-
-import org.openecomp.dcae.apod.analytics.model.domain.policy.PolicyModel;
-
-/**
- * <p>
- * Marker interface for all TCA Policy Models
- * </p>
- *
- * @author Rajiv Singla . Creation Date: 11/5/2016.
- */
-public interface TCAPolicyModel extends PolicyModel {
-
-
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.domain.policy.tca; + +import org.onap.dcae.apod.analytics.model.domain.policy.PolicyModel; + +/** + * <p> + * Marker interface for all TCA Policy Models + * </p> + * + * @author Rajiv Singla . Creation Date: 11/5/2016. + */ +public interface TCAPolicyModel extends PolicyModel { + + +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/tca/Threshold.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/tca/Threshold.java index 536f458..60da70d 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/tca/Threshold.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/tca/Threshold.java @@ -1,127 +1,127 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.domain.policy.tca;
-
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.openecomp.dcae.apod.analytics.model.domain.cef.EventSeverity;
-
-import java.math.BigDecimal;
-
-/**
- *
- * @author Rajiv Singla . Creation Date: 11/5/2016.
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class Threshold extends BaseTCAPolicyModel {
-
- private static final long serialVersionUID = 1L;
-
- /**
- * Closed Loop Control Name
- *
- * @param closedLoopControlName New value for Closed Loop Control Name
- * @return Closed Loop Control Name
- */
- private String closedLoopControlName;
-
-
- /**
- * Closed Loop Event Status
- *
- * @param closedLoopEventStatus New value for Closed Loop Event Status
- * @return Closed Loop Event Status
- */
- private ClosedLoopEventStatus closedLoopEventStatus;
-
- /**
- * Threshold Version
- *
- * @param version New value for Threshold Version
- * @return Threshold Version
- */
- private String version;
-
- /**
- * Path of the field inside Common Event Format which needs to be monitored by TCA App
- * for threshold crossing
- *
- * @param fieldPath New value for Path of the field inside CEF which needs to be monitored for TCA
- * @return Path of the field inside Common Event Format which needs to be monitored by TCA App
- */
- private String fieldPath;
-
- /**
- * Threshold Value
- *
- * @param thresholdValue New value for Threshold Value
- * @return Threshold Value
- */
- private Long thresholdValue;
-
- /**
- * Direction of threshold
- *
- * @param direction New value for Direction of threshold
- * @return Direction of threshold
- */
- private Direction direction;
-
- /**
- * Severity of Event based on CEF Convention
- *
- * @param severity New value for Severity of Event based on CEF Convention
- * @return Severity of Event based on CEF Convention
- */
- private EventSeverity severity;
-
-
- /**
- * Actual Field value that caused the threshold violation. Note: Ignored for serialization / deserialization
- *
- *
- * @param actualFieldValue new value for actual Field value that caused the violation
- * @return actual field value that caused the violation
- */
- private BigDecimal actualFieldValue;
-
- /**
- * Creates a deep copy of give {@link Threshold}
- *
- * @param threshold threshold that need to be copied
- *
- * @return new instance of threshold with copied value for give threshold
- */
- public static Threshold copy(final Threshold threshold) {
- final Threshold newThreshold = new Threshold();
- newThreshold.setClosedLoopControlName(threshold.getClosedLoopControlName());
- newThreshold.setClosedLoopEventStatus(threshold.getClosedLoopEventStatus());
- newThreshold.setFieldPath(threshold.getFieldPath());
- newThreshold.setThresholdValue(threshold.getThresholdValue());
- newThreshold.setDirection(threshold.getDirection());
- newThreshold.setSeverity(threshold.getSeverity());
- newThreshold.setVersion(threshold.getVersion());
- newThreshold.setActualFieldValue(threshold.getActualFieldValue());
- return newThreshold;
- }
-
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.domain.policy.tca; + +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.onap.dcae.apod.analytics.model.domain.cef.EventSeverity; + +import java.math.BigDecimal; + +/** + * + * @author Rajiv Singla . Creation Date: 11/5/2016. + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class Threshold extends BaseTCAPolicyModel { + + private static final long serialVersionUID = 1L; + + /** + * Closed Loop Control Name + * + * @param closedLoopControlName New value for Closed Loop Control Name + * @return Closed Loop Control Name + */ + private String closedLoopControlName; + + + /** + * Closed Loop Event Status + * + * @param closedLoopEventStatus New value for Closed Loop Event Status + * @return Closed Loop Event Status + */ + private ClosedLoopEventStatus closedLoopEventStatus; + + /** + * Threshold Version + * + * @param version New value for Threshold Version + * @return Threshold Version + */ + private String version; + + /** + * Path of the field inside Common Event Format which needs to be monitored by TCA App + * for threshold crossing + * + * @param fieldPath New value for Path of the field inside CEF which needs to be monitored for TCA + * @return Path of the field inside Common Event Format which needs to be monitored by TCA App + */ + private String fieldPath; + + /** + * Threshold Value + * + * @param thresholdValue New value for Threshold Value + * @return Threshold Value + */ + private Long thresholdValue; + + /** + * Direction of threshold + * + * @param direction New value for Direction of threshold + * @return Direction of threshold + */ + private Direction direction; + + /** + * Severity of Event based on CEF Convention + * + * @param severity New value for Severity of Event based on CEF Convention + * @return Severity of Event based on CEF Convention + */ + private EventSeverity severity; + + + /** + * Actual Field value that caused the threshold violation. Note: Ignored for serialization / deserialization + * + * + * @param actualFieldValue new value for actual Field value that caused the violation + * @return actual field value that caused the violation + */ + private BigDecimal actualFieldValue; + + /** + * Creates a deep copy of give {@link Threshold} + * + * @param threshold threshold that need to be copied + * + * @return new instance of threshold with copied value for give threshold + */ + public static Threshold copy(final Threshold threshold) { + final Threshold newThreshold = new Threshold(); + newThreshold.setClosedLoopControlName(threshold.getClosedLoopControlName()); + newThreshold.setClosedLoopEventStatus(threshold.getClosedLoopEventStatus()); + newThreshold.setFieldPath(threshold.getFieldPath()); + newThreshold.setThresholdValue(threshold.getThresholdValue()); + newThreshold.setDirection(threshold.getDirection()); + newThreshold.setSeverity(threshold.getSeverity()); + newThreshold.setVersion(threshold.getVersion()); + newThreshold.setActualFieldValue(threshold.getActualFieldValue()); + return newThreshold; + } + +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/facade/FacadeModel.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/facade/FacadeModel.java index 0041341..195a6c2 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/facade/FacadeModel.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/facade/FacadeModel.java @@ -1,33 +1,33 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.facade;
-
-import org.openecomp.dcae.apod.analytics.model.DCAEAnalyticsModel;
-
-/**
- * <p>
- * Marker Interface for all Facade (outgoing) DCAE Analytics Model
- * </p>
- *
- * @author Rajiv Singla . Creation Date: 11/9/2016.
- */
-public interface FacadeModel extends DCAEAnalyticsModel {
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.facade; + +import org.onap.dcae.apod.analytics.model.DCAEAnalyticsModel; + +/** + * <p> + * Marker Interface for all Facade (outgoing) DCAE Analytics Model + * </p> + * + * @author Rajiv Singla . Creation Date: 11/9/2016. + */ +public interface FacadeModel extends DCAEAnalyticsModel { +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/facade/tca/AAI.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/facade/tca/AAI.java index 91cfdef..f878917 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/facade/tca/AAI.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/facade/tca/AAI.java @@ -1,41 +1,41 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.facade.tca;
-
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.openecomp.dcae.apod.analytics.model.BaseDynamicPropertiesProvider;
-
-/**
- *
- * @author Rajiv Singla . Creation Date: 11/9/2016.
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class AAI extends BaseDynamicPropertiesProvider implements TCAFacadeModel {
-
- private static final long serialVersionUID = 1L;
-
- private String genericVNFName;
-
- private String genericServerName;
-
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.facade.tca; + +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.onap.dcae.apod.analytics.model.BaseDynamicPropertiesProvider; + +/** + * + * @author Rajiv Singla . Creation Date: 11/9/2016. + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class AAI extends BaseDynamicPropertiesProvider implements TCAFacadeModel { + + private static final long serialVersionUID = 1L; + + private String genericVNFName; + + private String genericServerName; + +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/facade/tca/TCAFacadeModel.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/facade/tca/TCAFacadeModel.java index 602412a..8b8b88c 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/facade/tca/TCAFacadeModel.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/facade/tca/TCAFacadeModel.java @@ -1,31 +1,31 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.facade.tca;
-
-import org.openecomp.dcae.apod.analytics.model.facade.FacadeModel;
-
-/**
- * Marker Interface for all TCA Facade Models
- *
- * @author Rajiv Singla . Creation Date: 11/9/2016.
- */
-public interface TCAFacadeModel extends FacadeModel {
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.facade.tca; + +import org.onap.dcae.apod.analytics.model.facade.FacadeModel; + +/** + * Marker Interface for all TCA Facade Models + * + * @author Rajiv Singla . Creation Date: 11/9/2016. + */ +public interface TCAFacadeModel extends FacadeModel { +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/facade/tca/TCAVESResponse.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/facade/tca/TCAVESResponse.java index 0ee8fe2..6e8024f 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/facade/tca/TCAVESResponse.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/facade/tca/TCAVESResponse.java @@ -1,50 +1,50 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.facade.tca;
-
-import lombok.Data;
-
-/**
- * Response generated by TCA for VES Message
- *
- * @author Rajiv Singla . Creation Date: 11/9/2016.
- */
-@Data
-public class TCAVESResponse implements TCAFacadeModel {
-
- private static final long serialVersionUID = 1L;
-
- private AAI aai;
- private Long closedLoopAlarmEnd;
- private Long closedLoopAlarmStart;
- private String closedLoopControlName;
- private String closedLoopEventClient;
- private String closedLoopEventStatus;
- private String from;
- private String policyName;
- private String policyScope;
- private String policyVersion;
- private String requestID;
- private String target;
- private String targetType;
- private String version;
-
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.facade.tca; + +import lombok.Data; + +/** + * Response generated by TCA for VES Message + * + * @author Rajiv Singla . Creation Date: 11/9/2016. + */ +@Data +public class TCAVESResponse implements TCAFacadeModel { + + private static final long serialVersionUID = 1L; + + private AAI aai; + private Long closedLoopAlarmEnd; + private Long closedLoopAlarmStart; + private String closedLoopControlName; + private String closedLoopEventClient; + private String closedLoopEventStatus; + private String from; + private String policyName; + private String policyScope; + private String policyVersion; + private String requestID; + private String target; + private String targetType; + private String version; + +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/AnalyticsModelIOUtils.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/AnalyticsModelIOUtils.java index 6fcd459..a0f374c 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/AnalyticsModelIOUtils.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/AnalyticsModelIOUtils.java @@ -1,132 +1,132 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.util;
-
-import com.fasterxml.jackson.core.JsonParseException;
-import com.fasterxml.jackson.databind.JsonMappingException;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.nio.charset.Charset;
-import java.util.Properties;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Utility class containing methods for IO related operations
- * <p>
- * @author Rajiv Singla . Creation Date: 10/17/2016.
- */
-public abstract class AnalyticsModelIOUtils extends AnalyticsModelJsonUtils {
-
- private static final Logger LOG = LoggerFactory.getLogger(AnalyticsModelIOUtils.class);
-
- /**
- * Parses given valid JSON file Location to object of given binding class type.
- *
- * @param fileLocation valid JSON File Location
- * @param bindingClass class Type of Binding object
- *
- * @param <T> binding Class Type
- *
- * @return binding Class Object which properties populated from JSON File Location
- * @throws IOException when fails to do IO operations
- */
- public static final <T> T convertToJsonObject(String fileLocation, Class<T> bindingClass) throws IOException {
-
- // Load Resource from give path
- final InputStream resourceAsStream = loadResourceAsStream(fileLocation);
-
- // If resource is null throw an exception
- if (resourceAsStream == null) {
- final String errorMessage = String.format("Invalid File location: %s", fileLocation);
- throw new IOException(errorMessage, new FileNotFoundException(errorMessage));
- }
-
- // Parse input stream
- try (InputStreamReader inputStreamReader = new InputStreamReader(resourceAsStream, Charset.forName("UTF-8"))) {
-
- return ANALYTICS_MODEL_OBJECT_MAPPER.readValue(inputStreamReader, bindingClass);
- } catch (JsonMappingException | JsonParseException e) {
-
- // If parsing fails due to Invalid Json or Json IO Issues throw an exception
- final String errorMessage = String.format("Json parsing error while parsing Json File location: %s",
- fileLocation);
-
- LOG.error(errorMessage);
- throw new IOException(errorMessage, e);
- } catch (IOException e) {
-
- // If parsing fails due to IO Issues throw an exception
- final String errorMessage = String.format("IO Error while parsing Json File location: %s", fileLocation);
- LOG.error(errorMessage);
- throw new IOException(errorMessage, e);
- }
- }
-
- /**
- * Loads properties from a given file location. Throws {@link RuntimeException} if file location is invalid
- * or there were exception when loading properties
- *
- * @param propertiesFileLocation path string for properties file
- * @param properties properties object that needs to be populated with give file properties
- *
- * @return properties object with populated properties from properties file
- *
- */
- public static Properties loadPropertiesFile(String propertiesFileLocation, final Properties properties) {
-
- // Load Resource from give properties file path
- final InputStream propertiesFileInputStream = loadResourceAsStream(propertiesFileLocation);
-
- // If properties file is not present throw an exception
- if (propertiesFileInputStream == null) {
- final String errorMessage = String.format("Invalid Properties File at location: %s",
- propertiesFileLocation);
- //TODO: discuss and change this excpeiton as well.
- throw new RuntimeException(errorMessage, new FileNotFoundException(errorMessage));
- }
-
- try {
- properties.load(propertiesFileInputStream);
- } catch (IOException e) {
- final String errorMessage = String.format("IO Exception while reading Properties File at location: %s",
- propertiesFileLocation);
- throw new RuntimeException(errorMessage, e);
- }
-
- return properties;
-
- }
-
- /**
- * Loads Input file from the given classpath file location and returns file InputStream
- *
- * @param fileLocation classpath file location
- *
- * @return {@link InputStream} for classpath file
- */
- public static InputStream loadResourceAsStream(String fileLocation) {
- // Load Resource from give path
- return Thread.currentThread().getContextClassLoader().getResourceAsStream(fileLocation);
- }
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.util; + +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.databind.JsonMappingException; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.nio.charset.Charset; +import java.util.Properties; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * Utility class containing methods for IO related operations + * <p> + * @author Rajiv Singla . Creation Date: 10/17/2016. + */ +public abstract class AnalyticsModelIOUtils extends AnalyticsModelJsonUtils { + + private static final Logger LOG = LoggerFactory.getLogger(AnalyticsModelIOUtils.class); + + /** + * Parses given valid JSON file Location to object of given binding class type. + * + * @param fileLocation valid JSON File Location + * @param bindingClass class Type of Binding object + * + * @param <T> binding Class Type + * + * @return binding Class Object which properties populated from JSON File Location + * @throws IOException when fails to do IO operations + */ + public static final <T> T convertToJsonObject(String fileLocation, Class<T> bindingClass) throws IOException { + + // Load Resource from give path + final InputStream resourceAsStream = loadResourceAsStream(fileLocation); + + // If resource is null throw an exception + if (resourceAsStream == null) { + final String errorMessage = String.format("Invalid File location: %s", fileLocation); + throw new IOException(errorMessage, new FileNotFoundException(errorMessage)); + } + + // Parse input stream + try (InputStreamReader inputStreamReader = new InputStreamReader(resourceAsStream, Charset.forName("UTF-8"))) { + + return ANALYTICS_MODEL_OBJECT_MAPPER.readValue(inputStreamReader, bindingClass); + } catch (JsonMappingException | JsonParseException e) { + + // If parsing fails due to Invalid Json or Json IO Issues throw an exception + final String errorMessage = String.format("Json parsing error while parsing Json File location: %s", + fileLocation); + + LOG.error(errorMessage); + throw new IOException(errorMessage, e); + } catch (IOException e) { + + // If parsing fails due to IO Issues throw an exception + final String errorMessage = String.format("IO Error while parsing Json File location: %s", fileLocation); + LOG.error(errorMessage); + throw new IOException(errorMessage, e); + } + } + + /** + * Loads properties from a given file location. Throws {@link RuntimeException} if file location is invalid + * or there were exception when loading properties + * + * @param propertiesFileLocation path string for properties file + * @param properties properties object that needs to be populated with give file properties + * + * @return properties object with populated properties from properties file + * + */ + public static Properties loadPropertiesFile(String propertiesFileLocation, final Properties properties) { + + // Load Resource from give properties file path + final InputStream propertiesFileInputStream = loadResourceAsStream(propertiesFileLocation); + + // If properties file is not present throw an exception + if (propertiesFileInputStream == null) { + final String errorMessage = String.format("Invalid Properties File at location: %s", + propertiesFileLocation); + //TODO: discuss and change this excpeiton as well. + throw new RuntimeException(errorMessage, new FileNotFoundException(errorMessage)); + } + + try { + properties.load(propertiesFileInputStream); + } catch (IOException e) { + final String errorMessage = String.format("IO Exception while reading Properties File at location: %s", + propertiesFileLocation); + throw new RuntimeException(errorMessage, e); + } + + return properties; + + } + + /** + * Loads Input file from the given classpath file location and returns file InputStream + * + * @param fileLocation classpath file location + * + * @return {@link InputStream} for classpath file + */ + public static InputStream loadResourceAsStream(String fileLocation) { + // Load Resource from give path + return Thread.currentThread().getContextClassLoader().getResourceAsStream(fileLocation); + } +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/AnalyticsModelJsonUtils.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/AnalyticsModelJsonUtils.java index e01f323..35834d1 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/AnalyticsModelJsonUtils.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/AnalyticsModelJsonUtils.java @@ -1,104 +1,104 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.util;
-
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.core.type.TypeReference;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.google.common.base.Suppliers;
-import org.openecomp.dcae.apod.analytics.model.util.json.AnalyticsModelObjectMapperSupplier;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-/**
- *
- * @author Rajiv Singla . Creation Date: 11/7/2016.
- */
-public abstract class AnalyticsModelJsonUtils {
-
- /**
- * Object mapper to be used for all TCA Json Parsing
- */
- protected static final ObjectMapper ANALYTICS_MODEL_OBJECT_MAPPER =
- Suppliers.memoize(new AnalyticsModelObjectMapperSupplier()).get();
-
-
- /**
- * Converts Input Stream to given type reference object
- *
- * @param inputStream input stream
- * @param valueTypeRef type reference
- * @param <T> type of type reference
- *
- * @return parsed json object
- *
- * @throws IOException IO Exception
- */
- public static <T> T readValue(InputStream inputStream, TypeReference<T> valueTypeRef) throws IOException {
- return ANALYTICS_MODEL_OBJECT_MAPPER.readValue(inputStream, valueTypeRef);
- }
-
-
- /**
- * Converts Input Stream to given target class object
- *
- * @param inputStream input stream
- * @param targetClass target class type
- * @param <T> type of class
- *
- * @return parsed json object
- *
- * @throws IOException IO Exception
- */
- public static <T> T readValue(InputStream inputStream, Class<T> targetClass) throws IOException {
- return ANALYTICS_MODEL_OBJECT_MAPPER.readValue(inputStream, targetClass);
- }
-
-
- /**
- * Converts given object to JSON string
- *
- * @param value object that needs to converted to json string
- *
- * @return json string
- * @throws JsonProcessingException Json Processing exception
- */
- public static String writeValueAsString(Object value) throws JsonProcessingException {
- return ANALYTICS_MODEL_OBJECT_MAPPER.writeValueAsString(value);
- }
-
-
- /**
- * Method to deserialize JSON content from given JSON content String.
- *
- * @param jsonString JSON String
- * @param objectClass target object class
- * @param <T> object class type
- *
- * @return converted Object from JSON String
- *
- * @throws IOException IO Exception
- */
- public static <T> T readValue(final String jsonString, final Class<T> objectClass) throws IOException {
- return ANALYTICS_MODEL_OBJECT_MAPPER.readValue(jsonString, objectClass);
- }
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.util; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.google.common.base.Suppliers; +import org.onap.dcae.apod.analytics.model.util.json.AnalyticsModelObjectMapperSupplier; + +import java.io.IOException; +import java.io.InputStream; + +/** + * + * @author Rajiv Singla . Creation Date: 11/7/2016. + */ +public abstract class AnalyticsModelJsonUtils { + + /** + * Object mapper to be used for all TCA Json Parsing + */ + protected static final ObjectMapper ANALYTICS_MODEL_OBJECT_MAPPER = + Suppliers.memoize(new AnalyticsModelObjectMapperSupplier()).get(); + + + /** + * Converts Input Stream to given type reference object + * + * @param inputStream input stream + * @param valueTypeRef type reference + * @param <T> type of type reference + * + * @return parsed json object + * + * @throws IOException IO Exception + */ + public static <T> T readValue(InputStream inputStream, TypeReference<T> valueTypeRef) throws IOException { + return ANALYTICS_MODEL_OBJECT_MAPPER.readValue(inputStream, valueTypeRef); + } + + + /** + * Converts Input Stream to given target class object + * + * @param inputStream input stream + * @param targetClass target class type + * @param <T> type of class + * + * @return parsed json object + * + * @throws IOException IO Exception + */ + public static <T> T readValue(InputStream inputStream, Class<T> targetClass) throws IOException { + return ANALYTICS_MODEL_OBJECT_MAPPER.readValue(inputStream, targetClass); + } + + + /** + * Converts given object to JSON string + * + * @param value object that needs to converted to json string + * + * @return json string + * @throws JsonProcessingException Json Processing exception + */ + public static String writeValueAsString(Object value) throws JsonProcessingException { + return ANALYTICS_MODEL_OBJECT_MAPPER.writeValueAsString(value); + } + + + /** + * Method to deserialize JSON content from given JSON content String. + * + * @param jsonString JSON String + * @param objectClass target object class + * @param <T> object class type + * + * @return converted Object from JSON String + * + * @throws IOException IO Exception + */ + public static <T> T readValue(final String jsonString, final Class<T> objectClass) throws IOException { + return ANALYTICS_MODEL_OBJECT_MAPPER.readValue(jsonString, objectClass); + } +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/AnalyticsModelObjectMapperSupplier.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/AnalyticsModelObjectMapperSupplier.java index 1a4feb3..d5e2d9f 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/AnalyticsModelObjectMapperSupplier.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/AnalyticsModelObjectMapperSupplier.java @@ -1,115 +1,115 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.util.json;
-
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.databind.DeserializationFeature;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.google.common.base.Supplier;
-import com.jayway.jsonpath.Configuration;
-import com.jayway.jsonpath.JsonPath;
-import com.jayway.jsonpath.Option;
-import com.jayway.jsonpath.spi.json.JacksonJsonProvider;
-import com.jayway.jsonpath.spi.json.JsonProvider;
-import com.jayway.jsonpath.spi.mapper.JacksonMappingProvider;
-import com.jayway.jsonpath.spi.mapper.MappingProvider;
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
-
-import java.util.EnumSet;
-import java.util.Set;
-
-/**
- *<p>
- * {@link Supplier} that can be used by clients to get Object Mapper which specializes
- * in serialize and deserialize - DCAE Analytics Model JSON Objects. Clients can
- * choose to memoize this Supplier for performance enhancements
- * <br>
- * NOTE: This supplier also setups up {@link JsonPath} default
- * config to make use of this Supplier object mapper
- *</p>
- * @author Rajiv Singla . Creation Date: 11/10/2016.
- */
-@SuppressFBWarnings("SIC_INNER_SHOULD_BE_STATIC_ANON")
-public class AnalyticsModelObjectMapperSupplier implements Supplier<ObjectMapper> {
-
- @Override
- public ObjectMapper get() {
-
- final ObjectMapper objectMapper = new ObjectMapper();
-
- // Serialize null values
- objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
-
- // Don't fail on unknown properties
- objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
-
- // Register Common Event Format Module
- objectMapper.registerModule(new CommonEventFormatModule());
- // Register TCA Policy Module
- objectMapper.registerModule(new TCAPolicyModule());
- // Register TCA Facade Module
- objectMapper.registerModule(new TCAFacadeModelModule());
- // Register TCA Controller App Config Module
- objectMapper.registerModule(new TCAControllerConfigModule());
-
-
- // Setup JsonPath default config
- setupJsonPathDefaultConfig(objectMapper);
-
- return objectMapper;
- }
-
-
- /**
- * Setups up default Config for {@link JsonPath}
- *
- * @param objectMapper Jackson object mapper
- */
- private void setupJsonPathDefaultConfig(final ObjectMapper objectMapper) {
-
- Configuration.setDefaults(new Configuration.Defaults() {
-
- private final JsonProvider jsonProvider = new JacksonJsonProvider(objectMapper);
- private final MappingProvider mappingProvider = new JacksonMappingProvider(objectMapper);
-
- @Override
- public JsonProvider jsonProvider() {
- return jsonProvider;
- }
-
- @Override
- public MappingProvider mappingProvider() {
- return mappingProvider;
- }
-
- @Override
- public Set<Option> options() {
-
- // Json Path exceptions are suppressed, also missing properties are tolerated
- return EnumSet.of(Option.DEFAULT_PATH_LEAF_TO_NULL, Option.SUPPRESS_EXCEPTIONS,
- Option.ALWAYS_RETURN_LIST);
- }
- });
-
-
- }
-
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.util.json; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.google.common.base.Supplier; +import com.jayway.jsonpath.Configuration; +import com.jayway.jsonpath.JsonPath; +import com.jayway.jsonpath.Option; +import com.jayway.jsonpath.spi.json.JacksonJsonProvider; +import com.jayway.jsonpath.spi.json.JsonProvider; +import com.jayway.jsonpath.spi.mapper.JacksonMappingProvider; +import com.jayway.jsonpath.spi.mapper.MappingProvider; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; + +import java.util.EnumSet; +import java.util.Set; + +/** + *<p> + * {@link Supplier} that can be used by clients to get Object Mapper which specializes + * in serialize and deserialize - DCAE Analytics Model JSON Objects. Clients can + * choose to memoize this Supplier for performance enhancements + * <br> + * NOTE: This supplier also setups up {@link JsonPath} default + * config to make use of this Supplier object mapper + *</p> + * @author Rajiv Singla . Creation Date: 11/10/2016. + */ +@SuppressFBWarnings("SIC_INNER_SHOULD_BE_STATIC_ANON") +public class AnalyticsModelObjectMapperSupplier implements Supplier<ObjectMapper> { + + @Override + public ObjectMapper get() { + + final ObjectMapper objectMapper = new ObjectMapper(); + + // Serialize null values + objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); + + // Don't fail on unknown properties + objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + + // Register Common Event Format Module + objectMapper.registerModule(new CommonEventFormatModule()); + // Register TCA Policy Module + objectMapper.registerModule(new TCAPolicyModule()); + // Register TCA Facade Module + objectMapper.registerModule(new TCAFacadeModelModule()); + // Register TCA Controller App Config Module + objectMapper.registerModule(new TCAControllerConfigModule()); + + + // Setup JsonPath default config + setupJsonPathDefaultConfig(objectMapper); + + return objectMapper; + } + + + /** + * Setups up default Config for {@link JsonPath} + * + * @param objectMapper Jackson object mapper + */ + private void setupJsonPathDefaultConfig(final ObjectMapper objectMapper) { + + Configuration.setDefaults(new Configuration.Defaults() { + + private final JsonProvider jsonProvider = new JacksonJsonProvider(objectMapper); + private final MappingProvider mappingProvider = new JacksonMappingProvider(objectMapper); + + @Override + public JsonProvider jsonProvider() { + return jsonProvider; + } + + @Override + public MappingProvider mappingProvider() { + return mappingProvider; + } + + @Override + public Set<Option> options() { + + // Json Path exceptions are suppressed, also missing properties are tolerated + return EnumSet.of(Option.DEFAULT_PATH_LEAF_TO_NULL, Option.SUPPRESS_EXCEPTIONS, + Option.ALWAYS_RETURN_LIST); + } + }); + + + } + +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/CommonEventFormatModule.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/CommonEventFormatModule.java index acf6cf9..90e770c 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/CommonEventFormatModule.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/CommonEventFormatModule.java @@ -1,96 +1,96 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.util.json;
-
-import com.fasterxml.jackson.core.Version;
-import com.fasterxml.jackson.databind.module.SimpleModule;
-import org.openecomp.dcae.apod.analytics.model.domain.cef.AlertAction;
-import org.openecomp.dcae.apod.analytics.model.domain.cef.AlertType;
-import org.openecomp.dcae.apod.analytics.model.domain.cef.BaseCEFModel;
-import org.openecomp.dcae.apod.analytics.model.domain.cef.CommonEventHeader;
-import org.openecomp.dcae.apod.analytics.model.domain.cef.Criticality;
-import org.openecomp.dcae.apod.analytics.model.domain.cef.Domain;
-import org.openecomp.dcae.apod.analytics.model.domain.cef.Event;
-import org.openecomp.dcae.apod.analytics.model.domain.cef.EventListener;
-import org.openecomp.dcae.apod.analytics.model.domain.cef.EventSeverity;
-import org.openecomp.dcae.apod.analytics.model.domain.cef.Field;
-import org.openecomp.dcae.apod.analytics.model.domain.cef.InternalHeaderFields;
-import org.openecomp.dcae.apod.analytics.model.domain.cef.MeasurementsForVfScalingFields;
-import org.openecomp.dcae.apod.analytics.model.domain.cef.NamedArrayOfFields;
-import org.openecomp.dcae.apod.analytics.model.domain.cef.PerformanceCounter;
-import org.openecomp.dcae.apod.analytics.model.domain.cef.Priority;
-import org.openecomp.dcae.apod.analytics.model.domain.cef.ThresholdCrossingAlertFields;
-import org.openecomp.dcae.apod.analytics.model.domain.cef.VNicPerformance;
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef.AlertActionMixin;
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef.AlertTypeMixin;
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef.BaseCEFModelMixin;
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef.CommonEventHeaderMixin;
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef.CriticalityMixin;
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef.DomainMixin;
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef.EventListenerMixin;
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef.EventMixin;
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef.EventSeverityMixin;
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef.FieldMixin;
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef.InternalHeaderFieldsMixin;
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef.MeasurementsForVfScalingFieldsMixin;
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef.NamedArrayOfFieldsMixin;
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef.PerformanceCounterMixin;
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef.PriorityMixin;
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef.ThresholdCrossingAlertFieldsMixin;
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef.VNicUsageArrayMixin;
-
-/**
- * @author Rajiv Singla . Creation Date: 10/18/2016.
- */
-public class CommonEventFormatModule extends SimpleModule {
-
- private static final long serialVersionUID = 1L;
-
- public CommonEventFormatModule() {
- super("Common Event Format",
- new Version(28, 3, 0, null, " org.openecomp.dcae.apod.analytics.model", "dcae-analytics-model"));
- }
-
- @Override
- public void setupModule(final SetupContext setupContext) {
-
- setupContext.setMixInAnnotations(AlertAction.class, AlertActionMixin.class);
- setupContext.setMixInAnnotations(AlertType.class, AlertTypeMixin.class);
- setupContext.setMixInAnnotations(BaseCEFModel.class, BaseCEFModelMixin.class);
- setupContext.setMixInAnnotations(CommonEventHeader.class, CommonEventHeaderMixin.class);
- setupContext.setMixInAnnotations(Domain.class, DomainMixin.class);
- setupContext.setMixInAnnotations(InternalHeaderFields.class, InternalHeaderFieldsMixin.class);
- setupContext.setMixInAnnotations(Field.class, FieldMixin.class);
- setupContext.setMixInAnnotations(NamedArrayOfFields.class, NamedArrayOfFieldsMixin.class);
- setupContext.setMixInAnnotations(Criticality.class, CriticalityMixin.class);
- setupContext.setMixInAnnotations(EventListener.class, EventListenerMixin.class);
- setupContext.setMixInAnnotations(Event.class, EventMixin.class);
- setupContext.setMixInAnnotations(EventSeverity.class, EventSeverityMixin.class);
- setupContext.setMixInAnnotations(MeasurementsForVfScalingFields.class,
- MeasurementsForVfScalingFieldsMixin.class);
- setupContext.setMixInAnnotations(PerformanceCounter.class, PerformanceCounterMixin.class);
- setupContext.setMixInAnnotations(Priority.class, PriorityMixin.class);
- setupContext.setMixInAnnotations(ThresholdCrossingAlertFields.class, ThresholdCrossingAlertFieldsMixin.class);
- setupContext.setMixInAnnotations(VNicPerformance.class, VNicUsageArrayMixin.class);
-
- }
-
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.util.json; + +import com.fasterxml.jackson.core.Version; +import com.fasterxml.jackson.databind.module.SimpleModule; +import org.onap.dcae.apod.analytics.model.domain.cef.AlertAction; +import org.onap.dcae.apod.analytics.model.domain.cef.AlertType; +import org.onap.dcae.apod.analytics.model.domain.cef.BaseCEFModel; +import org.onap.dcae.apod.analytics.model.domain.cef.CommonEventHeader; +import org.onap.dcae.apod.analytics.model.domain.cef.Criticality; +import org.onap.dcae.apod.analytics.model.domain.cef.Domain; +import org.onap.dcae.apod.analytics.model.domain.cef.Event; +import org.onap.dcae.apod.analytics.model.domain.cef.EventListener; +import org.onap.dcae.apod.analytics.model.domain.cef.EventSeverity; +import org.onap.dcae.apod.analytics.model.domain.cef.Field; +import org.onap.dcae.apod.analytics.model.domain.cef.InternalHeaderFields; +import org.onap.dcae.apod.analytics.model.domain.cef.MeasurementsForVfScalingFields; +import org.onap.dcae.apod.analytics.model.domain.cef.NamedArrayOfFields; +import org.onap.dcae.apod.analytics.model.domain.cef.PerformanceCounter; +import org.onap.dcae.apod.analytics.model.domain.cef.Priority; +import org.onap.dcae.apod.analytics.model.domain.cef.ThresholdCrossingAlertFields; +import org.onap.dcae.apod.analytics.model.domain.cef.VNicPerformance; +import org.onap.dcae.apod.analytics.model.util.json.mixin.cef.AlertActionMixin; +import org.onap.dcae.apod.analytics.model.util.json.mixin.cef.AlertTypeMixin; +import org.onap.dcae.apod.analytics.model.util.json.mixin.cef.BaseCEFModelMixin; +import org.onap.dcae.apod.analytics.model.util.json.mixin.cef.CommonEventHeaderMixin; +import org.onap.dcae.apod.analytics.model.util.json.mixin.cef.CriticalityMixin; +import org.onap.dcae.apod.analytics.model.util.json.mixin.cef.DomainMixin; +import org.onap.dcae.apod.analytics.model.util.json.mixin.cef.EventListenerMixin; +import org.onap.dcae.apod.analytics.model.util.json.mixin.cef.EventMixin; +import org.onap.dcae.apod.analytics.model.util.json.mixin.cef.EventSeverityMixin; +import org.onap.dcae.apod.analytics.model.util.json.mixin.cef.FieldMixin; +import org.onap.dcae.apod.analytics.model.util.json.mixin.cef.InternalHeaderFieldsMixin; +import org.onap.dcae.apod.analytics.model.util.json.mixin.cef.MeasurementsForVfScalingFieldsMixin; +import org.onap.dcae.apod.analytics.model.util.json.mixin.cef.NamedArrayOfFieldsMixin; +import org.onap.dcae.apod.analytics.model.util.json.mixin.cef.PerformanceCounterMixin; +import org.onap.dcae.apod.analytics.model.util.json.mixin.cef.PriorityMixin; +import org.onap.dcae.apod.analytics.model.util.json.mixin.cef.ThresholdCrossingAlertFieldsMixin; +import org.onap.dcae.apod.analytics.model.util.json.mixin.cef.VNicUsageArrayMixin; + +/** + * @author Rajiv Singla . Creation Date: 10/18/2016. + */ +public class CommonEventFormatModule extends SimpleModule { + + private static final long serialVersionUID = 1L; + + public CommonEventFormatModule() { + super("Common Event Format", + new Version(28, 3, 0, null, " org.onap.dcae.apod.analytics.model", "dcae-analytics-model")); + } + + @Override + public void setupModule(final SetupContext setupContext) { + + setupContext.setMixInAnnotations(AlertAction.class, AlertActionMixin.class); + setupContext.setMixInAnnotations(AlertType.class, AlertTypeMixin.class); + setupContext.setMixInAnnotations(BaseCEFModel.class, BaseCEFModelMixin.class); + setupContext.setMixInAnnotations(CommonEventHeader.class, CommonEventHeaderMixin.class); + setupContext.setMixInAnnotations(Domain.class, DomainMixin.class); + setupContext.setMixInAnnotations(InternalHeaderFields.class, InternalHeaderFieldsMixin.class); + setupContext.setMixInAnnotations(Field.class, FieldMixin.class); + setupContext.setMixInAnnotations(NamedArrayOfFields.class, NamedArrayOfFieldsMixin.class); + setupContext.setMixInAnnotations(Criticality.class, CriticalityMixin.class); + setupContext.setMixInAnnotations(EventListener.class, EventListenerMixin.class); + setupContext.setMixInAnnotations(Event.class, EventMixin.class); + setupContext.setMixInAnnotations(EventSeverity.class, EventSeverityMixin.class); + setupContext.setMixInAnnotations(MeasurementsForVfScalingFields.class, + MeasurementsForVfScalingFieldsMixin.class); + setupContext.setMixInAnnotations(PerformanceCounter.class, PerformanceCounterMixin.class); + setupContext.setMixInAnnotations(Priority.class, PriorityMixin.class); + setupContext.setMixInAnnotations(ThresholdCrossingAlertFields.class, ThresholdCrossingAlertFieldsMixin.class); + setupContext.setMixInAnnotations(VNicPerformance.class, VNicUsageArrayMixin.class); + + } + +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/TCAControllerConfigModule.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/TCAControllerConfigModule.java index ba529e4..16d5be6 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/TCAControllerConfigModule.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/TCAControllerConfigModule.java @@ -1,59 +1,59 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.util.json;
-
-import com.fasterxml.jackson.core.Version;
-import com.fasterxml.jackson.databind.module.SimpleModule;
-import org.openecomp.dcae.apod.analytics.model.config.tca.BaseTCAAppConfigModel;
-import org.openecomp.dcae.apod.analytics.model.config.tca.BaseTCAHandle;
-import org.openecomp.dcae.apod.analytics.model.config.tca.DMAAPInfo;
-import org.openecomp.dcae.apod.analytics.model.config.tca.StreamsPublishes;
-import org.openecomp.dcae.apod.analytics.model.config.tca.StreamsSubscribes;
-import org.openecomp.dcae.apod.analytics.model.config.tca.TCAControllerAppConfig;
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.config.tca.BaseTCAAppConfigModelMixin;
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.config.tca.BaseTCAHandleMixin;
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.config.tca.DMAAPInfoMixin;
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.config.tca.StreamsPublishesMixin;
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.config.tca.StreamsSubscribesMixin;
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.config.tca.TCAControllerAppConfigMixin;
-
-/**
- * @author Rajiv Singla . Creation Date: 8/25/2017.
- */
-public class TCAControllerConfigModule extends SimpleModule {
-
- private static final long serialVersionUID = 1L;
-
- public TCAControllerConfigModule() {
- super("Threshold Crossing Alert Controller Config",
- new Version(1, 0, 0, null, "org.openecomp.dace.apod.analytics.model", "dcae-analytics-model"));
- }
-
- @Override
- public void setupModule(final SetupContext setupContext) {
- setupContext.setMixInAnnotations(BaseTCAAppConfigModel.class, BaseTCAAppConfigModelMixin.class);
- setupContext.setMixInAnnotations(BaseTCAHandle.class, BaseTCAHandleMixin.class);
- setupContext.setMixInAnnotations(DMAAPInfo.class, DMAAPInfoMixin.class);
- setupContext.setMixInAnnotations(StreamsPublishes.class, StreamsPublishesMixin.class);
- setupContext.setMixInAnnotations(StreamsSubscribes.class, StreamsSubscribesMixin.class);
- setupContext.setMixInAnnotations(TCAControllerAppConfig.class, TCAControllerAppConfigMixin.class);
- }
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.util.json; + +import com.fasterxml.jackson.core.Version; +import com.fasterxml.jackson.databind.module.SimpleModule; +import org.onap.dcae.apod.analytics.model.config.tca.BaseTCAAppConfigModel; +import org.onap.dcae.apod.analytics.model.config.tca.BaseTCAHandle; +import org.onap.dcae.apod.analytics.model.config.tca.DMAAPInfo; +import org.onap.dcae.apod.analytics.model.config.tca.StreamsPublishes; +import org.onap.dcae.apod.analytics.model.config.tca.StreamsSubscribes; +import org.onap.dcae.apod.analytics.model.config.tca.TCAControllerAppConfig; +import org.onap.dcae.apod.analytics.model.util.json.mixin.config.tca.BaseTCAAppConfigModelMixin; +import org.onap.dcae.apod.analytics.model.util.json.mixin.config.tca.BaseTCAHandleMixin; +import org.onap.dcae.apod.analytics.model.util.json.mixin.config.tca.DMAAPInfoMixin; +import org.onap.dcae.apod.analytics.model.util.json.mixin.config.tca.StreamsPublishesMixin; +import org.onap.dcae.apod.analytics.model.util.json.mixin.config.tca.StreamsSubscribesMixin; +import org.onap.dcae.apod.analytics.model.util.json.mixin.config.tca.TCAControllerAppConfigMixin; + +/** + * @author Rajiv Singla . Creation Date: 8/25/2017. + */ +public class TCAControllerConfigModule extends SimpleModule { + + private static final long serialVersionUID = 1L; + + public TCAControllerConfigModule() { + super("Threshold Crossing Alert Controller Config", + new Version(1, 0, 0, null, "org.onap.dcae.apod.analytics.model", "dcae-analytics-model")); + } + + @Override + public void setupModule(final SetupContext setupContext) { + setupContext.setMixInAnnotations(BaseTCAAppConfigModel.class, BaseTCAAppConfigModelMixin.class); + setupContext.setMixInAnnotations(BaseTCAHandle.class, BaseTCAHandleMixin.class); + setupContext.setMixInAnnotations(DMAAPInfo.class, DMAAPInfoMixin.class); + setupContext.setMixInAnnotations(StreamsPublishes.class, StreamsPublishesMixin.class); + setupContext.setMixInAnnotations(StreamsSubscribes.class, StreamsSubscribesMixin.class); + setupContext.setMixInAnnotations(TCAControllerAppConfig.class, TCAControllerAppConfigMixin.class); + } +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/TCAFacadeModelModule.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/TCAFacadeModelModule.java index f836bb0..fd9c674 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/TCAFacadeModelModule.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/TCAFacadeModelModule.java @@ -1,49 +1,49 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.util.json;
-
-import com.fasterxml.jackson.core.Version;
-import com.fasterxml.jackson.databind.module.SimpleModule;
-import org.openecomp.dcae.apod.analytics.model.facade.tca.AAI;
-import org.openecomp.dcae.apod.analytics.model.facade.tca.TCAVESResponse;
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.facade.tca.AAIMixin;
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.facade.tca.VESCEFMessageResponseMixin;
-
-/**
- *
- * @author Rajiv Singla . Creation Date: 11/9/2016.
- */
-public class TCAFacadeModelModule extends SimpleModule {
-
- private static final long serialVersionUID = 1L;
-
- public TCAFacadeModelModule() {
- super("Threshold Crossing Alert Facade",
- new Version(1, 0, 0, null, "org.openecomp.dace.apod.analytics.model", "dcae-analytics-model"));
- }
-
- @Override
- public void setupModule(final SetupContext setupContext) {
- setupContext.setMixInAnnotations(TCAVESResponse.class, VESCEFMessageResponseMixin.class);
- setupContext.setMixInAnnotations(AAI.class, AAIMixin.class);
- }
-
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.util.json; + +import com.fasterxml.jackson.core.Version; +import com.fasterxml.jackson.databind.module.SimpleModule; +import org.onap.dcae.apod.analytics.model.facade.tca.AAI; +import org.onap.dcae.apod.analytics.model.facade.tca.TCAVESResponse; +import org.onap.dcae.apod.analytics.model.util.json.mixin.facade.tca.AAIMixin; +import org.onap.dcae.apod.analytics.model.util.json.mixin.facade.tca.VESCEFMessageResponseMixin; + +/** + * + * @author Rajiv Singla . Creation Date: 11/9/2016. + */ +public class TCAFacadeModelModule extends SimpleModule { + + private static final long serialVersionUID = 1L; + + public TCAFacadeModelModule() { + super("Threshold Crossing Alert Facade", + new Version(1, 0, 0, null, "org.onap.dcae.apod.analytics.model", "dcae-analytics-model")); + } + + @Override + public void setupModule(final SetupContext setupContext) { + setupContext.setMixInAnnotations(TCAVESResponse.class, VESCEFMessageResponseMixin.class); + setupContext.setMixInAnnotations(AAI.class, AAIMixin.class); + } + +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/TCAPolicyModule.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/TCAPolicyModule.java index 06f4c08..9876138 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/TCAPolicyModule.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/TCAPolicyModule.java @@ -1,64 +1,64 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.util.json;
-
-import com.fasterxml.jackson.core.Version;
-import com.fasterxml.jackson.databind.module.SimpleModule;
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.BaseTCAPolicyModel;
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.ClosedLoopEventStatus;
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.ControlLoopSchemaType;
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.Direction;
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.MetricsPerEventName;
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.TCAPolicy;
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.Threshold;
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.policy.tca.BaseTCAPolicyModelMixin;
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.policy.tca.ClosedLoopEventStatusMixin;
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.policy.tca.ControlLoopSchemaTypeMixin;
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.policy.tca.DirectionMixin;
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.policy.tca.MetricsPerEventNameMixin;
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.policy.tca.TCAPolicyMixin;
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.policy.tca.ThresholdMixin;
-
-/**
- *
- * @author Rajiv Singla . Creation Date: 11/5/2016.
- */
-public class TCAPolicyModule extends SimpleModule {
-
- private static final long serialVersionUID = 1L;
-
- public TCAPolicyModule() {
- super("Threshold Crossing Alert Policy",
- new Version(1, 0, 0, null, " org.openecomp.dcae.apod.analytics.model", "dcae-analytics-model"));
- }
-
- @Override
- public void setupModule(final SetupContext setupContext) {
- setupContext.setMixInAnnotations(BaseTCAPolicyModel.class, BaseTCAPolicyModelMixin.class);
- setupContext.setMixInAnnotations(ControlLoopSchemaType.class, ControlLoopSchemaTypeMixin.class);
- setupContext.setMixInAnnotations(Direction.class, DirectionMixin.class);
- setupContext.setMixInAnnotations(ClosedLoopEventStatus.class, ClosedLoopEventStatusMixin.class);
- setupContext.setMixInAnnotations(TCAPolicy.class, TCAPolicyMixin.class);
- setupContext.setMixInAnnotations(MetricsPerEventName.class, MetricsPerEventNameMixin.class);
- setupContext.setMixInAnnotations(Threshold.class, ThresholdMixin.class);
- setupContext.setMixInAnnotations(TCAPolicy.class, TCAPolicyMixin.class);
- }
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.util.json; + +import com.fasterxml.jackson.core.Version; +import com.fasterxml.jackson.databind.module.SimpleModule; +import org.onap.dcae.apod.analytics.model.domain.policy.tca.BaseTCAPolicyModel; +import org.onap.dcae.apod.analytics.model.domain.policy.tca.ClosedLoopEventStatus; +import org.onap.dcae.apod.analytics.model.domain.policy.tca.ControlLoopSchemaType; +import org.onap.dcae.apod.analytics.model.domain.policy.tca.Direction; +import org.onap.dcae.apod.analytics.model.domain.policy.tca.MetricsPerEventName; +import org.onap.dcae.apod.analytics.model.domain.policy.tca.TCAPolicy; +import org.onap.dcae.apod.analytics.model.domain.policy.tca.Threshold; +import org.onap.dcae.apod.analytics.model.util.json.mixin.policy.tca.BaseTCAPolicyModelMixin; +import org.onap.dcae.apod.analytics.model.util.json.mixin.policy.tca.ClosedLoopEventStatusMixin; +import org.onap.dcae.apod.analytics.model.util.json.mixin.policy.tca.ControlLoopSchemaTypeMixin; +import org.onap.dcae.apod.analytics.model.util.json.mixin.policy.tca.DirectionMixin; +import org.onap.dcae.apod.analytics.model.util.json.mixin.policy.tca.MetricsPerEventNameMixin; +import org.onap.dcae.apod.analytics.model.util.json.mixin.policy.tca.TCAPolicyMixin; +import org.onap.dcae.apod.analytics.model.util.json.mixin.policy.tca.ThresholdMixin; + +/** + * + * @author Rajiv Singla . Creation Date: 11/5/2016. + */ +public class TCAPolicyModule extends SimpleModule { + + private static final long serialVersionUID = 1L; + + public TCAPolicyModule() { + super("Threshold Crossing Alert Policy", + new Version(1, 0, 0, null, " org.onap.dcae.apod.analytics.model", "dcae-analytics-model")); + } + + @Override + public void setupModule(final SetupContext setupContext) { + setupContext.setMixInAnnotations(BaseTCAPolicyModel.class, BaseTCAPolicyModelMixin.class); + setupContext.setMixInAnnotations(ControlLoopSchemaType.class, ControlLoopSchemaTypeMixin.class); + setupContext.setMixInAnnotations(Direction.class, DirectionMixin.class); + setupContext.setMixInAnnotations(ClosedLoopEventStatus.class, ClosedLoopEventStatusMixin.class); + setupContext.setMixInAnnotations(TCAPolicy.class, TCAPolicyMixin.class); + setupContext.setMixInAnnotations(MetricsPerEventName.class, MetricsPerEventNameMixin.class); + setupContext.setMixInAnnotations(Threshold.class, ThresholdMixin.class); + setupContext.setMixInAnnotations(TCAPolicy.class, TCAPolicyMixin.class); + } +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/BaseDynamicPropertiesProviderMixin.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/BaseDynamicPropertiesProviderMixin.java index 328c6fc..f7b3a9b 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/BaseDynamicPropertiesProviderMixin.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/BaseDynamicPropertiesProviderMixin.java @@ -1,61 +1,61 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin;
-
-import com.fasterxml.jackson.annotation.JsonAnyGetter;
-import com.fasterxml.jackson.annotation.JsonAnySetter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import org.openecomp.dcae.apod.analytics.model.BaseDynamicPropertiesProvider;
-
-import java.util.Map;
-
-/**
- * Json Mixin for {@link BaseDynamicPropertiesProvider}
- *
- * @author Rajiv Singla . Creation Date: 11/5/2016.
- */
-public abstract class BaseDynamicPropertiesProviderMixin implements JsonMixin {
-
- /**
- * Provides hint to Jackson Json Object mapper to bind any put all dynamic properties in a map
- *
- * @param propertyName dynamic property name
- * @param propertyValue dynamic property value
- */
- @JsonAnySetter
- public abstract void addDynamicProperties(String propertyName, Object propertyValue);
-
- /**
- * Provides hint to serialize dynamic properties as map
- *
- * @return dynamic properties map
- */
- @JsonAnyGetter
- public abstract Map<String, Object> getDynamicProperties();
-
- /**
- * Ignores isDynamicPropertiesPresent for json serialization
- *
- * @return true if dynamic properties are present
- */
- @JsonIgnore
- public abstract boolean isDynamicPropertiesPresent();
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.util.json.mixin; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.onap.dcae.apod.analytics.model.BaseDynamicPropertiesProvider; + +import java.util.Map; + +/** + * Json Mixin for {@link BaseDynamicPropertiesProvider} + * + * @author Rajiv Singla . Creation Date: 11/5/2016. + */ +public abstract class BaseDynamicPropertiesProviderMixin implements JsonMixin { + + /** + * Provides hint to Jackson Json Object mapper to bind any put all dynamic properties in a map + * + * @param propertyName dynamic property name + * @param propertyValue dynamic property value + */ + @JsonAnySetter + public abstract void addDynamicProperties(String propertyName, Object propertyValue); + + /** + * Provides hint to serialize dynamic properties as map + * + * @return dynamic properties map + */ + @JsonAnyGetter + public abstract Map<String, Object> getDynamicProperties(); + + /** + * Ignores isDynamicPropertiesPresent for json serialization + * + * @return true if dynamic properties are present + */ + @JsonIgnore + public abstract boolean isDynamicPropertiesPresent(); +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/JsonMixin.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/JsonMixin.java index 29c4c31..5a9260a 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/JsonMixin.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/JsonMixin.java @@ -1,31 +1,31 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin;
-
-import java.io.Serializable;
-
-/**
- * Marker Interface for all Json Mixin classes
- *
- * @author Rajiv Singla . Creation Date: 11/3/2016.
- */
-public interface JsonMixin extends Serializable {
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.util.json.mixin; + +import java.io.Serializable; + +/** + * Marker Interface for all Json Mixin classes + * + * @author Rajiv Singla . Creation Date: 11/3/2016. + */ +public interface JsonMixin extends Serializable { +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/AlertActionMixin.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/AlertActionMixin.java index 3a86fa8..058467b 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/AlertActionMixin.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/AlertActionMixin.java @@ -1,30 +1,30 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef;
-
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.JsonMixin;
-
-/**
- *
- * @author Rajiv Singla. Creation Date: 08/15/2017.
- */
-public abstract class AlertActionMixin implements JsonMixin {
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.util.json.mixin.cef; + +import org.onap.dcae.apod.analytics.model.util.json.mixin.JsonMixin; + +/** + * + * @author Rajiv Singla. Creation Date: 08/15/2017. + */ +public abstract class AlertActionMixin implements JsonMixin { +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/AlertTypeMixin.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/AlertTypeMixin.java index 0de7235..3c8df6c 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/AlertTypeMixin.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/AlertTypeMixin.java @@ -1,61 +1,61 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef;
-
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonValue;
-import org.openecomp.dcae.apod.analytics.model.domain.cef.AlertType;
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.JsonMixin;
-
-/**
- * Mixin for Alert Type
- *
- * @author Rajiv Singla. Creation Date: 08/15/2017.
- */
-public abstract class AlertTypeMixin implements JsonMixin {
-
- private String name;
-
- @JsonCreator
- public static AlertType forValue(String name) {
-
- switch (name) {
- case "CARD-ANOMALY":
- return AlertType.CARD_ANOMALY;
- case "ELEMENT-ANOMALY":
- return AlertType.ELEMENT_ANOMALY;
- case "INTERFACE-ANOMALY":
- return AlertType.INTERFACE_ANOMALY;
- case "SERVICE-ANOMALY":
- return AlertType.SERVICE_ANOMALY;
- default:
- return AlertType.UNKNOWN;
- }
-
- }
-
- @JsonValue
- public String getName() {
- return name;
- }
-
-
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.util.json.mixin.cef; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import org.onap.dcae.apod.analytics.model.domain.cef.AlertType; +import org.onap.dcae.apod.analytics.model.util.json.mixin.JsonMixin; + +/** + * Mixin for Alert Type + * + * @author Rajiv Singla. Creation Date: 08/15/2017. + */ +public abstract class AlertTypeMixin implements JsonMixin { + + private String name; + + @JsonCreator + public static AlertType forValue(String name) { + + switch (name) { + case "CARD-ANOMALY": + return AlertType.CARD_ANOMALY; + case "ELEMENT-ANOMALY": + return AlertType.ELEMENT_ANOMALY; + case "INTERFACE-ANOMALY": + return AlertType.INTERFACE_ANOMALY; + case "SERVICE-ANOMALY": + return AlertType.SERVICE_ANOMALY; + default: + return AlertType.UNKNOWN; + } + + } + + @JsonValue + public String getName() { + return name; + } + + +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/BaseCEFModelMixin.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/BaseCEFModelMixin.java index fb15303..82ecd3c 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/BaseCEFModelMixin.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/BaseCEFModelMixin.java @@ -1,31 +1,31 @@ -/*
- * ============LICENSE_START=========================================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef;
-
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.BaseDynamicPropertiesProviderMixin;
-
-/**
- * Abstract Mixin for all CEF Model Mixins
- *
- * @author Rajiv Singla. Creation Date: 08/15/2017.
- */
-public abstract class BaseCEFModelMixin extends BaseDynamicPropertiesProviderMixin {
-}
+/* + * ============LICENSE_START========================================================= + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.dcae.apod.analytics.model.util.json.mixin.cef; + +import org.onap.dcae.apod.analytics.model.util.json.mixin.BaseDynamicPropertiesProviderMixin; + +/** + * Abstract Mixin for all CEF Model Mixins + * + * @author Rajiv Singla. Creation Date: 08/15/2017. + */ +public abstract class BaseCEFModelMixin extends BaseDynamicPropertiesProviderMixin { +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/CommonEventHeaderMixin.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/CommonEventHeaderMixin.java index 5627130..8c688c7 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/CommonEventHeaderMixin.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/CommonEventHeaderMixin.java @@ -1,27 +1,27 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef;
-
-/**
- * @author Rajiv Singla. Creation Date: 08/15/2017.
- */
-public abstract class CommonEventHeaderMixin extends BaseCEFModelMixin {
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.util.json.mixin.cef; + +/** + * @author Rajiv Singla. Creation Date: 08/15/2017. + */ +public abstract class CommonEventHeaderMixin extends BaseCEFModelMixin { +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/CriticalityMixin.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/CriticalityMixin.java index 2ef51f3..bf6807f 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/CriticalityMixin.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/CriticalityMixin.java @@ -1,30 +1,30 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef;
-
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.JsonMixin;
-
-/**
- *
- * @author Rajiv Singla. Creation Date: 08/15/2017.
- */
-public abstract class CriticalityMixin implements JsonMixin {
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.util.json.mixin.cef; + +import org.onap.dcae.apod.analytics.model.util.json.mixin.JsonMixin; + +/** + * + * @author Rajiv Singla. Creation Date: 08/15/2017. + */ +public abstract class CriticalityMixin implements JsonMixin { +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/DomainMixin.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/DomainMixin.java index 1c5acbe..25e44e1 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/DomainMixin.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/DomainMixin.java @@ -1,30 +1,30 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef;
-
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.JsonMixin;
-
-/**
- * @author Rajiv Singla . Creation Date: 08/15/2017.
- */
-public abstract class DomainMixin implements JsonMixin {
-
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.util.json.mixin.cef; + +import org.onap.dcae.apod.analytics.model.util.json.mixin.JsonMixin; + +/** + * @author Rajiv Singla . Creation Date: 08/15/2017. + */ +public abstract class DomainMixin implements JsonMixin { + +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/EventListenerMixin.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/EventListenerMixin.java index 35a2e9b..3bb6d7b 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/EventListenerMixin.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/EventListenerMixin.java @@ -1,29 +1,29 @@ -/*
- * ============LICENSE_START=========================================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef;
-
-/**
- * Event Listener Json Mixin class
- * <p>
- * @author Rajiv Singla. Creation Date: 08/15/2017.
- */
-public abstract class EventListenerMixin extends BaseCEFModelMixin {
-}
+/* + * ============LICENSE_START========================================================= + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.dcae.apod.analytics.model.util.json.mixin.cef; + +/** + * Event Listener Json Mixin class + * <p> + * @author Rajiv Singla. Creation Date: 08/15/2017. + */ +public abstract class EventListenerMixin extends BaseCEFModelMixin { +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/EventMixin.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/EventMixin.java index 57450e9..bd645ab 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/EventMixin.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/EventMixin.java @@ -1,29 +1,29 @@ -/*
- * ============LICENSE_START=========================================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef;
-
-/**
- * Event Json Mixin class
- * <p>
- * @author Rajiv Singla. Creation Date: 08/15/2017.
- */
-public abstract class EventMixin extends BaseCEFModelMixin {
-}
+/* + * ============LICENSE_START========================================================= + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.dcae.apod.analytics.model.util.json.mixin.cef; + +/** + * Event Json Mixin class + * <p> + * @author Rajiv Singla. Creation Date: 08/15/2017. + */ +public abstract class EventMixin extends BaseCEFModelMixin { +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/EventSeverityMixin.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/EventSeverityMixin.java index 8126758..ff2b083 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/EventSeverityMixin.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/EventSeverityMixin.java @@ -1,30 +1,30 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef;
-
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.JsonMixin;
-
-/**
- *
- * @author Rajiv Singla. Creation Date: 08/15/2017.
- */
-public abstract class EventSeverityMixin implements JsonMixin {
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.util.json.mixin.cef; + +import org.onap.dcae.apod.analytics.model.util.json.mixin.JsonMixin; + +/** + * + * @author Rajiv Singla. Creation Date: 08/15/2017. + */ +public abstract class EventSeverityMixin implements JsonMixin { +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/FieldMixin.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/FieldMixin.java index 95fc63d..8400986 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/FieldMixin.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/FieldMixin.java @@ -1,28 +1,28 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef;
-
-/**
- * @author Rajiv Singla . Creation Date: 08/15/2017.
- */
-public abstract class FieldMixin extends BaseCEFModelMixin {
-
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.util.json.mixin.cef; + +/** + * @author Rajiv Singla . Creation Date: 08/15/2017. + */ +public abstract class FieldMixin extends BaseCEFModelMixin { + +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/InternalHeaderFieldsMixin.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/InternalHeaderFieldsMixin.java index 0994845..7f765f3 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/InternalHeaderFieldsMixin.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/InternalHeaderFieldsMixin.java @@ -1,28 +1,28 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef;
-
-/**
- * @author Rajiv Singla . Creation Date: 08/15/2017.
- */
-public abstract class InternalHeaderFieldsMixin extends BaseCEFModelMixin {
-
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.util.json.mixin.cef; + +/** + * @author Rajiv Singla . Creation Date: 08/15/2017. + */ +public abstract class InternalHeaderFieldsMixin extends BaseCEFModelMixin { + +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/MeasurementsForVfScalingFieldsMixin.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/MeasurementsForVfScalingFieldsMixin.java index cb5bdf7..162ed89 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/MeasurementsForVfScalingFieldsMixin.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/MeasurementsForVfScalingFieldsMixin.java @@ -1,39 +1,39 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef;
-
-import com.fasterxml.jackson.annotation.JsonGetter;
-import com.fasterxml.jackson.annotation.JsonSetter;
-import org.openecomp.dcae.apod.analytics.model.domain.cef.VNicPerformance;
-
-import java.util.List;
-
-/**
- * @author Rajiv Singla. Creation Date: 08/15/2017.
- */
-public abstract class MeasurementsForVfScalingFieldsMixin extends BaseCEFModelMixin {
-
- @JsonSetter("vNicPerformanceArray")
- public abstract void setVNicPerformanceArray(List<VNicPerformance> vNicPerformances);
-
- @JsonGetter("vNicPerformanceArray")
- public abstract List<VNicPerformance> getVNicPerformanceArray();
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.util.json.mixin.cef; + +import com.fasterxml.jackson.annotation.JsonGetter; +import com.fasterxml.jackson.annotation.JsonSetter; +import org.onap.dcae.apod.analytics.model.domain.cef.VNicPerformance; + +import java.util.List; + +/** + * @author Rajiv Singla. Creation Date: 08/15/2017. + */ +public abstract class MeasurementsForVfScalingFieldsMixin extends BaseCEFModelMixin { + + @JsonSetter("vNicPerformanceArray") + public abstract void setVNicPerformanceArray(List<VNicPerformance> vNicPerformances); + + @JsonGetter("vNicPerformanceArray") + public abstract List<VNicPerformance> getVNicPerformanceArray(); +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/NamedArrayOfFieldsMixin.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/NamedArrayOfFieldsMixin.java index d8dd6f9..18a12b3 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/NamedArrayOfFieldsMixin.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/NamedArrayOfFieldsMixin.java @@ -1,28 +1,28 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef;
-
-/**
- * @author Rajiv Singla . Creation Date: 08/15/2017.
- */
-public abstract class NamedArrayOfFieldsMixin extends BaseCEFModelMixin {
-
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.util.json.mixin.cef; + +/** + * @author Rajiv Singla . Creation Date: 08/15/2017. + */ +public abstract class NamedArrayOfFieldsMixin extends BaseCEFModelMixin { + +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/PerformanceCounterMixin.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/PerformanceCounterMixin.java index df8b957..ab15ccd 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/PerformanceCounterMixin.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/PerformanceCounterMixin.java @@ -1,29 +1,29 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef;
-
-/**
- * CEF Performance Counter Mixin
- *
- * @author Rajiv Singla. Creation Date: 08/15/2017.
- */
-public abstract class PerformanceCounterMixin extends BaseCEFModelMixin {
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.util.json.mixin.cef; + +/** + * CEF Performance Counter Mixin + * + * @author Rajiv Singla. Creation Date: 08/15/2017. + */ +public abstract class PerformanceCounterMixin extends BaseCEFModelMixin { +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/PriorityMixin.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/PriorityMixin.java index d71ade4..7641e66 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/PriorityMixin.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/PriorityMixin.java @@ -1,30 +1,30 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef;
-
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.JsonMixin;
-
-/**
- *
- * @author Rajiv Singla. Creation Date: 08/15/2017.
- */
-public abstract class PriorityMixin implements JsonMixin {
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.util.json.mixin.cef; + +import org.onap.dcae.apod.analytics.model.util.json.mixin.JsonMixin; + +/** + * + * @author Rajiv Singla. Creation Date: 08/15/2017. + */ +public abstract class PriorityMixin implements JsonMixin { +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/ThresholdCrossingAlertFieldsMixin.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/ThresholdCrossingAlertFieldsMixin.java index 2b0aae8..6cd3471 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/ThresholdCrossingAlertFieldsMixin.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/ThresholdCrossingAlertFieldsMixin.java @@ -1,29 +1,29 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef;
-
-/**
- * Mixin class for ThresholdCrossingAlertFields
- *
- * @author Rajiv Singla. Creation Date: 08/15/2017.
- */
-public abstract class ThresholdCrossingAlertFieldsMixin extends BaseCEFModelMixin {
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.util.json.mixin.cef; + +/** + * Mixin class for ThresholdCrossingAlertFields + * + * @author Rajiv Singla. Creation Date: 08/15/2017. + */ +public abstract class ThresholdCrossingAlertFieldsMixin extends BaseCEFModelMixin { +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/VNicUsageArrayMixin.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/VNicUsageArrayMixin.java index ed3aa23..a48f32b 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/VNicUsageArrayMixin.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/VNicUsageArrayMixin.java @@ -1,36 +1,36 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef;
-
-import com.fasterxml.jackson.annotation.JsonSetter;
-
-/**
- * @author Rajiv Singla. Creation Date: 08/15/2017.
- */
-public abstract class VNicUsageArrayMixin extends BaseCEFModelMixin {
-
- @JsonSetter("vNicIdentifier")
- public abstract void setVNicIdentifier(String name);
-
- @JsonSetter("vNicIdentifier")
- public abstract String setVNicIdentifier();
-
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.util.json.mixin.cef; + +import com.fasterxml.jackson.annotation.JsonSetter; + +/** + * @author Rajiv Singla. Creation Date: 08/15/2017. + */ +public abstract class VNicUsageArrayMixin extends BaseCEFModelMixin { + + @JsonSetter("vNicIdentifier") + public abstract void setVNicIdentifier(String name); + + @JsonSetter("vNicIdentifier") + public abstract String setVNicIdentifier(); + +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/config/tca/BaseTCAAppConfigModelMixin.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/config/tca/BaseTCAAppConfigModelMixin.java index c62afd6..b6dca65 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/config/tca/BaseTCAAppConfigModelMixin.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/config/tca/BaseTCAAppConfigModelMixin.java @@ -1,29 +1,29 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.config.tca;
-
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.BaseDynamicPropertiesProviderMixin;
-
-/**
- * @author Rajiv Singla . Creation Date: 8/25/2017.
- */
-public abstract class BaseTCAAppConfigModelMixin extends BaseDynamicPropertiesProviderMixin {
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.util.json.mixin.config.tca; + +import org.onap.dcae.apod.analytics.model.util.json.mixin.BaseDynamicPropertiesProviderMixin; + +/** + * @author Rajiv Singla . Creation Date: 8/25/2017. + */ +public abstract class BaseTCAAppConfigModelMixin extends BaseDynamicPropertiesProviderMixin { +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/config/tca/BaseTCAHandleMixin.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/config/tca/BaseTCAHandleMixin.java index d1afabe..8f96e9f 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/config/tca/BaseTCAHandleMixin.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/config/tca/BaseTCAHandleMixin.java @@ -1,40 +1,40 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.config.tca;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-import org.openecomp.dcae.apod.analytics.model.config.tca.DMAAPInfo;
-
-/**
- * @author Rajiv Singla . Creation Date: 8/25/2017.
- */
-public abstract class BaseTCAHandleMixin extends BaseTCAAppConfigModelMixin {
-
- @JsonProperty("aaf_password")
- String aafPassword;
- @JsonProperty("aaf_username")
- String aafUserName;
- @JsonProperty("dmaap_info")
- DMAAPInfo dmaapInfo;
- @JsonProperty("type")
- String type;
-
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.util.json.mixin.config.tca; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.onap.dcae.apod.analytics.model.config.tca.DMAAPInfo; + +/** + * @author Rajiv Singla . Creation Date: 8/25/2017. + */ +public abstract class BaseTCAHandleMixin extends BaseTCAAppConfigModelMixin { + + @JsonProperty("aaf_password") + String aafPassword; + @JsonProperty("aaf_username") + String aafUserName; + @JsonProperty("dmaap_info") + DMAAPInfo dmaapInfo; + @JsonProperty("type") + String type; + +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/config/tca/DMAAPInfoMixin.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/config/tca/DMAAPInfoMixin.java index f0ac38e..51b23f5 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/config/tca/DMAAPInfoMixin.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/config/tca/DMAAPInfoMixin.java @@ -1,33 +1,33 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.config.tca;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-/**
- * @author Rajiv Singla . Creation Date: 8/25/2017.
- */
-
-public abstract class DMAAPInfoMixin extends BaseTCAAppConfigModelMixin {
-
- @JsonProperty("topic_url")
- String topicUrl;
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.util.json.mixin.config.tca; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * @author Rajiv Singla . Creation Date: 8/25/2017. + */ + +public abstract class DMAAPInfoMixin extends BaseTCAAppConfigModelMixin { + + @JsonProperty("topic_url") + String topicUrl; +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/config/tca/StreamsPublishesMixin.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/config/tca/StreamsPublishesMixin.java index b1ea534..83027de 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/config/tca/StreamsPublishesMixin.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/config/tca/StreamsPublishesMixin.java @@ -1,34 +1,34 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.config.tca;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-import org.openecomp.dcae.apod.analytics.model.config.tca.TCAHandleOut;
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.policy.tca.BaseTCAPolicyModelMixin;
-
-/**
- * @author Rajiv Singla . Creation Date: 8/25/2017.
- */
-public abstract class StreamsPublishesMixin extends BaseTCAPolicyModelMixin {
-
- @JsonProperty("tca_handle_out")
- TCAHandleOut tcaHandleOut;
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.util.json.mixin.config.tca; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.onap.dcae.apod.analytics.model.config.tca.TCAHandleOut; +import org.onap.dcae.apod.analytics.model.util.json.mixin.policy.tca.BaseTCAPolicyModelMixin; + +/** + * @author Rajiv Singla . Creation Date: 8/25/2017. + */ +public abstract class StreamsPublishesMixin extends BaseTCAPolicyModelMixin { + + @JsonProperty("tca_handle_out") + TCAHandleOut tcaHandleOut; +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/config/tca/StreamsSubscribesMixin.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/config/tca/StreamsSubscribesMixin.java index e13c746..b2b578a 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/config/tca/StreamsSubscribesMixin.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/config/tca/StreamsSubscribesMixin.java @@ -1,34 +1,34 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.config.tca;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-import org.openecomp.dcae.apod.analytics.model.config.tca.TCAHandleIn;
-
-/**
- * @author Rajiv Singla . Creation Date: 8/25/2017.
- */
-public abstract class StreamsSubscribesMixin extends BaseTCAAppConfigModelMixin {
-
- @JsonProperty("tca_handle_in")
- TCAHandleIn tcaHandleIn;
-
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.util.json.mixin.config.tca; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.onap.dcae.apod.analytics.model.config.tca.TCAHandleIn; + +/** + * @author Rajiv Singla . Creation Date: 8/25/2017. + */ +public abstract class StreamsSubscribesMixin extends BaseTCAAppConfigModelMixin { + + @JsonProperty("tca_handle_in") + TCAHandleIn tcaHandleIn; + +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/config/tca/TCAControllerAppConfigMixin.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/config/tca/TCAControllerAppConfigMixin.java index 2a8b261..f4b67f2 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/config/tca/TCAControllerAppConfigMixin.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/config/tca/TCAControllerAppConfigMixin.java @@ -1,37 +1,37 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.config.tca;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-import org.openecomp.dcae.apod.analytics.model.config.tca.StreamsPublishes;
-import org.openecomp.dcae.apod.analytics.model.config.tca.StreamsSubscribes;
-
-/**
- * @author Rajiv Singla . Creation Date: 8/25/2017.
- */
-public abstract class TCAControllerAppConfigMixin extends BaseTCAAppConfigModelMixin {
-
- @JsonProperty("streams_publishes")
- StreamsPublishes streamsPublishes;
- @JsonProperty("streams_subscribes")
- StreamsSubscribes streamsSubscribes;
-
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.util.json.mixin.config.tca; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.onap.dcae.apod.analytics.model.config.tca.StreamsPublishes; +import org.onap.dcae.apod.analytics.model.config.tca.StreamsSubscribes; + +/** + * @author Rajiv Singla . Creation Date: 8/25/2017. + */ +public abstract class TCAControllerAppConfigMixin extends BaseTCAAppConfigModelMixin { + + @JsonProperty("streams_publishes") + StreamsPublishes streamsPublishes; + @JsonProperty("streams_subscribes") + StreamsSubscribes streamsSubscribes; + +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/facade/tca/AAIMixin.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/facade/tca/AAIMixin.java index b6b2b05..d8f2d9e 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/facade/tca/AAIMixin.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/facade/tca/AAIMixin.java @@ -1,55 +1,55 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.facade.tca;
-
-import com.fasterxml.jackson.annotation.JsonGetter;
-import com.fasterxml.jackson.annotation.JsonSetter;
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.BaseDynamicPropertiesProviderMixin;
-
-/**
- *
- * @author Rajiv Singla . Creation Date: 11/9/2016.
- */
-public abstract class AAIMixin extends BaseDynamicPropertiesProviderMixin {
-
- private String genericVNFName;
- private String genericServerName;
-
- @JsonGetter("generic-vnf.vnf-name")
- public String getGenericVNFName() {
- return genericVNFName;
- }
-
- @JsonSetter("generic-vnf.vnf-name")
- public void setGenericVNFName(String genericVNFName) {
- this.genericVNFName = genericVNFName;
- }
-
- @JsonGetter("vserver.vserver-name")
- public String getGenericServerName() {
- return genericServerName;
- }
-
- @JsonSetter("vserver.vserver-name")
- public void setGenericServerName(String genericServerName) {
- this.genericServerName = genericServerName;
- }
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.util.json.mixin.facade.tca; + +import com.fasterxml.jackson.annotation.JsonGetter; +import com.fasterxml.jackson.annotation.JsonSetter; +import org.onap.dcae.apod.analytics.model.util.json.mixin.BaseDynamicPropertiesProviderMixin; + +/** + * + * @author Rajiv Singla . Creation Date: 11/9/2016. + */ +public abstract class AAIMixin extends BaseDynamicPropertiesProviderMixin { + + private String genericVNFName; + private String genericServerName; + + @JsonGetter("generic-vnf.vnf-name") + public String getGenericVNFName() { + return genericVNFName; + } + + @JsonSetter("generic-vnf.vnf-name") + public void setGenericVNFName(String genericVNFName) { + this.genericVNFName = genericVNFName; + } + + @JsonGetter("vserver.vserver-name") + public String getGenericServerName() { + return genericServerName; + } + + @JsonSetter("vserver.vserver-name") + public void setGenericServerName(String genericServerName) { + this.genericServerName = genericServerName; + } +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/facade/tca/VESCEFMessageResponseMixin.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/facade/tca/VESCEFMessageResponseMixin.java index 4d089bb..49e7373 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/facade/tca/VESCEFMessageResponseMixin.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/facade/tca/VESCEFMessageResponseMixin.java @@ -1,56 +1,56 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.facade.tca;
-
-import com.fasterxml.jackson.annotation.JsonGetter;
-import com.fasterxml.jackson.annotation.JsonSetter;
-import org.openecomp.dcae.apod.analytics.model.facade.tca.AAI;
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.JsonMixin;
-
-/**
- *
- * @author Rajiv Singla . Creation Date: 11/9/2016.
- */
-public abstract class VESCEFMessageResponseMixin implements JsonMixin {
-
- private String targetType;
- private AAI aai;
-
- @JsonGetter("target_type")
- public String getTargetType() {
- return targetType;
- }
-
- @JsonSetter("target_type")
- public void setTargetType(String targetType) {
- this.targetType = targetType;
- }
-
- @JsonGetter("AAI")
- public AAI getAai() {
- return aai;
- }
-
- @JsonSetter("AAI")
- public void setAai(AAI aai) {
- this.aai = aai;
- }
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.util.json.mixin.facade.tca; + +import com.fasterxml.jackson.annotation.JsonGetter; +import com.fasterxml.jackson.annotation.JsonSetter; +import org.onap.dcae.apod.analytics.model.facade.tca.AAI; +import org.onap.dcae.apod.analytics.model.util.json.mixin.JsonMixin; + +/** + * + * @author Rajiv Singla . Creation Date: 11/9/2016. + */ +public abstract class VESCEFMessageResponseMixin implements JsonMixin { + + private String targetType; + private AAI aai; + + @JsonGetter("target_type") + public String getTargetType() { + return targetType; + } + + @JsonSetter("target_type") + public void setTargetType(String targetType) { + this.targetType = targetType; + } + + @JsonGetter("AAI") + public AAI getAai() { + return aai; + } + + @JsonSetter("AAI") + public void setAai(AAI aai) { + this.aai = aai; + } +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/policy/tca/BaseTCAPolicyModelMixin.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/policy/tca/BaseTCAPolicyModelMixin.java index fa9eb48..e673d74 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/policy/tca/BaseTCAPolicyModelMixin.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/policy/tca/BaseTCAPolicyModelMixin.java @@ -1,30 +1,30 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.policy.tca;
-
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.BaseDynamicPropertiesProviderMixin;
-
-/**
- *
- * @author Rajiv Singla . Creation Date: 11/5/2016.
- */
-public abstract class BaseTCAPolicyModelMixin extends BaseDynamicPropertiesProviderMixin {
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.util.json.mixin.policy.tca; + +import org.onap.dcae.apod.analytics.model.util.json.mixin.BaseDynamicPropertiesProviderMixin; + +/** + * + * @author Rajiv Singla . Creation Date: 11/5/2016. + */ +public abstract class BaseTCAPolicyModelMixin extends BaseDynamicPropertiesProviderMixin { +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/policy/tca/ClosedLoopEventStatusMixin.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/policy/tca/ClosedLoopEventStatusMixin.java index f9a77cd..301704c 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/policy/tca/ClosedLoopEventStatusMixin.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/policy/tca/ClosedLoopEventStatusMixin.java @@ -1,30 +1,30 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.policy.tca;
-
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.JsonMixin;
-
-/**
- *
- * @author Rajiv Singla . Creation Date: 9/11/2017.
- */
-public abstract class ClosedLoopEventStatusMixin implements JsonMixin {
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.util.json.mixin.policy.tca; + +import org.onap.dcae.apod.analytics.model.util.json.mixin.JsonMixin; + +/** + * + * @author Rajiv Singla . Creation Date: 9/11/2017. + */ +public abstract class ClosedLoopEventStatusMixin implements JsonMixin { +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/policy/tca/ControlLoopSchemaTypeMixin.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/policy/tca/ControlLoopSchemaTypeMixin.java index c85fc1b..4d1c524 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/policy/tca/ControlLoopSchemaTypeMixin.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/policy/tca/ControlLoopSchemaTypeMixin.java @@ -1,29 +1,29 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.policy.tca;
-
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.JsonMixin;
-
-/**
- * @author Rajiv Singla . Creation Date: 8/24/2017.
- */
-public abstract class ControlLoopSchemaTypeMixin implements JsonMixin {
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.util.json.mixin.policy.tca; + +import org.onap.dcae.apod.analytics.model.util.json.mixin.JsonMixin; + +/** + * @author Rajiv Singla . Creation Date: 8/24/2017. + */ +public abstract class ControlLoopSchemaTypeMixin implements JsonMixin { +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/policy/tca/DirectionMixin.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/policy/tca/DirectionMixin.java index aafcd09..1118172 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/policy/tca/DirectionMixin.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/policy/tca/DirectionMixin.java @@ -1,30 +1,30 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.policy.tca;
-
-import org.openecomp.dcae.apod.analytics.model.util.json.mixin.JsonMixin;
-
-/**
- *
- * @author Rajiv Singla . Creation Date: 11/5/2016.
- */
-public abstract class DirectionMixin implements JsonMixin {
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.util.json.mixin.policy.tca; + +import org.onap.dcae.apod.analytics.model.util.json.mixin.JsonMixin; + +/** + * + * @author Rajiv Singla . Creation Date: 11/5/2016. + */ +public abstract class DirectionMixin implements JsonMixin { +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/policy/tca/MetricsPerEventNameMixin.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/policy/tca/MetricsPerEventNameMixin.java index 43cf5aa..962b4ab 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/policy/tca/MetricsPerEventNameMixin.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/policy/tca/MetricsPerEventNameMixin.java @@ -1,28 +1,28 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.policy.tca;
-
-/**
- *
- * @author Rajiv Singla . Creation Date: 11/5/2016.
- */
-public abstract class MetricsPerEventNameMixin extends BaseTCAPolicyModelMixin {
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.util.json.mixin.policy.tca; + +/** + * + * @author Rajiv Singla . Creation Date: 11/5/2016. + */ +public abstract class MetricsPerEventNameMixin extends BaseTCAPolicyModelMixin { +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/policy/tca/TCAPolicyMixin.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/policy/tca/TCAPolicyMixin.java index ac610c0..3309901 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/policy/tca/TCAPolicyMixin.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/policy/tca/TCAPolicyMixin.java @@ -1,28 +1,28 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.policy.tca;
-
-/**
- *
- * @author Rajiv Singla . Creation Date: 11/5/2016.
- */
-public abstract class TCAPolicyMixin extends BaseTCAPolicyModelMixin {
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.util.json.mixin.policy.tca; + +/** + * + * @author Rajiv Singla . Creation Date: 11/5/2016. + */ +public abstract class TCAPolicyMixin extends BaseTCAPolicyModelMixin { +} diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/policy/tca/ThresholdMixin.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/policy/tca/ThresholdMixin.java index 27344f8..69c9c82 100644 --- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/policy/tca/ThresholdMixin.java +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/policy/tca/ThresholdMixin.java @@ -1,46 +1,46 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.policy.tca;
-
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-import java.math.BigDecimal;
-
-/**
- *
- * @author Rajiv Singla . Creation Date: 11/5/2016.
- */
-public abstract class ThresholdMixin extends BaseTCAPolicyModelMixin {
-
- @JsonIgnore
- private BigDecimal actualFieldValue;
-
- @JsonIgnore
- public BigDecimal getActualFieldValue() {
- return actualFieldValue;
- }
-
- @JsonProperty
- public void setActualFieldValue(BigDecimal actualFieldValue) {
- this.actualFieldValue = actualFieldValue;
- }
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.util.json.mixin.policy.tca; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +import java.math.BigDecimal; + +/** + * + * @author Rajiv Singla . Creation Date: 11/5/2016. + */ +public abstract class ThresholdMixin extends BaseTCAPolicyModelMixin { + + @JsonIgnore + private BigDecimal actualFieldValue; + + @JsonIgnore + public BigDecimal getActualFieldValue() { + return actualFieldValue; + } + + @JsonProperty + public void setActualFieldValue(BigDecimal actualFieldValue) { + this.actualFieldValue = actualFieldValue; + } +} diff --git a/dcae-analytics-model/src/test/java/org/openecomp/dcae/apod/analytics/model/BaseAnalyticsModelUnitTest.java b/dcae-analytics-model/src/test/java/org/onap/dcae/apod/analytics/model/BaseAnalyticsModelUnitTest.java index 76f225d..37b2790 100644 --- a/dcae-analytics-model/src/test/java/org/openecomp/dcae/apod/analytics/model/BaseAnalyticsModelUnitTest.java +++ b/dcae-analytics-model/src/test/java/org/onap/dcae/apod/analytics/model/BaseAnalyticsModelUnitTest.java @@ -1,154 +1,154 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model;
-
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.google.common.base.Suppliers;
-import org.json.JSONException;
-import org.junit.Assert;
-import org.junit.BeforeClass;
-import org.openecomp.dcae.apod.analytics.model.util.json.AnalyticsModelObjectMapperSupplier;
-import org.openecomp.dcae.apod.analytics.test.BaseDCAEAnalyticsUnitTest;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-/**
- * @author Rajiv Singla . Creation Date: 10/17/2016.
- */
-public abstract class BaseAnalyticsModelUnitTest extends BaseDCAEAnalyticsUnitTest {
-
-
- protected static ObjectMapper objectMapper;
-
- /**
- * Before running test cases need to assign object mapper.
- */
- @BeforeClass
- public static void beforeClass() {
- final AnalyticsModelObjectMapperSupplier analyticsModelObjectMapperSupplier =
- new AnalyticsModelObjectMapperSupplier();
- objectMapper = Suppliers.memoize(analyticsModelObjectMapperSupplier).get();
- }
-
-
- /**
- * Deserialize given Json file location to given model class and returns it back without any validation check.
- *
- * @param jsonFileLocation Classpath location of the json file
- * @param modelClass Model Class type
- * @param <T> Json Model Type
- * @return Deserialized Model Object
- */
- public static <T> T deserializeJsonFileToModel(String jsonFileLocation, Class<T> modelClass) {
- final InputStream jsonFileInputStream =
- BaseDCAEAnalyticsUnitTest.class.getClassLoader().getResourceAsStream(jsonFileLocation);
- Assert.assertNotNull("Json File Location must be valid", jsonFileInputStream);
- try {
- return objectMapper.readValue(jsonFileInputStream, modelClass);
- } catch (IOException ex) {
- LOG.error("Error while doing assert Json for fileLocation: {}, modelClass: {}, Exception {}",
- jsonFileLocation, modelClass, ex);
- throw new RuntimeException(ex);
- } finally {
- try {
- jsonFileInputStream.close();
- } catch (IOException e) {
- LOG.error("Error while closing input stream at file location: {}", jsonFileLocation);
- throw new RuntimeException(e);
- }
- }
- }
-
- /**
- * Deserialize given Json file location to given model class and then validates deserialization by comparing it
- * with given expected Object.
- *
- * @param jsonFileLocation Classpath location of the json file
- * @param modelClass Model Class type
- * @param expectedJsonObject Expected Json Object
- * @param <T> Json Model Type
- * @return deserialized actual value if expected Json Object matches deserialized object
- */
- public static <T> T assertJsonDeserialization(String jsonFileLocation, Class<T> modelClass, T expectedJsonObject) {
- final T actualValue = deserializeJsonFileToModel(jsonFileLocation, modelClass);
- assertThat(actualValue, is(expectedJsonObject));
- return actualValue;
- }
-
- /**
- * Serialize model to json.
- * @param model model
- * @return json
- * @throws JsonProcessingException when fails to process object
- */
- public static String serializeModelToJson(Object model) throws JsonProcessingException {
- return objectMapper.writeValueAsString(model);
- }
-
- /**
- * Converts given model to json string and compare it with json present at given file location.
- *
- * @param model Model which needs to be compared
- * @param expectedJsonFileLocation Location of file containing expected json string
- *
- * @return If assertion passes returns the input model
- */
- public static <T> T assertJsonSerialization(T model, String expectedJsonFileLocation) {
- try {
- final String actualModelString = serializeModelToJson(model);
- final String expectedModelString = fromStream(expectedJsonFileLocation);
- assertJson(expectedModelString, actualModelString);
- return model;
- } catch (IOException | JSONException ex) {
- LOG.error("Error while doing assert Json serialization Assertion: model: {}, "
- + "expected Json File Location: {}, Exception {}", model, expectedJsonFileLocation, ex);
- throw new RuntimeException(ex);
- }
- }
-
-
- /**
- * Checks both serialization and deserialization.
- * </p>
- * First checks deserialization and then serialize the deserialized object back to json
- * and check if matches the given json file location string
- *
- * @param jsonFileLocation Classpath location of the json file
- * @param modelClass Class type
- * @param <T> Json Model Type
- *
- * @return If assertion passes, returns deserialized object
- */
-
- public static <T> T assertJsonConversions(String jsonFileLocation, Class<T> modelClass) {
- //first check deserialization
- final T actualValue = deserializeJsonFileToModel(jsonFileLocation, modelClass);
- //then check serialization
- assertJsonSerialization(actualValue, jsonFileLocation);
-
- return actualValue;
- }
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.google.common.base.Suppliers; +import org.json.JSONException; +import org.junit.Assert; +import org.junit.BeforeClass; +import org.onap.dcae.apod.analytics.model.util.json.AnalyticsModelObjectMapperSupplier; +import org.onap.dcae.apod.analytics.test.BaseDCAEAnalyticsUnitTest; + +import java.io.IOException; +import java.io.InputStream; + +import static org.hamcrest.CoreMatchers.is; +import static org.junit.Assert.assertThat; + +/** + * @author Rajiv Singla . Creation Date: 10/17/2016. + */ +public abstract class BaseAnalyticsModelUnitTest extends BaseDCAEAnalyticsUnitTest { + + + protected static ObjectMapper objectMapper; + + /** + * Before running test cases need to assign object mapper. + */ + @BeforeClass + public static void beforeClass() { + final AnalyticsModelObjectMapperSupplier analyticsModelObjectMapperSupplier = + new AnalyticsModelObjectMapperSupplier(); + objectMapper = Suppliers.memoize(analyticsModelObjectMapperSupplier).get(); + } + + + /** + * Deserialize given Json file location to given model class and returns it back without any validation check. + * + * @param jsonFileLocation Classpath location of the json file + * @param modelClass Model Class type + * @param <T> Json Model Type + * @return Deserialized Model Object + */ + public static <T> T deserializeJsonFileToModel(String jsonFileLocation, Class<T> modelClass) { + final InputStream jsonFileInputStream = + BaseDCAEAnalyticsUnitTest.class.getClassLoader().getResourceAsStream(jsonFileLocation); + Assert.assertNotNull("Json File Location must be valid", jsonFileInputStream); + try { + return objectMapper.readValue(jsonFileInputStream, modelClass); + } catch (IOException ex) { + LOG.error("Error while doing assert Json for fileLocation: {}, modelClass: {}, Exception {}", + jsonFileLocation, modelClass, ex); + throw new RuntimeException(ex); + } finally { + try { + jsonFileInputStream.close(); + } catch (IOException e) { + LOG.error("Error while closing input stream at file location: {}", jsonFileLocation); + throw new RuntimeException(e); + } + } + } + + /** + * Deserialize given Json file location to given model class and then validates deserialization by comparing it + * with given expected Object. + * + * @param jsonFileLocation Classpath location of the json file + * @param modelClass Model Class type + * @param expectedJsonObject Expected Json Object + * @param <T> Json Model Type + * @return deserialized actual value if expected Json Object matches deserialized object + */ + public static <T> T assertJsonDeserialization(String jsonFileLocation, Class<T> modelClass, T expectedJsonObject) { + final T actualValue = deserializeJsonFileToModel(jsonFileLocation, modelClass); + assertThat(actualValue, is(expectedJsonObject)); + return actualValue; + } + + /** + * Serialize model to json. + * @param model model + * @return json + * @throws JsonProcessingException when fails to process object + */ + public static String serializeModelToJson(Object model) throws JsonProcessingException { + return objectMapper.writeValueAsString(model); + } + + /** + * Converts given model to json string and compare it with json present at given file location. + * + * @param model Model which needs to be compared + * @param expectedJsonFileLocation Location of file containing expected json string + * + * @return If assertion passes returns the input model + */ + public static <T> T assertJsonSerialization(T model, String expectedJsonFileLocation) { + try { + final String actualModelString = serializeModelToJson(model); + final String expectedModelString = fromStream(expectedJsonFileLocation); + assertJson(expectedModelString, actualModelString); + return model; + } catch (IOException | JSONException ex) { + LOG.error("Error while doing assert Json serialization Assertion: model: {}, " + + "expected Json File Location: {}, Exception {}", model, expectedJsonFileLocation, ex); + throw new RuntimeException(ex); + } + } + + + /** + * Checks both serialization and deserialization. + * </p> + * First checks deserialization and then serialize the deserialized object back to json + * and check if matches the given json file location string + * + * @param jsonFileLocation Classpath location of the json file + * @param modelClass Class type + * @param <T> Json Model Type + * + * @return If assertion passes, returns deserialized object + */ + + public static <T> T assertJsonConversions(String jsonFileLocation, Class<T> modelClass) { + //first check deserialization + final T actualValue = deserializeJsonFileToModel(jsonFileLocation, modelClass); + //then check serialization + assertJsonSerialization(actualValue, jsonFileLocation); + + return actualValue; + } +} diff --git a/dcae-analytics-model/src/test/java/org/openecomp/dcae/apod/analytics/model/domain/cef/EventSeverityTest.java b/dcae-analytics-model/src/test/java/org/onap/dcae/apod/analytics/model/domain/cef/EventSeverityTest.java index c7da0f5..e9814f1 100644 --- a/dcae-analytics-model/src/test/java/org/openecomp/dcae/apod/analytics/model/domain/cef/EventSeverityTest.java +++ b/dcae-analytics-model/src/test/java/org/onap/dcae/apod/analytics/model/domain/cef/EventSeverityTest.java @@ -1,71 +1,71 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.domain.cef;
-
-import org.junit.Assert;
-import org.junit.Test;
-import org.openecomp.dcae.apod.analytics.test.BaseDCAEAnalyticsUnitTest;
-
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.LinkedList;
-import java.util.List;
-
-/**
- *
- * @author Rajiv Singla . Creation Date: 11/10/2016.
- */
-public class EventSeverityTest extends BaseDCAEAnalyticsUnitTest {
-
- private static Comparator<EventSeverity> eventSeverityComparator = new Comparator<EventSeverity>() {
- @Override
- public int compare(EventSeverity eventSeverity1, EventSeverity eventSeverity2) {
- return eventSeverity1.compareTo(eventSeverity2);
- }
- };
-
- @Test
- public void testEventSeverityOrdering() throws Exception {
-
- List<EventSeverity> eventSeverities = new LinkedList<>();
- Collections.addAll(eventSeverities,
- EventSeverity.NORMAL,
- EventSeverity.WARNING,
- EventSeverity.MINOR,
- EventSeverity.MAJOR,
- EventSeverity.CRITICAL);
-
- Collections.sort(eventSeverities);
-
- List<EventSeverity> expectedEventSeverities = new LinkedList<>();
- Collections.addAll(expectedEventSeverities,
- EventSeverity.CRITICAL,
- EventSeverity.MAJOR,
- EventSeverity.MINOR,
- EventSeverity.WARNING,
- EventSeverity.NORMAL
- );
-
- Assert.assertTrue("Severity Order must be CRITICAL, MAJOR, MINOR, WARNING, NORMAL",
- eventSeverities.equals(expectedEventSeverities));
-
- }
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.domain.cef; + +import org.junit.Assert; +import org.junit.Test; +import org.onap.dcae.apod.analytics.test.BaseDCAEAnalyticsUnitTest; + +import java.util.Collections; +import java.util.Comparator; +import java.util.LinkedList; +import java.util.List; + +/** + * + * @author Rajiv Singla . Creation Date: 11/10/2016. + */ +public class EventSeverityTest extends BaseDCAEAnalyticsUnitTest { + + private static Comparator<EventSeverity> eventSeverityComparator = new Comparator<EventSeverity>() { + @Override + public int compare(EventSeverity eventSeverity1, EventSeverity eventSeverity2) { + return eventSeverity1.compareTo(eventSeverity2); + } + }; + + @Test + public void testEventSeverityOrdering() throws Exception { + + List<EventSeverity> eventSeverities = new LinkedList<>(); + Collections.addAll(eventSeverities, + EventSeverity.NORMAL, + EventSeverity.WARNING, + EventSeverity.MINOR, + EventSeverity.MAJOR, + EventSeverity.CRITICAL); + + Collections.sort(eventSeverities); + + List<EventSeverity> expectedEventSeverities = new LinkedList<>(); + Collections.addAll(expectedEventSeverities, + EventSeverity.CRITICAL, + EventSeverity.MAJOR, + EventSeverity.MINOR, + EventSeverity.WARNING, + EventSeverity.NORMAL + ); + + Assert.assertTrue("Severity Order must be CRITICAL, MAJOR, MINOR, WARNING, NORMAL", + eventSeverities.equals(expectedEventSeverities)); + + } +} diff --git a/dcae-analytics-model/src/test/java/org/openecomp/dcae/apod/analytics/model/facade/tca/AAITest.java b/dcae-analytics-model/src/test/java/org/onap/dcae/apod/analytics/model/facade/tca/AAITest.java index 689633b..ebbc690 100644 --- a/dcae-analytics-model/src/test/java/org/openecomp/dcae/apod/analytics/model/facade/tca/AAITest.java +++ b/dcae-analytics-model/src/test/java/org/onap/dcae/apod/analytics/model/facade/tca/AAITest.java @@ -1,57 +1,57 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.facade.tca;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.openecomp.dcae.apod.analytics.model.BaseAnalyticsModelUnitTest;
-
-import static org.hamcrest.core.Is.is;
-import static org.junit.Assert.assertThat;
-
-/**
- * @author Rajiv Singla . Creation Date: 12/16/2016.
- */
-public class AAITest extends BaseAnalyticsModelUnitTest {
-
- private AAI aai;
- private static final String GENERIC_VNF_ID = "testVNFID";
- private static final String CHANGED_GENERIC_VNF_ID = "changedVNFID";
-
- @Before
- public void before() {
- aai = new AAI();
- }
-
- @Test
- public void getGenericVNFId() throws Exception {
- aai.setGenericVNFName(GENERIC_VNF_ID);
- assertThat("VNFID must be same", aai.getGenericVNFName(), is(GENERIC_VNF_ID));
- }
-
- @Test
- public void setGenericVNFId() throws Exception {
- final String genericVNFId = "testVNFID";
- aai.setGenericVNFName(GENERIC_VNF_ID);
- aai.setGenericVNFName(CHANGED_GENERIC_VNF_ID);
- assertThat("VNFID must be same as changed VNFID", aai.getGenericVNFName(), is(CHANGED_GENERIC_VNF_ID));
- }
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.facade.tca; + +import org.junit.Before; +import org.junit.Test; +import org.onap.dcae.apod.analytics.model.BaseAnalyticsModelUnitTest; + +import static org.hamcrest.core.Is.is; +import static org.junit.Assert.assertThat; + +/** + * @author Rajiv Singla . Creation Date: 12/16/2016. + */ +public class AAITest extends BaseAnalyticsModelUnitTest { + + private AAI aai; + private static final String GENERIC_VNF_ID = "testVNFID"; + private static final String CHANGED_GENERIC_VNF_ID = "changedVNFID"; + + @Before + public void before() { + aai = new AAI(); + } + + @Test + public void getGenericVNFId() throws Exception { + aai.setGenericVNFName(GENERIC_VNF_ID); + assertThat("VNFID must be same", aai.getGenericVNFName(), is(GENERIC_VNF_ID)); + } + + @Test + public void setGenericVNFId() throws Exception { + final String genericVNFId = "testVNFID"; + aai.setGenericVNFName(GENERIC_VNF_ID); + aai.setGenericVNFName(CHANGED_GENERIC_VNF_ID); + assertThat("VNFID must be same as changed VNFID", aai.getGenericVNFName(), is(CHANGED_GENERIC_VNF_ID)); + } +} diff --git a/dcae-analytics-model/src/test/java/org/openecomp/dcae/apod/analytics/model/facade/tca/TCAVESResponseTest.java b/dcae-analytics-model/src/test/java/org/onap/dcae/apod/analytics/model/facade/tca/TCAVESResponseTest.java index 3724c8d..b4dba38 100644 --- a/dcae-analytics-model/src/test/java/org/openecomp/dcae/apod/analytics/model/facade/tca/TCAVESResponseTest.java +++ b/dcae-analytics-model/src/test/java/org/onap/dcae/apod/analytics/model/facade/tca/TCAVESResponseTest.java @@ -1,76 +1,76 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.facade.tca;
-
-import org.junit.Test;
-import org.openecomp.dcae.apod.analytics.model.BaseAnalyticsModelUnitTest;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-/**
- * @author Rajiv Singla . Creation Date: 12/16/2016.
- */
-public class TCAVESResponseTest extends BaseAnalyticsModelUnitTest {
-
- private static final String TCA_VES_CEF_RESPONSE_JSON_FILE_LOCATION = "data/json/facade/tca_ves_cef_response.json";
-
- @Test
- public void testTCAPolicyJsonConversions() throws Exception {
-
- final TCAVESResponse vesCEFMessageResponse =
- assertJsonConversions(TCA_VES_CEF_RESPONSE_JSON_FILE_LOCATION, TCAVESResponse.class);
-
- assertThat("VES CEF Message Response AAI generics VNF Id must match",
- vesCEFMessageResponse.getAai().getGenericVNFName(), is("vpp-test(?)"));
-
- assertThat("VES CEF Message target type must be parsed correctly as VNF",
- vesCEFMessageResponse.getTargetType(), is("VNF"));
-
- assertThat("VES closed Loop Name must be CL-FRWL-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8",
- vesCEFMessageResponse.getClosedLoopControlName(),
- is("CL-FRWL-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8"));
-
- assertThat("version must be 1.0.2", vesCEFMessageResponse.getVersion(), is("1.0.2"));
-
- assertThat("closedLoopAlarmStart must be 1478189220547",
- vesCEFMessageResponse.getClosedLoopAlarmStart(), is(1478189220547L));
- assertThat("closedLoopEventClient must be tca.instance00001",
- vesCEFMessageResponse.getClosedLoopEventClient(), is("tca.instance00001"));
- assertThat("target_type must be VNF", vesCEFMessageResponse.getTargetType(), is("VNF"));
- assertThat("target must be VNF", vesCEFMessageResponse.getTarget(), is("generic-vnf.vnf-name"));
- assertThat("aai generic vnf id must be vpp-test(?)", vesCEFMessageResponse.getAai().getGenericVNFName(),
- is("vpp-test(?)"));
- assertThat("from must be DCAE", vesCEFMessageResponse.getFrom(), is("DCAE"));
- assertThat("policyScope must be resource=vFirewall;type=configuration",
- vesCEFMessageResponse.getPolicyScope(), is("resource=vFirewall;type=configuration"));
-
- assertThat("policyName must be configuration.dcae.microservice.tca.xml",
- vesCEFMessageResponse.getPolicyName(), is("configuration.dcae.microservice.tca.xml"));
-
- assertThat("policyVersion must be v0.0.1",
- vesCEFMessageResponse.getPolicyVersion(), is("v0.0.1"));
-
- assertThat("closedLoopEventStatus is ONSET",
- vesCEFMessageResponse.getClosedLoopEventStatus(), is("ONSET"));
-
- }
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.facade.tca; + +import org.junit.Test; +import org.onap.dcae.apod.analytics.model.BaseAnalyticsModelUnitTest; + +import static org.hamcrest.CoreMatchers.is; +import static org.junit.Assert.assertThat; + +/** + * @author Rajiv Singla . Creation Date: 12/16/2016. + */ +public class TCAVESResponseTest extends BaseAnalyticsModelUnitTest { + + private static final String TCA_VES_CEF_RESPONSE_JSON_FILE_LOCATION = "data/json/facade/tca_ves_cef_response.json"; + + @Test + public void testTCAPolicyJsonConversions() throws Exception { + + final TCAVESResponse vesCEFMessageResponse = + assertJsonConversions(TCA_VES_CEF_RESPONSE_JSON_FILE_LOCATION, TCAVESResponse.class); + + assertThat("VES CEF Message Response AAI generics VNF Id must match", + vesCEFMessageResponse.getAai().getGenericVNFName(), is("vpp-test(?)")); + + assertThat("VES CEF Message target type must be parsed correctly as VNF", + vesCEFMessageResponse.getTargetType(), is("VNF")); + + assertThat("VES closed Loop Name must be CL-FRWL-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8", + vesCEFMessageResponse.getClosedLoopControlName(), + is("CL-FRWL-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8")); + + assertThat("version must be 1.0.2", vesCEFMessageResponse.getVersion(), is("1.0.2")); + + assertThat("closedLoopAlarmStart must be 1478189220547", + vesCEFMessageResponse.getClosedLoopAlarmStart(), is(1478189220547L)); + assertThat("closedLoopEventClient must be tca.instance00001", + vesCEFMessageResponse.getClosedLoopEventClient(), is("tca.instance00001")); + assertThat("target_type must be VNF", vesCEFMessageResponse.getTargetType(), is("VNF")); + assertThat("target must be VNF", vesCEFMessageResponse.getTarget(), is("generic-vnf.vnf-name")); + assertThat("aai generic vnf id must be vpp-test(?)", vesCEFMessageResponse.getAai().getGenericVNFName(), + is("vpp-test(?)")); + assertThat("from must be DCAE", vesCEFMessageResponse.getFrom(), is("DCAE")); + assertThat("policyScope must be resource=vFirewall;type=configuration", + vesCEFMessageResponse.getPolicyScope(), is("resource=vFirewall;type=configuration")); + + assertThat("policyName must be configuration.dcae.microservice.tca.xml", + vesCEFMessageResponse.getPolicyName(), is("configuration.dcae.microservice.tca.xml")); + + assertThat("policyVersion must be v0.0.1", + vesCEFMessageResponse.getPolicyVersion(), is("v0.0.1")); + + assertThat("closedLoopEventStatus is ONSET", + vesCEFMessageResponse.getClosedLoopEventStatus(), is("ONSET")); + + } +} diff --git a/dcae-analytics-model/src/test/java/org/openecomp/dcae/apod/analytics/model/util/AnalyticsModelIOUtilsTest.java b/dcae-analytics-model/src/test/java/org/onap/dcae/apod/analytics/model/util/AnalyticsModelIOUtilsTest.java index fed3fd2..42f3508 100644 --- a/dcae-analytics-model/src/test/java/org/openecomp/dcae/apod/analytics/model/util/AnalyticsModelIOUtilsTest.java +++ b/dcae-analytics-model/src/test/java/org/onap/dcae/apod/analytics/model/util/AnalyticsModelIOUtilsTest.java @@ -1,86 +1,86 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.util;
-
-
-import org.junit.Test;
-import org.mockito.Mockito;
-import org.openecomp.dcae.apod.analytics.model.BaseAnalyticsModelUnitTest;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Properties;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertThat;
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.Mockito.doThrow;
-
-/**
- * @author Rajiv Singla . Creation Date: 10/17/2016.
- */
-public class AnalyticsModelIOUtilsTest extends BaseAnalyticsModelUnitTest {
-
- private static final String TEST_CONFIG_FILE_LOCATION = "data/json/config/testAppConfig.json";
- private static final String INVALID_TEST_CONFIG_FILE_LOCATION = "data/json/config/invalidJsonConfig.json";
- private static final String TEST_PROPERTIES_FILE_LOCATION = "data/properties/testApp.properties";
-
- @Test
- public void testConvertToJsonObjectWhenFileLocationIsValid() throws Exception {
- ConfigHolder configHolder =
- AnalyticsModelIOUtils.convertToJsonObject(TEST_CONFIG_FILE_LOCATION, ConfigHolder.class);
- String appName = configHolder.getConfig().getAppName();
- assertEquals("App Name must match with json settings file value", "TestAppName", appName);
- String appDescription = configHolder.getConfig().getAppDescription();
- assertEquals("App Description much with json settings file value", "Test App Description", appDescription);
- }
-
- @Test(expected = IOException.class)
- public void testConvertToJsonObjectWhenFileLocationIsInvValid() throws Exception {
- AnalyticsModelIOUtils.convertToJsonObject("InvalidFileLocation", ConfigHolder.class);
- }
-
- @Test(expected = IOException.class)
- public void testConvertToJsonObjectWhenJsonFileHasInvalidJson() throws Exception {
- AnalyticsModelIOUtils.convertToJsonObject(INVALID_TEST_CONFIG_FILE_LOCATION, ConfigHolder.class);
- }
-
- @Test
- public void testValidPropertiesFileLoading() throws Exception {
- final Properties properties =
- AnalyticsModelIOUtils.loadPropertiesFile(TEST_PROPERTIES_FILE_LOCATION, new Properties());
- assertThat("Properties File must contain 2 properties", properties.size(), is(2));
- }
-
- @Test(expected = RuntimeException.class)
- public void testNonExistingPropertiesFileLoading() throws Exception {
- AnalyticsModelIOUtils.loadPropertiesFile("InvalidPropertiesFileLocation", new Properties());
- }
-
- @Test(expected = RuntimeException.class)
- public void testLoadPropertiesFileWhenIOException() throws Exception {
- final Properties mockProperties = Mockito.mock(Properties.class);
- doThrow(new IOException()).when(mockProperties).load(any(InputStream.class));
- AnalyticsModelIOUtils.loadPropertiesFile(TEST_PROPERTIES_FILE_LOCATION, mockProperties);
- }
-}
-
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.util; + + +import org.junit.Test; +import org.mockito.Mockito; +import org.onap.dcae.apod.analytics.model.BaseAnalyticsModelUnitTest; + +import java.io.IOException; +import java.io.InputStream; +import java.util.Properties; + +import static org.hamcrest.CoreMatchers.is; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertThat; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.Mockito.doThrow; + +/** + * @author Rajiv Singla . Creation Date: 10/17/2016. + */ +public class AnalyticsModelIOUtilsTest extends BaseAnalyticsModelUnitTest { + + private static final String TEST_CONFIG_FILE_LOCATION = "data/json/config/testAppConfig.json"; + private static final String INVALID_TEST_CONFIG_FILE_LOCATION = "data/json/config/invalidJsonConfig.json"; + private static final String TEST_PROPERTIES_FILE_LOCATION = "data/properties/testApp.properties"; + + @Test + public void testConvertToJsonObjectWhenFileLocationIsValid() throws Exception { + ConfigHolder configHolder = + AnalyticsModelIOUtils.convertToJsonObject(TEST_CONFIG_FILE_LOCATION, ConfigHolder.class); + String appName = configHolder.getConfig().getAppName(); + assertEquals("App Name must match with json settings file value", "TestAppName", appName); + String appDescription = configHolder.getConfig().getAppDescription(); + assertEquals("App Description much with json settings file value", "Test App Description", appDescription); + } + + @Test(expected = IOException.class) + public void testConvertToJsonObjectWhenFileLocationIsInvValid() throws Exception { + AnalyticsModelIOUtils.convertToJsonObject("InvalidFileLocation", ConfigHolder.class); + } + + @Test(expected = IOException.class) + public void testConvertToJsonObjectWhenJsonFileHasInvalidJson() throws Exception { + AnalyticsModelIOUtils.convertToJsonObject(INVALID_TEST_CONFIG_FILE_LOCATION, ConfigHolder.class); + } + + @Test + public void testValidPropertiesFileLoading() throws Exception { + final Properties properties = + AnalyticsModelIOUtils.loadPropertiesFile(TEST_PROPERTIES_FILE_LOCATION, new Properties()); + assertThat("Properties File must contain 2 properties", properties.size(), is(2)); + } + + @Test(expected = RuntimeException.class) + public void testNonExistingPropertiesFileLoading() throws Exception { + AnalyticsModelIOUtils.loadPropertiesFile("InvalidPropertiesFileLocation", new Properties()); + } + + @Test(expected = RuntimeException.class) + public void testLoadPropertiesFileWhenIOException() throws Exception { + final Properties mockProperties = Mockito.mock(Properties.class); + doThrow(new IOException()).when(mockProperties).load(any(InputStream.class)); + AnalyticsModelIOUtils.loadPropertiesFile(TEST_PROPERTIES_FILE_LOCATION, mockProperties); + } +} + diff --git a/dcae-analytics-model/src/test/java/org/openecomp/dcae/apod/analytics/model/util/AnalyticsModelJsonUtilsTest.java b/dcae-analytics-model/src/test/java/org/onap/dcae/apod/analytics/model/util/AnalyticsModelJsonUtilsTest.java index a715c2c..4b9e3b1 100644 --- a/dcae-analytics-model/src/test/java/org/openecomp/dcae/apod/analytics/model/util/AnalyticsModelJsonUtilsTest.java +++ b/dcae-analytics-model/src/test/java/org/onap/dcae/apod/analytics/model/util/AnalyticsModelJsonUtilsTest.java @@ -1,80 +1,80 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.util;
-
-import com.fasterxml.jackson.core.type.TypeReference;
-import org.junit.Test;
-import org.openecomp.dcae.apod.analytics.model.BaseAnalyticsModelUnitTest;
-import org.openecomp.dcae.apod.analytics.model.domain.cef.EventListener;
-
-import java.io.InputStream;
-import java.util.List;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertThat;
-
-/**
- * @author Rajiv Singla . Creation Date: 12/16/2016.
- */
-public class AnalyticsModelJsonUtilsTest extends BaseAnalyticsModelUnitTest {
-
- private static final TypeReference<List<EventListener>> EVENT_LISTENER_TYPE_REFERENCE =
- new TypeReference<List<EventListener>>() {
- };
-
- final String cefMessagesJsonFileLocation = "data/json/cef/cef_messages.json";
- final String eventListenerJsonFileLocation = "data/json/cef/cef_message.json";
-
- @Test
- public void testReadValueWithTypeReference() throws Exception {
- final InputStream resourceAsStream =
- Thread.currentThread().getContextClassLoader().getResourceAsStream(cefMessagesJsonFileLocation);
- List<EventListener> eventListeners = AnalyticsModelJsonUtils.readValue(resourceAsStream,
- EVENT_LISTENER_TYPE_REFERENCE);
- assertThat("Event Listeners size must be 31", eventListeners.size(), is(31));
- }
-
- @Test
- public void testReadValueWithClassType() throws Exception {
- final InputStream resourceAsStream =
- Thread.currentThread().getContextClassLoader().getResourceAsStream(eventListenerJsonFileLocation);
- final EventListener eventListener = AnalyticsModelJsonUtils.readValue(resourceAsStream, EventListener.class);
- assertNotNull("Event Listener event is not null", eventListener.getEvent());
- }
-
- @Test
- public void testWriteValueAsString() throws Exception {
- final InputStream resourceAsStream =
- Thread.currentThread().getContextClassLoader().getResourceAsStream(eventListenerJsonFileLocation);
- final EventListener eventListener = AnalyticsModelJsonUtils.readValue(resourceAsStream, EventListener.class);
- final String eventListenerString = AnalyticsModelJsonUtils.writeValueAsString(eventListener);
- assertJson(fromStream(eventListenerJsonFileLocation), eventListenerString);
- }
-
- @Test
- public void testReadValueWithJsonString() throws Exception {
- final EventListener eventListener =
- AnalyticsModelJsonUtils.readValue(fromStream(eventListenerJsonFileLocation), EventListener.class);
- assertNotNull("Event Listener event is not null", eventListener.getEvent());
- }
-
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.util; + +import com.fasterxml.jackson.core.type.TypeReference; +import org.junit.Test; +import org.onap.dcae.apod.analytics.model.BaseAnalyticsModelUnitTest; +import org.onap.dcae.apod.analytics.model.domain.cef.EventListener; + +import java.io.InputStream; +import java.util.List; + +import static org.hamcrest.CoreMatchers.is; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertThat; + +/** + * @author Rajiv Singla . Creation Date: 12/16/2016. + */ +public class AnalyticsModelJsonUtilsTest extends BaseAnalyticsModelUnitTest { + + private static final TypeReference<List<EventListener>> EVENT_LISTENER_TYPE_REFERENCE = + new TypeReference<List<EventListener>>() { + }; + + final String cefMessagesJsonFileLocation = "data/json/cef/cef_messages.json"; + final String eventListenerJsonFileLocation = "data/json/cef/cef_message.json"; + + @Test + public void testReadValueWithTypeReference() throws Exception { + final InputStream resourceAsStream = + Thread.currentThread().getContextClassLoader().getResourceAsStream(cefMessagesJsonFileLocation); + List<EventListener> eventListeners = AnalyticsModelJsonUtils.readValue(resourceAsStream, + EVENT_LISTENER_TYPE_REFERENCE); + assertThat("Event Listeners size must be 31", eventListeners.size(), is(31)); + } + + @Test + public void testReadValueWithClassType() throws Exception { + final InputStream resourceAsStream = + Thread.currentThread().getContextClassLoader().getResourceAsStream(eventListenerJsonFileLocation); + final EventListener eventListener = AnalyticsModelJsonUtils.readValue(resourceAsStream, EventListener.class); + assertNotNull("Event Listener event is not null", eventListener.getEvent()); + } + + @Test + public void testWriteValueAsString() throws Exception { + final InputStream resourceAsStream = + Thread.currentThread().getContextClassLoader().getResourceAsStream(eventListenerJsonFileLocation); + final EventListener eventListener = AnalyticsModelJsonUtils.readValue(resourceAsStream, EventListener.class); + final String eventListenerString = AnalyticsModelJsonUtils.writeValueAsString(eventListener); + assertJson(fromStream(eventListenerJsonFileLocation), eventListenerString); + } + + @Test + public void testReadValueWithJsonString() throws Exception { + final EventListener eventListener = + AnalyticsModelJsonUtils.readValue(fromStream(eventListenerJsonFileLocation), EventListener.class); + assertNotNull("Event Listener event is not null", eventListener.getEvent()); + } + +} diff --git a/dcae-analytics-model/src/test/java/org/openecomp/dcae/apod/analytics/model/util/ConfigHolder.java b/dcae-analytics-model/src/test/java/org/onap/dcae/apod/analytics/model/util/ConfigHolder.java index f6d65aa..4052b0f 100644 --- a/dcae-analytics-model/src/test/java/org/openecomp/dcae/apod/analytics/model/util/ConfigHolder.java +++ b/dcae-analytics-model/src/test/java/org/onap/dcae/apod/analytics/model/util/ConfigHolder.java @@ -1,33 +1,33 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.util;
-
-/**
- * Created by Rajiv Singla on 10/5/2016.
- */
-public class ConfigHolder {
-
- private TestAppConfig config;
-
- public TestAppConfig getConfig() {
- return config;
- }
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.util; + +/** + * Created by Rajiv Singla on 10/5/2016. + */ +public class ConfigHolder { + + private TestAppConfig config; + + public TestAppConfig getConfig() { + return config; + } +} diff --git a/dcae-analytics-model/src/test/java/org/openecomp/dcae/apod/analytics/model/util/TestAppConfig.java b/dcae-analytics-model/src/test/java/org/onap/dcae/apod/analytics/model/util/TestAppConfig.java index ea5e5e4..8251b35 100644 --- a/dcae-analytics-model/src/test/java/org/openecomp/dcae/apod/analytics/model/util/TestAppConfig.java +++ b/dcae-analytics-model/src/test/java/org/onap/dcae/apod/analytics/model/util/TestAppConfig.java @@ -1,38 +1,38 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.util;
-
-/**
- * Created by Rajiv Singla on 10/5/2016.
- */
-public class TestAppConfig {
-
- private String appName;
- private String appDescription;
-
- public String getAppName() {
- return appName;
- }
-
- public String getAppDescription() {
- return appDescription;
- }
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.util; + +/** + * Created by Rajiv Singla on 10/5/2016. + */ +public class TestAppConfig { + + private String appName; + private String appDescription; + + public String getAppName() { + return appName; + } + + public String getAppDescription() { + return appDescription; + } +} diff --git a/dcae-analytics-model/src/test/java/org/openecomp/dcae/apod/analytics/model/util/json/AnalyticsModelObjectMapperSupplierTest.java b/dcae-analytics-model/src/test/java/org/onap/dcae/apod/analytics/model/util/json/AnalyticsModelObjectMapperSupplierTest.java index 55dd817..15ee5b9 100644 --- a/dcae-analytics-model/src/test/java/org/openecomp/dcae/apod/analytics/model/util/json/AnalyticsModelObjectMapperSupplierTest.java +++ b/dcae-analytics-model/src/test/java/org/onap/dcae/apod/analytics/model/util/json/AnalyticsModelObjectMapperSupplierTest.java @@ -1,64 +1,64 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.util.json;
-
-import com.jayway.jsonpath.Configuration;
-import com.jayway.jsonpath.JsonPath;
-import com.jayway.jsonpath.Option;
-import com.jayway.jsonpath.spi.json.JsonProvider;
-import com.jayway.jsonpath.spi.mapper.MappingProvider;
-import org.junit.Test;
-import org.openecomp.dcae.apod.analytics.model.BaseAnalyticsModelUnitTest;
-
-import java.util.Set;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.Matchers.containsInAnyOrder;
-import static org.junit.Assert.assertThat;
-
-
-/**
- * @author Rajiv Singla . Creation Date: 12/16/2016.
- */
-public class AnalyticsModelObjectMapperSupplierTest extends BaseAnalyticsModelUnitTest {
-
-
- @Test
- public void testJsonPathSettings() throws Exception {
- final Configuration configuration = JsonPath.parse("{\"test\": \"test\"}").configuration();
-
- final JsonProvider jsonProvider = configuration.jsonProvider();
- final String jsonProviderClassName = jsonProvider.getClass().getSimpleName();
- assertThat("Json Provider cass name must be JacksonJsonProvider",
- jsonProviderClassName, is("JacksonJsonProvider"));
-
- final MappingProvider mappingProvider = configuration.mappingProvider();
- final String mappingProviderClassName = mappingProvider.getClass().getSimpleName();
- assertThat("Mapping Provider cass name must be JacksonMappingProvider",
- mappingProviderClassName, is("JacksonMappingProvider"));
-
- final Set<Option> configurationOptions = configuration.getOptions();
- assertThat(configurationOptions,
- containsInAnyOrder(Option.DEFAULT_PATH_LEAF_TO_NULL, Option.SUPPRESS_EXCEPTIONS,
- Option.ALWAYS_RETURN_LIST));
- }
-
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.util.json; + +import com.jayway.jsonpath.Configuration; +import com.jayway.jsonpath.JsonPath; +import com.jayway.jsonpath.Option; +import com.jayway.jsonpath.spi.json.JsonProvider; +import com.jayway.jsonpath.spi.mapper.MappingProvider; +import org.junit.Test; +import org.onap.dcae.apod.analytics.model.BaseAnalyticsModelUnitTest; + +import java.util.Set; + +import static org.hamcrest.CoreMatchers.is; +import static org.hamcrest.Matchers.containsInAnyOrder; +import static org.junit.Assert.assertThat; + + +/** + * @author Rajiv Singla . Creation Date: 12/16/2016. + */ +public class AnalyticsModelObjectMapperSupplierTest extends BaseAnalyticsModelUnitTest { + + + @Test + public void testJsonPathSettings() throws Exception { + final Configuration configuration = JsonPath.parse("{\"test\": \"test\"}").configuration(); + + final JsonProvider jsonProvider = configuration.jsonProvider(); + final String jsonProviderClassName = jsonProvider.getClass().getSimpleName(); + assertThat("Json Provider cass name must be JacksonJsonProvider", + jsonProviderClassName, is("JacksonJsonProvider")); + + final MappingProvider mappingProvider = configuration.mappingProvider(); + final String mappingProviderClassName = mappingProvider.getClass().getSimpleName(); + assertThat("Mapping Provider cass name must be JacksonMappingProvider", + mappingProviderClassName, is("JacksonMappingProvider")); + + final Set<Option> configurationOptions = configuration.getOptions(); + assertThat(configurationOptions, + containsInAnyOrder(Option.DEFAULT_PATH_LEAF_TO_NULL, Option.SUPPRESS_EXCEPTIONS, + Option.ALWAYS_RETURN_LIST)); + } + +} diff --git a/dcae-analytics-model/src/test/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/AlertTypeMixinTest.java b/dcae-analytics-model/src/test/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/AlertTypeMixinTest.java index f55fa2b..5c12829 100644 --- a/dcae-analytics-model/src/test/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/AlertTypeMixinTest.java +++ b/dcae-analytics-model/src/test/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/AlertTypeMixinTest.java @@ -1,51 +1,51 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef;
-
-import org.junit.Test;
-import org.openecomp.dcae.apod.analytics.model.BaseAnalyticsModelUnitTest;
-import org.openecomp.dcae.apod.analytics.model.domain.cef.AlertType;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-import static org.openecomp.dcae.apod.analytics.model.domain.cef.AlertType.CARD_ANOMALY;
-
-/**
- *
- * @author Rajiv Singla . Creation Date: 11/3/2016.
- */
-public class AlertTypeMixinTest extends BaseAnalyticsModelUnitTest {
-
- // NOTE: Alert type enum has some special customizations in AlertTypeMixin class
- // as Java enum names does not allow for "-" so actual values are coded as enum names
- @Test
- public void testAlertTypeJsonConversions() throws Exception {
-
- final String alertTypeJson = serializeModelToJson(CARD_ANOMALY);
- assertThat("Alert Type Json for CARD ANOMALY must have hyphen in it", alertTypeJson,
- is("\"CARD-ANOMALY\""));
- // convert parsed alert type back to enum
- final AlertType alertType = objectMapper.readValue(alertTypeJson, AlertType.class);
- LOG.debug(alertType.toString());
- assertThat("Json String for CARD ANOMALY with hyphen can be converted back to Alert Type", alertType,
- is(CARD_ANOMALY));
- }
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.util.json.mixin.cef; + +import org.junit.Test; +import org.onap.dcae.apod.analytics.model.BaseAnalyticsModelUnitTest; +import org.onap.dcae.apod.analytics.model.domain.cef.AlertType; + +import static org.hamcrest.CoreMatchers.is; +import static org.junit.Assert.assertThat; +import static org.onap.dcae.apod.analytics.model.domain.cef.AlertType.CARD_ANOMALY; + +/** + * + * @author Rajiv Singla . Creation Date: 11/3/2016. + */ +public class AlertTypeMixinTest extends BaseAnalyticsModelUnitTest { + + // NOTE: Alert type enum has some special customizations in AlertTypeMixin class + // as Java enum names does not allow for "-" so actual values are coded as enum names + @Test + public void testAlertTypeJsonConversions() throws Exception { + + final String alertTypeJson = serializeModelToJson(CARD_ANOMALY); + assertThat("Alert Type Json for CARD ANOMALY must have hyphen in it", alertTypeJson, + is("\"CARD-ANOMALY\"")); + // convert parsed alert type back to enum + final AlertType alertType = objectMapper.readValue(alertTypeJson, AlertType.class); + LOG.debug(alertType.toString()); + assertThat("Json String for CARD ANOMALY with hyphen can be converted back to Alert Type", alertType, + is(CARD_ANOMALY)); + } +} diff --git a/dcae-analytics-model/src/test/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/EventListenerMixinTest.java b/dcae-analytics-model/src/test/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/EventListenerMixinTest.java index efa98e4..7de89f1 100644 --- a/dcae-analytics-model/src/test/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/EventListenerMixinTest.java +++ b/dcae-analytics-model/src/test/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/EventListenerMixinTest.java @@ -1,83 +1,83 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.cef;
-
-import com.fasterxml.jackson.core.type.TypeReference;
-import org.junit.Test;
-import org.openecomp.dcae.apod.analytics.model.BaseAnalyticsModelUnitTest;
-import org.openecomp.dcae.apod.analytics.model.domain.cef.EventListener;
-import org.openecomp.dcae.apod.analytics.model.domain.cef.Field;
-import org.openecomp.dcae.apod.analytics.model.domain.cef.NamedArrayOfFields;
-
-import java.util.List;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-/**
- * @author Rajiv Singla . Creation Date: 10/18/2016.
- */
-public class EventListenerMixinTest extends BaseAnalyticsModelUnitTest {
-
- final String eventListenerJsonFileLocation = "data/json/cef/cef_message.json";
- final String cefMessagesJsonFileLocation = "data/json/cef/cef_messages.json";
-
- @Test
- public void testEventListenerJsonConversions() throws Exception {
-
- final EventListener eventListener = assertJsonConversions(eventListenerJsonFileLocation, EventListener.class);
-
- final List<Field> additionalFields =
- eventListener.getEvent().getMeasurementsForVfScalingFields().getAdditionalFields();
-
- assertThat("Additional Fields size must be 2", additionalFields.size(), is(2));
-
- final List<NamedArrayOfFields> additionalMeasurements =
- eventListener.getEvent().getMeasurementsForVfScalingFields().getAdditionalMeasurements();
-
- assertThat("Additional Measurements size must be 1", additionalMeasurements.size(), is(1));
-
- final List<Field> arrayOfFields = additionalMeasurements.get(0).getArrayOfFields();
-
- assertThat("Array Of Field size must be 6", arrayOfFields.size(), is(6));
- }
-
- @Test
- public void testCollectionOfEventListenersJsonConversion() throws Exception {
-
- final String cefMessageAsString = fromStream(cefMessagesJsonFileLocation);
-
- final TypeReference<List<EventListener>> eventListenerListTypeReference =
- new TypeReference<List<EventListener>>() {
- };
- List<EventListener> eventListeners = objectMapper.readValue(cefMessageAsString, eventListenerListTypeReference);
- assertThat("Event Listeners size must be 31", eventListeners.size(), is(31));
-
- // Check serialized json will match deserialized json
- final String eventListenerString = objectMapper.writeValueAsString(eventListeners);
- assertJson(cefMessageAsString, eventListenerString);
-
- // Checks serialization
- testSerialization(eventListeners, getClass());
-
- }
-
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.util.json.mixin.cef; + +import com.fasterxml.jackson.core.type.TypeReference; +import org.junit.Test; +import org.onap.dcae.apod.analytics.model.BaseAnalyticsModelUnitTest; +import org.onap.dcae.apod.analytics.model.domain.cef.EventListener; +import org.onap.dcae.apod.analytics.model.domain.cef.Field; +import org.onap.dcae.apod.analytics.model.domain.cef.NamedArrayOfFields; + +import java.util.List; + +import static org.hamcrest.CoreMatchers.is; +import static org.junit.Assert.assertThat; + +/** + * @author Rajiv Singla . Creation Date: 10/18/2016. + */ +public class EventListenerMixinTest extends BaseAnalyticsModelUnitTest { + + final String eventListenerJsonFileLocation = "data/json/cef/cef_message.json"; + final String cefMessagesJsonFileLocation = "data/json/cef/cef_messages.json"; + + @Test + public void testEventListenerJsonConversions() throws Exception { + + final EventListener eventListener = assertJsonConversions(eventListenerJsonFileLocation, EventListener.class); + + final List<Field> additionalFields = + eventListener.getEvent().getMeasurementsForVfScalingFields().getAdditionalFields(); + + assertThat("Additional Fields size must be 2", additionalFields.size(), is(2)); + + final List<NamedArrayOfFields> additionalMeasurements = + eventListener.getEvent().getMeasurementsForVfScalingFields().getAdditionalMeasurements(); + + assertThat("Additional Measurements size must be 1", additionalMeasurements.size(), is(1)); + + final List<Field> arrayOfFields = additionalMeasurements.get(0).getArrayOfFields(); + + assertThat("Array Of Field size must be 6", arrayOfFields.size(), is(6)); + } + + @Test + public void testCollectionOfEventListenersJsonConversion() throws Exception { + + final String cefMessageAsString = fromStream(cefMessagesJsonFileLocation); + + final TypeReference<List<EventListener>> eventListenerListTypeReference = + new TypeReference<List<EventListener>>() { + }; + List<EventListener> eventListeners = objectMapper.readValue(cefMessageAsString, eventListenerListTypeReference); + assertThat("Event Listeners size must be 31", eventListeners.size(), is(31)); + + // Check serialized json will match deserialized json + final String eventListenerString = objectMapper.writeValueAsString(eventListeners); + assertJson(cefMessageAsString, eventListenerString); + + // Checks serialization + testSerialization(eventListeners, getClass()); + + } + +} diff --git a/dcae-analytics-model/src/test/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/config/tca/TCAControllerAppConfigMixinTest.java b/dcae-analytics-model/src/test/java/org/onap/dcae/apod/analytics/model/util/json/mixin/config/tca/TCAControllerAppConfigMixinTest.java index ed76d59..57bbe77 100644 --- a/dcae-analytics-model/src/test/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/config/tca/TCAControllerAppConfigMixinTest.java +++ b/dcae-analytics-model/src/test/java/org/onap/dcae/apod/analytics/model/util/json/mixin/config/tca/TCAControllerAppConfigMixinTest.java @@ -1,63 +1,63 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.config.tca;
-
-import org.junit.Test;
-import org.openecomp.dcae.apod.analytics.model.BaseAnalyticsModelUnitTest;
-import org.openecomp.dcae.apod.analytics.model.config.tca.DMAAPInfo;
-import org.openecomp.dcae.apod.analytics.model.config.tca.TCAControllerAppConfig;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.CoreMatchers.notNullValue;
-import static org.junit.Assert.assertThat;
-
-/**
- * @author Rajiv Singla . Creation Date: 8/25/2017.
- */
-public class TCAControllerAppConfigMixinTest extends BaseAnalyticsModelUnitTest {
-
- final String tcaControllerAppConfigJsonFileLocation = "data/json/config/controller_app_config.json";
-
- @Test
- public void testTCAControllerConfigJsonConversions() throws Exception {
-
- final TCAControllerAppConfig tcaControllerAppConfig =
- assertJsonConversions(tcaControllerAppConfigJsonFileLocation, TCAControllerAppConfig.class);
-
- assertThat("TCA Stream Publishes must not be null",
- tcaControllerAppConfig.getStreamsPublishes(), is(notNullValue()));
-
- assertThat("TCA Stream Subscribes must not be null",
- tcaControllerAppConfig.getStreamsSubscribes(), is(notNullValue()));
-
- final DMAAPInfo publisherDmaaPInfo = tcaControllerAppConfig.getStreamsPublishes().getTcaHandleOut()
- .getDmaapInfo();
- assertThat("TCA publisher URL Info must not be null",
- publisherDmaaPInfo.getTopicUrl(), is(notNullValue()));
-
- final DMAAPInfo subscriberDmaaPInfo = tcaControllerAppConfig.getStreamsSubscribes().getTcaHandleIn()
- .getDmaapInfo();
- assertThat("TCA subscriber URL Info must not be null",
- subscriberDmaaPInfo.getTopicUrl(), is(notNullValue()));
-
- }
-
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.util.json.mixin.config.tca; + +import org.junit.Test; +import org.onap.dcae.apod.analytics.model.BaseAnalyticsModelUnitTest; +import org.onap.dcae.apod.analytics.model.config.tca.DMAAPInfo; +import org.onap.dcae.apod.analytics.model.config.tca.TCAControllerAppConfig; + +import static org.hamcrest.CoreMatchers.is; +import static org.hamcrest.CoreMatchers.notNullValue; +import static org.junit.Assert.assertThat; + +/** + * @author Rajiv Singla . Creation Date: 8/25/2017. + */ +public class TCAControllerAppConfigMixinTest extends BaseAnalyticsModelUnitTest { + + final String tcaControllerAppConfigJsonFileLocation = "data/json/config/controller_app_config.json"; + + @Test + public void testTCAControllerConfigJsonConversions() throws Exception { + + final TCAControllerAppConfig tcaControllerAppConfig = + assertJsonConversions(tcaControllerAppConfigJsonFileLocation, TCAControllerAppConfig.class); + + assertThat("TCA Stream Publishes must not be null", + tcaControllerAppConfig.getStreamsPublishes(), is(notNullValue())); + + assertThat("TCA Stream Subscribes must not be null", + tcaControllerAppConfig.getStreamsSubscribes(), is(notNullValue())); + + final DMAAPInfo publisherDmaaPInfo = tcaControllerAppConfig.getStreamsPublishes().getTcaHandleOut() + .getDmaapInfo(); + assertThat("TCA publisher URL Info must not be null", + publisherDmaaPInfo.getTopicUrl(), is(notNullValue())); + + final DMAAPInfo subscriberDmaaPInfo = tcaControllerAppConfig.getStreamsSubscribes().getTcaHandleIn() + .getDmaapInfo(); + assertThat("TCA subscriber URL Info must not be null", + subscriberDmaaPInfo.getTopicUrl(), is(notNullValue())); + + } + +} diff --git a/dcae-analytics-model/src/test/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/facade/tca/TCAVESResponseMixinTest.java b/dcae-analytics-model/src/test/java/org/onap/dcae/apod/analytics/model/util/json/mixin/facade/tca/TCAVESResponseMixinTest.java index 98c52af..1514140 100644 --- a/dcae-analytics-model/src/test/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/facade/tca/TCAVESResponseMixinTest.java +++ b/dcae-analytics-model/src/test/java/org/onap/dcae/apod/analytics/model/util/json/mixin/facade/tca/TCAVESResponseMixinTest.java @@ -1,55 +1,55 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.facade.tca;
-
-import org.junit.Test;
-import org.openecomp.dcae.apod.analytics.model.BaseAnalyticsModelUnitTest;
-import org.openecomp.dcae.apod.analytics.model.facade.tca.TCAVESResponse;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-/**
- *
- * @author Rajiv Singla . Creation Date: 11/9/2016.
- */
-public class TCAVESResponseMixinTest extends BaseAnalyticsModelUnitTest {
-
- private static final String TCA_VES_CEF_RESPONSE_JSON_FILE_LOCATION = "data/json/facade/tca_ves_cef_response.json";
-
- @Test
- public void testTCAPolicyJsonConversions() throws Exception {
-
- final TCAVESResponse vesCEFMessageResponse =
- assertJsonConversions(TCA_VES_CEF_RESPONSE_JSON_FILE_LOCATION, TCAVESResponse.class);
-
- assertThat("VES CEF Message Response AAI generics VNF Id must match",
- vesCEFMessageResponse.getAai().getGenericVNFName(), is("vpp-test(?)"));
-
- assertThat("VES CEF Message Response AAI generic Server Id must match",
- vesCEFMessageResponse.getAai().getGenericServerName(), is("dfw1lb01lb01"));
-
- assertThat("VES CEF Message target type must be parsed correctly as VNF",
- vesCEFMessageResponse.getTargetType(), is("VNF"));
-
- testSerialization(vesCEFMessageResponse, getClass());
- }
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.util.json.mixin.facade.tca; + +import org.junit.Test; +import org.onap.dcae.apod.analytics.model.BaseAnalyticsModelUnitTest; +import org.onap.dcae.apod.analytics.model.facade.tca.TCAVESResponse; + +import static org.hamcrest.CoreMatchers.is; +import static org.junit.Assert.assertThat; + +/** + * + * @author Rajiv Singla . Creation Date: 11/9/2016. + */ +public class TCAVESResponseMixinTest extends BaseAnalyticsModelUnitTest { + + private static final String TCA_VES_CEF_RESPONSE_JSON_FILE_LOCATION = "data/json/facade/tca_ves_cef_response.json"; + + @Test + public void testTCAPolicyJsonConversions() throws Exception { + + final TCAVESResponse vesCEFMessageResponse = + assertJsonConversions(TCA_VES_CEF_RESPONSE_JSON_FILE_LOCATION, TCAVESResponse.class); + + assertThat("VES CEF Message Response AAI generics VNF Id must match", + vesCEFMessageResponse.getAai().getGenericVNFName(), is("vpp-test(?)")); + + assertThat("VES CEF Message Response AAI generic Server Id must match", + vesCEFMessageResponse.getAai().getGenericServerName(), is("dfw1lb01lb01")); + + assertThat("VES CEF Message target type must be parsed correctly as VNF", + vesCEFMessageResponse.getTargetType(), is("VNF")); + + testSerialization(vesCEFMessageResponse, getClass()); + } +} diff --git a/dcae-analytics-model/src/test/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/policy/tca/TCAPolicyMixinTest.java b/dcae-analytics-model/src/test/java/org/onap/dcae/apod/analytics/model/util/json/mixin/policy/tca/TCAPolicyMixinTest.java index 90dca5a..5f4c387 100644 --- a/dcae-analytics-model/src/test/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/policy/tca/TCAPolicyMixinTest.java +++ b/dcae-analytics-model/src/test/java/org/onap/dcae/apod/analytics/model/util/json/mixin/policy/tca/TCAPolicyMixinTest.java @@ -1,51 +1,51 @@ -/*
- * ===============================LICENSE_START======================================
- * dcae-analytics
- * ================================================================================
- * Copyright © 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================LICENSE_END===========================================
- */
-
-package org.openecomp.dcae.apod.analytics.model.util.json.mixin.policy.tca;
-
-import org.junit.Test;
-import org.openecomp.dcae.apod.analytics.model.BaseAnalyticsModelUnitTest;
-import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.TCAPolicy;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-/**
- *
- * @author Rajiv Singla . Creation Date: 11/5/2016.
- */
-public class TCAPolicyMixinTest extends BaseAnalyticsModelUnitTest {
-
- private static final String TCA_POLICY_JSON_FILE_LOCATION = "data/json/policy/tca_policy.json";
-
- @Test
- public void testTCAPolicyJsonConversions() throws Exception {
-
- final TCAPolicy tcaPolicy = assertJsonConversions(TCA_POLICY_JSON_FILE_LOCATION, TCAPolicy.class);
-
- assertThat("TCA Policy Metrics Per Event Name must be 3",
- tcaPolicy.getMetricsPerEventName().size(), is(3));
-
- assertThat("TCA Policy Thresholds for first event name must be 3",
- tcaPolicy.getMetricsPerEventName().get(0).getThresholds().size(), is(3));
-
- testSerialization(tcaPolicy, getClass());
- }
-}
+/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.util.json.mixin.policy.tca; + +import org.junit.Test; +import org.onap.dcae.apod.analytics.model.BaseAnalyticsModelUnitTest; +import org.onap.dcae.apod.analytics.model.domain.policy.tca.TCAPolicy; + +import static org.hamcrest.CoreMatchers.is; +import static org.junit.Assert.assertThat; + +/** + * + * @author Rajiv Singla . Creation Date: 11/5/2016. + */ +public class TCAPolicyMixinTest extends BaseAnalyticsModelUnitTest { + + private static final String TCA_POLICY_JSON_FILE_LOCATION = "data/json/policy/tca_policy.json"; + + @Test + public void testTCAPolicyJsonConversions() throws Exception { + + final TCAPolicy tcaPolicy = assertJsonConversions(TCA_POLICY_JSON_FILE_LOCATION, TCAPolicy.class); + + assertThat("TCA Policy Metrics Per Event Name must be 3", + tcaPolicy.getMetricsPerEventName().size(), is(3)); + + assertThat("TCA Policy Thresholds for first event name must be 3", + tcaPolicy.getMetricsPerEventName().get(0).getThresholds().size(), is(3)); + + testSerialization(tcaPolicy, getClass()); + } +} diff --git a/dcae-analytics-model/src/test/resources/logback-test.xml b/dcae-analytics-model/src/test/resources/logback-test.xml index 4857522..78cbdfa 100644 --- a/dcae-analytics-model/src/test/resources/logback-test.xml +++ b/dcae-analytics-model/src/test/resources/logback-test.xml @@ -1,55 +1,55 @@ -<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- ~ ===============================LICENSE_START======================================
- ~ dcae-analytics
- ~ ================================================================================
- ~ Copyright © 2017 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.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- ~ ============================LICENSE_END===========================================
- -->
-<configuration debug="false">
-
- <!--
- Disabling some chatty loggers.
- -->
- <logger name="org.apache.commons.beanutils" level="ERROR"/>
- <logger name="org.apache.zookeeper.server" level="ERROR"/>
- <logger name="org.apache.zookeeper" level="ERROR"/>
- <logger name="com.ning" level="WARN"/>
- <logger name="org.apache.spark" level="WARN"/>
- <logger name="org.spark-project" level="WARN"/>
- <logger name="org.apache.hadoop" level="WARN"/>
- <logger name="org.apache.hive" level="WARN"/>
- <logger name="org.quartz.core" level="WARN"/>
- <logger name="org.eclipse.jetty" level="WARN"/>
- <logger name="io.netty.util.internal" level="WARN"/>
-
- <logger name="org.apache.twill" level="WARN"/>
- <logger name="co.cask.cdap" level="INFO"/>
- <logger name="org.openecomp.dcae.apod.analytics" level="DEBUG"/>
-
- <appender name="Console" class="ch.qos.logback.core.ConsoleAppender">
- <encoder>
- <pattern>%d{ISO8601} - %-5p [%t:%C{1}@%L] - %m%n</pattern>
- </encoder>
- </appender>
-
- <root level="ERROR">
- <appender-ref ref="Console"/>
- </root>
-
-
-</configuration>
-
+<?xml version="1.0" encoding="UTF-8"?> + +<!-- + ~ ===============================LICENSE_START====================================== + ~ dcae-analytics + ~ ================================================================================ + ~ Copyright © 2017 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. + ~ You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, software + ~ distributed under the License is distributed on an "AS IS" BASIS, + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ~ See the License for the specific language governing permissions and + ~ limitations under the License. + ~ ============================LICENSE_END=========================================== + --> +<configuration debug="false"> + + <!-- + Disabling some chatty loggers. + --> + <logger name="org.apache.commons.beanutils" level="ERROR"/> + <logger name="org.apache.zookeeper.server" level="ERROR"/> + <logger name="org.apache.zookeeper" level="ERROR"/> + <logger name="com.ning" level="WARN"/> + <logger name="org.apache.spark" level="WARN"/> + <logger name="org.spark-project" level="WARN"/> + <logger name="org.apache.hadoop" level="WARN"/> + <logger name="org.apache.hive" level="WARN"/> + <logger name="org.quartz.core" level="WARN"/> + <logger name="org.eclipse.jetty" level="WARN"/> + <logger name="io.netty.util.internal" level="WARN"/> + + <logger name="org.apache.twill" level="WARN"/> + <logger name="co.cask.cdap" level="INFO"/> + <logger name="org.onap.dcae.apod.analytics" level="DEBUG"/> + + <appender name="Console" class="ch.qos.logback.core.ConsoleAppender"> + <encoder> + <pattern>%d{ISO8601} - %-5p [%t:%C{1}@%L] - %m%n</pattern> + </encoder> + </appender> + + <root level="ERROR"> + <appender-ref ref="Console"/> + </root> + + +</configuration> + |