[VERSION] Update version to 1.0.0
[sdnc/core.git] / filters / provider / src / main / java / org / openecomp / sdnc / filters / Activator.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * openECOMP : SDN-C
4  * ================================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights
6  *                                              reserved.
7  * ================================================================================
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  * 
12  *      http://www.apache.org/licenses/LICENSE-2.0
13  * 
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  * ============LICENSE_END=========================================================
20  */
21
22 package org.openecomp.sdnc.filters;
23
24 import java.io.File;
25 import java.io.FileInputStream;
26 import java.net.URL;
27 import java.util.Properties;
28
29 import org.osgi.framework.BundleActivator;
30 import org.osgi.framework.BundleContext;
31 import org.osgi.framework.ServiceRegistration;
32 import org.slf4j.Logger;
33 import org.slf4j.LoggerFactory;
34
35
36 public class Activator implements BundleActivator {
37
38         private ServiceRegistration registration = null;
39
40         private static final Logger LOG = LoggerFactory.getLogger(Activator.class);
41
42         @Override
43         public void start(BundleContext ctx) throws Exception {
44
45
46                 
47                 Object impl = new String();
48                 String regName = impl.getClass().getName();
49                 
50                 if (registration == null)
51                 {
52                         LOG.debug("Registering Filters service "+regName);
53                         registration = ctx.registerService(regName, impl, null);
54                 }
55
56         }
57
58         @Override
59         public void stop(BundleContext ctx) throws Exception {
60                 
61                 if (registration != null)
62                 {
63                         registration.unregister();
64                         registration = null;
65                 }
66         }
67
68 }