blob: c2d12c7b53024b4a225194db6da2e315a5791d02 [file] [log] [blame]
Stuart McCullochb657c2f2008-01-25 08:10:25 +00001/*
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 */
19package org.apache.felix.obr.plugin;
20
21
Stuart McCullocha132a142008-02-05 11:18:20 +000022import java.net.URI;
23
24
Stuart McCullochb657c2f2008-01-25 08:10:25 +000025/**
26 * this class is used to store some user information about configuration of the plugin.
27 * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
28 *
29 */
30public class Config
31{
Stuart McCullochb657c2f2008-01-25 08:10:25 +000032 private boolean m_pathRelative; // use relative or absolute path in repository.xml
Stuart McCullocha132a142008-02-05 11:18:20 +000033 private boolean m_remoteFile; // deploy file on remote server
34 private URI m_remoteBundle; // public address of deployed bundle
Stuart McCullochb657c2f2008-01-25 08:10:25 +000035
36
37 /**
38 * constructor: set default configuration: use relative path and don't upload file.
Stuart McCullochb657c2f2008-01-25 08:10:25 +000039 */
40 public Config()
41 {
42 // default configuration
43 m_pathRelative = true;
Stuart McCullocha132a142008-02-05 11:18:20 +000044 m_remoteFile = false;
45 m_remoteBundle = null;
Stuart McCullochb657c2f2008-01-25 08:10:25 +000046 }
47
48
49 /**
Stuart McCullocha132a142008-02-05 11:18:20 +000050 * @param value enable to use relative path
Stuart McCullochb657c2f2008-01-25 08:10:25 +000051 */
52 public void setPathRelative( boolean value )
53 {
54 m_pathRelative = value;
55 }
56
57
58 /**
Stuart McCullocha132a142008-02-05 11:18:20 +000059 * @param value enable when uploading
Stuart McCullochb657c2f2008-01-25 08:10:25 +000060 */
Stuart McCullocha132a142008-02-05 11:18:20 +000061 public void setRemoteFile( boolean value )
Stuart McCullochb657c2f2008-01-25 08:10:25 +000062 {
Stuart McCullocha132a142008-02-05 11:18:20 +000063 m_remoteFile = value;
Stuart McCullochb657c2f2008-01-25 08:10:25 +000064 }
65
66
67 /**
Stuart McCullocha132a142008-02-05 11:18:20 +000068 * @param value public address of deployed bundle
69 */
70 public void setRemoteBundle( URI value )
71 {
72 m_remoteBundle = value;
73 }
74
75
76 /**
77 * @return true if plugin uses relative path, else false
Stuart McCullochb657c2f2008-01-25 08:10:25 +000078 */
79 public boolean isPathRelative()
80 {
81 return m_pathRelative;
82 }
83
84
85 /**
Stuart McCullochb657c2f2008-01-25 08:10:25 +000086 * @return true if the file will be uploaded, else false
87 */
Stuart McCullocha132a142008-02-05 11:18:20 +000088 public boolean isRemoteFile()
Stuart McCullochb657c2f2008-01-25 08:10:25 +000089 {
Stuart McCullocha132a142008-02-05 11:18:20 +000090 return m_remoteFile;
91 }
92
93
94 /**
95 * @return public address of deployed bundle
96 */
97 public URI getRemoteBundle()
98 {
99 return m_remoteBundle;
Stuart McCullochb657c2f2008-01-25 08:10:25 +0000100 }
101}