diff --git a/build.gradle b/build.gradle index c7802a38..e9b9a1a2 100644 --- a/build.gradle +++ b/build.gradle @@ -3,10 +3,23 @@ def projectNameLowerCase = 'openmuc' configure(allprojects) { apply plugin: 'java' - version = '0.13.1' + version = '0.14.0' group = 'org.openmuc.framework' } +allprojects { + gradle.projectsEvaluated { + tasks.withType(JavaCompile) { + options.encoding = "UTF-8" + options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation" + } + } + + javadoc { + options.encoding = "UTF-8" + } +} + project.ext { distributionProjects = subprojects.findAll { it.getPath() == ':openmuc-core-api' || @@ -21,6 +34,7 @@ project.ext { it.getPath() == ':openmuc-driver-iec62056p21' || it.getPath() == ':openmuc-driver-knx' || it.getPath() == ':openmuc-driver-mbus' || + it.getPath() == ':openmuc-driver-wmbus' || it.getPath() == ':openmuc-driver-modbus' || it.getPath() == ':openmuc-driver-s7plc' || it.getPath() == ':openmuc-driver-snmp' || @@ -33,8 +47,7 @@ project.ext { it.getPath() == ':openmuc-webui-channelconfigurator' || it.getPath() == ':openmuc-webui-userconfigurator' || it.getPath() == ':openmuc-server-restws' || - it.getPath() == ':openmuc-server-asciisocket' || - it.getPath() == ':openmuc-server-modbus' + it.getPath() == ':openmuc-server-asciisocket' } docProjects = distributionProjects.findAll { @@ -55,8 +68,7 @@ configure(subprojects) { targetCompatibility = 1.6 repositories { - mavenCentral() -// maven { url 'http://repo1.maven.org/maven2/' } + mavenCentral() flatDir { dirs 'dependencies', rootDir.getPath() + "/dependencies" } @@ -88,7 +100,6 @@ configure(subprojects) { uploadArchives { repositories { mavenDeployer { - beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } repository(url: project.properties.repository) { authentication(userName: project.properties.artifactoryUser, password: project.properties.artifactoryPass) @@ -206,7 +217,6 @@ task(tar, type: Tar) { include 'demo/framework/felix/**' include 'demo/framework/bundle/**' include 'demo/framework/conf/**' - include 'demo/framework/openmuc-config.xml' include 'demo/framework/README.txt' include 'demo/framework/run-openmuc.bat.winfile' include 'demo/framework/build.gradle' diff --git a/demo/framework/build.gradle b/demo/framework/build.gradle index 6c35ebc4..c37955a2 100644 --- a/demo/framework/build.gradle +++ b/demo/framework/build.gradle @@ -6,7 +6,7 @@ configurations.create('osgibundles') configurations.osgibundles.transitive = false; dependencies { - def openmucversion = '0.13.1' + def openmucversion = '0.14.0' osgibundles files('../../build/libs/openmuc-core-api-' + openmucversion + '.jar') osgibundles files('../../build/libs/openmuc-core-spi-' + openmucversion + '.jar') @@ -26,39 +26,55 @@ dependencies { osgibundles files('../projects/simpleappdemo/build/libs/openmuc-demo-simpleapp-' + openmucversion + '.jar') osgibundles files('../projects/dummydriver/build/libs/openmuc-driver-dummy-' + openmucversion + '.jar') - //The Apache Felix Gogo standard shell for OSGi (http://felix.apache.org/site/apache-felix-gogo.html) + //-------------------------------------------------------------------------------------------------- + // The Apache Felix Gogo standard shell for OSGi (http://felix.apache.org/site/apache-felix-gogo.html) + //-------------------------------------------------------------------------------------------------- osgibundles group: 'org.apache.felix', name: 'org.apache.felix.gogo.runtime', version: '0.12.1' osgibundles group: 'org.apache.felix', name: 'org.apache.felix.gogo.command', version: '0.14.0' osgibundles group: 'org.apache.felix', name: 'org.apache.felix.gogo.shell', version: '0.10.0' - //Adds a telnet server so that the Felix Gogo Shell can be accessed - //using telnet clients. By default this server only listens on - //localhost port 6666. Therefor you can on only access it from the - //same host on which felix is running. + //-------------------------------------------------------------------------------------------------- + // Adds a telnet server so that the Felix Gogo Shell can be accessed + // using telnet clients. By default this server only listens on + // localhost port 6666. Therefor you can on only access it from the + // same host on which felix is running. + //-------------------------------------------------------------------------------------------------- osgibundles group: 'org.apache.felix', name: 'org.apache.felix.shell.remote', version: '1.1.2' - //message logging libraries, SLF4J is a light-weight logging API, - //Logback is a message logger implementation that implements SLF4J - //natively - osgibundles group: 'org.slf4j', name: 'slf4j-api', version: '1.7.7' + //-------------------------------------------------------------------------------------------------- + // message logging libraries, SLF4J is a light-weight logging API, + // Logback is a message logger implementation that implements SLF4J + // natively + //-------------------------------------------------------------------------------------------------- + osgibundles group: 'org.slf4j', name: 'slf4j-api', version: '1.7.10' osgibundles group: 'ch.qos.logback', name: 'logback-classic', version: '1.1.2' osgibundles group: 'ch.qos.logback', name: 'logback-core', version: '1.1.2' - //Apache Felix Service Component Runtime that implements the OSGi Declarative Services Specification - //the OpenMUC core bundles use declarative services and thus depend on them + //-------------------------------------------------------------------------------------------------- + // Apache Felix Service Component Runtime that implements the OSGi Declarative Services Specification + // the OpenMUC core bundles use declarative services and thus depend on them + //-------------------------------------------------------------------------------------------------- osgibundles group: 'org.apache.felix', name: 'org.apache.felix.scr', version: '1.8.2' - //An implementation of the OSGi HTTP Service Specification, needed by the WebUI bundles - osgibundles group: 'org.apache.felix', name: 'org.apache.felix.http.bundle', version: '2.3.0' - //Implementation of the OSGi Event Admin Service needed by org.apache.felix.http.jetty - osgibundles group: 'org.apache.felix', name: 'org.apache.felix.eventadmin', version: '1.4.0' + //-------------------------------------------------------------------------------------------------- + // An implementation of the OSGi HTTP Service Specification, needed by the WebUI bundles + //-------------------------------------------------------------------------------------------------- + osgibundles group: 'org.apache.felix', name: 'org.apache.felix.http.bundle', version: '2.3.2' + //-------------------------------------------------------------------------------------------------- + // Implementation of the OSGi Event Admin Service needed by org.apache.felix.http.jetty + //-------------------------------------------------------------------------------------------------- + osgibundles group: 'org.apache.felix', name: 'org.apache.felix.eventadmin', version: '1.4.2' - //An implementation of the OSGi Configuration Admin Service, needed by the BundleConfigurator WebUI - //to enable users to dynamically configure running bundles. + //-------------------------------------------------------------------------------------------------- + // An implementation of the OSGi Configuration Admin Service, needed by the BundleConfigurator WebUI + // to enable users to dynamically configure running bundles. + //-------------------------------------------------------------------------------------------------- osgibundles group: 'org.apache.felix', name: 'org.apache.felix.configadmin', version: '1.8.0' - //An implementation of the OSGi MetaType Service, needed by the BundleConfigurator WebUI to receive - //information about the running bundles: + //-------------------------------------------------------------------------------------------------- + // An implementation of the OSGi MetaType Service, needed by the BundleConfigurator WebUI to receive + // information about the running bundles: + //-------------------------------------------------------------------------------------------------- osgibundles group: 'org.apache.felix', name: 'org.apache.felix.metatype', version: '1.0.10' } diff --git a/demo/framework/bundle/openmuc-core-api-0.13.1.jar b/demo/framework/bundle/openmuc-core-api-0.14.0.jar similarity index 70% rename from demo/framework/bundle/openmuc-core-api-0.13.1.jar rename to demo/framework/bundle/openmuc-core-api-0.14.0.jar index f0d7fab1..30d584da 100644 Binary files a/demo/framework/bundle/openmuc-core-api-0.13.1.jar and b/demo/framework/bundle/openmuc-core-api-0.14.0.jar differ diff --git a/demo/framework/bundle/openmuc-core-datamanager-0.13.1.jar b/demo/framework/bundle/openmuc-core-datamanager-0.13.1.jar deleted file mode 100644 index 29ddcf19..00000000 Binary files a/demo/framework/bundle/openmuc-core-datamanager-0.13.1.jar and /dev/null differ diff --git a/demo/framework/bundle/openmuc-core-datamanager-0.14.0.jar b/demo/framework/bundle/openmuc-core-datamanager-0.14.0.jar new file mode 100644 index 00000000..d1205188 Binary files /dev/null and b/demo/framework/bundle/openmuc-core-datamanager-0.14.0.jar differ diff --git a/demo/framework/bundle/openmuc-core-spi-0.13.1.jar b/demo/framework/bundle/openmuc-core-spi-0.13.1.jar deleted file mode 100644 index 03a1452a..00000000 Binary files a/demo/framework/bundle/openmuc-core-spi-0.13.1.jar and /dev/null differ diff --git a/demo/framework/bundle/openmuc-core-spi-0.14.0.jar b/demo/framework/bundle/openmuc-core-spi-0.14.0.jar new file mode 100644 index 00000000..a6d65b2b Binary files /dev/null and b/demo/framework/bundle/openmuc-core-spi-0.14.0.jar differ diff --git a/demo/framework/bundle/openmuc-datalogger-ascii-0.13.1.jar b/demo/framework/bundle/openmuc-datalogger-ascii-0.13.1.jar deleted file mode 100644 index f40637dd..00000000 Binary files a/demo/framework/bundle/openmuc-datalogger-ascii-0.13.1.jar and /dev/null differ diff --git a/demo/framework/bundle/openmuc-datalogger-ascii-0.14.0.jar b/demo/framework/bundle/openmuc-datalogger-ascii-0.14.0.jar new file mode 100644 index 00000000..bd1a2e16 Binary files /dev/null and b/demo/framework/bundle/openmuc-datalogger-ascii-0.14.0.jar differ diff --git a/demo/framework/bundle/openmuc-datalogger-slotsdb-0.13.1.jar b/demo/framework/bundle/openmuc-datalogger-slotsdb-0.14.0.jar similarity index 83% rename from demo/framework/bundle/openmuc-datalogger-slotsdb-0.13.1.jar rename to demo/framework/bundle/openmuc-datalogger-slotsdb-0.14.0.jar index dee13520..b62fee7f 100644 Binary files a/demo/framework/bundle/openmuc-datalogger-slotsdb-0.13.1.jar and b/demo/framework/bundle/openmuc-datalogger-slotsdb-0.14.0.jar differ diff --git a/demo/framework/bundle/openmuc-demo-simpleapp-0.13.1.jar b/demo/framework/bundle/openmuc-demo-simpleapp-0.14.0.jar similarity index 68% rename from demo/framework/bundle/openmuc-demo-simpleapp-0.13.1.jar rename to demo/framework/bundle/openmuc-demo-simpleapp-0.14.0.jar index 36488b62..5c6fcb2e 100644 Binary files a/demo/framework/bundle/openmuc-demo-simpleapp-0.13.1.jar and b/demo/framework/bundle/openmuc-demo-simpleapp-0.14.0.jar differ diff --git a/demo/framework/bundle/openmuc-driver-dummy-0.13.1.jar b/demo/framework/bundle/openmuc-driver-dummy-0.13.1.jar deleted file mode 100644 index 1c45b3d6..00000000 Binary files a/demo/framework/bundle/openmuc-driver-dummy-0.13.1.jar and /dev/null differ diff --git a/demo/framework/bundle/openmuc-driver-dummy-0.14.0.jar b/demo/framework/bundle/openmuc-driver-dummy-0.14.0.jar new file mode 100644 index 00000000..3d3fe9de Binary files /dev/null and b/demo/framework/bundle/openmuc-driver-dummy-0.14.0.jar differ diff --git a/demo/framework/bundle/openmuc-server-restws-0.13.1.jar b/demo/framework/bundle/openmuc-server-restws-0.13.1.jar deleted file mode 100644 index 89dc5e2c..00000000 Binary files a/demo/framework/bundle/openmuc-server-restws-0.13.1.jar and /dev/null differ diff --git a/demo/framework/bundle/openmuc-server-restws-0.14.0.jar b/demo/framework/bundle/openmuc-server-restws-0.14.0.jar new file mode 100644 index 00000000..4d245a45 Binary files /dev/null and b/demo/framework/bundle/openmuc-server-restws-0.14.0.jar differ diff --git a/demo/framework/bundle/openmuc-webui-base-0.13.1.jar b/demo/framework/bundle/openmuc-webui-base-0.14.0.jar similarity index 99% rename from demo/framework/bundle/openmuc-webui-base-0.13.1.jar rename to demo/framework/bundle/openmuc-webui-base-0.14.0.jar index 3a3404eb..ec37010c 100644 Binary files a/demo/framework/bundle/openmuc-webui-base-0.13.1.jar and b/demo/framework/bundle/openmuc-webui-base-0.14.0.jar differ diff --git a/demo/framework/bundle/openmuc-webui-bundleconfigurator-0.13.1.jar b/demo/framework/bundle/openmuc-webui-bundleconfigurator-0.14.0.jar similarity index 98% rename from demo/framework/bundle/openmuc-webui-bundleconfigurator-0.13.1.jar rename to demo/framework/bundle/openmuc-webui-bundleconfigurator-0.14.0.jar index 5a3fb1ef..52a5cecc 100644 Binary files a/demo/framework/bundle/openmuc-webui-bundleconfigurator-0.13.1.jar and b/demo/framework/bundle/openmuc-webui-bundleconfigurator-0.14.0.jar differ diff --git a/demo/framework/bundle/openmuc-webui-channelaccesstool-0.13.1.jar b/demo/framework/bundle/openmuc-webui-channelaccesstool-0.14.0.jar similarity index 72% rename from demo/framework/bundle/openmuc-webui-channelaccesstool-0.13.1.jar rename to demo/framework/bundle/openmuc-webui-channelaccesstool-0.14.0.jar index eebad2f1..046eb8cb 100644 Binary files a/demo/framework/bundle/openmuc-webui-channelaccesstool-0.13.1.jar and b/demo/framework/bundle/openmuc-webui-channelaccesstool-0.14.0.jar differ diff --git a/demo/framework/bundle/openmuc-webui-channelconfigurator-0.13.1.jar b/demo/framework/bundle/openmuc-webui-channelconfigurator-0.14.0.jar similarity index 53% rename from demo/framework/bundle/openmuc-webui-channelconfigurator-0.13.1.jar rename to demo/framework/bundle/openmuc-webui-channelconfigurator-0.14.0.jar index 9cefaa74..2ce55750 100644 Binary files a/demo/framework/bundle/openmuc-webui-channelconfigurator-0.13.1.jar and b/demo/framework/bundle/openmuc-webui-channelconfigurator-0.14.0.jar differ diff --git a/demo/framework/bundle/openmuc-webui-dataexporter-0.13.1.jar b/demo/framework/bundle/openmuc-webui-dataexporter-0.14.0.jar similarity index 80% rename from demo/framework/bundle/openmuc-webui-dataexporter-0.13.1.jar rename to demo/framework/bundle/openmuc-webui-dataexporter-0.14.0.jar index 7755970e..0f388a41 100644 Binary files a/demo/framework/bundle/openmuc-webui-dataexporter-0.13.1.jar and b/demo/framework/bundle/openmuc-webui-dataexporter-0.14.0.jar differ diff --git a/demo/framework/bundle/openmuc-webui-dataplotter-0.13.1.jar b/demo/framework/bundle/openmuc-webui-dataplotter-0.14.0.jar similarity index 97% rename from demo/framework/bundle/openmuc-webui-dataplotter-0.13.1.jar rename to demo/framework/bundle/openmuc-webui-dataplotter-0.14.0.jar index 69b7b126..7dfd751c 100644 Binary files a/demo/framework/bundle/openmuc-webui-dataplotter-0.13.1.jar and b/demo/framework/bundle/openmuc-webui-dataplotter-0.14.0.jar differ diff --git a/demo/framework/bundle/openmuc-webui-spi-0.13.1.jar b/demo/framework/bundle/openmuc-webui-spi-0.14.0.jar similarity index 70% rename from demo/framework/bundle/openmuc-webui-spi-0.13.1.jar rename to demo/framework/bundle/openmuc-webui-spi-0.14.0.jar index f6e10da3..b1a8d503 100644 Binary files a/demo/framework/bundle/openmuc-webui-spi-0.13.1.jar and b/demo/framework/bundle/openmuc-webui-spi-0.14.0.jar differ diff --git a/demo/framework/bundle/openmuc-webui-userconfigurator-0.13.1.jar b/demo/framework/bundle/openmuc-webui-userconfigurator-0.14.0.jar similarity index 74% rename from demo/framework/bundle/openmuc-webui-userconfigurator-0.13.1.jar rename to demo/framework/bundle/openmuc-webui-userconfigurator-0.14.0.jar index 8fa21103..c22295d5 100644 Binary files a/demo/framework/bundle/openmuc-webui-userconfigurator-0.13.1.jar and b/demo/framework/bundle/openmuc-webui-userconfigurator-0.14.0.jar differ diff --git a/demo/framework/bundle/org.apache.felix.eventadmin-1.4.0.jar b/demo/framework/bundle/org.apache.felix.eventadmin-1.4.2.jar similarity index 60% rename from demo/framework/bundle/org.apache.felix.eventadmin-1.4.0.jar rename to demo/framework/bundle/org.apache.felix.eventadmin-1.4.2.jar index 796b9d81..1df22266 100644 Binary files a/demo/framework/bundle/org.apache.felix.eventadmin-1.4.0.jar and b/demo/framework/bundle/org.apache.felix.eventadmin-1.4.2.jar differ diff --git a/demo/framework/bundle/org.apache.felix.http.bundle-2.3.0.jar b/demo/framework/bundle/org.apache.felix.http.bundle-2.3.2.jar similarity index 92% rename from demo/framework/bundle/org.apache.felix.http.bundle-2.3.0.jar rename to demo/framework/bundle/org.apache.felix.http.bundle-2.3.2.jar index b73f7a2a..b08f8944 100644 Binary files a/demo/framework/bundle/org.apache.felix.http.bundle-2.3.0.jar and b/demo/framework/bundle/org.apache.felix.http.bundle-2.3.2.jar differ diff --git a/demo/framework/bundle/slf4j-api-1.7.10.jar b/demo/framework/bundle/slf4j-api-1.7.10.jar new file mode 100644 index 00000000..744e9ec5 Binary files /dev/null and b/demo/framework/bundle/slf4j-api-1.7.10.jar differ diff --git a/demo/framework/bundle/slf4j-api-1.7.7.jar b/demo/framework/bundle/slf4j-api-1.7.7.jar deleted file mode 100644 index bebabd96..00000000 Binary files a/demo/framework/bundle/slf4j-api-1.7.7.jar and /dev/null differ diff --git a/demo/framework/openmuc-config.xml b/demo/framework/conf/channels.xml similarity index 100% rename from demo/framework/openmuc-config.xml rename to demo/framework/conf/channels.xml diff --git a/demo/framework/conf/logback.xml b/demo/framework/conf/logback.xml index b8afe0bd..5e7941b7 100644 --- a/demo/framework/conf/logback.xml +++ b/demo/framework/conf/logback.xml @@ -20,6 +20,5 @@ - diff --git a/demo/framework/conf/system.properties b/demo/framework/conf/system.properties index 9b1b36fe..e99c7ef2 100644 --- a/demo/framework/conf/system.properties +++ b/demo/framework/conf/system.properties @@ -2,28 +2,34 @@ logback.configurationFile=conf/logback.xml java.util.logging.config.file=conf/jul.properties +# Required by Apache Felix to enable the HTTP Server +org.apache.felix.http.jettyEnabled=true + +# set the location of the channel config file +# the default is conf/channels.xml +#org.openmuc.framework.channelconfig=conf/channels.xml + # Required by jSSDP. This configuration makes OpenMUC announce its REST-Service as a SSDP Multicast Message -org.openmuc.framework.util.ssdp.rest.searchtarget=openmuc:rest -org.openmuc.framework.util.ssdp.rest.uri.prefix=http:// -org.openmuc.framework.util.ssdp.rest.uri.port=8888 -org.openmuc.framework.util.ssdp.rest.uri.suffix=/rest +#org.openmuc.framework.util.ssdp.rest.searchtarget=openmuc:rest +#org.openmuc.framework.util.ssdp.rest.uri.prefix=http:// +#org.openmuc.framework.util.ssdp.rest.uri.port=8888 +#org.openmuc.framework.util.ssdp.rest.uri.suffix=/rest # Set this value to true, if you want to have the unscaled value in the modbus server. (Default: false) # This helps to translate modbus-rtu into modbus-tcp. # Example: Register content: "803" which has to be interpreted as "80,3". # By defining the Channel as Double Value and specifying a scalingFactor of "0.1" OpenMUC will internally display # the input as a correct floating point value. On Modbus-TCP Server it will again be "803" if set to true. "80" if false. -org.openmuc.framework.server.modbus.useUnscaledValues=false +#org.openmuc.framework.server.modbus.useUnscaledValues=false # If false (default) then https is used for writing channels via PUT requests. # If true then the unsecure http is used for writing channels via PUT requests. -org.openmuc.framework.server.restws.channel.ChannelResource.enableHttpWrite=false +#org.openmuc.framework.server.restws.channel.ChannelResource.enableHttpWrite=false # Set all combinations of serial ports / ttys. This fixes bugs on most of the embedded Linux Systems -gnu.io.rxtx.SerialPorts=/dev/ttyACM0:/dev/ttyACM1:/dev/ttyACM2:/dev/ttyACM3:/dev/ttyACM4:/dev/ttyACM5:/dev/ttyACM6:/dev/ttyACM7:/dev/ttyACM8:/dev/ttyACM9:/dev/ttyACM10:/dev/ttyAMA0:/dev/ttyAMA1:/dev/ttyAMA2:/dev/ttyAMA3:/dev/ttyAMA4:/dev/ttyAMA5:/dev/ttyAMA6:/dev/ttyAMA7:/dev/ttyAMA8:/dev/ttyAMA9:/dev/ttyAMA10:/dev/ttyUSB0:/dev/ttyUSB1:/dev/ttyUSB2:/dev/ttyUSB3:/dev/ttyUSB4:/dev/ttyUSB5:/dev/ttyUSB6:/dev/ttyUSB7:/dev/ttyUSB8:/dev/ttyUSB9:/dev/ttyUSB10:/dev/ttyS0:/dev/ttyS1:/dev/ttyS2:/dev/ttyS3:/dev/ttyS4:/dev/ttyS5:/dev/ttyS6:/dev/ttyS7:/dev/ttyS8:/dev/ttyS9:/dev/ttyS10:/dev/ttyO0:/dev/ttyO1:/dev/ttyO2:/dev/ttyO3:/dev/ttyO4:/dev/ttyO5:/dev/ttyO6:/dev/ttyO7:/dev/ttyO8:/dev/ttyO9:/dev/ttyO10:COM0:COM1:COM2:COM3:COM4:COM5:COM6:COM7:COM8:COM9:COM10:COM11:COM12:COM13:COM14:COM15:COM16:COM17:COM18:COM19:COM20 +#gnu.io.rxtx.SerialPorts=/dev/ttyACM0:/dev/ttyACM1:/dev/ttyACM2:/dev/ttyACM3:/dev/ttyACM4:/dev/ttyACM5:/dev/ttyACM6:/dev/ttyACM7:/dev/ttyACM8:/dev/ttyACM9:/dev/ttyACM10:/dev/ttyAMA0:/dev/ttyAMA1:/dev/ttyAMA2:/dev/ttyAMA3:/dev/ttyAMA4:/dev/ttyAMA5:/dev/ttyAMA6:/dev/ttyAMA7:/dev/ttyAMA8:/dev/ttyAMA9:/dev/ttyAMA10:/dev/ttyUSB0:/dev/ttyUSB1:/dev/ttyUSB2:/dev/ttyUSB3:/dev/ttyUSB4:/dev/ttyUSB5:/dev/ttyUSB6:/dev/ttyUSB7:/dev/ttyUSB8:/dev/ttyUSB9:/dev/ttyUSB10:/dev/ttyS0:/dev/ttyS1:/dev/ttyS2:/dev/ttyS3:/dev/ttyS4:/dev/ttyS5:/dev/ttyS6:/dev/ttyS7:/dev/ttyS8:/dev/ttyS9:/dev/ttyS10:/dev/ttyO0:/dev/ttyO1:/dev/ttyO2:/dev/ttyO3:/dev/ttyO4:/dev/ttyO5:/dev/ttyO6:/dev/ttyO7:/dev/ttyO8:/dev/ttyO9:/dev/ttyO10:COM0:COM1:COM2:COM3:COM4:COM5:COM6:COM7:COM8:COM9:COM10:COM11:COM12:COM13:COM14:COM15:COM16:COM17:COM18:COM19:COM20 # TBD. org.eclipse.jetty.server.Request.maxFormKeys=2000 -# Required by Apache Felix to enable the HTTP Server -org.apache.felix.http.jettyEnabled=true + diff --git a/demo/framework/felix/felix-4.4.1-doc/DEPENDENCIES b/demo/framework/felix/felix-4.6.0-doc/DEPENDENCIES similarity index 86% rename from demo/framework/felix/felix-4.4.1-doc/DEPENDENCIES rename to demo/framework/felix/felix-4.6.0-doc/DEPENDENCIES index ac01909e..ce175835 100644 --- a/demo/framework/felix/felix-4.4.1-doc/DEPENDENCIES +++ b/demo/framework/felix/felix-4.6.0-doc/DEPENDENCIES @@ -1,5 +1,5 @@ Apache Felix Main Distribution -Copyright 2013 The Apache Software Foundation +Copyright 2015 The Apache Software Foundation This software was developed at the Apache Software Foundation (http://www.apache.org) and may have dependencies on other @@ -9,7 +9,7 @@ I. Included Third-Party Software This product includes software developed at The OSGi Alliance (http://www.osgi.org/). -Copyright (c) OSGi Alliance (2000, 2012). +Copyright (c) OSGi Alliance (2000, 2014). Licensed under the Apache License 2.0. This product includes software from http://kxml.sourceforge.net. @@ -20,7 +20,7 @@ II. Used Third-Party Software This product uses software developed at The OSGi Alliance (http://www.osgi.org/). -Copyright (c) OSGi Alliance (2000, 2012). +Copyright (c) OSGi Alliance (2000, 2014). Licensed under the Apache License 2.0. This product uses software developed at diff --git a/demo/framework/felix/felix-4.4.1-doc/LICENSE b/demo/framework/felix/felix-4.6.0-doc/LICENSE similarity index 100% rename from demo/framework/felix/felix-4.4.1-doc/LICENSE rename to demo/framework/felix/felix-4.6.0-doc/LICENSE diff --git a/demo/framework/felix/felix-4.4.1-doc/LICENSE.kxml2 b/demo/framework/felix/felix-4.6.0-doc/LICENSE.kxml2 similarity index 100% rename from demo/framework/felix/felix-4.4.1-doc/LICENSE.kxml2 rename to demo/framework/felix/felix-4.6.0-doc/LICENSE.kxml2 diff --git a/demo/framework/felix/felix-4.4.1-doc/NOTICE b/demo/framework/felix/felix-4.6.0-doc/NOTICE similarity index 84% rename from demo/framework/felix/felix-4.4.1-doc/NOTICE rename to demo/framework/felix/felix-4.6.0-doc/NOTICE index ad3a64fb..1cf00224 100644 --- a/demo/framework/felix/felix-4.4.1-doc/NOTICE +++ b/demo/framework/felix/felix-4.6.0-doc/NOTICE @@ -1,5 +1,5 @@ Apache Felix Main Distribution -Copyright 2014 The Apache Software Foundation +Copyright 2015 The Apache Software Foundation This product includes software developed at The Apache Software Foundation (http://www.apache.org/). @@ -7,7 +7,7 @@ Licensed under the Apache License 2.0. This product includes software developed at The OSGi Alliance (http://www.osgi.org/). -Copyright (c) OSGi Alliance (2000, 2012). +Copyright (c) OSGi Alliance (2000, 2014). Licensed under the Apache License 2.0. This product includes software from http://kxml.sourceforge.net. diff --git a/demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-framework-configuration-properties.html b/demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-framework-configuration-properties.html similarity index 66% rename from demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-framework-configuration-properties.html rename to demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-framework-configuration-properties.html index 045f998a..f5a04dd7 100644 --- a/demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-framework-configuration-properties.html +++ b/demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-framework-configuration-properties.html @@ -1,12 +1,10 @@ - + Apache Felix - Apache Felix Framework Configuration Properties - + @@ -22,41 +20,30 @@
-

- Apache - Felix Framework Configuration Properties

+

Apache Felix Framework + Configuration Properties

@@ -68,11 +55,9 @@

Overview<

This document describes the various configuration properties related to the Apache Felix Framework. Technically, there are framework properties and launcher properties. If you are using the Felix - Framework JAR file (i.e., org.apache.felix.framework-x.y.x.jar), then you can only - use framework properties. On the other hand, if you are using the Felix Main launcher JAR - (i.e., felix.jar or org.apache.felix.main-x.y.z.jar), then you can use - both framework and launcher properties. This document will describe both sets of properties. -

+ Framework JAR file (i.e., org.apache.felix.framework-x.y.x.jar), then you can only use framework properties. On the other + hand, if you are using the Felix Main launcher JAR (i.e., felix.jar or org.apache.felix.main-x.y.z.jar), then you + can use both framework and launcher properties. This document will describe both sets of properties.

Note that the framework does not use system properties to find its configuration properties, it only consults the map passed into its @@ -83,17 +68,14 @@

Overview< launcher, it will copy all configuration properties it finds in the system properties to the configuration map passed into the framework constructor, which allows you to set configuration properties on the - command line. This feature is not available if you are just using the Felix framework - JAR file.

+ command line. This feature is not available if you are just using the Felix framework JAR file.

-

Framework - configuration properties

+

Framework configuration properties

-

The following configuration properties are for the framework (properties starting with "felix" - are specific to Felix, while those starting with "org.osgi" are standard OSGi - properties):

+

The following configuration properties are for the framework (properties starting with "felix" are specific to Felix, while + those starting with "org.osgi" are standard OSGi properties):

diff --git a/demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-framework-configuration-properties_files/apache.png b/demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-framework-configuration-properties_files/apache.png similarity index 100% rename from demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-framework-configuration-properties_files/apache.png rename to demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-framework-configuration-properties_files/apache.png diff --git a/demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-framework-configuration-properties_files/button.html b/demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-framework-configuration-properties_files/button.html similarity index 55% rename from demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-framework-configuration-properties_files/button.html rename to demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-framework-configuration-properties_files/button.html index 8d2e211b..320aeb10 100644 --- a/demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-framework-configuration-properties_files/button.html +++ b/demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-framework-configuration-properties_files/button.html @@ -3,9 +3,8 @@ - + \ No newline at end of file diff --git a/demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-framework-configuration-properties_files/button_data/2010-na-125x125.png b/demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-framework-configuration-properties_files/button_data/2010-na-125x125.png similarity index 100% rename from demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-framework-configuration-properties_files/button_data/2010-na-125x125.png rename to demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-framework-configuration-properties_files/button_data/2010-na-125x125.png diff --git a/demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-framework-configuration-properties_files/logo.png b/demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-framework-configuration-properties_files/logo.png similarity index 100% rename from demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-framework-configuration-properties_files/logo.png rename to demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-framework-configuration-properties_files/logo.png diff --git a/demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-framework-configuration-properties_files/site.css b/demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-framework-configuration-properties_files/site.css similarity index 100% rename from demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-framework-configuration-properties_files/site.css rename to demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-framework-configuration-properties_files/site.css diff --git a/demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-framework-launching-and-embedding.html b/demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-framework-launching-and-embedding.html similarity index 79% rename from demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-framework-launching-and-embedding.html rename to demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-framework-launching-and-embedding.html index 87d0646d..407ee44b 100644 --- a/demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-framework-launching-and-embedding.html +++ b/demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-framework-launching-and-embedding.html @@ -1,12 +1,10 @@ - + Apache Felix - Apache Felix Framework Launching and Embedding - + @@ -22,32 +20,24 @@
-

- Apache - Felix Framework Launching and Embedding

+

Apache Felix Framework Launching + and Embedding

[This document describes framework launching introduced in Felix Framework 2.0.0 and continuing with the latest releases; it is @@ -55,38 +45,29 @@

-

The framework launcher starts the framework and installs and starts all bundles contained in - the bundle +

The framework launcher starts the framework and installs and starts all bundles contained in the bundle directory of the current directory. By default, the bundle directory contains shell-related bundles providing a textual user interface to interact with the framework. Bundles installed into the framework are @@ -129,20 +108,18 @@

St - + Useful Information
Previous versions of the framework prompted for a profile name when executed. The profile name was used to create a directory inside .felix/ in the user home directory. This approach allowed users to have different sets of bundles for different purposes, e.g., testing, production, etc. If this behavior is still desired, it is very easy to - mimic. Modify conf/config.properties to include "felix.cache.rootdir=${user.home}/.felix". - Now, if you start Felix with something like "java -jar bin/felix.jar - foo", it will use "${user.home}/.felix/foo/" as the bundle - cache directory, where "${user.home}" is automatically substituted with - the appropriate system property by the launcher. + mimic. Modify conf/config.properties to include "felix.cache.rootdir=${user.home}/.felix". Now, if you + start Felix with something like "java -jar bin/felix.jar foo", it will use "${user.home}/.felix/foo/" + as the bundle cache directory, where "${user.home}" is automatically substituted with the appropriate system + property by the launcher. @@ -153,10 +130,9 @@

St

Framework Shell

-

The main way to interact with the framework is via the supplied Apache Felix Gogo shell. - After starting the framework, type help into the shell to see the list of the - available commands and help <command-name> to get help for a specific - command.

+

The main way to interact with the framework is via the supplied Apache Felix Gogo shell. After starting the framework, type + help into the shell to see the list of the available commands and help <command-name> to get help for a + specific command.

@@ -166,14 +142,11 @@

Framewor

- - + @@ -181,19 +154,16 @@

Framewor

Useful Information
In Gogo, command names are made up of two parts: - <scope>:<name>. This is similar to a fully qualified class - name in Java and is used to avoid naming collisions. If the - <name> portion of the command is unique, then you only need to - type it. If not, then you must either type the full <scope>:<name> +
Useful Information
In Gogo, command names are made up of two parts: <scope>:<name>. This + is similar to a fully qualified class name in Java and is used to avoid naming collisions. If the <name> + portion of the command is unique, then you only need to type it. If not, then you must either type the full <scope>:<name> or arrange the scope search path accordingly.
-

To install bundles, use the felix:install command, which is described in more detail - in the next sub-section. To - list installed bundles, use the felix:lb command. To stop the framework type stop - 0 +

To install bundles, use the felix:install command, which is described in more detail in the next sub-section. To list installed bundles, use the felix:lb + command. To stop the framework type stop 0 to stop the System Bundle; any installed bundles will automatically be reloaded (and potentially restarted) the next time you launch with the associated cache.

-

Installing Bundles -

+

Installing Bundles

A bundle is the OSGi term for a component for the OSGi framework. A bundle is simply a JAR file containing a manifest and some combination @@ -209,16 +179,15 @@

Insta Command (basic set of commands), and Bundle Repository (a bundle repository service). In addition to these bundles, the bundle repository provides access to other bundles for easy installation. The - bundle repository service provides a set of shell commands in the obr:* scope; - refer to the Apache Felix OSGi Bundle - Repository for more information.

+ bundle repository service provides a set of shell commands in the obr:* scope; refer to the Apache + Felix OSGi Bundle Repository for more information.

Before installing any bundles, it is important to understand how bundles are manually deployed into the framework. Bundles are deployed in two stages; first they are installed, then they are started. To - install a bundle use the felix:install shell command followed by a bundle URL. For - example, to install a bundle.jar bundle you type:

+ install a bundle use the felix:install shell command followed by a bundle URL. For example, to install a + bundle.jar bundle you type:

@@ -227,8 +196,8 @@

Insta

-

Once a bundle is installed, it can then be started by using the felix:start command - and the bundle identifier of the desired bundle. The felix:lb +

Once a bundle is installed, it can then be started by using the felix:start command and the bundle identifier of the desired + bundle. The felix:lb command is used to list installed bundles and to obtain the bundle's identifier. The following Felix shell session illustrates how to start the bundle.jar bundle:

@@ -252,17 +221,14 @@

Insta -

The felix:stop command is used to stop a bundle and the felix:uninstall - command is used to remove a bundle from the bundle cache. As an alternative to using the - felix:install and felix:start commands explicitly, it is also possible to - install and start a bundle in one step by using the felix:start command with a - bundle URL.

+

The felix:stop command is used to stop a bundle and the felix:uninstall command is used to remove a bundle from the + bundle cache. As an alternative to using the felix:install and felix:start commands explicitly, it is also + possible to install and start a bundle in one step by using the felix:start command with a bundle URL.

Bundles can be updated using the felix:update command. The update command allows you to specify an URL from which to retrieve the updated bundle, but if one is not specified it will try to update the - bundle from the bundle's Bundle-UpdateLocation manifest attribute, if present, or - the bundle's original location URL.

+ bundle from the bundle's Bundle-UpdateLocation manifest attribute, if present, or the bundle's original location URL.

@@ -272,16 +238,14 @@

Insta

- + @@ -292,8 +256,8 @@

Insta

-

Web - Proxy Issues when Installing Bundles

+

Web Proxy Issues when Installing Bundles +

If you use a proxy for Web access, then you may run into difficulty using the Gogo shell to install bundles from remote URLs. To remedy @@ -311,23 +275,20 @@

-D<prop>=<value>" syntax or you can put them in the lib/system.properties - file of your Felix installation; see the next section on configuring - Felix for more information.

+

These system properties can be set directly on the command line when starting the JVM using the standard "-D<prop>=<value>" + syntax or you can put them in the lib/system.properties file of your Felix installation; see the next section on configuring Felix for more information.

-

Bundle Auto-Deploy -

+

Bundle Auto-Deploy

To minimize the amount of configuration necessary to install bundles when you launch the framework, the Felix launcher uses the concept of an "auto-deploy" directory. The Felix launcher deploys all bundles in the auto-deploy directory into the framework instance during startup. - By default, the auto-deploy directory is "bundle" in the current directory, but it - can be specified on the command line like this:

+ By default, the auto-deploy directory is "bundle" in the current directory, but it can be specified on the command line + like this:

@@ -344,18 +305,16 @@

Bundle respectively:

    -
  • felix.auto.deploy.dir - Specifies the auto-deploy directory from which bundles - are automatically deploy at framework startup. The default is the bundle/ - directory of the current directory. +
  • felix.auto.deploy.dir - Specifies the auto-deploy directory from which bundles are automatically deploy at framework + startup. The default is the bundle/ directory of the current directory.
  • felix.auto.deploy.action - Specifies the auto-deploy actions to be performed on the bundle JAR - files found in the auto-deploy directory. The possible actions are install, - update, start, and uninstall. + files found in the auto-deploy directory. The possible actions are install, update, start, and uninstall. If no actions are specified, then the auto-deploy directory is not processed (i.e., it is disabled). There is no default value for this - property, but the default config.properties file installed with the Felix - framework distribution sets the value to: install, start
  • + property, but the default config.properties file installed with the Felix framework distribution sets the value to: + install, start
@@ -363,15 +322,14 @@

Bundle

-

Configuring the - Framework

+

Configuring the Framework

Both the Felix framework and the launcher use configuration properties to alter their default behavior. The framework can only be configured by passing properties into its constructor, but the launcher provides a mechanism to configure the framework via a property file. - The framework launcher reads configuration properties from conf/config.properties. - This file uses standard Java property file syntax.

+ The framework launcher reads configuration properties from conf/config.properties. This file uses standard Java property + file syntax.

The launcher also supports setting system properties via the conf/system.properties file. This file is purely for convenience when you need to repeatedly @@ -380,9 +338,8 @@

-

It is possible to specify different locations for these property files using the felix.config.properties - and felix.system.properties system properties when executing the framework. For - example:

+

It is possible to specify different locations for these property files using the felix.config.properties and felix.system.properties + system properties when executing the framework. For example:

@@ -391,29 +348,25 @@

-

Configuration and system properties are accessible at run time via BundleContext.getProperty(), - but configuration properties override system properties.

+

Configuration and system properties are accessible at run time via BundleContext.getProperty(), but configuration properties + override system properties.

The following configuration properties are for the launcher:

    -
  • felix.auto.deploy.dir - Specifies the auto-deploy directory from which bundles - are automatically deploy at framework startup. The default is the bundle/ - directory of the current directory. +
  • felix.auto.deploy.dir - Specifies the auto-deploy directory from which bundles are automatically deploy at framework + startup. The default is the bundle/ directory of the current directory.
  • felix.auto.deploy.action - Specifies a comma-delimited list of actions to be performed on bundle - JAR files found in the auto-deploy directory. The possible actions are install, - update, start, and uninstall. An undefined or blank value is - equivalent to disabling auto-deploy processing. + JAR files found in the auto-deploy directory. The possible actions are install, update, start, and + uninstall. An undefined or blank value is equivalent to disabling auto-deploy processing.
  • -
  • felix.auto.install.<n> - Space-delimited list of bundle URLs to - automatically install when Felix is started, where <n> is the start level - into which the bundle will be installed (e.g., felix.auto.install.2). +
  • felix.auto.install.<n> - Space-delimited list of bundle URLs to automatically install when Felix is started, + where <n> is the start level into which the bundle will be installed (e.g., felix.auto.install.2).
  • -
  • felix.auto.start.<n> - Space-delimited list of bundle URLs to - automatically install and start when Felix is started, where <n> is the - start level into which the bundle will be installed (e.g., felix.auto.start.2). +
  • felix.auto.start.<n> - Space-delimited list of bundle URLs to automatically install and start when Felix is + started, where <n> is the start level into which the bundle will be installed (e.g., felix.auto.start.2).
  • felix.shutdown.hook - Specifies whether the launcher should install a shutdown hook to @@ -422,28 +375,25 @@

    -

    The following configuration properties are for the framework (properties starting with "felix" - are specific to Felix, while those starting with "org.osgi" are standard OSGi - properties):

    +

    The following configuration properties are for the framework (properties starting with "felix" are specific to Felix, while + those starting with "org.osgi" are standard OSGi properties):

      -
    • org.osgi.framework.storage - Sets the directory to use as the bundle cache; by - default bundle cache directory is felix-cache +
    • org.osgi.framework.storage - Sets the directory to use as the bundle cache; by default bundle cache directory is felix-cache in the current working directory. The value should be a valid directory name. The directory name can be either absolute or relative. Relative directory names are relative to the current working directory. The specified directory will be created if it does not exist.
    • -
    • felix.cache.rootdir - Sets the root directory used to calculate the bundle - cache directory for relative directory names. If org.osgi.framework.storage +
    • felix.cache.rootdir - Sets the root directory used to calculate the bundle cache directory for relative directory + names. If org.osgi.framework.storage is set to a relative name, by default it is relative to the current working directory. If this property is set, then it will be calculated as being relative to the specified root directory.
    • -
    • org.osgi.framework.storage.clean - Determines whether the bundle cache is - flushed. The value can either be "none" or "onFirstInit", where "none" - does not flush the bundle cache and "onFirstInit" flushes the bundle cache when - the framework instance is first initialized. The default value is "none". +
    • org.osgi.framework.storage.clean - Determines whether the bundle cache is flushed. The value can either be + "none" or "onFirstInit", where "none" does not flush the bundle cache and "onFirstInit" + flushes the bundle cache when the framework instance is first initialized. The default value is "none".
    • felix.cache.bufsize - Sets the buffer size to be used by the cache; the default value is @@ -459,9 +409,8 @@

      org.osgi.framework.system.packages.extra - Specifies a comma-delimited list of packages that should be exported via the System Bundle from the framework class loader in addition to - the packages in org.osgi.framework.system.packages. The default value is empty. - If a value is specified, it is appended to the list of default or specified packages in - org.osgi.framework.system.packages. + the packages in org.osgi.framework.system.packages. The default value is empty. If a value is specified, it is appended + to the list of default or specified packages in org.osgi.framework.system.packages.

    • org.osgi.framework.bootdelegation - Specifies a comma-delimited list of packages that should be made @@ -469,11 +418,9 @@

      -
    • org.osgi.framework.bundle.parent - Specifies which class loader is used for - boot delegation. Possible values are: boot for the boot class loader, - app for the application class loader, ext for the extension class - loader, and framework for the framework's class loader. The default is - boot. +
    • org.osgi.framework.bundle.parent - Specifies which class loader is used for boot delegation. Possible values are: boot + for the boot class loader, app for the application class loader, ext for the extension class loader, and framework + for the framework's class loader. The default is boot.
    • felix.bootdelegation.implicit - Specifies whether the framework should try to guess when to @@ -499,15 +446,12 @@

      -
    • org.osgi.framework.startlevel.beginning - The initial start level of the - framework once it starts execution; the default value is 1. +
    • org.osgi.framework.startlevel.beginning - The initial start level of the framework once it starts execution; the + default value is 1.
    • -
    • felix.startlevel.bundle - The default start level for newly installed bundles; - the default value is 1. -
    • -
    • felix.service.urlhandlers - Flag to indicate whether to activate the URL - Handlers service for the framework instance; the default value is "true". - Activating the URL Handlers service will result in the URL.setURLStreamHandlerFactory() +
    • felix.startlevel.bundle - The default start level for newly installed bundles; the default value is 1.
    • +
    • felix.service.urlhandlers - Flag to indicate whether to activate the URL Handlers service for the framework instance; + the default value is "true". Activating the URL Handlers service will result in the URL.setURLStreamHandlerFactory() and URLConnection.setContentHandlerFactory() being called.
    @@ -517,53 +461,44 @@

    -

    Migrating - from Earlier Versions

    +

    Migrating from Earlier Versions

    -

    Apache Felix Framework 2.0.0 introduced some configuration property changes. This - section describes the differences from older versions of the framework.

    +

    Apache Felix Framework 2.0.0 introduced some configuration property changes. This section describes the differences from + older versions of the framework.

    • Removed
        -
      • felix.embedded.execution - No longer needed, since the framework now - never calls System.exit(); the creator of the framework is now always - responsible for exiting the VM. -
      • -
      • felix.strict.osgi - No longer needed, since all non-specification - features have been removed. +
      • felix.embedded.execution - No longer needed, since the framework now never calls System.exit(); the + creator of the framework is now always responsible for exiting the VM.
      • -
      • felix.cache.dir - No longer needed, since Felix no longer uses bundle - cache profiles for saving sets of bundles. +
      • felix.strict.osgi - No longer needed, since all non-specification features have been removed.
      • +
      • felix.cache.dir - No longer needed, since Felix no longer uses bundle cache profiles for saving sets of + bundles.
      • -
      • felix.cache.profile - No longer needed, since the framework no longer - uses bundle cache profiles for saving sets of bundles. -
      • -
      • felix.fragment.validation - No longer needed, since the framework - supports fragments. +
      • felix.cache.profile - No longer needed, since the framework no longer uses bundle cache profiles for saving + sets of bundles.
      • +
      • felix.fragment.validation - No longer needed, since the framework supports fragments.
    • Renamed
        -
      • felix.cache.profiledir - The equivalent of this property is now named - org.osgi.framework.storage. -
      • -
      • felix.startlevel.framework - The equivalent of this property is now - named org.osgi.framework.startlevel.beginning. +
      • felix.cache.profiledir - The equivalent of this property is now named org.osgi.framework.storage.
      • +
      • felix.startlevel.framework - The equivalent of this property is now named org.osgi.framework.startlevel.beginning.
    • Introduced
        -
      • org.osgi.framework.system.packages.extra - New property, as described - above, added to align with standard framework API. +
      • org.osgi.framework.system.packages.extra - New property, as described above, added to align with standard + framework API.
      • -
      • org.osgi.framework.storage.clean - New property, as described above, - added to align with standard framework API. +
      • org.osgi.framework.storage.clean - New property, as described above, added to align with standard framework + API.
      • -
      • felix.cache.rootdir - Introduced as a result of removing bundle - profiles to help resolve relative bundle cache directories. +
      • felix.cache.rootdir - Introduced as a result of removing bundle profiles to help resolve relative bundle cache + directories.
    • @@ -576,12 +511,10 @@

      -

      System - Property Substitution

      +

      System Property Substitution

      -

      It is possible to use system properties to specify the values of properties in the conf/config.properties - file. This is achieved through system property substitution, which is instigated by using - ${<property>} syntax, where <property> +

      It is possible to use system properties to specify the values of properties in the conf/config.properties file. This is + achieved through system property substitution, which is instigated by using ${<property>} syntax, where <property> is the name of a system property to substitute. When the properties file is read, any such property values are substituted as appropriate. It is possible to have nested system property substitution, in which @@ -590,8 +523,7 @@

      -

      Configuring Bundles -

      +

      Configuring Bundles

      Some bundles use properties to configure certain aspects of their behavior. It is a good idea, when implementing bundles, to parameterize @@ -599,22 +531,20 @@

      Conf configuration options for specific bundles, refer to the documentation that accompanies them.

      -

      Bundle properties may also be defined in the conf/config.properties property file. - Any property placed in this file will be accessible via BundleContext.getProperty() +

      Bundle properties may also be defined in the conf/config.properties property file. Any property placed in this file will be + accessible via BundleContext.getProperty() at run time. The property file uses the standard Java property file syntax (i.e., attribute-value pairs). For information on changing the - default location of this file, refer to the section on configuring + default location of this file, refer to the section on configuring Felix.

      Feedback

      -

      Subscribe to the Felix users mailing list by sending a message to users-subscribe@felix.apache.org; - after subscribing, email questions or feedback to users@felix.apache.org. +

      Subscribe to the Felix users mailing list by sending a message to users-subscribe@felix.apache.org; + after subscribing, email questions or feedback to users@felix.apache.org.

diff --git a/demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-framework-usage-documentation_files/apache.png b/demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-framework-usage-documentation_files/apache.png similarity index 100% rename from demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-framework-usage-documentation_files/apache.png rename to demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-framework-usage-documentation_files/apache.png diff --git a/demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-framework-usage-documentation_files/button.html b/demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-framework-usage-documentation_files/button.html similarity index 55% rename from demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-framework-usage-documentation_files/button.html rename to demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-framework-usage-documentation_files/button.html index 8d2e211b..320aeb10 100644 --- a/demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-framework-usage-documentation_files/button.html +++ b/demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-framework-usage-documentation_files/button.html @@ -3,9 +3,8 @@ - + \ No newline at end of file diff --git a/demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-framework-usage-documentation_files/button_data/2008-usa-125x125.png b/demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-framework-usage-documentation_files/button_data/2008-usa-125x125.png similarity index 100% rename from demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-framework-usage-documentation_files/button_data/2008-usa-125x125.png rename to demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-framework-usage-documentation_files/button_data/2008-usa-125x125.png diff --git a/demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-framework-usage-documentation_files/button_data/2009-europe-125x125.png b/demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-framework-usage-documentation_files/button_data/2009-europe-125x125.png similarity index 100% rename from demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-framework-usage-documentation_files/button_data/2009-europe-125x125.png rename to demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-framework-usage-documentation_files/button_data/2009-europe-125x125.png diff --git a/demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-framework-usage-documentation_files/button_data/2009-usa-125x125.png b/demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-framework-usage-documentation_files/button_data/2009-usa-125x125.png similarity index 100% rename from demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-framework-usage-documentation_files/button_data/2009-usa-125x125.png rename to demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-framework-usage-documentation_files/button_data/2009-usa-125x125.png diff --git a/demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-framework-usage-documentation_files/button_data/2010-na-125x125.png b/demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-framework-usage-documentation_files/button_data/2010-na-125x125.png similarity index 100% rename from demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-framework-usage-documentation_files/button_data/2010-na-125x125.png rename to demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-framework-usage-documentation_files/button_data/2010-na-125x125.png diff --git a/demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-framework-usage-documentation_files/information.gif b/demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-framework-usage-documentation_files/information.gif similarity index 100% rename from demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-framework-usage-documentation_files/information.gif rename to demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-framework-usage-documentation_files/information.gif diff --git a/demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-framework-usage-documentation_files/linkext7.gif b/demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-framework-usage-documentation_files/linkext7.gif similarity index 100% rename from demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-framework-usage-documentation_files/linkext7.gif rename to demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-framework-usage-documentation_files/linkext7.gif diff --git a/demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-framework-usage-documentation_files/logo.png b/demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-framework-usage-documentation_files/logo.png similarity index 100% rename from demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-framework-usage-documentation_files/logo.png rename to demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-framework-usage-documentation_files/logo.png diff --git a/demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-framework-usage-documentation_files/mail_small.gif b/demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-framework-usage-documentation_files/mail_small.gif similarity index 100% rename from demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-framework-usage-documentation_files/mail_small.gif rename to demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-framework-usage-documentation_files/mail_small.gif diff --git a/demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-framework-usage-documentation_files/site.css b/demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-framework-usage-documentation_files/site.css similarity index 100% rename from demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-framework-usage-documentation_files/site.css rename to demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-framework-usage-documentation_files/site.css diff --git a/demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-gogo-Dateien/apache.png b/demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-gogo-Dateien/apache.png similarity index 100% rename from demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-gogo-Dateien/apache.png rename to demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-gogo-Dateien/apache.png diff --git a/demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-gogo-Dateien/button.html b/demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-gogo-Dateien/button.html similarity index 55% rename from demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-gogo-Dateien/button.html rename to demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-gogo-Dateien/button.html index 8d2e211b..320aeb10 100644 --- a/demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-gogo-Dateien/button.html +++ b/demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-gogo-Dateien/button.html @@ -3,9 +3,8 @@ - + \ No newline at end of file diff --git a/demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-gogo-Dateien/button_data/2010-na-125x125.png b/demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-gogo-Dateien/button_data/2010-na-125x125.png similarity index 100% rename from demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-gogo-Dateien/button_data/2010-na-125x125.png rename to demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-gogo-Dateien/button_data/2010-na-125x125.png diff --git a/demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-gogo-Dateien/logo.png b/demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-gogo-Dateien/logo.png similarity index 100% rename from demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-gogo-Dateien/logo.png rename to demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-gogo-Dateien/logo.png diff --git a/demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-gogo-Dateien/site.css b/demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-gogo-Dateien/site.css similarity index 100% rename from demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-gogo-Dateien/site.css rename to demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-gogo-Dateien/site.css diff --git a/demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-gogo.html b/demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-gogo.html similarity index 71% rename from demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-gogo.html rename to demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-gogo.html index 0aea1b7f..01e665f1 100644 --- a/demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-gogo.html +++ b/demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-gogo.html @@ -1,5 +1,4 @@ - + @@ -10,33 +9,23 @@
- -
Apache
+
Apache
-

Apache - Felix OSGi Bundle Repository (OBR)

+

Apache Felix OSGi Bundle Repository (OBR)

@@ -85,8 +71,7 @@

Motivation

  1. To simplify deploying and using available bundles with Felix.
  2. -
  3. To encourage independent bundle development so that communities of interest can grow. -
  4. +
  5. To encourage independent bundle development so that communities of interest can grow.
@@ -101,8 +86,8 @@

Motivation

Note: OBR provides access to the Felix' default bundle repository, but you can also use it to deploy your own bundles by creating a bundle - repository meta-data file for your local bundles; see the obr list-url, obr - add-url, and obr remove-url commands for more details.

+ repository meta-data file for your local bundles; see the obr list-url, obr add-url, and obr remove-url + commands for more details.

@@ -120,30 +105,23 @@

Overview

OBR defines the following entities:

    -
  • Repository Admin - a service to access a federation of repositories. -
  • +
  • Repository Admin - a service to access a federation of repositories.
  • Repository - provides access to a set of resources.
  • -
  • Resource - a description of an artifact to be installed on a device. -
  • +
  • Resource - a description of an artifact to be installed on a device.
  • Capability - a named set of properties.
  • Requirement - an assertion on a capability.
  • -
  • Resolver - an object to resolve resource dependencies and to deploy - them. -
  • +
  • Resolver - an object to resolve resource dependencies and to deploy them.
  • Repository file - XML file containing resource meta-data.

The following diagram illustrates the relationships among these entities:

-

+

-

The client has access to a federated set of repositories via the Repository Admin service; - such as depicted in this view:

+

The client has access to a federated set of repositories via the Repository Admin service; such as depicted in this view:

-

+

@@ -151,11 +129,9 @@

OBR Reposito

The OBR repository file is an XML-based representation of bundle meta-data. The goal is provide a generic model for describing - dependencies among resources; as such, the term resource is used instead of - bundle in the OBR repository syntax; a detailed description of the OBR - meta-data format is available in the OSGi - RFC 112 + dependencies among resources; as such, the term resource is used instead of bundle in the OBR + repository syntax; a detailed description of the OBR meta-data format is available in the OSGi RFC 112 document; this document is not completely in sync with the implementation, but the concepts are still correct. The following XML snippet depicts the overall structure of a repository file:

@@ -219,8 +195,7 @@

OBR Reposito versions greater than '1.0.0'. Although this syntax looks rather complicated with the '\&' and '\>=' syntax, it is simply the standard OSGi LDAP query syntax in XML form (additionally, Peter Kriens - has created a tool called bindex to generate this meta-data from a bundle's - manifest).

+ has created a tool called bindex to generate this meta-data from a bundle's manifest).

With this generic dependency model, OBR is able to provide mappings for the various OSGi bundle dependencies; e.g., import/export package, @@ -249,8 +224,7 @@

OBR Service API<
-
public interface RepositoryAdmin
+
public interface RepositoryAdmin
 {
     public Resource[] discoverResources(String filterExpr);
     public Resolver resolver();
@@ -258,8 +232,7 @@ 

OBR Service API< throws Exception; public boolean removeRepository(URL repository); public Repository[] listRepositories(); - public Resource getResource(String respositoryId); + public Resource getResource(String respositoryId); }

@@ -270,8 +243,7 @@

OBR Service API<
-
public interface Resolver
+
public interface Resolver
 {
     public void add(Resource resource);
     public Requirement[] getUnsatisfiedRequirements();
@@ -336,10 +308,9 @@ 

OBR Service API<

In the general case, OBR user's will not use the OBR API directly, but will use its functionality indirectly from another tool or user interface. For example, interactive access to OBR is available via a - command for Felix' shell service. The OBR shell command is - discussed in the next section.

+ command for Felix' shell service. The OBR shell command is discussed in the next section. +

@@ -453,8 +424,7 @@

obr info

-

The above example retrieves the meta-data for version "1.0.0" of the bundle named "Bundle - Repository".

+

The above example retrieves the meta-data for version "1.0.0" of the bundle named "Bundle Repository".

@@ -510,8 +480,7 @@

obr start

-

The above example installs and starts the "1.0.0" version of the bundle named "Bundle - Repository" and its dependencies.

+

The above example installs and starts the "1.0.0" version of the bundle named "Bundle Repository" and its dependencies.

@@ -594,18 +563,15 @@

Using OBR w

-

Bundle Source Packaging -

+

Bundle Source Packaging

Coming soon...

-

Note on OSGi R3 Bundles -

+

Note on OSGi R3 Bundles

-

In contrast to OSGi R4 the previous specifications, most notably R3, allowed bundles without - the Bundle-SymbolicName +

In contrast to OSGi R4 the previous specifications, most notably R3, allowed bundles without the Bundle-SymbolicName header. The Felix OSGi Bundle Repository implementation heavily relies on the symbolic name being defined in bundles. As a consequence bundles without a symbolic name are not fully supported by the Bundle @@ -614,8 +580,8 @@

Note on OS
  • Bundles installed in the framework are used by the Bundle Repository implementation to resolve dependencies regardless of whether - they have a Bundle-SymbolicName header or not. Resolution of dependencies - against the installed bundles takes place based on the Export-Package headers. + they have a Bundle-SymbolicName header or not. Resolution of dependencies against the installed bundles takes place + based on the Export-Package headers.
  • Bundles installed in the framework without a Bundle-SymbolicName header cannot be updated by the Bundle Repository implementation @@ -629,10 +595,8 @@

    Note on OS

    Feedback

    -

    Subscribe to the Felix users mailing list by sending a message to users-subscribe@felix.apache.org; - after subscribing, email questions or feedback to users@felix.apache.org. +

    Subscribe to the Felix users mailing list by sending a message to users-subscribe@felix.apache.org; + after subscribing, email questions or feedback to users@felix.apache.org.

diff --git a/demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-osgi-bundle-repository_files/apache-felix-small.png b/demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-osgi-bundle-repository_files/apache-felix-small.png similarity index 100% rename from demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-osgi-bundle-repository_files/apache-felix-small.png rename to demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-osgi-bundle-repository_files/apache-felix-small.png diff --git a/demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-osgi-bundle-repository_files/apache.png b/demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-osgi-bundle-repository_files/apache.png similarity index 100% rename from demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-osgi-bundle-repository_files/apache.png rename to demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-osgi-bundle-repository_files/apache.png diff --git a/demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-osgi-bundle-repository_files/button.html b/demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-osgi-bundle-repository_files/button.html similarity index 52% rename from demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-osgi-bundle-repository_files/button.html rename to demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-osgi-bundle-repository_files/button.html index 6dc9c96a..08117b98 100644 --- a/demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-osgi-bundle-repository_files/button.html +++ b/demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-osgi-bundle-repository_files/button.html @@ -3,9 +3,8 @@ - + \ No newline at end of file diff --git a/demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-osgi-bundle-repository_files/button_data/2009-usa-125x125.png b/demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-osgi-bundle-repository_files/button_data/2009-usa-125x125.png similarity index 100% rename from demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-osgi-bundle-repository_files/button_data/2009-usa-125x125.png rename to demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-osgi-bundle-repository_files/button_data/2009-usa-125x125.png diff --git a/demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-osgi-bundle-repository_files/linkext7.gif b/demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-osgi-bundle-repository_files/linkext7.gif similarity index 100% rename from demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-osgi-bundle-repository_files/linkext7.gif rename to demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-osgi-bundle-repository_files/linkext7.gif diff --git a/demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-osgi-bundle-repository_files/logo.png b/demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-osgi-bundle-repository_files/logo.png similarity index 100% rename from demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-osgi-bundle-repository_files/logo.png rename to demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-osgi-bundle-repository_files/logo.png diff --git a/demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-osgi-bundle-repository_files/mail_small.gif b/demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-osgi-bundle-repository_files/mail_small.gif similarity index 100% rename from demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-osgi-bundle-repository_files/mail_small.gif rename to demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-osgi-bundle-repository_files/mail_small.gif diff --git a/demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-osgi-bundle-repository_files/obr-entities.png b/demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-osgi-bundle-repository_files/obr-entities.png similarity index 100% rename from demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-osgi-bundle-repository_files/obr-entities.png rename to demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-osgi-bundle-repository_files/obr-entities.png diff --git a/demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-osgi-bundle-repository_files/obr-high-level.png b/demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-osgi-bundle-repository_files/obr-high-level.png similarity index 100% rename from demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-osgi-bundle-repository_files/obr-high-level.png rename to demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-osgi-bundle-repository_files/obr-high-level.png diff --git a/demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-osgi-bundle-repository_files/site.css b/demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-osgi-bundle-repository_files/site.css similarity index 100% rename from demo/framework/felix/felix-4.4.1-doc/doc/apache-felix-osgi-bundle-repository_files/site.css rename to demo/framework/felix/felix-4.6.0-doc/doc/apache-felix-osgi-bundle-repository_files/site.css diff --git a/demo/framework/felix/felix-4.4.1-doc/doc/changelog.txt b/demo/framework/felix/felix-4.6.0-doc/doc/changelog.txt similarity index 96% rename from demo/framework/felix/felix-4.4.1-doc/doc/changelog.txt rename to demo/framework/felix/felix-4.6.0-doc/doc/changelog.txt index 895a1418..bc5c4d6c 100644 --- a/demo/framework/felix/felix-4.4.1-doc/doc/changelog.txt +++ b/demo/framework/felix/felix-4.6.0-doc/doc/changelog.txt @@ -1,3 +1,8 @@ +Changes from 4.4.1 to 4.6.0 +--------------------------- +** Improvement + * Update to framework and main 4.6.0 + Changes from 4.4.0 to 4.4.1 --------------------------- ** Improvement diff --git a/demo/framework/felix/felix-4.4.1-doc/doc/changelog_bundlerepository.txt b/demo/framework/felix/felix-4.6.0-doc/doc/changelog_bundlerepository.txt similarity index 100% rename from demo/framework/felix/felix-4.4.1-doc/doc/changelog_bundlerepository.txt rename to demo/framework/felix/felix-4.6.0-doc/doc/changelog_bundlerepository.txt diff --git a/demo/framework/felix/felix-4.4.1-doc/doc/changelog_framework.txt b/demo/framework/felix/felix-4.6.0-doc/doc/changelog_framework.txt similarity index 96% rename from demo/framework/felix/felix-4.4.1-doc/doc/changelog_framework.txt rename to demo/framework/felix/felix-4.6.0-doc/doc/changelog_framework.txt index 26ffe22f..72e23b14 100644 --- a/demo/framework/felix/felix-4.4.1-doc/doc/changelog_framework.txt +++ b/demo/framework/felix/felix-4.6.0-doc/doc/changelog_framework.txt @@ -1,3 +1,31 @@ +Changes from 4.4.1 to 4.6.0 +--------------------------- +** Sub-task + * [FELIX-4503] - [Core R6] Support osgi.native capability + * [FELIX-4504] - [Core R6] Support Framework DTOs + * [FELIX-4505] - [Core R6] Support Prototype Service Factory + * [FELIX-4578] - [Core R6] Support new Framework.init(FrameworkListener ... listeners) override + * [FELIX-4579] - [Core R6] Support Framework Extension Bundle Activators + * [FELIX-4580] - [Core R6] Support service.bundleid Service Registration property + * [FELIX-4581] - [Core R6] Support FrameworkWiring.findProviders(Requirement) + * [FELIX-4582] - [Core R6] Support WovenClassListener + * [FELIX-4583] - [Core R6] Ensure that all OSGi Core R6 CT tests pass + * [FELIX-4590] - [Core R6] Update to R6 API + * [FELIX-4593] - Support the JavaSE/compact profiles for Java 8 + * [FELIX-4726] - [Core R6] Update bundle and service hooks for the system bundle + +** Bug + * [FELIX-3883] - [Framework] Move OS and processor aliases to configuration properties + * [FELIX-4690] - Some bundles containing native code can fail to start on Windows 7+ + * [FELIX-4701] - Properties with surprising spelling in AutoProcessor + * [FELIX-4729] - [Core R6] Support for osgi.native namespace with Loading native code libraries + +** Improvement + * [FELIX-4502] - [Core R6] Provide an OSGi R6 compliant framework implementation + * [FELIX-4658] - URL of the CodeSource of a ProtectionDomain should resolve to the right JAR + * [FELIX-4692] - Improve Service access time + * [FELIX-4757] - Native Capabilities should allow OS and Processor alias to load from default and config properties + Changes form 4.4.0 to 4.4.1 --------------------------- ** Bug diff --git a/demo/framework/felix/felix-4.4.1-doc/doc/changelog_gogo.command.txt b/demo/framework/felix/felix-4.6.0-doc/doc/changelog_gogo.command.txt similarity index 100% rename from demo/framework/felix/felix-4.4.1-doc/doc/changelog_gogo.command.txt rename to demo/framework/felix/felix-4.6.0-doc/doc/changelog_gogo.command.txt diff --git a/demo/framework/felix/felix-4.4.1-doc/doc/changelog_gogo.runtime.txt b/demo/framework/felix/felix-4.6.0-doc/doc/changelog_gogo.runtime.txt similarity index 100% rename from demo/framework/felix/felix-4.4.1-doc/doc/changelog_gogo.runtime.txt rename to demo/framework/felix/felix-4.6.0-doc/doc/changelog_gogo.runtime.txt diff --git a/demo/framework/felix/felix-4.4.1-doc/doc/changelog_gogo.shell.txt b/demo/framework/felix/felix-4.6.0-doc/doc/changelog_gogo.shell.txt similarity index 100% rename from demo/framework/felix/felix-4.4.1-doc/doc/changelog_gogo.shell.txt rename to demo/framework/felix/felix-4.6.0-doc/doc/changelog_gogo.shell.txt diff --git a/demo/framework/felix/felix-4.4.1-doc/doc/changelog_main.txt b/demo/framework/felix/felix-4.6.0-doc/doc/changelog_main.txt similarity index 98% rename from demo/framework/felix/felix-4.4.1-doc/doc/changelog_main.txt rename to demo/framework/felix/felix-4.6.0-doc/doc/changelog_main.txt index 5069cd50..92929abf 100644 --- a/demo/framework/felix/felix-4.4.1-doc/doc/changelog_main.txt +++ b/demo/framework/felix/felix-4.6.0-doc/doc/changelog_main.txt @@ -1,3 +1,8 @@ +Changes from 4.4.1 to 4.6.0 +--------------------------- +** Improvement + * Update to latest framework version 4.6.0 + Changes from 4.4.0 to 4.4.1 --------------------------- ** Improvement diff --git a/demo/projects/dummydriver/build.gradle b/demo/projects/dummydriver/build.gradle index a4332cfc..588d28f0 100644 --- a/demo/projects/dummydriver/build.gradle +++ b/demo/projects/dummydriver/build.gradle @@ -3,7 +3,7 @@ apply plugin: 'eclipse' apply plugin: 'osgi' apply plugin: 'maven' -version = '0.13.1' +version = '0.14.0' group = 'org.openmuc.framework' def bundleSymbolicName = 'org.openmuc.framework.driver.dummy' def bundleName = 'OpenMUC Driver - Dummy' @@ -23,8 +23,8 @@ dependencies { compile group: 'org.osgi', name: 'org.osgi.core', version: '4.3.1' compile group: 'org.osgi', name: 'org.osgi.compendium', version: '4.3.1' compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.2' - compile group: 'org.openmuc.framework', name: 'openmuc-core-api', version: '0.13.1' - compile group: 'org.openmuc.framework', name: 'openmuc-core-spi', version: '0.13.1' + compile group: 'org.openmuc.framework', name: 'openmuc-core-api', version: '0.14.0' + compile group: 'org.openmuc.framework', name: 'openmuc-core-spi', version: '0.14.0' } jar { diff --git a/demo/projects/dummydriver/src/main/java/org/openmuc/framework/driver/dummy/DummyConnection.java b/demo/projects/dummydriver/src/main/java/org/openmuc/framework/driver/dummy/DummyConnection.java new file mode 100644 index 00000000..857914a9 --- /dev/null +++ b/demo/projects/dummydriver/src/main/java/org/openmuc/framework/driver/dummy/DummyConnection.java @@ -0,0 +1,136 @@ +package org.openmuc.framework.driver.dummy; + +import org.openmuc.framework.config.ChannelScanInfo; +import org.openmuc.framework.data.DoubleValue; +import org.openmuc.framework.data.Flag; +import org.openmuc.framework.data.Record; +import org.openmuc.framework.data.ValueType; +import org.openmuc.framework.driver.spi.*; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class DummyConnection implements Connection { + + private final static Logger logger = LoggerFactory.getLogger(DummyConnection.class); + + private final String deviceAddress; + + DummyListener listenerThread; + + boolean applianceStateON = false; + long applianceSwitchedOnTime; + long applianceSwitchedOffTime; + long applianceActiveTime; + long applianceInactiveTime; + boolean initApplianceState = true; + double p = Math.random(); + + public DummyConnection(String deviceAddress) { + this.deviceAddress = deviceAddress; + } + + @Override + public List scanForChannels(String settings) throws UnsupportedOperationException, ConnectionException { + List informationList = new ArrayList(2); + informationList.add(new ChannelScanInfo("dummy/channel/address/voltage", "", ValueType.DOUBLE, null)); + informationList.add(new ChannelScanInfo("dummy/channel/address/current", "", ValueType.BYTE_ARRAY, 5)); + return informationList; + } + + @Override + public void disconnect() { + logger.info("Disconnecting from device: " + deviceAddress); + if (listenerThread != null) { + listenerThread.shutdown(); + } + } + + @Override + public Object read(List containers, Object containerListHandle, String samplingGroup) throws + UnsupportedOperationException, ConnectionException { + + double value = 0; + long receiveTime = System.currentTimeMillis(); + for (ChannelRecordContainer channel : containers) { + + if (channel.getChannelAddress().equals("dummy/channel/address/voltage")) { + // voltage: 227 V - 233 V + value = 227 + (int) (Math.random() * ((233 - 227) + 1)); /* Generate values between 227 and 233 */ + // voltage: 10 V - 12 V + // value = Math.random() * (12 - 10) + 10; + channel.setRecord(new Record(new DoubleValue(value), receiveTime)); + } else if (channel.getChannelAddress().equals("dummy/channel/address/current")) { + // current: 0.3 A - 0,7 A + value = Math.sin(p) + 2; + setApplianceState(); + if (applianceStateON) { + // add 5 A if appliance is on + value += 3; + } + p += 1.0 / 100 % 2 * Math.PI; + } else { + // a random value between -10 and +10 for any other channel address + value = Math.random() * (10 - (-10)) + (-10); + } + channel.setRecord(new Record(new DoubleValue(value), receiveTime)); + } + return null; + } + + @Override + public void startListening(List containers, RecordsReceivedListener listener) throws + UnsupportedOperationException { + if (containers.size() == 0) { + if (listenerThread != null) { + listenerThread.shutdown(); + } + } else { + if (listenerThread == null) { + listenerThread = new DummyListener(containers, listener); + listenerThread.start(); + } else { + listenerThread.setNewContainers(containers); + } + } + } + + @Override + public Object write(List containers, Object containerListHandle) throws UnsupportedOperationException, + ConnectionException { + try { + Thread.sleep(500); + } catch (InterruptedException e) { + } + for (ChannelValueContainer valueContainer : containers) { + valueContainer.setFlag(Flag.VALID); + } + return null; + } + + private void setApplianceState() { + + long currentTime = new Date().getTime(); + + if (!applianceStateON) { + // if appliance off then leave it off for a certain time and then turn it on + if ((applianceSwitchedOffTime + applianceInactiveTime) < currentTime || initApplianceState) { + initApplianceState = false; + applianceActiveTime = (long) (Math.random() * (10000 - 1000) + 1000); // 1s - 10s + applianceSwitchedOnTime = new Date().getTime(); + applianceStateON = true; + } + } else { + // if appliance on then turn it off after a certain time + if ((applianceSwitchedOnTime + applianceActiveTime) < currentTime) { + applianceInactiveTime = (long) (Math.random() * (10000 - 1000) + 1000); + applianceSwitchedOffTime = new Date().getTime(); + applianceStateON = false; + } + } + } + +} diff --git a/demo/projects/dummydriver/src/main/java/org/openmuc/framework/driver/dummy/DummyDriver.java b/demo/projects/dummydriver/src/main/java/org/openmuc/framework/driver/dummy/DummyDriver.java index 1bf5f730..130976aa 100644 --- a/demo/projects/dummydriver/src/main/java/org/openmuc/framework/driver/dummy/DummyDriver.java +++ b/demo/projects/dummydriver/src/main/java/org/openmuc/framework/driver/dummy/DummyDriver.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-14 Fraunhofer ISE + * Copyright 2011-15 Fraunhofer ISE * * This file is part of OpenMUC. * For more information visit http://www.openmuc.org @@ -22,70 +22,42 @@ package org.openmuc.framework.driver.dummy; import org.openmuc.framework.config.*; -import org.openmuc.framework.data.DoubleValue; -import org.openmuc.framework.data.Flag; -import org.openmuc.framework.data.Record; -import org.openmuc.framework.data.ValueType; -import org.openmuc.framework.driver.spi.*; -import org.osgi.service.component.ComponentContext; +import org.openmuc.framework.driver.spi.Connection; +import org.openmuc.framework.driver.spi.ConnectionException; +import org.openmuc.framework.driver.spi.DriverDeviceScanListener; +import org.openmuc.framework.driver.spi.DriverService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.util.ArrayList; -import java.util.Date; -import java.util.HashMap; -import java.util.List; - public final class DummyDriver implements DriverService { private final static Logger logger = LoggerFactory.getLogger(DummyDriver.class); - private final HashMap listenersByAddress = new HashMap(); + private final static DriverInfo info = new DriverInfo("dummy", // id + // description + "This is just a dummy driver that returns dummy values and acts as a sink for " + + "written values", + // device address + "dummy/device/address/[0-9]", + // parameters + "N.A.", + // channel address + "dummy/channel/address/[a-z A-Z]", + // device scan parameters + "N.A."); - boolean applianceStateON = false; - long applianceSwitchedOnTime; - long applianceSwitchedOffTime; - long applianceActiveTime; - long applianceInactiveTime; - boolean initApplianceState = true; - double p = Math.random(); private volatile boolean scanRunning = false; - protected void activate(ComponentContext context) { - logger.info("Activating Dummy Driver"); - } - - protected void deactivate(ComponentContext context) { - logger.info("Deactivating Dummy Driver"); - for (DummyListener listener : listenersByAddress.values()) { - listener.shutdown(); - } - } - @Override public DriverInfo getInfo() { - DriverInfo toReturn = new DriverInfo("dummy", /* id */ - "This is just a dummy driver " - + "that returns dummy values " - + "and acts as a sink for " - + "written values", /* description */ - "/dev/ttyS[0-9]", /* interfaceAddressSyntax */ - "dummy/device/address/[0-9]", /* deviceAddressSyntax */ - "no parameters needed", /* parametersSyntax */ - "dummy/channel/address/[a-z A-Z]", /* channelAddressSyntax */ - "no parameters needed"); /* deviceScanParametersSyntax */ - return toReturn; + return info; } @Override - public void scanForDevices(String settings, DriverDeviceScanListener listener) - throws UnsupportedOperationException, ArgumentSyntaxException, ScanException, - ScanInterruptedException { + public void scanForDevices(String settings, DriverDeviceScanListener listener) throws UnsupportedOperationException, + ArgumentSyntaxException, ScanException, ScanInterruptedException { - listener.deviceFound(new DeviceScanInfo(null, - "dummy/device/address/1", - "", - "Dummy device 1.")); + listener.deviceFound(new DeviceScanInfo("dummy/device/address/1", "", "Dummy device 1.")); try { scanRunning = true; for (int i = 0; i <= 10; i++) { @@ -95,14 +67,10 @@ public void scanForDevices(String settings, DriverDeviceScanListener listener) Thread.sleep(500); listener.scanProgressUpdate(i * 10); if (i == 5) { - listener.deviceFound(new DeviceScanInfo(null, - "dummy/device/address/2", - "meaning=101010b", - "Dummy device 2.")); + listener.deviceFound(new DeviceScanInfo("dummy/device/address/2", "meaning=101010b", "Dummy device 2.")); } } - } - catch (InterruptedException e) { + } catch (InterruptedException e) { throw new ScanInterruptedException(e); } } @@ -114,130 +82,11 @@ public void interruptDeviceScan() throws UnsupportedOperationException { } @Override - public List scanForChannels(DeviceConnection connection, String settings) - throws UnsupportedOperationException, ConnectionException { - List informationList = new ArrayList(2); - informationList.add(new ChannelScanInfo("dummy/channel/address/voltage", - "", - ValueType.DOUBLE, - null)); - informationList.add(new ChannelScanInfo("dummy/channel/address/current", - "", - ValueType.BYTE_ARRAY, - 5)); - return informationList; - } - - @Override - public Object connect(String interfaceAddress, String deviceAddress, String settings) - throws ConnectionException { - String deviceAndInterfaceAddress; - - if (interfaceAddress.isEmpty()) { - deviceAndInterfaceAddress = deviceAddress; - } else { - deviceAndInterfaceAddress = deviceAddress + " at " + interfaceAddress; - - } - logger.info("Connecting to device: " + deviceAndInterfaceAddress); - - return deviceAndInterfaceAddress; - } - - @Override - public void disconnect(DeviceConnection connection) { - logger.info("Disconnecting from device: " + (String) connection.getConnectionHandle()); - } - - @Override - public Object read(DeviceConnection connection, List containers, - Object containerListHandle, String samplingGroup) - throws UnsupportedOperationException, ConnectionException { - - double value = 0; - long receiveTime = System.currentTimeMillis(); - for (ChannelRecordContainer channel : containers) { + public Connection connect(String deviceAddress, String settings) throws ConnectionException { - if (channel.getChannelAddress().equals("dummy/channel/address/voltage")) { - // voltage: 227 V - 233 V - value = 227 + (int) (Math.random() * ((233 - 227) + 1)); /* Generate values between 227 and 233 */ - // voltage: 10 V - 12 V - // value = Math.random() * (12 - 10) + 10; - channel.setRecord(new Record(new DoubleValue(value), receiveTime)); - } else if (channel.getChannelAddress().equals("dummy/channel/address/current")) { - // current: 0.3 A - 0,7 A - value = Math.sin(p) + 2; - setApplianceState(); - if (applianceStateON) { - // add 5 A if appliance is on - value += 3; - } - p += 1.0 / 100 % 2 * Math.PI; - } else { - // a random value between -10 and +10 for any other channel address - value = Math.random() * (10 - (-10)) + (-10); - } - channel.setRecord(new Record(new DoubleValue(value), receiveTime)); - } - return null; - } + logger.info("Connecting to device: " + deviceAddress); - @Override - public void startListening(DeviceConnection connection, List containers, - RecordsReceivedListener listener) - throws UnsupportedOperationException { - DummyListener listenerThread = listenersByAddress.get(connection); - if (containers.size() == 0) { - if (listenerThread != null) { - listenerThread.shutdown(); - } - } else { - if (listenerThread == null) { - listenerThread = new DummyListener(containers, listener); - listenerThread.start(); - listenersByAddress.put(connection, listenerThread); - } else { - listenerThread.setNewContainers(containers); - } - } + return new DummyConnection(deviceAddress); } - @Override - public Object write(DeviceConnection connection, - List containers, - Object containerListHandle) - throws UnsupportedOperationException, ConnectionException { - try { - Thread.sleep(500); - } - catch (InterruptedException e) { - } - for (ChannelValueContainer valueContainer : containers) { - valueContainer.setFlag(Flag.VALID); - } - return null; - } - - private void setApplianceState() { - - long currentTime = new Date().getTime(); - - if (!applianceStateON) { - // if appliance off then leave it off for a certain time and then turn it on - if ((applianceSwitchedOffTime + applianceInactiveTime) < currentTime - || initApplianceState) { - initApplianceState = false; - applianceActiveTime = (long) (Math.random() * (10000 - 1000) + 1000); // 1s - 10s - applianceSwitchedOnTime = new Date().getTime(); - applianceStateON = true; - } - } else { - // if appliance on then turn it off after a certain time - if ((applianceSwitchedOnTime + applianceActiveTime) < currentTime) { - applianceInactiveTime = (long) (Math.random() * (10000 - 1000) + 1000); - applianceSwitchedOffTime = new Date().getTime(); - applianceStateON = false; - } - } - } } diff --git a/demo/projects/dummydriver/src/main/java/org/openmuc/framework/driver/dummy/DummyListener.java b/demo/projects/dummydriver/src/main/java/org/openmuc/framework/driver/dummy/DummyListener.java index 2fa3f58d..0d3bcc6c 100644 --- a/demo/projects/dummydriver/src/main/java/org/openmuc/framework/driver/dummy/DummyListener.java +++ b/demo/projects/dummydriver/src/main/java/org/openmuc/framework/driver/dummy/DummyListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-14 Fraunhofer ISE + * Copyright 2011-15 Fraunhofer ISE * * This file is part of OpenMUC. * For more information visit http://www.openmuc.org @@ -35,8 +35,7 @@ final class DummyListener extends Thread { Double p = Math.random(); - public DummyListener(List containers, - RecordsReceivedListener listener) { + public DummyListener(List containers, RecordsReceivedListener listener) { this.containers = containers; this.listener = listener; } @@ -46,8 +45,7 @@ public void run() { while (true) { try { Thread.sleep(3000); - } - catch (InterruptedException e) { + } catch (InterruptedException e) { return; } long receiveTime = System.currentTimeMillis(); diff --git a/demo/projects/restclientdemo/build.gradle b/demo/projects/restclientdemo/build.gradle index 748a049d..7dd9c197 100644 --- a/demo/projects/restclientdemo/build.gradle +++ b/demo/projects/restclientdemo/build.gradle @@ -4,7 +4,7 @@ apply plugin: 'osgi' apply plugin: 'maven' apply plugin: 'application' -version = '0.13.1' +version = '0.14.0' group = 'org.openmuc.framework' def bundleName = 'OpenMUC RESTful Client Demo' diff --git a/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/ClientStarter.java b/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/ClientStarter.java index a8ea1edf..2816094e 100644 --- a/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/ClientStarter.java +++ b/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/ClientStarter.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-14 Fraunhofer ISE + * Copyright 2011-15 Fraunhofer ISE * * This file is part of OpenMUC. * For more information visit http://www.openmuc.org @@ -35,9 +35,9 @@ public static void main(String[] args) { String[] arg = args; if (arg.length == 0) { - System.out - .println( - "No arguments.\n\t-->\ttype for help: ./openmuc-demo-restclient --manual or\n\t \t ./openmuc-demo-restclient -m\n "); + System.out.println( + "No arguments.\n\t-->\ttype for help: ./openmuc-demo-restclient --manual or\n\t \t " + "" + + "./openmuc-demo-restclient -m\n "); return; } initOptions(); @@ -67,30 +67,28 @@ public static void main(String[] args) { System.out.println(code2); int code3 = (int) ((argCode & 0x0F80) >> 7); switch (code2) { - case 1: - Boolean ch = ChannelClient.start(code3, arg); - if (!ch) { - System.out.println("Error"); - } - break; - case 2: - Boolean dv = DeviceClient.start(code3, arg); - if (!dv) { - System.out.println("Error"); - } - break; - case 4: + case 1: + Boolean ch = ChannelClient.start(code3, arg); + if (!ch) { + System.out.println("Error"); + } + break; + case 2: + Boolean dv = DeviceClient.start(code3, arg); + if (!dv) { + System.out.println("Error"); + } + break; + case 4: - Boolean dr = DriverClient.start(code3, arg); - if (!dr) { - System.out.println("Error"); - } - break; - default: - System.out - .println( - "Do not use option -c (--channel), option -d (--device) and option -p (--driver) together."); - return; + Boolean dr = DriverClient.start(code3, arg); + if (!dr) { + System.out.println("Error"); + } + break; + default: + System.out.println("Do not use option -c (--channel), option -d (--device) and option -p (--driver) together."); + return; } } @@ -109,9 +107,7 @@ private static void initOptions() { Option optMan = new Option('m', "manual", "Prints the full help for this client."); optionsList.add(optMan); - Option optHelp = new Option('h', - "help", - "Prints usage information about a specific command."); + Option optHelp = new Option('h', "help", "Prints usage information about a specific command."); optHelp.setNbrOfParamaters(1); optionsList.add(optHelp); @@ -134,34 +130,24 @@ private static void initOptions() { optWrite.setNbrOfParamaters(20); optionsList.add(optWrite); - Option optGet = new Option('g', - "get", - "Gets config informations form the openmuc-config.xml"); + Option optGet = new Option('g', "get", "Gets config informations form the channel config file"); optGet.setNbrOfParamaters(20); optionsList.add(optGet); - Option optSet = new Option('s', - "set", - "sets config informations in the openmuc-config.xml"); + Option optSet = new Option('s', "set", "sets config informations in the channel config file"); optGet.setNbrOfParamaters(20); optionsList.add(optSet); - Option optAll = new Option('a', - "all", - "Prints all available channels for a given driver or device."); + Option optAll = new Option('a', "all", "Prints all available channels for a given driver or device."); optionsList.add(optAll); - Option optHistory = new Option('H', - "history", - "Prints history record for a given channel."); + Option optHistory = new Option('H', "history", "Prints history record for a given channel."); optHistory.setNbrOfParamaters(2); optionsList.add(optHistory); // 5th group of options - Option optReturnText = new Option('t', - "text", - "Displays server answers in text/plain format."); + Option optReturnText = new Option('t', "text", "Displays server answers in text/plain format."); optionsList.add(optReturnText); Option optReturnJson = new Option('j', "json", "Displays server answers in json format."); diff --git a/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/JsonHelper.java b/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/JsonHelper.java index bfc057d5..96a4244c 100644 --- a/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/JsonHelper.java +++ b/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/JsonHelper.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-14 Fraunhofer ISE + * Copyright 2011-15 Fraunhofer ISE * * This file is part of OpenMUC. * For more information visit http://www.openmuc.org @@ -33,10 +33,8 @@ public static String StringValueToJson(String value) { jso.writeObjectField("value"); try { jso.writeObjectValue(Double.valueOf(value)); - } - catch (NumberFormatException e) { - System.out.println( - "No valid double as argument for option -w (--write)\nRequest will fail:"); + } catch (NumberFormatException e) { + System.out.println("No valid double as argument for option -w (--write)\nRequest will fail:"); } jso.writeEndObject(); @@ -55,10 +53,8 @@ public static String ChannelValuesToJson(ArrayList wParam) { } else { try { jso.writeObjectValue(Double.valueOf(param)); - } - catch (NumberFormatException e) { - System.out.println( - "No valid double as argument for option -w (--write)\nRequest will fail:"); + } catch (NumberFormatException e) { + System.out.println("No valid double as argument for option -w (--write)\nRequest will fail:"); } } ++i; diff --git a/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/Option.java b/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/Option.java index 6f45df6f..2a923877 100644 --- a/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/Option.java +++ b/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/Option.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-14 Fraunhofer ISE + * Copyright 2011-15 Fraunhofer ISE * * This file is part of OpenMUC. * For more information visit http://www.openmuc.org @@ -37,12 +37,7 @@ public Option(char optName, String optFName, String des) { @Override public String toString() { - return "short name: " - + this.optionName - + " full name: " - + this.optionFullName - + " id: " - + this.id; + return "short name: " + this.optionName + " full name: " + this.optionFullName + " id: " + this.id; } public Boolean equals(Option opt) { diff --git a/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/clients/ChannelClient.java b/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/clients/ChannelClient.java index 09c19fd1..cda728f5 100644 --- a/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/clients/ChannelClient.java +++ b/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/clients/ChannelClient.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-14 Fraunhofer ISE + * Copyright 2011-15 Fraunhofer ISE * * This file is part of OpenMUC. * For more information visit http://www.openmuc.org @@ -32,122 +32,104 @@ public static Boolean start(int code, String[] args) { switch (code) { - case 0: - if (param == null) { + case 0: + if (param == null) { - ServerClient.sendGET("/channel"); - return true; - } else { - for (String chId : param) { - System.out.println(chId); - ServerClient.sendGET("/channel/" + chId); + ServerClient.sendGET("/channel"); + return true; + } else { + for (String chId : param) { + System.out.println(chId); + ServerClient.sendGET("/channel/" + chId); + } + return true; } - return true; - } - case 8: - if (param == null) { + case 8: + if (param == null) { - ServerClient.sendGET("/channel"); - return true; - } else { - System.out.println( - "If option -a (--all) is used you do not have to specify channels."); - return false; - } - case 16: - ArrayList hParam = ClientStarter.getParameters(new Option('H', "history", ""), - args); - if (param == null) { - System.out.println( - "Enter at least one channelId as parameter for option -c (--channel) "); - return false; - } else if (hParam == null) { - System.out.println( - "Enter at least one timeStamp (from) as parameter for option -H (--history) "); - return false; - } else if (!hParam.get(0).matches("[0-9]+")) { - System.out.println( - "Enter a valid timeStamp (from) as parameter for option -H (--history) "); - return false; - } else if (hParam.size() == 2) { - long from = Long.parseLong(hParam.get(0)); - long until = Long.parseLong(hParam.get(1)); - for (String chId : param) { - ServerClient.sendGETHistory("/channel/" + chId, from, until); + ServerClient.sendGET("/channel"); + return true; + } else { + System.out.println("If option -a (--all) is used you do not have to specify channels."); + return false; } - return true; - } else if (hParam.size() == 1) { - long from = Long.parseLong(hParam.get(0)); - long until = System.currentTimeMillis(); - for (String chId : param) { - ServerClient.sendGETHistory("/channel/" + chId, from, until); + case 16: + ArrayList hParam = ClientStarter.getParameters(new Option('H', "history", ""), args); + if (param == null) { + System.out.println("Enter at least one channelId as parameter for option -c (--channel) "); + return false; + } else if (hParam == null) { + System.out.println("Enter at least one timeStamp (from) as parameter for option -H (--history) "); + return false; + } else if (!hParam.get(0).matches("[0-9]+")) { + System.out.println("Enter a valid timeStamp (from) as parameter for option -H (--history) "); + return false; + } else if (hParam.size() == 2) { + long from = Long.parseLong(hParam.get(0)); + long until = Long.parseLong(hParam.get(1)); + for (String chId : param) { + ServerClient.sendGETHistory("/channel/" + chId, from, until); + } + return true; + } else if (hParam.size() == 1) { + long from = Long.parseLong(hParam.get(0)); + long until = System.currentTimeMillis(); + for (String chId : param) { + ServerClient.sendGETHistory("/channel/" + chId, from, until); + } + return true; + } else { + return false; } - return true; - } else { - return false; - } - case 1: - ArrayList wParam = ClientStarter.getParameters(new Option('w', "write", ""), - args); - if (param == null || (wParam.size() > param.size())) { - System.out - .println( - "One or more channels to write in are missing as parameter for option -c (--channel)"); - return false; - } else if (wParam == null || wParam.size() < param.size()) { - System.out.println( - "One or more values to write are missing as parameter for option -w (--write)"); - return false; - } else { - int i = 0; - for (String chId : param) { - ServerClient.sendPUT("/channel/" + chId, wParam.get(i)); - ++i; + case 1: + ArrayList wParam = ClientStarter.getParameters(new Option('w', "write", ""), args); + if (param == null || (wParam.size() > param.size())) { + System.out.println("One or more channels to write in are missing as parameter for option -c (--channel)"); + return false; + } else if (wParam == null || wParam.size() < param.size()) { + System.out.println("One or more values to write are missing as parameter for option -w (--write)"); + return false; + } else { + int i = 0; + for (String chId : param) { + ServerClient.sendPUT("/channel/" + chId, wParam.get(i)); + ++i; + } + return true; } - return true; - } - case 2: - ArrayList gParam = ClientStarter.getParameters(new Option('g', "get", ""), - args); - if (param == null || gParam.size() > param.size()) { - System.out - .println( - "One or more channels to get config information from are missing as parameter for option -c (--channel)"); - return false; - } else if (param == null || gParam.size() < param.size()) { - System.out - .println( - "One or more config field names to get are missing as parameter for option -g (--get)"); - return false; - } else { - for (String chId : param) { + case 2: + ArrayList gParam = ClientStarter.getParameters(new Option('g', "get", ""), args); + if (param == null || gParam.size() > param.size()) { + System.out.println( + "One or more channels to get config information from are missing as parameter for option -c (--channel)"); + return false; + } else if (param == null || gParam.size() < param.size()) { + System.out.println("One or more config field names to get are missing as parameter for option -g (--get)"); + return false; + } else { + for (String chId : param) { + } + return true; } - return true; - } - case 4: - ArrayList sParam = ClientStarter.getParameters(new Option('s', "set", ""), - args); - if (param == null) { + case 4: + ArrayList sParam = ClientStarter.getParameters(new Option('s', "set", ""), args); + if (param == null) { + System.out.println("Option -c (--channel) needs one channel to set config information to"); + return false; + } else if (param.size() > 1) { + System.out.println("Option -s (--set) can set only one channel at once"); + return false; + } else if ((sParam.size() & 01) == 1) { + System.out.println("Option -s (--set) need an even number of parameters: ..."); + return false; + } else { + for (String chId : param) { + } + } + default: System.out.println( - "Option -c (--channel) needs one channel to set config information to"); - return false; - } else if (param.size() > 1) { - System.out.println("Option -s (--set) can set only one channel at once"); + "Do not use use the options -a (--all), -H (--history), -w (--write), -g (--get) and -s (--set) together."); return false; - } else if ((sParam.size() & 01) == 1) { - System.out - .println( - "Option -s (--set) need an even number of parameters: ..."); - return false; - } else { - for (String chId : param) { - } - } - default: - System.out - .println( - "Do not use use the options -a (--all), -H (--history), -w (--write), -g (--get) and -s (--set) together."); - return false; } } diff --git a/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/clients/DeviceClient.java b/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/clients/DeviceClient.java index d855df02..1e603e4c 100644 --- a/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/clients/DeviceClient.java +++ b/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/clients/DeviceClient.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-14 Fraunhofer ISE + * Copyright 2011-15 Fraunhofer ISE * * This file is part of OpenMUC. * For more information visit http://www.openmuc.org @@ -30,86 +30,74 @@ public static Boolean start(int code, String[] args) { ArrayList param = ClientStarter.getParameters(new Option('d', "device", ""), args); switch (code) { - case 0: - if (param == null) { - ServerClient.sendGET("/device"); - return true; - } else { - for (String dvId : param) { - System.out.println(dvId); - ServerClient.sendGET("/device/" + dvId); + case 0: + if (param == null) { + ServerClient.sendGET("/device"); + return true; + } else { + for (String dvId : param) { + System.out.println(dvId); + ServerClient.sendGET("/device/" + dvId); + } + return true; } - return true; - } - case 8: - if (param == null) { + case 8: + if (param == null) { - ServerClient.sendGET("/device"); - return true; - } else { - System.out.println( - "If option -a (--all) is used you do not have to specify devices."); - return false; - } - case 1: - ArrayList wParam = ClientStarter.getParameters(new Option('w', "write", ""), - args); - if (param == null) { - System.out.println("Option -d (--device) needs one driver to put a value in"); - return false; - } else if (wParam == null) { - System.out.println("Option -w (--write) needs at least two parameters"); - return false; - } else if ((wParam.size() & 01) == 1) { - System.out.println( - "Option -w (--write) need an even number of parameters: ..."); - return false; - } else { - ServerClient.sendPUTd("/device/" + param.get(0), wParam); - return true; - } - case 2: - ArrayList gParam = ClientStarter.getParameters(new Option('g', "get", ""), - args); - if (param == null || gParam.size() > param.size()) { - System.out - .println( - "One or more channels to get config information from are missing as parameter for option -d (--device)"); - return false; - } else if (param == null || gParam.size() < param.size()) { - System.out - .println( - "One or more config field names to get are missing as parameter for option -g (--get)"); - return false; - } else { - for (String chId : param) { + ServerClient.sendGET("/device"); + return true; + } else { + System.out.println("If option -a (--all) is used you do not have to specify devices."); + return false; + } + case 1: + ArrayList wParam = ClientStarter.getParameters(new Option('w', "write", ""), args); + if (param == null) { + System.out.println("Option -d (--device) needs one driver to put a value in"); + return false; + } else if (wParam == null) { + System.out.println("Option -w (--write) needs at least two parameters"); + return false; + } else if ((wParam.size() & 01) == 1) { + System.out.println("Option -w (--write) need an even number of parameters: ..."); + return false; + } else { + ServerClient.sendPUTd("/device/" + param.get(0), wParam); + return true; + } + case 2: + ArrayList gParam = ClientStarter.getParameters(new Option('g', "get", ""), args); + if (param == null || gParam.size() > param.size()) { + System.out.println( + "One or more channels to get config information from are missing as parameter for option -d (--device)"); + return false; + } else if (param == null || gParam.size() < param.size()) { + System.out.println("One or more config field names to get are missing as parameter for option -g (--get)"); + return false; + } else { + for (String chId : param) { + } + return true; + } + case 4: + ArrayList sParam = ClientStarter.getParameters(new Option('s', "set", ""), args); + if (param == null) { + System.out.println("Option -d (--device) needs one channel to set config information to"); + return false; + } else if (param.size() > 1) { + System.out.println("Option -s (--set) can set only one channel at once"); + return false; + } else if ((sParam.size() & 01) == 1) { + System.out.println("Option -s (--set) need an even number of parameters: ..."); + return false; + } else { + for (String chId : param) { + } } - return true; - } - case 4: - ArrayList sParam = ClientStarter.getParameters(new Option('s', "set", ""), - args); - if (param == null) { + default: System.out.println( - "Option -d (--device) needs one channel to set config information to"); + "Do not use use the options -a (--all), -H (--history), -w (--write), -g (--get) and -s (--set) together."); return false; - } else if (param.size() > 1) { - System.out.println("Option -s (--set) can set only one channel at once"); - return false; - } else if ((sParam.size() & 01) == 1) { - System.out - .println( - "Option -s (--set) need an even number of parameters: ..."); - return false; - } else { - for (String chId : param) { - } - } - default: - System.out - .println( - "Do not use use the options -a (--all), -H (--history), -w (--write), -g (--get) and -s (--set) together."); - return false; } } diff --git a/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/clients/DriverClient.java b/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/clients/DriverClient.java index 48cbeebe..e3204f0b 100644 --- a/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/clients/DriverClient.java +++ b/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/clients/DriverClient.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-14 Fraunhofer ISE + * Copyright 2011-15 Fraunhofer ISE * * This file is part of OpenMUC. * For more information visit http://www.openmuc.org @@ -30,88 +30,76 @@ public static Boolean start(int code, String[] args) { ArrayList param = ClientStarter.getParameters(new Option('p', "driver", ""), args); switch (code) { - case 0: - if (param == null) { - System.out.println("df"); - ServerClient.sendGET("/driver"); - return true; - } else { - for (String drId : param) { - System.out.println(drId); - ServerClient.sendGET("/driver/" + drId); + case 0: + if (param == null) { + System.out.println("df"); + ServerClient.sendGET("/driver"); + return true; + } else { + for (String drId : param) { + System.out.println(drId); + ServerClient.sendGET("/driver/" + drId); + } + return true; } - return true; - } - case 8: - if (param == null) { + case 8: + if (param == null) { - ServerClient.sendGET("/driver"); - return true; - } else { - System.out.println( - "If option -a (--all) is used you do not have to specify drivers."); - return false; - } + ServerClient.sendGET("/driver"); + return true; + } else { + System.out.println("If option -a (--all) is used you do not have to specify drivers."); + return false; + } - case 1: - ArrayList wParam = ClientStarter.getParameters(new Option('w', "write", ""), - args); - if (param == null) { - System.out.println("Option -p (--driver) needs one driver to put a value in"); - return false; - } else if (wParam == null) { - System.out.println("Option -w (--write) needs at least two parameters"); - return false; - } else if ((wParam.size() & 01) == 1) { - System.out.println( - "Option -w (--write) need an even number of parameters: ..."); - return false; - } else { - ServerClient.sendPUTd("/driver/" + param.get(0), wParam); - return true; - } - case 2: - ArrayList gParam = ClientStarter.getParameters(new Option('g', "get", ""), - args); - if (param == null || gParam.size() > param.size()) { - System.out - .println( - "One or more channels to get config information from are missing as parameter for option -d (--device)"); - return false; - } else if (param == null || gParam.size() < param.size()) { - System.out - .println( - "One or more config field names to get are missing as parameter for option -g (--get)"); - return false; - } else { - for (String drId : param) { + case 1: + ArrayList wParam = ClientStarter.getParameters(new Option('w', "write", ""), args); + if (param == null) { + System.out.println("Option -p (--driver) needs one driver to put a value in"); + return false; + } else if (wParam == null) { + System.out.println("Option -w (--write) needs at least two parameters"); + return false; + } else if ((wParam.size() & 01) == 1) { + System.out.println("Option -w (--write) need an even number of parameters: ..."); + return false; + } else { + ServerClient.sendPUTd("/driver/" + param.get(0), wParam); + return true; + } + case 2: + ArrayList gParam = ClientStarter.getParameters(new Option('g', "get", ""), args); + if (param == null || gParam.size() > param.size()) { + System.out.println( + "One or more channels to get config information from are missing as parameter for option -d (--device)"); + return false; + } else if (param == null || gParam.size() < param.size()) { + System.out.println("One or more config field names to get are missing as parameter for option -g (--get)"); + return false; + } else { + for (String drId : param) { + } + return true; + } + case 4: + ArrayList sParam = ClientStarter.getParameters(new Option('s', "set", ""), args); + if (param == null) { + System.out.println("Option -p (--driver) needs one channel to set config information to"); + return false; + } else if (param.size() > 1) { + System.out.println("Option -s (--set) can set only one channel at once"); + return false; + } else if ((sParam.size() & 01) == 1) { + System.out.println("Option -s (--set) need an even number of parameters: ..."); + return false; + } else { + for (String chId : param) { + } } - return true; - } - case 4: - ArrayList sParam = ClientStarter.getParameters(new Option('s', "set", ""), - args); - if (param == null) { + default: System.out.println( - "Option -p (--driver) needs one channel to set config information to"); + "Do not use use the options -a (--all), -H (--history), -w (--write), -g (--get) and -s (--set) together."); return false; - } else if (param.size() > 1) { - System.out.println("Option -s (--set) can set only one channel at once"); - return false; - } else if ((sParam.size() & 01) == 1) { - System.out - .println( - "Option -s (--set) need an even number of parameters: ..."); - return false; - } else { - for (String chId : param) { - } - } - default: - System.out - .println( - "Do not use use the options -a (--all), -H (--history), -w (--write), -g (--get) and -s (--set) together."); - return false; } } diff --git a/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/clients/HelpClient.java b/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/clients/HelpClient.java index 0a5f350f..ab98c690 100644 --- a/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/clients/HelpClient.java +++ b/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/clients/HelpClient.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-14 Fraunhofer ISE + * Copyright 2011-15 Fraunhofer ISE * * This file is part of OpenMUC. * For more information visit http://www.openmuc.org @@ -27,31 +27,27 @@ public class HelpClient { public static Boolean start(int code, String[] args) { switch (code) { - case 1: - System.out.println( - "This is the client for OpenMUC-Rest Server.\nWritten by: Arsalane Arrach in July 2014"); - break; - case 2: - System.out.println("Client version: 0.1"); - break; - case 3: - System.out.println( - "This is the client for OpenMUC-Rest Server.\nWritten by: Arsalane Arrach in July 2014"); - System.out.println("Client version: 0.1"); - break; - case 4: - for (Option opt : ClientStarter.optionsList) { - System.out.println(opt.getName() + ", " + opt.getFullName()); - System.out.println("\t" + opt.getDescription()); - } - break; - case 8: - return setCommand(args); - default: - System.out - .println( - "Do not use option -m (--manual) or option -h (--help) together with -i (--info) or -v (--version)"); - return false; + case 1: + System.out.println("This is the client for OpenMUC-Rest Server.\nWritten by: Arsalane Arrach in July 2014"); + break; + case 2: + System.out.println("Client version: 0.1"); + break; + case 3: + System.out.println("This is the client for OpenMUC-Rest Server.\nWritten by: Arsalane Arrach in July 2014"); + System.out.println("Client version: 0.1"); + break; + case 4: + for (Option opt : ClientStarter.optionsList) { + System.out.println(opt.getName() + ", " + opt.getFullName()); + System.out.println("\t" + opt.getDescription()); + } + break; + case 8: + return setCommand(args); + default: + System.out.println("Do not use option -m (--manual) or option -h (--help) together with -i (--info) or -v (--version)"); + return false; } return true; } diff --git a/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/clients/ServerClient.java b/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/clients/ServerClient.java index 2d9495d8..c0e04219 100644 --- a/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/clients/ServerClient.java +++ b/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/clients/ServerClient.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-14 Fraunhofer ISE + * Copyright 2011-15 Fraunhofer ISE * * This file is part of OpenMUC. * For more information visit http://www.openmuc.org @@ -35,10 +35,7 @@ public class ServerClient { public static String USER_AGENT = "Rest Client"; public static void sendGET(String string) { - String urlStr = SettingsClient.getProtocol() - + SettingsClient.getServer() - + ClientStarter.name - + string; + String urlStr = SettingsClient.getProtocol() + SettingsClient.getServer() + ClientStarter.name + string; URL url; try { url = new URL(urlStr); @@ -61,8 +58,7 @@ public static void sendGET(String string) { System.out.println("Response Code : " + responseCode); } - } - catch (IOException ioe) { + } catch (IOException ioe) { ioe.printStackTrace(); } } @@ -74,10 +70,7 @@ public static void sendGETHistory(String chId, long from, long until) { } public static void sendPUT(String string, String string2) { - String urlStr = SettingsClient.getProtocol() - + SettingsClient.getServer() - + ClientStarter.name - + string; + String urlStr = SettingsClient.getProtocol() + SettingsClient.getServer() + ClientStarter.name + string; URL url; try { url = new URL(urlStr); @@ -105,18 +98,14 @@ public static void sendPUT(String string, String string2) { System.out.println("Response Code : " + responseCode); } - } - catch (IOException ioe) { + } catch (IOException ioe) { ioe.printStackTrace(); } } public static void sendPUTd(String string, ArrayList wParam) { - String urlStr = SettingsClient.getProtocol() - + SettingsClient.getServer() - + ClientStarter.name - + string; + String urlStr = SettingsClient.getProtocol() + SettingsClient.getServer() + ClientStarter.name + string; URL url; try { url = new URL(urlStr); @@ -145,8 +134,7 @@ public static void sendPUTd(String string, ArrayList wParam) { System.out.println("Response Code : " + responseCode); } - } - catch (IOException ioe) { + } catch (IOException ioe) { ioe.printStackTrace(); } diff --git a/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/clients/SettingsClient.java b/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/clients/SettingsClient.java index 83cc6fe4..7843952d 100644 --- a/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/clients/SettingsClient.java +++ b/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/clients/SettingsClient.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-14 Fraunhofer ISE + * Copyright 2011-15 Fraunhofer ISE * * This file is part of OpenMUC. * For more information visit http://www.openmuc.org @@ -31,27 +31,27 @@ public class SettingsClient { public static Boolean start(int code, String[] args) { switch (code) { - case 0: - case 2: - setDefaultSettings(); - return true; - case 1: - setDefaultSettings(); - setPrintText(true); - setPrintJson(false); - return true; - case 4: - case 6: - setDefaultSettings(); - return setServer(args); - case 5: - setDefaultSettings(); - setPrintText(true); - setPrintJson(false); - return setServer(args); - default: - System.out.println("Do not use option -j (--json) and option -t (--text) together."); - return false; + case 0: + case 2: + setDefaultSettings(); + return true; + case 1: + setDefaultSettings(); + setPrintText(true); + setPrintJson(false); + return true; + case 4: + case 6: + setDefaultSettings(); + return setServer(args); + case 5: + setDefaultSettings(); + setPrintText(true); + setPrintJson(false); + return setServer(args); + default: + System.out.println("Do not use option -j (--json) and option -t (--text) together."); + return false; } } diff --git a/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/json/JsonArray.java b/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/json/JsonArray.java index 0489d183..85701e1a 100644 --- a/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/json/JsonArray.java +++ b/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/json/JsonArray.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-14 Fraunhofer ISE + * Copyright 2011-15 Fraunhofer ISE * * This file is part of OpenMUC. * For more information visit http://www.openmuc.org diff --git a/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/json/JsonFieldInformation.java b/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/json/JsonFieldInformation.java index 3b2d362b..04b0e84f 100644 --- a/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/json/JsonFieldInformation.java +++ b/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/json/JsonFieldInformation.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-14 Fraunhofer ISE + * Copyright 2011-15 Fraunhofer ISE * * This file is part of OpenMUC. * For more information visit http://www.openmuc.org diff --git a/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/json/JsonObject.java b/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/json/JsonObject.java index d16ac734..3b97d473 100644 --- a/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/json/JsonObject.java +++ b/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/json/JsonObject.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-14 Fraunhofer ISE + * Copyright 2011-15 Fraunhofer ISE * * This file is part of OpenMUC. * For more information visit http://www.openmuc.org diff --git a/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/json/JsonObjectMap.java b/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/json/JsonObjectMap.java index 381fd60e..1b8194fd 100644 --- a/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/json/JsonObjectMap.java +++ b/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/json/JsonObjectMap.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-14 Fraunhofer ISE + * Copyright 2011-15 Fraunhofer ISE * * This file is part of OpenMUC. * For more information visit http://www.openmuc.org diff --git a/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/json/JsonReader.java b/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/json/JsonReader.java index 23a340b4..9b84edcd 100644 --- a/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/json/JsonReader.java +++ b/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/json/JsonReader.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-14 Fraunhofer ISE + * Copyright 2011-15 Fraunhofer ISE * * This file is part of OpenMUC. * For more information visit http://www.openmuc.org @@ -38,8 +38,7 @@ private static JsonObjectMap FieldValueReader() { Pattern FieldValueObjetPattern = Pattern.compile("((\\[)|(:)|(,))\\{.*?\\}((\\])|(})|(,))"); Pattern FieldValueArrayPattern = Pattern.compile("((\\[)|(:)|(,))\\[.*?\\]((\\])|(})|(,))"); Pattern FieldValueNumberPattern = Pattern - .compile( - "((\\[)|(:)|(,))(((-)|(\\+)){0,1})([0-9]{0,})([.eE]{0,1})([0-9]+)((\\])|(})|(,))"); + .compile("((\\[)|(:)|(,))(((-)|(\\+)){0,1})([0-9]{0,})([.eE]{0,1})([0-9]+)((\\])|(})|(,))"); Matcher matcher; ArrayList arrayList = new ArrayList(tmpMap.keySet()); @@ -164,9 +163,7 @@ private static LinkedHashMap FieldNameReader() { tmpText = tmpText.replace(foundField, ""); foundField = foundField.replace("\"", "").replace(":", ""); - JsonFieldInformation jfi = new JsonFieldInformation(level, - foundField, - expectedType(next)); + JsonFieldInformation jfi = new JsonFieldInformation(level, foundField, expectedType(next)); tmpMap.put(jfi, endIndex); @@ -223,24 +220,24 @@ private static int determineNbrTab(String text) { private static JsonTextType expectedType(char next) { switch (next) { - case '\"': - return JsonTextType.JsonString; - case '{': - return JsonTextType.JsonObject; - case '[': - return JsonTextType.JsonArray; - case 'f': - return JsonTextType.JsonFalse; - case 't': - return JsonTextType.JsonTrue; - case 'n': - return JsonTextType.JsonNull; - default: - if (Character.isDigit(next)) { - return JsonTextType.JsonNumber; - } else { - return null; - } + case '\"': + return JsonTextType.JsonString; + case '{': + return JsonTextType.JsonObject; + case '[': + return JsonTextType.JsonArray; + case 'f': + return JsonTextType.JsonFalse; + case 't': + return JsonTextType.JsonTrue; + case 'n': + return JsonTextType.JsonNull; + default: + if (Character.isDigit(next)) { + return JsonTextType.JsonNumber; + } else { + return null; + } } } diff --git a/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/json/JsonText.java b/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/json/JsonText.java index 0a8bdcbd..9adcb399 100644 --- a/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/json/JsonText.java +++ b/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/json/JsonText.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-14 Fraunhofer ISE + * Copyright 2011-15 Fraunhofer ISE * * This file is part of OpenMUC. * For more information visit http://www.openmuc.org diff --git a/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/json/JsonTextType.java b/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/json/JsonTextType.java index 54e94285..009529a9 100644 --- a/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/json/JsonTextType.java +++ b/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/json/JsonTextType.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-14 Fraunhofer ISE + * Copyright 2011-15 Fraunhofer ISE * * This file is part of OpenMUC. * For more information visit http://www.openmuc.org diff --git a/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/json/JsonWriter.java b/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/json/JsonWriter.java index 70bb4b8c..2c7ce480 100644 --- a/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/json/JsonWriter.java +++ b/demo/projects/restclientdemo/src/main/java/org/openmuc/framework/demo/restclient/json/JsonWriter.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-14 Fraunhofer ISE + * Copyright 2011-15 Fraunhofer ISE * * This file is part of OpenMUC. * For more information visit http://www.openmuc.org diff --git a/demo/projects/simpleappdemo/build.gradle b/demo/projects/simpleappdemo/build.gradle index 6d7ab93a..b1b420a2 100644 --- a/demo/projects/simpleappdemo/build.gradle +++ b/demo/projects/simpleappdemo/build.gradle @@ -3,7 +3,7 @@ apply plugin: 'eclipse' apply plugin: 'osgi' apply plugin: 'maven' -version = '0.13.1' +version = '0.14.0' group = 'org.openmuc.framework' def bundleSymbolicName = 'org.openmuc.framework.demo.simpleapp' def bundleName = 'Simple App Demo' @@ -23,7 +23,7 @@ dependencies { compile group: 'org.osgi', name: 'org.osgi.core', version: '4.3.1' compile group: 'org.osgi', name: 'org.osgi.compendium', version: '4.3.1' compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.2' - compile group: 'org.openmuc.framework', name: 'openmuc-core-api', version: '0.13.1' + compile group: 'org.openmuc.framework', name: 'openmuc-core-api', version: '0.14.0' } jar { diff --git a/demo/projects/simpleappdemo/src/main/java/org/openmuc/framework/demo/simpleapp/SimpleDemoApp.java b/demo/projects/simpleappdemo/src/main/java/org/openmuc/framework/demo/simpleapp/SimpleDemoApp.java index 9bfdc8b2..cc951f90 100644 --- a/demo/projects/simpleappdemo/src/main/java/org/openmuc/framework/demo/simpleapp/SimpleDemoApp.java +++ b/demo/projects/simpleappdemo/src/main/java/org/openmuc/framework/demo/simpleapp/SimpleDemoApp.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-14 Fraunhofer ISE + * Copyright 2011-15 Fraunhofer ISE * * This file is part of OpenMUC. * For more information visit http://www.openmuc.org @@ -71,8 +71,7 @@ protected void deactivate(ComponentContext context) { interrupt(); try { this.join(); - } - catch (InterruptedException e) { + } catch (InterruptedException e) { } } @@ -102,19 +101,13 @@ public void run() { channel6 = dataAccessService.getChannel(channelId6); while (!deactivatedSignal && (channel1 == null || channel2 == null || channel3 == null)) { - String errorMessage = "Channel " - + channelId1 - + " or " - + channelId2 - + " or " - + channelId3 - + " not found, will try again in 5 seconds."; + String errorMessage = "Channel " + channelId1 + " or " + channelId2 + " or " + channelId3 + " not found, will try again in 5 " + + "seconds."; logger.error(errorMessage); try { Thread.sleep(5000); - } - catch (InterruptedException e) { + } catch (InterruptedException e) { logger.info("DemoApp thread interrupted: will stop"); } @@ -170,18 +163,7 @@ public void run() { long time = cal.getTimeInMillis(); if ((cal.get(Calendar.MINUTE) % 2) > 0) { valueChannel5 = "Teststring"; - byte[] valueChannel6 = {0x00, - 0x01, - 0x09, - 0x0A, - 0x0F, - 0x10, - 0x11, - 0x7F, - -0x7F, - -0x51, - -0x10, - -0x01}; + byte[] valueChannel6 = {0x00, 0x01, 0x09, 0x0A, 0x0F, 0x10, 0x11, 0x7F, -0x7F, -0x51, -0x10, -0x01}; channel6.setLatestRecord(new Record(new ByteArrayValue(valueChannel6), time)); } else { valueChannel5 = "Test"; @@ -200,31 +182,19 @@ public void run() { printCounter++; if (printCounter > 20) { - logger.debug(channelId1 - + ": " - + valueChannel1 - + " " - + channelId2 - + ": " - + valueChannel2 - + " " - + channelId3 - + ": " - + valueChannel3 - + " state: " - + state); + logger.debug( + channelId1 + ": " + valueChannel1 + " " + channelId2 + ": " + valueChannel2 + " " + channelId3 + ": " + + valueChannel3 + " state: " + state); printCounter = 0; } - } - catch (Exception e) { + } catch (Exception e) { logger.error("something went wrong..."); } try { Thread.sleep(100); - } - catch (InterruptedException e) { + } catch (InterruptedException e) { logger.info("DemoApp thread interrupted"); } } diff --git a/doc/CHANGELOG.txt b/doc/CHANGELOG.txt index c89ac1b3..81e9f2a0 100644 --- a/doc/CHANGELOG.txt +++ b/doc/CHANGELOG.txt @@ -1,3 +1,10 @@ +v0.14.0 24-Feb-2015 +------------------- +- added wirless M-Bus driver +- modified driver API +- improved REST server +- some bug fixes in ASCII logger + v0.13.1 17-Oct-2014 ------------------- - improvements to some drivers (M-Bus, IEC 62056-21 Modbus RTU) diff --git a/doc/userguide/openmuc-doc-frames.html b/doc/userguide/openmuc-doc-frames.html index 87075841..2ad3ae49 100644 --- a/doc/userguide/openmuc-doc-frames.html +++ b/doc/userguide/openmuc-doc-frames.html @@ -7,13 +7,13 @@ OpenMUC User Guide
Useful Information
When you use felix:update or felix:uninstall, the changes appear to take effect immediately, but in reality the changes are only partially enacted. If a bundle is updated or uninstalled and it was exporting packages, these packages are not - removed until the framework is refreshed using the PackageAdmin - service. The Felix shell offers a convenient refresh command for this - purpose. This is the correct behavior as defined by the OSGi specification. + removed until the framework is refreshed using the PackageAdmin service. The Felix shell offers a convenient + refresh command for this purpose. This is the correct behavior as defined by the OSGi specification.