Richard S. Hall | 930fecc | 2005-08-16 18:33:34 +0000 | [diff] [blame] | 1 | /* |
| 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 | */ |
| 17 | package org.ungoverned.osgi.service.shell; |
| 18 | |
| 19 | /** |
| 20 | * This interface defines the <tt>cd</tt> command service interface for the |
Richard S. Hall | 5a03159 | 2005-08-19 19:53:58 +0000 | [diff] [blame] | 21 | * Felix impl service. The <tt>cd</tt> command does not really change the |
| 22 | * directory of the impl, rather it maintains a base URL for |
Richard S. Hall | 930fecc | 2005-08-16 18:33:34 +0000 | [diff] [blame] | 23 | * simplifying URL entry. |
| 24 | * <p> |
| 25 | * For example, if the base URL is <tt>http://www.foo.com/<tt> and you |
| 26 | * try to install a bundle <tt>foo.jar</tt>, the actual URL will be |
| 27 | * expanded to <tt>http://www.foo.com/foo.jar</tt>. Any bundles wishing |
Richard S. Hall | 5a03159 | 2005-08-19 19:53:58 +0000 | [diff] [blame] | 28 | * to retrieve or set the current directory of the impl can use this |
Richard S. Hall | 930fecc | 2005-08-16 18:33:34 +0000 | [diff] [blame] | 29 | * service interface. |
| 30 | **/ |
| 31 | public interface CdCommand extends Command |
| 32 | { |
| 33 | /** |
| 34 | * Property used to configure the base URL. |
| 35 | **/ |
Richard S. Hall | 5a03159 | 2005-08-19 19:53:58 +0000 | [diff] [blame] | 36 | public static final String BASE_URL_PROPERTY = "felix.impl.baseurl"; |
Richard S. Hall | 930fecc | 2005-08-16 18:33:34 +0000 | [diff] [blame] | 37 | |
| 38 | /** |
Richard S. Hall | 5a03159 | 2005-08-19 19:53:58 +0000 | [diff] [blame] | 39 | * Returns the current <i>directory</i> of the impl service. |
| 40 | * @return the current impl directory. |
Richard S. Hall | 930fecc | 2005-08-16 18:33:34 +0000 | [diff] [blame] | 41 | **/ |
| 42 | public String getBaseURL(); |
| 43 | |
| 44 | /** |
Richard S. Hall | 5a03159 | 2005-08-19 19:53:58 +0000 | [diff] [blame] | 45 | * Sets the current <i>directory</i> of the impl service. |
Richard S. Hall | 930fecc | 2005-08-16 18:33:34 +0000 | [diff] [blame] | 46 | * @param s the new value for the base URL. |
| 47 | **/ |
| 48 | public void setBaseURL(String s); |
| 49 | } |