Unit tests for android extension of resource contianer
[platform/upstream/iotivity.git] / service / resource-container / android / resource-container / src / main / java / org / iotivity / service / resourcecontainer / BundleActivator.java
1 //******************************************************************
2 //
3 // Copyright 2015 Samsung Electronics All Rights Reserved.
4 //
5 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
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
10 //
11 //      http://www.apache.org/licenses/LICENSE-2.0
12 //
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 //
19 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
20 package org.iotivity.service.resourcecontainer;
21
22 import android.content.Context;
23 import java.util.List;
24
25 public abstract class BundleActivator {
26     protected RcsResourceContainerBundleAPI bundleAPI;
27     protected Context appContext;
28     
29     public BundleActivator(RcsResourceContainerBundleAPI bundleAPI, Context appContext){
30         this.bundleAPI = bundleAPI;
31         this.appContext = appContext;
32     }
33     /**
34      * Activates the bundle and creates all resources.
35      */
36     public abstract void activateBundle();
37
38     /**
39      * Deactivates the bundle and destroys all resources.
40      */
41     public abstract void deactivateBundle();
42
43     /**
44      * Creates a resources
45      * @param resource Instance of a BundleResource
46      */
47     public abstract void createResource(ResourceConfig resource);
48
49     /**
50      * Destroys a resource
51      * @param resource Instance of a BundleResource
52      */
53     public abstract void destroyResource(BundleResource resource);
54
55 }