Felix Meschberger | 3f9e4da | 2009-08-17 07:52:39 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Licensed to the Apache Software Foundation (ASF) under one |
| 3 | * or more contributor license agreements. See the NOTICE file |
| 4 | * distributed with this work for additional information |
| 5 | * regarding copyright ownership. The ASF licenses this file |
| 6 | * to you under the Apache License, Version 2.0 (the |
| 7 | * "License"); you may not use this file except in compliance |
| 8 | * with the License. You may obtain a copy of the License at |
| 9 | * |
| 10 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | * |
| 12 | * Unless required by applicable law or agreed to in writing, |
| 13 | * software distributed under the License is distributed on an |
| 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 15 | * KIND, either express or implied. See the License for the |
| 16 | * specific language governing permissions and limitations |
| 17 | * under the License. |
| 18 | */ |
| 19 | package org.apache.felix.cm; |
| 20 | |
| 21 | |
| 22 | import java.io.IOException; |
| 23 | import java.io.InputStream; |
| 24 | import java.net.URL; |
| 25 | import java.util.Dictionary; |
| 26 | import java.util.Enumeration; |
| 27 | |
| 28 | import org.osgi.framework.Bundle; |
| 29 | import org.osgi.framework.BundleContext; |
| 30 | import org.osgi.framework.BundleException; |
| 31 | import org.osgi.framework.ServiceReference; |
| 32 | |
| 33 | |
| 34 | public class MockBundle implements Bundle |
| 35 | { |
| 36 | |
| 37 | private final BundleContext context; |
| 38 | private final String location; |
| 39 | |
| 40 | |
| 41 | public MockBundle( BundleContext context, String location ) |
| 42 | { |
| 43 | this.context = context; |
| 44 | this.location = location; |
| 45 | } |
| 46 | |
| 47 | |
| 48 | public Enumeration findEntries( String arg0, String arg1, boolean arg2 ) |
| 49 | { |
| 50 | // TODO Auto-generated method stub |
| 51 | return null; |
| 52 | } |
| 53 | |
| 54 | |
| 55 | public BundleContext getBundleContext() |
| 56 | { |
| 57 | return context; |
| 58 | } |
| 59 | |
| 60 | |
| 61 | public long getBundleId() |
| 62 | { |
| 63 | return 0; |
| 64 | } |
| 65 | |
| 66 | |
| 67 | public URL getEntry( String arg0 ) |
| 68 | { |
| 69 | // TODO Auto-generated method stub |
| 70 | return null; |
| 71 | } |
| 72 | |
| 73 | |
| 74 | public Enumeration getEntryPaths( String arg0 ) |
| 75 | { |
| 76 | // TODO Auto-generated method stub |
| 77 | return null; |
| 78 | } |
| 79 | |
| 80 | |
| 81 | public Dictionary getHeaders() |
| 82 | { |
| 83 | // TODO Auto-generated method stub |
| 84 | return null; |
| 85 | } |
| 86 | |
| 87 | |
| 88 | public Dictionary getHeaders( String arg0 ) |
| 89 | { |
| 90 | // TODO Auto-generated method stub |
| 91 | return null; |
| 92 | } |
| 93 | |
| 94 | |
| 95 | public long getLastModified() |
| 96 | { |
| 97 | // TODO Auto-generated method stub |
| 98 | return 0; |
| 99 | } |
| 100 | |
| 101 | |
| 102 | public String getLocation() |
| 103 | { |
| 104 | return location; |
| 105 | } |
| 106 | |
| 107 | |
| 108 | public ServiceReference[] getRegisteredServices() |
| 109 | { |
| 110 | // TODO Auto-generated method stub |
| 111 | return null; |
| 112 | } |
| 113 | |
| 114 | |
| 115 | public URL getResource( String arg0 ) |
| 116 | { |
| 117 | // TODO Auto-generated method stub |
| 118 | return null; |
| 119 | } |
| 120 | |
| 121 | |
| 122 | public Enumeration getResources( String arg0 ) throws IOException |
| 123 | { |
| 124 | // TODO Auto-generated method stub |
| 125 | return null; |
| 126 | } |
| 127 | |
| 128 | |
| 129 | public ServiceReference[] getServicesInUse() |
| 130 | { |
| 131 | // TODO Auto-generated method stub |
| 132 | return null; |
| 133 | } |
| 134 | |
| 135 | |
| 136 | public int getState() |
| 137 | { |
| 138 | // TODO Auto-generated method stub |
| 139 | return 0; |
| 140 | } |
| 141 | |
| 142 | |
| 143 | public String getSymbolicName() |
| 144 | { |
| 145 | // TODO Auto-generated method stub |
| 146 | return null; |
| 147 | } |
| 148 | |
| 149 | |
| 150 | public boolean hasPermission( Object arg0 ) |
| 151 | { |
| 152 | // TODO Auto-generated method stub |
| 153 | return false; |
| 154 | } |
| 155 | |
| 156 | |
| 157 | public Class loadClass( String arg0 ) throws ClassNotFoundException |
| 158 | { |
| 159 | // TODO Auto-generated method stub |
| 160 | return null; |
| 161 | } |
| 162 | |
| 163 | |
| 164 | public void start() throws BundleException |
| 165 | { |
| 166 | // TODO Auto-generated method stub |
| 167 | |
| 168 | } |
| 169 | |
| 170 | |
| 171 | public void stop() throws BundleException |
| 172 | { |
| 173 | // TODO Auto-generated method stub |
| 174 | |
| 175 | } |
| 176 | |
| 177 | |
| 178 | public void uninstall() throws BundleException |
| 179 | { |
| 180 | // TODO Auto-generated method stub |
| 181 | |
| 182 | } |
| 183 | |
| 184 | |
| 185 | public void update() throws BundleException |
| 186 | { |
| 187 | // TODO Auto-generated method stub |
| 188 | |
| 189 | } |
| 190 | |
| 191 | |
| 192 | public void update( InputStream arg0 ) throws BundleException |
| 193 | { |
| 194 | // TODO Auto-generated method stub |
| 195 | |
| 196 | } |
| 197 | |
| 198 | } |