blob: 8e70fd32c546f5fb023afd67c2691df13c84c909 [file] [log] [blame]
Richard S. Hall930fecc2005-08-16 18:33:34 +00001/*
2 * Copyright 2005 The Apache Software Foundation
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *
16 */
Richard S. Hall5a031592005-08-19 19:53:58 +000017package org.apache.felix.framework;
Richard S. Hall930fecc2005-08-16 18:33:34 +000018
19import java.io.File;
20import java.util.Map;
21
Richard S. Hall5a031592005-08-19 19:53:58 +000022import org.apache.felix.framework.cache.BundleArchive;
23import org.apache.felix.framework.util.FelixConstants;
Richard S. Hall930fecc2005-08-16 18:33:34 +000024import org.osgi.framework.Bundle;
25import org.osgi.framework.BundleActivator;
26
27public class SystemBundleArchive implements BundleArchive
28{
29 private Map m_headerMap = null;
30
31 public long getId()
32 {
33 return 0;
34 }
35
36 public String getLocation()
37 throws Exception
38 {
39 return FelixConstants.SYSTEM_BUNDLE_LOCATION;
40 }
41
42 public int getPersistentState()
43 throws Exception
44 {
45 return Bundle.ACTIVE;
46 }
47
48 public void setPersistentState(int state)
49 throws Exception
50 {
51 }
52
53 public int getStartLevel()
54 throws Exception
55 {
56 return FelixConstants.SYSTEMBUNDLE_DEFAULT_STARTLEVEL;
57 }
58
59 public void setStartLevel(int level)
60 throws Exception
61 {
62 }
63
64 public File getDataFile(String fileName)
65 throws Exception
66 {
67 return null;
68 }
69
70 public BundleActivator getActivator(ClassLoader loader)
71 throws Exception
72 {
73 return null;
74 }
75
76 public void setActivator(Object obj)
77 throws Exception
78 {
79 }
80
81 public int getRevisionCount()
82 throws Exception
83 {
84 return 1;
85 }
86
87 public Map getManifestHeader(int revision)
88 throws Exception
89 {
90 return m_headerMap;
91 }
92
93 protected void setManifestHeader(Map headerMap)
94 {
95 m_headerMap = headerMap;
96 }
97
98 public String[] getClassPath(int revision)
99 throws Exception
100 {
101 return null;
102 }
103
104 public String findLibrary(int revision, String libName)
105 throws Exception
106 {
107 return null;
108 }
109}