http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30947fd7/com.ibm.team.juno.microservice/bin/.gitignore ---------------------------------------------------------------------- diff --git a/com.ibm.team.juno.microservice/bin/.gitignore b/com.ibm.team.juno.microservice/bin/.gitignore deleted file mode 100644 index c2d9872..0000000 --- a/com.ibm.team.juno.microservice/bin/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/com/
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30947fd7/com.ibm.team.juno.microservice/build.properties ---------------------------------------------------------------------- diff --git a/com.ibm.team.juno.microservice/build.properties b/com.ibm.team.juno.microservice/build.properties index f32e521..8fe52e5 100755 --- a/com.ibm.team.juno.microservice/build.properties +++ b/com.ibm.team.juno.microservice/build.properties @@ -1,15 +1,17 @@ -############################################################################### -# -# Licensed Materials - Property of IBM -# (c) Copyright IBM Corporation 2015. All Rights Reserved. -# -# Note to U.S. Government Users Restricted Rights: -# Use, duplication or disclosure restricted by GSA ADP Schedule -# Contract with IBM Corp. -# -############################################################################### -source.. = src/ -output.. = bin/ +# *************************************************************************************************************************** +# * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file * +# * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file * +# * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance * +# * with the License. You may obtain a copy of the License at * +# * * +# * http://www.apache.org/licenses/LICENSE-2.0 * +# * * +# * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an * +# * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * +# * specific language governing permissions and limitations under the License. * +# *************************************************************************************************************************** +source.. = src/main/java +output.. = target/classes bin.includes = META-INF/,\ . jar = microservice.jar http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30947fd7/com.ibm.team.juno.microservice/src/com/ibm/juno/microservice/Microservice.java ---------------------------------------------------------------------- diff --git a/com.ibm.team.juno.microservice/src/com/ibm/juno/microservice/Microservice.java b/com.ibm.team.juno.microservice/src/com/ibm/juno/microservice/Microservice.java deleted file mode 100755 index c175f5f..0000000 --- a/com.ibm.team.juno.microservice/src/com/ibm/juno/microservice/Microservice.java +++ /dev/null @@ -1,521 +0,0 @@ -/******************************************************************************* - * Licensed Materials - Property of IBM - * © Copyright IBM Corporation 2015. All Rights Reserved. - * - * The source code for this program is not published or otherwise - * divested of its trade secrets, irrespective of what has been - * deposited with the U.S. Copyright Office. - *******************************************************************************/ -package com.ibm.juno.microservice; - -import java.io.Console; -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.net.URL; -import java.net.URLClassLoader; -import java.util.Map; -import java.util.Set; -import java.util.jar.Manifest; - -import com.ibm.juno.core.ObjectMap; -import com.ibm.juno.core.utils.*; -import com.ibm.juno.core.ini.ConfigFile; -import com.ibm.juno.core.ini.ConfigFileListener; -import com.ibm.juno.core.ini.ConfigMgr; - -/** - * Parent class for all microservices. - * <p> - * A microservice defines a simple API for starting and stopping simple Java services - * contained in executable jars. - * <p> - * The general command for invoking these services is... - * <p class='bcode'> - * java -jar mymicroservice.jar [mymicroservice.cfg] - * </p> - * <p> - * Your microservice class must be specified as the <jk>Main-Class</jk> entry in - * the manifest file of your microservice jar file. - * - * <h6 class='topic'>Microservice Configuration</h6> - * - * This class defines the following method for accessing configuration for your microservice: - * <p> - * <ul> - * <li>{@link #getArgs()} - The command-line arguments passed to the jar file. - * <li>{@link #getConfig()} - An external INI-style configuration file. - * <li>{@link #getManifest()} - The manifest file for the main jar file. - * </ul> - * - * <h6 class='topic'>Entrypoint Method</h6> - * - * Subclasses must implement a static void main method as the entry point for the microservice. - * Typically, this method will simply consist of the following... - * <p> - * <p class='bcode'> - * <jk>public static void</jk> main(String[] args) <jk>throws</jk> Exception { - * <jk>new</jk> MyMicroservice(args).start(); - * } - * </p> - * - * <h6 class='topic'>Lifecycle Methods</h6> - * - * Subclasses must implement the following lifecycle methods: - * <p> - * <ul> - * <li>{@link #start()} - Gets executed during startup. - * <li>{@link #stop()} - Gets executed when 'exit' is typed in the console or an external shutdown signal is received. - * <li>{@link #kill()} - Can be used to forcibly shut down the service. Doesn't get called during normal operation. - * </ul> - * - * <h6 class='topic'>Lifecycle Listener Methods</h6> - * - * Subclasses can optionally implement the following event listener methods: - * <p> - * <ul> - * <li>{@link #onStart()} - Gets executed before {@link #start()}. - * <li>{@link #onStop()} - Gets executed before {@link #stop()}. - * <li>{@link #onConfigSave(ConfigFile)} - Gets executed after a config file has been saved. - * <li>{@link #onConfigChange(ConfigFile, Set)} - Gets executed after a config file has been modified. - * </ul> - * - * <h6 class='topic'>Other Methods</h6> - * - * Subclasses can optionally override the following methods to provide customized behavior: - * <p> - * <ul> - * <li>{@link #createVarResolver()} - Creates the {@link StringVarResolver} used to resolve variables in the config file returned by {@link #getConfig()}. - * </ul> - * - * @author [email protected] - */ -public abstract class Microservice { - - private static Args args; - private static ConfigFile cf; - private static ObjectMap mf; - - /** - * Constructor. - * - * @param args2 Command line arguments. - * @throws Exception - */ - protected Microservice(String[] args2) throws Exception { - Microservice.args = new Args(args2); - - // -------------------------------------------------------------------------------- - // Try to get the manifest file. - // -------------------------------------------------------------------------------- - Manifest m = new Manifest(); - - // If running within an eclipse workspace, need to get it from the file system. - File f = new File("META-INF/MANIFEST.MF"); - if (f.exists()) { - try { - m.read(new FileInputStream(f)); - } catch (IOException e) { - System.err.println("Problem detected in MANIFEST.MF. Contents below:\n" + IOUtils.read(f)); - throw e; - } - } else { - // Otherwise, read from manifest file in the jar file containing the main class. - URLClassLoader cl = (URLClassLoader)getClass().getClassLoader(); - URL url = cl.findResource("META-INF/MANIFEST.MF"); - if (url != null) { - try { - m.read(url.openStream()); - } catch (IOException e) { - System.err.println("Problem detected in MANIFEST.MF. Contents below:\n" + IOUtils.read(url.openStream())); - throw e; - } - } - } - mf = new ObjectMap(); - for (Map.Entry<Object,Object> e : m.getMainAttributes().entrySet()) - mf.put(e.getKey().toString(), e.getValue().toString()); - - // -------------------------------------------------------------------------------- - // Find config file. - // Can either be passed in as first parameter, or we discover it using - // the 'sun.java.command' system property. - // -------------------------------------------------------------------------------- - String cFile = null; - if (args.hasArg(0)) - cFile = args.getArg(0); - else if (mf.containsKey("Main-ConfigFile")) - cFile = mf.getString("Main-ConfigFile"); - else { - String cmd = System.getProperty("sun.java.command", "not_found").split("\\s+")[0]; - if (cmd.endsWith(".jar")) - cFile = cmd.replace(".jar", ".cfg"); - } - - if (cFile == null) { - System.err.println("Running class ["+getClass().getSimpleName()+"] without a config file."); - cf = ConfigMgr.DEFAULT.create(); - } else { - System.out.println("Running class ["+getClass().getSimpleName()+"] using config file ["+cFile+"]"); - System.setProperty("juno.configFile", cFile); - cf = ConfigMgr.DEFAULT.get(cFile).getResolving(createVarResolver()); - } - - // -------------------------------------------------------------------------------- - // Set system properties. - // -------------------------------------------------------------------------------- - Set<String> spKeys = cf.getSectionKeys("SystemProperties"); - if (spKeys != null) - for (String key : spKeys) - System.setProperty(key, cf.get("SystemProperties", key)); - - // -------------------------------------------------------------------------------- - // Add a config file change listener. - // -------------------------------------------------------------------------------- - cf.addListener(new ConfigFileListener() { - @Override /* ConfigFileListener */ - public void onSave(ConfigFile cf) { - onConfigSave(cf); - } - @Override /* ConfigFileListener */ - public void onChange(ConfigFile cf, Set<String> changes) { - onConfigChange(cf, changes); - } - }); - - // -------------------------------------------------------------------------------- - // Add exit listeners. - // -------------------------------------------------------------------------------- - new Thread() { - @Override /* Thread */ - public void run() { - Console c = System.console(); - if (c == null) - System.out.println("No available console."); - else { - while (true) { - String l = c.readLine("\nEnter 'exit' to exit.\n"); - if (l == null || l.equals("exit")) { - Microservice.this.stop(); - break; - } - } - } - } - }.start(); - Runtime.getRuntime().addShutdownHook( - new Thread() { - @Override /* Thread */ - public void run() { - Microservice.this.stop(); - } - } - ); - } - - /** - * Creates the {@link StringVarResolver} used to resolve variables in the - * config file returned by {@link #getConfig()}. - * <p> - * The default implementation resolves the following variables: - * <ul> - * <li><code>$S{key}</code>, <code>$S{key,default}</code> - System properties. - * <li><code>$E{key}</code>, <code>$E{key,default}</code> - Environment variables. - * <li><code>$C{key}</code>, <code>$C{key,default}</code> - Config file entries. - * <li><code>$MF{key}</code>, <code>$MF{key,default}</code> - Manifest file entries. - * <li><code>$ARG{key}</code>, <code>$ARG{key,default}</code> - Command-line arguments. - * </ul> - * <p> - * Subclasses can override this method to provide their own variables. - * <dl> - * <dt>Examples:</dt> - * <dd> - * <p class='bcode'> - * <jd>/** - * * Augment default var resolver with a custom $B{...} variable that simply wraps strings inside square brackets. - * * /</jd> - * <ja>@Override</ja> <jc>// Microservice</jc> - * <jk>protected</jk> StringVarResolver createVarResolver() { - * <jk>return super</jk>.createVarResolver() - * .addVar(<js>"B"</js>, - * <jk>new</jk> StringVarWithDefault() { - * <ja>@Override</ja> <jc>// StringVar</jc> - * <jk>public</jk> String resolve(String varVal) { - * <jk>return</jk> <js>'['</js> + varVal + <js>']'</js>; - * } - * } - * ); - * } - * </p> - * <p class='bcode'> - * <cc># Example config file</cc> - * <cs>[MySection]</cs> - * <ck>myEntry</ck> = $B{foo} - * </p> - * <p class='bcode'> - * <jc>// Example java code</jc> - * String myentry = getConfig().getString(<js>"MySection/myEntry"</js>); <jc>// == "[foo]"</js> - * </p> - * </dd> - * </dl> - * - * @return A new {@link StringVarResolver}. - */ - protected StringVarResolver createVarResolver() { - return new StringVarResolver(StringVarResolver.DEFAULT) - .addVar("C", - new StringVarWithDefault() { - @Override /* StringVar */ - public String resolve(String varVal) { - return cf.getString(varVal); - } - } - ) - .addVar("MF", - new StringVarWithDefault() { - @Override /* StringVar */ - public String resolve(String varVal) { - if (mf == null) - return null; - return mf.getString(varVal); - } - } - ) - .addVar("ARG", - new StringVarWithDefault() { - @Override /* StringVar */ - public String resolve(String varVal) { - if (args == null) - return null; - return args.getString(varVal); - } - } - ); - } - - /** - * Returns the command-line arguments passed into the application. - * <p> - * This method can be called from the class constructor. - * <p> - * See {@link Args} for details on using this method. - * - * @return The command-line arguments passed into the application. - */ - protected static Args getArgs() { - return args; - } - - /** - * Overrides the value returned by {@link #getArgs()}. - * - * @param args The new arguments. - * @return This object (for method chaining). - */ - protected Microservice setArgs(String[] args) { - Microservice.args = new Args(args); - return this; - } - - /** - * Returns the external INI-style configuration file that can be used to configure your microservice. - * <p> - * The config file location is determined in the following order: - * <ol class='spaced-list'> - * <li>The first argument passed to the microservice jar. - * <li>The <code>Main-ConfigFile</code> entry in the microservice jar manifest file. - * <li>The name of the microservice jar with a <js>".cfg"</js> suffix (e.g. <js>"mymicroservice.jar"</js>-><js>"mymicroservice.cfg"</js>). - * </ol> - * <p> - * If all methods for locating the config file fail, then this method returns <jk>null</jk>. - * <p> - * Subclasses can set their own config file by calling the {@link #setConfig(ConfigFile)} method. - * <p> - * String variables defined by {@link #createVarResolver()} are automatically resolved when using this method. - * <p> - * This method can be called from the class constructor. - * <dl> - * <dt>Examples:</dt> - * <dd> - * <p class='bcode'> - * <cc>#--------------------------</cc> - * <cc># My section</cc> - * <cc>#--------------------------</cc> - * <cs>[MySection]</cs> - * - * <cc># An integer</cc> - * <ck>anInt</ck> = 1 - * - * <cc># A boolean</cc> - * <ck>aBoolean</ck> = true - * - * <cc># An int array</cc> - * <ck>anIntArray</ck> = 1,2,3 - * - * <cc># A POJO that can be converted from a String</cc> - * <ck>aURL</ck> = http://foo - * - * <cc># A POJO that can be converted from JSON</cc> - * <ck>aBean</ck> = {foo:'bar',baz:123} - * - * <cc># A system property</cc> - * <ck>locale</ck> = $S{java.locale, en_US} - * - * <cc># An environment variable</cc> - * <ck>path</ck> = $E{PATH, unknown} - * - * <cc># A manifest file entry</cc> - * <ck>mainClass</ck> = $MF{Main-Class} - * - * <cc># Another value in this config file</cc> - * <ck>sameAsAnInt</ck> = $C{MySection/anInt} - * - * <cc># A command-line argument in the form "myarg=foo"</cc> - * <ck>myArg</ck> = $ARG{myarg} - * - * <cc># The first command-line argument</cc> - * <ck>firstArg</ck> = $ARG{0} - * - * <cc># Look for system property, or env var if that doesn't exist, or command-line arg if that doesn't exist.</cc> - * <ck>nested</ck> = $S{mySystemProperty,$E{MY_ENV_VAR,$ARG{0}}} - * - * <cc># A POJO with embedded variables</cc> - * <ck>aBean2</ck> = {foo:'$ARG{0}',baz:$C{MySection/anInt}} - * - * </p> - * <p class='bcode'> - * <jc>// Java code for accessing config entries above.</jc> - * ConfigFile cf = getConfig(); - * - * <jk>int</jk> anInt = cf.getInt(<js>"MySection/anInt"</js>); - * <jk>boolean</jk> aBoolean = cf.getBoolean(<js>"MySection/aBoolean"</js>); - * <jk>int</jk>[] anIntArray = cf.getObject(<jk>int</jk>[].<jk>class</jk>, <js>"MySection/anIntArray"</js>); - * URL aURL = cf.getObject(URL.<jk>class</jk>, <js>"MySection/aURL"</js>); - * MyBean aBean = cf.getObject(MyBean.<jk>class</jk>, <js>"MySection/aBean"</js>); - * Locale locale = cf.getObject(Locale.<jk>class</jk>, <js>"MySection/locale"</js>); - * String path = cf.getString(<js>"MySection/path"</js>); - * String mainClass = cf.getString(<js>"MySection/mainClass"</js>); - * <jk>int</jk> sameAsAnInt = cf.getInt(<js>"MySection/sameAsAnInt"</js>); - * String myArg = cf.getString(<js>"MySection/myArg"</js>); - * String firstArg = cf.getString(<js>"MySection/firstArg"</js>); - * </p> - * </dd> - * </dl> - * - * @return The config file for this application, or <jk>null</jk> if no config file is configured. - */ - protected static ConfigFile getConfig() { - return cf; - } - - /** - * Overrides the value returned by {@link #getConfig()}. - * - * @param cf The config file for this application, or <jk>null</jk> if no config file is configured. - * @return This object (for method chaining). - */ - protected Microservice setConfig(ConfigFile cf) { - Microservice.cf = cf; - return this; - } - - /** - * Returns the main jar manifest file contents as a simple {@link ObjectMap}. - * <p> - * This map consists of the contents of {@link Manifest#getMainAttributes()} with the keys - * and entries converted to simple strings. - * <p> - * This method can be called from the class constructor. - * <dl> - * <dt>Examples:</dt> - * <dd> - * <p class='bcode'> - * <jc>// Get Main-Class from manifest file.</jc> - * String mainClass = Microservice.<jsm>getManifest</jsm>().getString(<js>"Main-Class"</js>, <js>"unknown"</js>); - * - * <jc>// Get Rest-Resources from manifest file.</jc> - * String[] restResources = Microservice.<jsm>getManifest</jsm>().getStringArray(<js>"Rest-Resources"</js>); - * </p> - * </dd> - * </dl> - * - * @return The manifest file from the main jar, or <jk>null</jk> if the manifest file could not be retrieved. - */ - protected static ObjectMap getManifest() { - return mf; - } - - //-------------------------------------------------------------------------------- - // Abstract lifecycle methods. - //-------------------------------------------------------------------------------- - - /** - * Start this application. - * <p> - * Default implementation simply calls {@link #onStart()}. - * <p> - * Overridden methods MUST call this method FIRST so that the {@link #onStart()} method is called. - * - * @throws Exception - */ - protected void start() throws Exception { - onStart(); - } - - /** - * Stop this application. - * <p> - * Default implementation simply calls {@link #onStop()}. - * <p> - * Overridden methods MUST call this method LAST so that the {@link #onStop()} method is called. - */ - protected void stop() { - onStop(); - } - - /** - * Kill the JVM by calling <code>System.exit(2);</code>. - */ - protected void kill() { - // This triggers the shutdown hook. - System.exit(2); - } - - //-------------------------------------------------------------------------------- - // Lifecycle listener methods. - // Subclasses can override these methods to run code on certain events. - //-------------------------------------------------------------------------------- - - /** - * Called at the beginning of the {@link #start()} call. - * <p> - * Subclasses can override this method to hook into the lifecycle of this application. - */ - protected void onStart() {} - - /** - * Called at the end of the {@link #stop()} call. - * <p> - * Subclasses can override this method to hook into the lifecycle of this application. - */ - protected void onStop() {} - - /** - * Called if the {@link ConfigFile#save()} is called on the config file. - * <p> - * Subclasses can override this method to listen for config file changes. - * - * @param cf The config file. - */ - protected void onConfigSave(ConfigFile cf) {} - - /** - * Called if one or more changes occur in the config file. - * <p> - * Subclasses can override this method to listen for config file changes. - * - * @param cf The config file. - * @param changes The list of keys in the config file being changed. - */ - protected void onConfigChange(ConfigFile cf, Set<String> changes) {} -} http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30947fd7/com.ibm.team.juno.microservice/src/com/ibm/juno/microservice/Resource.java ---------------------------------------------------------------------- diff --git a/com.ibm.team.juno.microservice/src/com/ibm/juno/microservice/Resource.java b/com.ibm.team.juno.microservice/src/com/ibm/juno/microservice/Resource.java deleted file mode 100755 index cce3bc8..0000000 --- a/com.ibm.team.juno.microservice/src/com/ibm/juno/microservice/Resource.java +++ /dev/null @@ -1,67 +0,0 @@ -/******************************************************************************* - * Licensed Materials - Property of IBM - * © Copyright IBM Corporation 2015, 2016. All Rights Reserved. - * - * The source code for this program is not published or otherwise - * divested of its trade secrets, irrespective of what has been - * deposited with the U.S. Copyright Office. - *******************************************************************************/ -package com.ibm.juno.microservice; -import static com.ibm.juno.core.html.HtmlDocSerializerProperties.*; - -import com.ibm.juno.core.utils.*; -import com.ibm.juno.server.*; -import com.ibm.juno.server.annotation.*; - -/** - * Superclass for all REST resources. - * <p> - * In additional to the functionality of the {@link RestServletDefault} group, - * augments the {@link #createVarResolver()} method with the following additional variable types: - * <ul class='spaced-list'> - * <li><code class='snippet'>$ARG{...}</code> - Command line arguments pulled from {@link Microservice#getArgs()}.<br> - * <h6 class='figure'>Example:</h6> - * <p class='bcode'> - * String firstArg = request.getVarResolver().resolve(<js>"$ARG{0}"</js>); <jc>// First argument.</jc> - * String namedArg = request.getVarResolver().resolve(<js>"$ARG{myarg}"</js>); <jc>// Named argument (e.g. "myarg=foo"). </jc> - * </p> - * <li><code class='snippet'>$MF{...}</code> - Manifest file entries pulled from {@link Microservice#getManifest()}.<br> - * <h6 class='figure'>Example:</h6> - * <p class='bcode'> - * String mainClass = request.getVarResolver().resolve(<js>"$MF{Main-Class}"</js>); <jc>// Main class. </jc> - * </p> - * </ul> - * - * @author James Bognar ([email protected]) - */ -@SuppressWarnings("serial") -@RestResource( - properties={ - @Property(name=HTMLDOC_links, value="{up:'$R{requestParentURI}',options:'$R{servletURI}?method=OPTIONS'}") - }, - config="$S{juno.configFile}", - stylesheet="$C{REST/stylesheet,styles/juno.css}" -) -public abstract class Resource extends RestServletDefault { - - /** - * Adds $ARG and $MF variables to variable resolver defined on {@link RestServlet#createVarResolver()}. - */ - @Override - protected StringVarResolver createVarResolver() { - StringVarResolver r = super.createVarResolver(); - - // Command-line arguments. - r.addVar("ARG", new StringVarWithDefault() { - @Override /* StringVar */ - public String resolve(String varVal) { - return Microservice.getArgs().getArg(varVal); - } - }); - - // Manifest file entries. - r.addVar("MF", new StringMapVar(Microservice.getManifest())); - - return r; - } -} http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30947fd7/com.ibm.team.juno.microservice/src/com/ibm/juno/microservice/ResourceGroup.java ---------------------------------------------------------------------- diff --git a/com.ibm.team.juno.microservice/src/com/ibm/juno/microservice/ResourceGroup.java b/com.ibm.team.juno.microservice/src/com/ibm/juno/microservice/ResourceGroup.java deleted file mode 100755 index db8f3d3..0000000 --- a/com.ibm.team.juno.microservice/src/com/ibm/juno/microservice/ResourceGroup.java +++ /dev/null @@ -1,66 +0,0 @@ -/******************************************************************************* - * Licensed Materials - Property of IBM - * © Copyright IBM Corporation 2015, 2016. All Rights Reserved. - * - * The source code for this program is not published or otherwise - * divested of its trade secrets, irrespective of what has been - * deposited with the U.S. Copyright Office. - *******************************************************************************/ -package com.ibm.juno.microservice; - -import static com.ibm.juno.core.html.HtmlDocSerializerProperties.*; - -import com.ibm.juno.core.utils.*; -import com.ibm.juno.server.*; -import com.ibm.juno.server.annotation.*; - -/** - * Superclass for all REST resource groups. - * <p> - * In additional to the functionality of the {@link RestServletGroupDefault} group, - * augments the {@link #createVarResolver()} method with the following additional variable types: - * <ul> - * <li><jk>$ARG{...}</jk> - Command line arguments.<br> - * Resolves values from {@link Microservice#getArgs()}.<br> - * <h6>Example:</h6> - * <p class='bcode'> - * String firstArg = request.getVarResolver().resolve(<js>"$ARG{0}"</js>); <jc>// First argument.</jc> - * String namedArg = request.getVarResolver().resolve(<js>"$ARG{myarg}"</js>); <jc>// Named argument (e.g. "myarg=foo"). </jc> - * </p> - * <li><jk>$MF{...}</jk> - Manifest file entries. - * <h6>Example:</h6> - * <p class='bcode'> - * String mainClass = request.getVarResolver().resolve(<js>"$MF{Main-Class}"</js>); <jc>// Main class. </jc> - * </p> - * </ul> - * - * @author James Bognar ([email protected]) - */ -@SuppressWarnings("serial") -@RestResource( - properties={ - @Property(name=HTMLDOC_links, value="{up:'$R{requestParentURI}',options:'$R{servletURI}?method=OPTIONS'}"), - }, - config="$S{juno.configFile}", - stylesheet="$C{REST/stylesheet,styles/juno.css}" -) -public abstract class ResourceGroup extends RestServletGroupDefault { - - @Override - protected StringVarResolver createVarResolver() { - StringVarResolver r = super.createVarResolver(); - - // Command-line arguments. - r.addVar("ARG", new StringVarWithDefault() { - @Override /* StringVar */ - public String resolve(String varVal) { - return Microservice.getArgs().getArg(varVal); - } - }); - - // Manifest file entries. - r.addVar("MF", new StringMapVar(Microservice.getManifest())); - - return r; - } -} http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30947fd7/com.ibm.team.juno.microservice/src/com/ibm/juno/microservice/ResourceJena.java ---------------------------------------------------------------------- diff --git a/com.ibm.team.juno.microservice/src/com/ibm/juno/microservice/ResourceJena.java b/com.ibm.team.juno.microservice/src/com/ibm/juno/microservice/ResourceJena.java deleted file mode 100755 index 153a000..0000000 --- a/com.ibm.team.juno.microservice/src/com/ibm/juno/microservice/ResourceJena.java +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Licensed Materials - Property of IBM - * © Copyright IBM Corporation 2015, 2016. All Rights Reserved. - * - * The source code for this program is not published or otherwise - * divested of its trade secrets, irrespective of what has been - * deposited with the U.S. Copyright Office. - *******************************************************************************/ -package com.ibm.juno.microservice; -import static com.ibm.juno.core.html.HtmlDocSerializerProperties.*; - -import com.ibm.juno.server.annotation.*; -import com.ibm.juno.server.jena.*; - -/** - * Superclass for all REST resources with RDF support. - * - * @author James Bognar ([email protected]) - */ -@SuppressWarnings("serial") -@RestResource( - properties={ - @Property(name=HTMLDOC_links, value="{up:'$R{requestParentURI}',options:'$R{servletURI}?method=OPTIONS'}") - }, - config="$S{juno.configFile}", - stylesheet="$C{REST/stylesheet,styles/juno.css}" -) -public abstract class ResourceJena extends RestServletJenaDefault {} http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30947fd7/com.ibm.team.juno.microservice/src/com/ibm/juno/microservice/RestMicroservice.java ---------------------------------------------------------------------- diff --git a/com.ibm.team.juno.microservice/src/com/ibm/juno/microservice/RestMicroservice.java b/com.ibm.team.juno.microservice/src/com/ibm/juno/microservice/RestMicroservice.java deleted file mode 100755 index 980f88c..0000000 --- a/com.ibm.team.juno.microservice/src/com/ibm/juno/microservice/RestMicroservice.java +++ /dev/null @@ -1,554 +0,0 @@ -/******************************************************************************* - * Licensed Materials - Property of IBM - * © Copyright IBM Corporation 2015. All Rights Reserved. - * - * The source code for this program is not published or otherwise - * divested of its trade secrets, irrespective of what has been - * deposited with the U.S. Copyright Office. - *******************************************************************************/ -package com.ibm.juno.microservice; - -import java.io.File; -import java.util.*; -import java.util.logging.*; - -import javax.servlet.Servlet; - -import org.eclipse.jetty.security.ConstraintMapping; -import org.eclipse.jetty.security.ConstraintSecurityHandler; -import org.eclipse.jetty.security.HashLoginService; -import org.eclipse.jetty.security.SecurityHandler; -import org.eclipse.jetty.security.authentication.BasicAuthenticator; -import org.eclipse.jetty.server.*; -import org.eclipse.jetty.server.ssl.SslSocketConnector; -import org.eclipse.jetty.servlet.*; -import org.eclipse.jetty.util.security.Constraint; -import org.eclipse.jetty.util.security.Credential; -import org.eclipse.jetty.util.ssl.SslContextFactory; - -import com.ibm.juno.core.ObjectMap; -import com.ibm.juno.core.ini.ConfigFile; -import com.ibm.juno.core.json.JsonSerializer; -import com.ibm.juno.core.parser.ParseException; -import com.ibm.juno.core.utils.*; -import com.ibm.juno.microservice.resources.LogEntryFormatter; -import com.ibm.juno.server.annotation.RestResource; - - -/** - * Entry point for Juno microservice that implements a REST interface using Jetty on a single port. - * - * <h6 class='topic'>Jetty Server Details</h6> - * <p> - * The Jetty server is created by the {@link #createServer()} method and started with the {@link #startServer()} method. - * These methods can be overridden to provided customized behavior. - * <p> - * - * <h6 class='topic'>Defining REST Resources</h6> - * <p> - * Top-level REST resources are defined by the {@link #getResourceMap()} method. - * This method can be overridden to provide a customized list of REST resources. - * <p> - * - * <h6 class='topic'>Logging</h6> - * <p> - * Logging is initialized by the {@link #initLogging()} method. - * This method can be overridden to provide customized logging behavior. - * - * <h6 class='topic'>Lifecycle Listener Methods</h6> - * Subclasses can optionally implement the following event listener methods: - * <ul> - * <li>{@link #onStart()} - Gets executed before {@link #start()}. - * <li>{@link #onStop()} - Gets executed before {@link #stop()}. - * <li>{@link #onCreateServer()} - Gets executed before {@link #createServer()}. - * <li>{@link #onStartServer()} - Gets executed before {@link #startServer()}. - * <li>{@link #onPostStartServer()} - Gets executed after {@link #startServer()}. - * <li>{@link #onStopServer()} - Gets executed before {@link #stop()}. - * <li>{@link #onPostStopServer()} - Gets executed after {@link #stop()}. - * </ul> - * - * @author [email protected] - */ -public class RestMicroservice extends Microservice { - - Server server; - int port; - Logger logger; - - /** - * Main method. - * Subclasses must also implement this method! - * - * @param args Command line arguments. - * @throws Exception - */ - public static void main(String[] args) throws Exception { - new RestMicroservice(args).start(); - } - - /** - * Constructor. - * - * @param args The command line arguments. - * @throws Exception - */ - public RestMicroservice(String[] args) throws Exception { - super(args); - } - - //-------------------------------------------------------------------------------- - // Methods implemented on Microservice API - //-------------------------------------------------------------------------------- - - @Override /* Microservice */ - protected void start() throws Exception { - super.start(); - initLogging(); - createServer(); - startServer(); - } - - @Override /* Microservice */ - public void stop() { - Thread t = new Thread() { - @Override /* Thread */ - public void run() { - try { - onStopServer(); - logger.warning("Stopping server."); - System.out.println(); - server.stop(); - logger.warning("Server stopped."); - onPostStopServer(); - } catch (Exception e) { - logger.log(Level.SEVERE, e.getLocalizedMessage(), e); - } - } - }; - t.start(); - try { - t.join(); - } catch (InterruptedException e) { - e.printStackTrace(); - } - super.stop(); - } - - //-------------------------------------------------------------------------------- - // RestMicroservice API methods. - //-------------------------------------------------------------------------------- - - /** - * Initialize the logging for this microservice. - * <p> - * Subclasses can override this method to provide customized logging. - * <p> - * The default implementation uses the <cs>Logging</cs> section in the config file to set up logging: - * <p class='bcode'> - * <cc>#================================================================================ - * # Logger settings - * # See FileHandler Java class for details. - * #================================================================================</cc> - * <cs>[Logging]</cs> - * - * <cc># The directory where to create the log file. - * # Default is ".".</cc> - * <ck>logDir</ck> = logs - * - * <cc># The name of the log file to create for the main logger. - * # The logDir and logFile make up the pattern that's passed to the FileHandler - * # constructor. - * # If value is not specified, then logging to a file will not be set up.</cc> - * <ck>logFile</ck> = microservice.%g.log - * - * <cc># Whether to append to the existing log file or create a new one. - * # Default is false.</cc> - * <ck>append</ck> = - * - * <cc># The SimpleDateFormat format to use for dates. - * # Default is "yyyy.MM.dd hh:mm:ss".</cc> - * <ck>dateFormat</ck> = - * - * <cc># The log message format. - * # The value can contain any of the following variables: - * # {date} - The date, formatted per dateFormat. - * # {class} - The class name. - * # {method} - The method name. - * # {logger} - The logger name. - * # {level} - The log level name. - * # {msg} - The log message. - * # {threadid} - The thread ID. - * # {exception} - The localized exception message. - * # Default is "[{date} {level}] {msg}%n".</cc> - * <ck>format</ck> = - * - * <cc># The maximum log file size. - * # Suffixes available for numbers. - * # See ConfigFile.getInt(String,int) for details. - * # Default is 1M.</cc> - * <ck>limit</ck> = 10M - * - * <cc># Max number of log files. - * # Default is 1.</cc> - * <ck>count</ck> = 5 - * - * <cc># Default log levels. - * # Keys are logger names. - * # Values are serialized Level POJOs.</cc> - * <ck>levels</ck> = { com.ibm.juno:'INFO' } - * - * <cc># Only print unique stack traces once and then refer to them by a simple 8 character hash identifier. - * # Useful for preventing log files from filling up with duplicate stack traces. - * # Default is false.</cc> - * <ck>useStackTraceHashes</ck> = true - * - * <cc># The default level for the console logger. - * # Default is WARNING.</cc> - * <ck>consoleLevel</ck> = WARNING - * </p> - * - * @throws Exception - */ - protected void initLogging() throws Exception { - ConfigFile cf = getConfig(); - logger = Logger.getLogger(""); - String logFile = cf.getString("Logging/logFile"); - if (! StringUtils.isEmpty(logFile)) { - LogManager.getLogManager().reset(); - String logDir = cf.getString("Logging/logDir", "."); - FileUtils.mkdirs(new File(logDir), false); - boolean append = cf.getBoolean("Logging/append"); - int limit = cf.getInt("Logging/limit", 1024*1024); - int count = cf.getInt("Logging/count", 1); - FileHandler fh = new FileHandler(logDir + '/' + logFile, limit, count, append); - - boolean useStackTraceHashes = cf.getBoolean("Logging/useStackTraceHashes"); - String format = cf.getString("Logging/format", "[{date} {level}] {msg}%n"); - String dateFormat = cf.getString("Logging/dateFormat", "yyyy.MM.dd hh:mm:ss"); - fh.setFormatter(new LogEntryFormatter(format, dateFormat, useStackTraceHashes)); - logger.addHandler(fh); - - ConsoleHandler ch = new ConsoleHandler(); - ch.setLevel(Level.parse(cf.getString("Logging/consoleLevel", "WARNING"))); - ch.setFormatter(new LogEntryFormatter(format, dateFormat, false)); - logger.addHandler(ch); - } - ObjectMap loggerLevels = cf.getObject(ObjectMap.class, "Logging/levels"); - if (loggerLevels != null) - for (String l : loggerLevels.keySet()) - Logger.getLogger(l).setLevel(loggerLevels.get(Level.class, l)); - } - - /** - * Method used to create (but not start) an instance of a Jetty server. - * <p> - * Subclasses can override this method to customize the Jetty server before it is started. - * <p> - * The default implementation is configured by the following values in the config file: - * <p> - * <p class='bcode'> - * <cc>#================================================================================ - * # REST settings - * #================================================================================</cc> - * <cs>[REST]</cs> - * - * <cc># The HTTP port number to use. - * # Default is Rest-Port setting in manifest file, or 8000.</cc> - * <ck>port</ck> = 10000 - * - * <cc># The context root of the Jetty server. - * # Default is Rest-ContextPath in manifest file, or "/".</cc> - * <ck>contextPath</ck> = 10000 - * - * <cc># Authentication: NONE, BASIC. - * # Default is Rest-AuthType in manifest file, or NONE.</cc> - * <ck>authType</ck> = NONE - * - * <cc># The BASIC auth username. - * # Default is Rest-LoginUser in manifest file.</cc> - * <ck>loginUser</ck> = - * - * <cc># The BASIC auth password. - * # Default is Rest-LoginPassword in manifest file.</cc> - * <ck>loginPassword</ck> = - * - * <cc># The BASIC auth realm. - * # Default is Rest-AuthRealm in manifest file.</cc> - * <ck>authRealm</ck> = - * - * <cc># Enable SSL support.</cc> - * <ck>useSsl</ck> = false - * - * <cc>#================================================================================ - * # Bean properties on the org.eclipse.jetty.util.ssl.SslSocketFactory class - * #-------------------------------------------------------------------------------- - * # Ignored if REST/useSsl is false. - * #================================================================================</cc> - * <cs>[REST-SslContextFactory]</cs> - * <ck>keyStorePath</ck> = client_keystore.jks - * <ck>keyStorePassword*</ck> = {HRAaRQoT} - * <ck>excludeCipherSuites</ck> = TLS_DHE.*, TLS_EDH.* - * <ck>excludeProtocols</ck> = SSLv3 - * <ck>allowRenegotiate</ck> = false - * </p> - * - * @return The newly-created server. - * @throws Exception - */ - protected Server createServer() throws Exception { - onCreateServer(); - - ConfigFile cf = getConfig(); - ObjectMap mf = getManifest(); - - port = cf.getInt("REST/port", mf.getInt("Rest-Port", 8000)); - String contextPath = cf.getString("REST/contextPath", mf.getString("Rest-ContextPath", "/")); - - if (cf.getBoolean("REST/useSsl")) { - - SslContextFactory sslContextFactory = new SslContextFactory(); - - // Write the properties in REST-SslContextFactory to the bean setters on sslContextFactory. - // Throws an exception if section contains unknown properties. - // Only look for bean properties of type String/String/boolean/int since class has multiple - // setters with the same name (e.g. setKeyStore(KeyStore) and setKeyStore(String)). - ObjectMap m = cf.writeProperties("REST-SslContextFactory", sslContextFactory, false, String.class, String[].class, boolean.class, int.class); - - // We're using Jetty 8 that doesn't allow regular expression matching in SslContextFactory.setExcludeCipherSuites(), - // so to prevent having the config file list all old cipher suites, exclude the known bad ones. - String[] excludeCipherSuites = ArrayUtils.combine( - StringUtils.split("SSL_RSA_WITH_DES_CBC_SHA,SSL_DHE_RSA_WITH_DES_CBC_SHA,SSL_DHE_DSS_WITH_DES_CBC_SHA,SSL_RSA_EXPORT_WITH_RC4_40_MD5,SSL_RSA_EXPORT_WITH_DES40_CBC_SHA,SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA,SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA,SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA,TLS_DHE_RSA_WITH_AES_256_CBC_SHA256,TLS_DHE_DSS_WITH_AES_256_CBC_SHA256,TLS_DHE_RSA_WITH_AES_256_CBC_SHA,TLS_DHE_DSS_WITH_AES_256_CBC_SHA,TLS_DHE_RSA_WITH_AES_128_CBC_SHA256,TLS_DHE_DSS_WITH_AES_128_CBC_SHA256,TLS_DHE_RSA_WITH_AES_128_CBC_SHA,TLS_DHE_DSS_WITH_AES_128_CBC_SHA", ','), - sslContextFactory.getExcludeCipherSuites() - ); - sslContextFactory.setExcludeCipherSuites(excludeCipherSuites); - - logger.log(Level.WARNING, "SSL properties set: {0}", JsonSerializer.DEFAULT_LAX.toString(m)); - - SslSocketConnector connector = new SslSocketConnector(sslContextFactory); - connector.setPort(port); - - server = new Server(); - server.setConnectors(new Connector[] { connector }); - - } else { - server = new Server(port); - } - - ServletContextHandler context = new ServletContextHandler(ServletContextHandler.SESSIONS); - - String authType = cf.getString("REST/authType", mf.getString("Rest-AuthType", "NONE")); - if (authType.equals("BASIC")) - context.setSecurityHandler(basicAuth(cf, mf)); - - context.setContextPath(contextPath); - server.setHandler(context); - - for (Map.Entry<String,Class<? extends Servlet>> e : getResourceMap().entrySet()) - context.addServlet(e.getValue(), e.getKey()).setInitOrder(0); - - return server; - } - - /** - * Method used to start the Jetty server created by {@link #createServer()}. - * <p> - * Subclasses can override this method to customize server startup. - * - * @throws Exception - */ - protected void startServer() throws Exception { - onStartServer(); - server.start(); - logger.warning("Server started on port " + port); - onPostStartServer(); - server.join(); - } - - /** - * Returns the resource map to use for this microservice. - * <p> - * <p> - * Subclasses can override this method to programmatically specify their resources. - * <p> - * The default implementation is configured by the following values in the config file: - * <p> - * <p class='bcode'> - * - * <cc>#================================================================================ - * # REST settings - * #================================================================================</cc> - * <cs>[REST]</cs> - * - * <cc># A JSON map of servlet paths to servlet classes. - * # Example: - * # resourceMap = {'/*':'com.ibm.MyServlet'} - * # Either resourceMap or resources must be specified if it's not defined in - * # the manifest file.</cc> - * <ck>resourceMap</ck> = - * - * <cc># A comma-delimited list of names of classes that extend from Servlet. - * # Resource paths are pulled from @RestResource.path() annotation, or - * # "/*" if annotation not specified. - * # Example: - * # resources = com.ibm.MyServlet - * * # Default is Rest-Resources in manifest file. - * # Either resourceMap or resources must be specified if it's not defined in - * # the manifest file.</cc> - * <ck>resources</ck> = - * </p> - * <p> - * In most cases, the rest resources will be specified in the manifest file since - * it's not likely to be a configurable property: - * <p> - * <p class='bcode'> - * <mk>Rest-Resources:</mk> com.ibm.juno.microservice.sample.RootResources - * </p> - * - * @return The map of REST resources. - * @throws ClassNotFoundException - * @throws ParseException - */ - @SuppressWarnings("unchecked") - protected Map<String,Class<? extends Servlet>> getResourceMap() throws ClassNotFoundException, ParseException { - ConfigFile cf = getConfig(); - ObjectMap mf = getManifest(); - Map<String,Class<? extends Servlet>> rm = new LinkedHashMap<String,Class<? extends Servlet>>(); - - ObjectMap resourceMap = cf.getObject(ObjectMap.class, "REST/resourceMap"); - String[] resources = cf.getStringArray("REST/resources", mf.getStringArray("Rest-Resources")); - - if (resourceMap != null && ! resourceMap.isEmpty()) { - for (Map.Entry<String,Object> e : resourceMap.entrySet()) { - Class<?> c = Class.forName(e.getValue().toString()); - if (! ClassUtils.isParentClass(Servlet.class, c)) - throw new ClassNotFoundException("Invalid class specified as resource. Must be a Servlet. Class='"+c.getName()+"'"); - rm.put(e.getKey(), (Class<? extends Servlet>)c); - } - } else if (resources.length > 0) { - for (String resource : resources) { - Class<?> c = Class.forName(resource); - if (! ClassUtils.isParentClass(Servlet.class, c)) - throw new ClassNotFoundException("Invalid class specified as resource. Must be a Servlet. Class='"+c.getName()+"'"); - RestResource rr = c.getAnnotation(RestResource.class); - String path = rr == null ? "/*" : rr.path(); - if (! path.endsWith("*")) - path += (path.endsWith("/") ? "*" : "/*"); - rm.put(path, (Class<? extends Servlet>)c); - } - } - return rm; - } - - /** - * Called when {@link ConfigFile#save()} is called on the config file. - * <p> - * The default behavior is configured by the following value in the config file: - * <p> - * <p class='bcode'> - * <cs>[REST]</cs> - * - * <cc># What to do when the config file is saved. - * # Possible values: - * # NOTHING - Don't do anything. (default) - * # RESTART_SERVER - Restart the Jetty server. - * # RESTART_SERVICE - Shutdown and exit with code '3'.</cc> - * <ck>saveConfigAction</ck> = RESTART_SERVER - * </p> - */ - @Override /* Microservice */ - protected void onConfigSave(ConfigFile cf) { - try { - String saveConfigAction = cf.getString("REST/saveConfigAction", "NOTHING"); - if (saveConfigAction.equals("RESTART_SERVER")) { - new Thread() { - @Override /* Thread */ - public void run() { - try { - RestMicroservice.this.stop(); - RestMicroservice.this.start(); - } catch (Exception e) { - logger.log(Level.SEVERE, e.getLocalizedMessage(), e); - } - } - }.start(); - } else if (saveConfigAction.equals("RESTART_SERVICE")) { - stop(); - System.exit(3); - } - } catch (Exception e) { - throw new RuntimeException(e); - } - } - - //-------------------------------------------------------------------------------- - // Lifecycle listener methods. - //-------------------------------------------------------------------------------- - - /** - * Called before {@link #createServer()} is called. - * <p> - * Subclasses can override this method to hook into the lifecycle of this application. - */ - protected void onCreateServer() {} - - /** - * Called before {@link #startServer()} is called. - * <p> - * Subclasses can override this method to hook into the lifecycle of this application. - */ - protected void onStartServer() {} - - /** - * Called after the Jetty server is started. - * <p> - * Subclasses can override this method to hook into the lifecycle of this application. - */ - protected void onPostStartServer() {} - - /** - * Called before the Jetty server is stopped. - * <p> - * Subclasses can override this method to hook into the lifecycle of this application. - */ - protected void onStopServer() {} - - /** - * Called after the Jetty server is stopped. - * <p> - * Subclasses can override this method to hook into the lifecycle of this application. - */ - protected void onPostStopServer() {} - - //-------------------------------------------------------------------------------- - // Other methods. - //-------------------------------------------------------------------------------- - - private static final SecurityHandler basicAuth(ConfigFile cf, ObjectMap mf) { - - HashLoginService l = new HashLoginService(); - String user = cf.getString("REST/loginUser", mf.getString("Rest-LoginUser")); - String pw = cf.getString("REST/loginPassword", mf.getString("Rest-LoginPassword")); - String realm = cf.getString("REST/authRealm", mf.getString("Rest-AuthRealm", "")); - String ctx = cf.getString("REST/contextPath", mf.getString("Rest-ContextPath", "/")); - - l.putUser(user, Credential.getCredential(pw), new String[] { "user" }); - l.setName(realm); - - Constraint constraint = new Constraint(); - constraint.setName(Constraint.__BASIC_AUTH); - constraint.setRoles(new String[] { "user" }); - constraint.setAuthenticate(true); - - ConstraintMapping cm = new ConstraintMapping(); - cm.setConstraint(constraint); - cm.setPathSpec(ctx); - - ConstraintSecurityHandler csh = new ConstraintSecurityHandler(); - csh.setAuthenticator(new BasicAuthenticator()); - csh.setRealmName("myrealm"); - csh.addConstraintMapping(cm); - csh.setLoginService(l); - - return csh; - } -} http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30947fd7/com.ibm.team.juno.microservice/src/com/ibm/juno/microservice/doc-files/build1.png ---------------------------------------------------------------------- diff --git a/com.ibm.team.juno.microservice/src/com/ibm/juno/microservice/doc-files/build1.png b/com.ibm.team.juno.microservice/src/com/ibm/juno/microservice/doc-files/build1.png deleted file mode 100755 index 008c6b5..0000000 Binary files a/com.ibm.team.juno.microservice/src/com/ibm/juno/microservice/doc-files/build1.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30947fd7/com.ibm.team.juno.microservice/src/com/ibm/juno/microservice/doc-files/build2.png ---------------------------------------------------------------------- diff --git a/com.ibm.team.juno.microservice/src/com/ibm/juno/microservice/doc-files/build2.png b/com.ibm.team.juno.microservice/src/com/ibm/juno/microservice/doc-files/build2.png deleted file mode 100755 index 9e55346..0000000 Binary files a/com.ibm.team.juno.microservice/src/com/ibm/juno/microservice/doc-files/build2.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30947fd7/com.ibm.team.juno.microservice/src/com/ibm/juno/microservice/doc-files/helloworld1.png ---------------------------------------------------------------------- diff --git a/com.ibm.team.juno.microservice/src/com/ibm/juno/microservice/doc-files/helloworld1.png b/com.ibm.team.juno.microservice/src/com/ibm/juno/microservice/doc-files/helloworld1.png deleted file mode 100755 index f5f0c7c..0000000 Binary files a/com.ibm.team.juno.microservice/src/com/ibm/juno/microservice/doc-files/helloworld1.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30947fd7/com.ibm.team.juno.microservice/src/com/ibm/juno/microservice/doc-files/instructions1.png ---------------------------------------------------------------------- diff --git a/com.ibm.team.juno.microservice/src/com/ibm/juno/microservice/doc-files/instructions1.png b/com.ibm.team.juno.microservice/src/com/ibm/juno/microservice/doc-files/instructions1.png deleted file mode 100755 index 1234828..0000000 Binary files a/com.ibm.team.juno.microservice/src/com/ibm/juno/microservice/doc-files/instructions1.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30947fd7/com.ibm.team.juno.microservice/src/com/ibm/juno/microservice/doc-files/instructions2.png ---------------------------------------------------------------------- diff --git a/com.ibm.team.juno.microservice/src/com/ibm/juno/microservice/doc-files/instructions2.png b/com.ibm.team.juno.microservice/src/com/ibm/juno/microservice/doc-files/instructions2.png deleted file mode 100755 index 4589f19..0000000 Binary files a/com.ibm.team.juno.microservice/src/com/ibm/juno/microservice/doc-files/instructions2.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30947fd7/com.ibm.team.juno.microservice/src/com/ibm/juno/microservice/doc-files/instructions3.png ---------------------------------------------------------------------- diff --git a/com.ibm.team.juno.microservice/src/com/ibm/juno/microservice/doc-files/instructions3.png b/com.ibm.team.juno.microservice/src/com/ibm/juno/microservice/doc-files/instructions3.png deleted file mode 100755 index 21808c0..0000000 Binary files a/com.ibm.team.juno.microservice/src/com/ibm/juno/microservice/doc-files/instructions3.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30947fd7/com.ibm.team.juno.microservice/src/com/ibm/juno/microservice/doc-files/instructions4.png ---------------------------------------------------------------------- diff --git a/com.ibm.team.juno.microservice/src/com/ibm/juno/microservice/doc-files/instructions4.png b/com.ibm.team.juno.microservice/src/com/ibm/juno/microservice/doc-files/instructions4.png deleted file mode 100755 index b5e8471..0000000 Binary files a/com.ibm.team.juno.microservice/src/com/ibm/juno/microservice/doc-files/instructions4.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30947fd7/com.ibm.team.juno.microservice/src/com/ibm/juno/microservice/doc-files/instructions5.png ---------------------------------------------------------------------- diff --git a/com.ibm.team.juno.microservice/src/com/ibm/juno/microservice/doc-files/instructions5.png b/com.ibm.team.juno.microservice/src/com/ibm/juno/microservice/doc-files/instructions5.png deleted file mode 100755 index 50504de..0000000 Binary files a/com.ibm.team.juno.microservice/src/com/ibm/juno/microservice/doc-files/instructions5.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30947fd7/com.ibm.team.juno.microservice/src/com/ibm/juno/microservice/doc-files/instructions6.png ---------------------------------------------------------------------- diff --git a/com.ibm.team.juno.microservice/src/com/ibm/juno/microservice/doc-files/instructions6.png b/com.ibm.team.juno.microservice/src/com/ibm/juno/microservice/doc-files/instructions6.png deleted file mode 100755 index e730d32..0000000 Binary files a/com.ibm.team.juno.microservice/src/com/ibm/juno/microservice/doc-files/instructions6.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30947fd7/com.ibm.team.juno.microservice/src/com/ibm/juno/microservice/doc-files/manifest1.png ---------------------------------------------------------------------- diff --git a/com.ibm.team.juno.microservice/src/com/ibm/juno/microservice/doc-files/manifest1.png b/com.ibm.team.juno.microservice/src/com/ibm/juno/microservice/doc-files/manifest1.png deleted file mode 100755 index 77604c1..0000000 Binary files a/com.ibm.team.juno.microservice/src/com/ibm/juno/microservice/doc-files/manifest1.png and /dev/null differ
