2 * ===============================LICENSE_START======================================
4 * ================================================================================
5 * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============================LICENSE_END===========================================
21 package org.openecomp.dcae.apod.analytics.model.util.json;
23 import com.fasterxml.jackson.core.Version;
24 import com.fasterxml.jackson.databind.module.SimpleModule;
25 import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.BaseTCAPolicyModel;
26 import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.Direction;
27 import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.MetricsPerFunctionalRole;
28 import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.TCAPolicy;
29 import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.Threshold;
30 import org.openecomp.dcae.apod.analytics.model.util.json.mixin.policy.tca.BaseTCAPolicyModelMixin;
31 import org.openecomp.dcae.apod.analytics.model.util.json.mixin.policy.tca.DirectionMixin;
32 import org.openecomp.dcae.apod.analytics.model.util.json.mixin.policy.tca.MetricsPerFunctionalRoleMixin;
33 import org.openecomp.dcae.apod.analytics.model.util.json.mixin.policy.tca.TCAPolicyMixin;
34 import org.openecomp.dcae.apod.analytics.model.util.json.mixin.policy.tca.ThresholdMixin;
38 * @author Rajiv Singla . Creation Date: 11/5/2016.
40 public class TCAPolicyModule extends SimpleModule {
42 private static final long serialVersionUID = 1L;
44 public TCAPolicyModule() {
45 super("Threshold Crossing Alert Policy",
46 new Version(1, 0, 0, null, " org.openecomp.dcae.apod.analytics.model", "dcae-analytics-model"));
50 public void setupModule(final SetupContext setupContext) {
52 setupContext.setMixInAnnotations(BaseTCAPolicyModel.class, BaseTCAPolicyModelMixin.class);
53 setupContext.setMixInAnnotations(Direction.class, DirectionMixin.class);
54 setupContext.setMixInAnnotations(TCAPolicy.class, TCAPolicyMixin.class);
55 setupContext.setMixInAnnotations(MetricsPerFunctionalRole.class, MetricsPerFunctionalRoleMixin.class);
56 setupContext.setMixInAnnotations(Threshold.class, ThresholdMixin.class);
57 setupContext.setMixInAnnotations(TCAPolicy.class, TCAPolicyMixin.class);