diff options
Diffstat (limited to 'dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json')
39 files changed, 1558 insertions, 0 deletions
diff --git a/dcae-analytics-model/src/main/java/org/onap/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 new file mode 100644 index 0000000..d5e2d9f --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/AnalyticsModelObjectMapperSupplier.java @@ -0,0 +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.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/onap/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 new file mode 100644 index 0000000..90e770c --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/CommonEventFormatModule.java @@ -0,0 +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.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/onap/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 new file mode 100644 index 0000000..16d5be6 --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/TCAControllerConfigModule.java @@ -0,0 +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.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/onap/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 new file mode 100644 index 0000000..fd9c674 --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/TCAFacadeModelModule.java @@ -0,0 +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.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/onap/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 new file mode 100644 index 0000000..9876138 --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/TCAPolicyModule.java @@ -0,0 +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.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/onap/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 new file mode 100644 index 0000000..f7b3a9b --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/BaseDynamicPropertiesProviderMixin.java @@ -0,0 +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.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/onap/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 new file mode 100644 index 0000000..5a9260a --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/JsonMixin.java @@ -0,0 +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.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/onap/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 new file mode 100644 index 0000000..058467b --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/AlertActionMixin.java @@ -0,0 +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.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/onap/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 new file mode 100644 index 0000000..3c8df6c --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/AlertTypeMixin.java @@ -0,0 +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.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/onap/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 new file mode 100644 index 0000000..82ecd3c --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/BaseCEFModelMixin.java @@ -0,0 +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.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/onap/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 new file mode 100644 index 0000000..8c688c7 --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/CommonEventHeaderMixin.java @@ -0,0 +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.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/onap/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 new file mode 100644 index 0000000..bf6807f --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/CriticalityMixin.java @@ -0,0 +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.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/onap/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 new file mode 100644 index 0000000..25e44e1 --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/DomainMixin.java @@ -0,0 +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.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/onap/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 new file mode 100644 index 0000000..3bb6d7b --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/EventListenerMixin.java @@ -0,0 +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.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/onap/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 new file mode 100644 index 0000000..bd645ab --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/EventMixin.java @@ -0,0 +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.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/onap/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 new file mode 100644 index 0000000..ff2b083 --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/EventSeverityMixin.java @@ -0,0 +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.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/onap/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 new file mode 100644 index 0000000..8400986 --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/FieldMixin.java @@ -0,0 +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.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/onap/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 new file mode 100644 index 0000000..7f765f3 --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/InternalHeaderFieldsMixin.java @@ -0,0 +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.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/onap/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 new file mode 100644 index 0000000..162ed89 --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/MeasurementsForVfScalingFieldsMixin.java @@ -0,0 +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.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/onap/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 new file mode 100644 index 0000000..18a12b3 --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/NamedArrayOfFieldsMixin.java @@ -0,0 +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.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/onap/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 new file mode 100644 index 0000000..ab15ccd --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/PerformanceCounterMixin.java @@ -0,0 +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.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/onap/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 new file mode 100644 index 0000000..7641e66 --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/PriorityMixin.java @@ -0,0 +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.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/onap/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 new file mode 100644 index 0000000..6cd3471 --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/ThresholdCrossingAlertFieldsMixin.java @@ -0,0 +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.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/onap/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 new file mode 100644 index 0000000..a48f32b --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/VNicUsageArrayMixin.java @@ -0,0 +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.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/onap/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 new file mode 100644 index 0000000..b6dca65 --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/config/tca/BaseTCAAppConfigModelMixin.java @@ -0,0 +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.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/onap/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 new file mode 100644 index 0000000..8f96e9f --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/config/tca/BaseTCAHandleMixin.java @@ -0,0 +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.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/onap/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 new file mode 100644 index 0000000..51b23f5 --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/config/tca/DMAAPInfoMixin.java @@ -0,0 +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.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/onap/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 new file mode 100644 index 0000000..83027de --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/config/tca/StreamsPublishesMixin.java @@ -0,0 +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.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/onap/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 new file mode 100644 index 0000000..b2b578a --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/config/tca/StreamsSubscribesMixin.java @@ -0,0 +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.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/onap/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 new file mode 100644 index 0000000..f4b67f2 --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/config/tca/TCAControllerAppConfigMixin.java @@ -0,0 +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.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/onap/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 new file mode 100644 index 0000000..d8f2d9e --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/facade/tca/AAIMixin.java @@ -0,0 +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.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/onap/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 new file mode 100644 index 0000000..49e7373 --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/facade/tca/VESCEFMessageResponseMixin.java @@ -0,0 +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.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/onap/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 new file mode 100644 index 0000000..e673d74 --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/policy/tca/BaseTCAPolicyModelMixin.java @@ -0,0 +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.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/onap/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 new file mode 100644 index 0000000..301704c --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/policy/tca/ClosedLoopEventStatusMixin.java @@ -0,0 +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.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/onap/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 new file mode 100644 index 0000000..4d1c524 --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/policy/tca/ControlLoopSchemaTypeMixin.java @@ -0,0 +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.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/onap/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 new file mode 100644 index 0000000..1118172 --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/policy/tca/DirectionMixin.java @@ -0,0 +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.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/onap/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 new file mode 100644 index 0000000..962b4ab --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/policy/tca/MetricsPerEventNameMixin.java @@ -0,0 +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.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/onap/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 new file mode 100644 index 0000000..3309901 --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/policy/tca/TCAPolicyMixin.java @@ -0,0 +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.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/onap/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 new file mode 100644 index 0000000..69c9c82 --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/policy/tca/ThresholdMixin.java @@ -0,0 +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.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; + } +} |