summaryrefslogtreecommitdiffstats
path: root/dcaedt_catalog/asdc/src/main/java/org/onap/sdc/dcae/catalog/asdc/ASDCUtilsController.java
blob: 443271239ccb2c2fb7b5a93284289f327acb5f9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
package org.onap.sdc.dcae.catalog.asdc;

import java.io.StringReader;

import java.util.UUID;
import java.util.Map;
import java.util.List;
import java.util.concurrent.Callable;

import java.net.URI;
import java.net.URISyntaxException;

import javax.servlet.http.HttpServletRequest;

import org.onap.sdc.common.onaplog.OnapLoggerDebug;
import org.onap.sdc.common.onaplog.Enums.LogLevel;
import org.springframework.beans.BeansException;

import org.springframework.web.bind.annotation.RestController;

import org.onap.sdc.dcae.catalog.asdc.ASDC;
import org.onap.sdc.dcae.catalog.asdc.ASDCUtils;
import org.onap.sdc.dcae.catalog.asdc.ASDCUtilsController;

import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.http.HttpStatus;
import org.springframework.http.HttpHeaders;
import org.springframework.http.ResponseEntity;

import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;

import org.springframework.boot.context.properties.ConfigurationProperties;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

import org.json.JSONObject;


@RestController
@ConfigurationProperties(prefix="asdcUtilsController")
public class ASDCUtilsController implements ApplicationContextAware {

	private ApplicationContext			appCtx;
	private OnapLoggerDebug debugLogger = OnapLoggerDebug.getInstance();
	
	//Constants//
	private static String NOT_CERTIFIED_CHECKOUT = "NOT_CERTIFIED_CHECKOUT"; 
	private static String NOT_CERTIFIED_CHECKIN  = "NOT_CERTIFIED_CHECKIN"; 
	private static String CERTIFICATION_IN_PROGRESS = "CERTIFICATION_IN_PROGRESS"; 
	private static String CERTIFIED = "CERTIFIED"; 


	public void setApplicationContext(ApplicationContext theCtx) throws BeansException {
    this.appCtx = theCtx;
	}

	@PostConstruct
	public void initController() {
		debugLogger.log(LogLevel.DEBUG, this.getClass().getName(),"initASDCUtilsController");

		//Done
		debugLogger.log(LogLevel.DEBUG, this.getClass().getName(),"ASDCUtilsController started");
	}

	@PreDestroy
	public void cleanupController() {
		debugLogger.log(LogLevel.DEBUG, this.getClass().getName(),"cleanupASDCUtilsController");
	}

}