Skip to content
This repository has been archived by the owner on Jul 18, 2022. It is now read-only.

Commit

Permalink
reformatting (spaces instead of tabs)
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/clerezza/trunk@1538292 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
retog committed Nov 2, 2013
1 parent 518f06d commit ad8555d
Showing 1 changed file with 29 additions and 29 deletions.
58 changes: 29 additions & 29 deletions shell/src/main/scala/org/apache/clerezza/shell/OsgiDsl.scala
Expand Up @@ -27,41 +27,41 @@ import org.osgi.service.component.ComponentContext
import scala.collection.JavaConversions._

class OsgiDsl(context: ComponentContext, outputStream: OutputStream)
extends ServicesDsl(context.getBundleContext) {
extends ServicesDsl(context.getBundleContext) {

lazy val out = new PrintWriter(new OutputStreamWriter(outputStream, "utf-8"), true)
val bundleContext = context.getBundleContext
lazy val out = new PrintWriter(new OutputStreamWriter(outputStream, "utf-8"), true)
val bundleContext = context.getBundleContext

def ps = {
for (b <- bundleContext.getBundles) {out.println(b.getBundleId+" - "+b.getSymbolicName+" "+b.getLocation)}
}
def ps = {
for (b <- bundleContext.getBundles) {out.println(b.getBundleId+" - "+b.getSymbolicName+" "+b.getLocation)}
}

def install(uri: String) = {
bundleContext.installBundle(uri)
}
def install(uri: String) = {
bundleContext.installBundle(uri)
}

def start(uri: String) = {
val b = install(uri)
b.start()
b
}
def start(uri: String) = {
val b = install(uri)
b.start()
b
}

def update(pattern: String) = {
for (b <- bundleContext.getBundles; if (b.getLocation.matches(pattern))) {
out.println("updating "+b.getLocation)
b.update()
}
}
def update(pattern: String) = {
for (b <- bundleContext.getBundles; if (b.getLocation.matches(pattern))) {
out.println("updating "+b.getLocation)
b.update()
}
}

def headers(bundleId: Int) {
headers(bundleContext.getBundle(bundleId))
}
def headers(bundleId: Int) {
headers(bundleContext.getBundle(bundleId))
}

def headers(bundle: Bundle) {
for ((k,v) <- bundle.getHeaders) {out.println(k+" = "+v) }
}
def headers(bundle: Bundle) {
for ((k,v) <- bundle.getHeaders) {out.println(k+" = "+v) }
}

def shutdown {
bundleContext.getBundle(0).stop()
}
def shutdown {
bundleContext.getBundle(0).stop()
}
}

0 comments on commit ad8555d

Please sign in to comment.