1 //******************************************************************
3 // Copyright 2015 Samsung Electronics All Rights Reserved.
5 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
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.
19 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
24 * This file contains RCSBundleInfo class, which provides APIs related to Bundle information.
26 package org.iotivity.service.resourcecontainer;
29 * This class provides APIs for getting and setting the Bundle Information
31 public class RcsBundleInfo {
32 private final String mId;
33 private final String mPath;
34 private final String mActivatorName;
35 private final String mLibraryPath;
36 private final String mVersion;
37 private boolean mActivated; // not final since it might be modified for Android-specific bundles
39 private RcsBundleInfo(String id, String path, String activatorName,
40 String libraryPath, String version) {
43 mActivatorName = activatorName;
44 mLibraryPath = libraryPath;
49 private RcsBundleInfo(String id, String path, String activatorName,
50 String libraryPath, String version, boolean activated) {
53 mActivatorName = activatorName;
54 mLibraryPath = libraryPath;
56 mActivated = activated;
60 * API for getting the Id of the bundle
62 * @return string - Id of the bundle
65 public String getID() {
70 * API for getting the path of the bundle
72 * @return path - path of the bundle
75 public String getPath() {
80 * API for setting the Activator name for the bundle
82 * @return string - Name of the activator
85 public String getActivatorName() {
86 return mActivatorName;
90 * API for getting the library path for the bundle
92 * @return string - Library path in string form
95 public String getLibraryPath() {
100 * API for getting the version of the bundle
102 * @return string - version of the bundle
105 public String getVersion() {
110 * Returns the current activation status of the bundle
112 * @return boolean - bundle has been successfully loaded and started
115 public boolean isActivated() {
120 * Set the current activation status of the bundle
122 * @return boolean - bundle has been successfully loaded and started
125 protected void setActivated(boolean activated) {
126 mActivated = activated;