FELIX-1117 - Update branding
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@771018 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/karaf/assembly/src/main/distribution/text/etc/users.properties b/karaf/assembly/src/main/distribution/text/etc/users.properties
index 0348fae..b91ac84 100644
--- a/karaf/assembly/src/main/distribution/text/etc/users.properties
+++ b/karaf/assembly/src/main/distribution/text/etc/users.properties
@@ -18,4 +18,4 @@
################################################################################
#
-smx=smx,admin
+karaf=karaf,admin
diff --git a/karaf/gshell/gshell-admin/src/main/resources/org/apache/felix/karaf/gshell/admin/etc/users.properties b/karaf/gshell/gshell-admin/src/main/resources/org/apache/felix/karaf/gshell/admin/etc/users.properties
index 0348fae..b91ac84 100644
--- a/karaf/gshell/gshell-admin/src/main/resources/org/apache/felix/karaf/gshell/admin/etc/users.properties
+++ b/karaf/gshell/gshell-admin/src/main/resources/org/apache/felix/karaf/gshell/admin/etc/users.properties
@@ -18,4 +18,4 @@
################################################################################
#
-smx=smx,admin
+karaf=karaf,admin
diff --git a/karaf/gshell/gshell-core/src/main/java/org/apache/felix/karaf/gshell/core/ApplicationImpl.java b/karaf/gshell/gshell-core/src/main/java/org/apache/felix/karaf/gshell/core/ApplicationImpl.java
index 5593a43..31bbcc4 100644
--- a/karaf/gshell/gshell-core/src/main/java/org/apache/felix/karaf/gshell/core/ApplicationImpl.java
+++ b/karaf/gshell/gshell-core/src/main/java/org/apache/felix/karaf/gshell/core/ApplicationImpl.java
@@ -54,12 +54,12 @@
props.load(getClass().getClassLoader().getResourceAsStream(SERVICEMIX_VERSION));
String kernelVersion = props.getProperty(VERSION_PROPERTY);
this.model.setVersion(kernelVersion);
- ServiceMixBranding smxBranding = (ServiceMixBranding) this.model.getBranding();
- smxBranding.setVersion(kernelVersion);
+ DefaultBranding branding = (DefaultBranding) this.model.getBranding();
+ branding.setVersion(kernelVersion);
if (this.getClass().getClassLoader().getResource(EMBEDDED_PROPS) != null) {
embeddedResource = this.getClass().getClassLoader().getResource(EMBEDDED_PROPS);
- smxBranding.setEmbeddedResource(embeddedResource);
+ branding.setEmbeddedResource(embeddedResource);
}
}
diff --git a/karaf/gshell/gshell-core/src/main/java/org/apache/felix/karaf/gshell/core/ServiceMixBranding.java b/karaf/gshell/gshell-core/src/main/java/org/apache/felix/karaf/gshell/core/DefaultBranding.java
similarity index 88%
rename from karaf/gshell/gshell-core/src/main/java/org/apache/felix/karaf/gshell/core/ServiceMixBranding.java
rename to karaf/gshell/gshell-core/src/main/java/org/apache/felix/karaf/gshell/core/DefaultBranding.java
index b0bcc0f..81e3546 100644
--- a/karaf/gshell/gshell-core/src/main/java/org/apache/felix/karaf/gshell/core/ServiceMixBranding.java
+++ b/karaf/gshell/gshell-core/src/main/java/org/apache/felix/karaf/gshell/core/DefaultBranding.java
@@ -30,7 +30,7 @@
import org.apache.geronimo.gshell.ansi.AnsiRenderWriter;
import org.apache.geronimo.gshell.application.model.Branding;
-public class ServiceMixBranding extends Branding {
+public class DefaultBranding extends Branding {
private String prompt;
private String[] banner;
@@ -41,20 +41,20 @@
private String applicationVersion;
private String applicationLocation;
- private String[] kernelBanner = {
- " ____ _ __ __ _ ",
- "/ ___| ___ _ ____ _(_) ___ ___| \\/ (_)_ __",
- "\\___ \\ / _ \\ '__\\ \\ / / |/ __/ _ \\ |\\/| | \\ \\/ /",
- " ___) | __/ | \\ V /| | (_| __/ | | | |> < ",
- "|____/ \\___|_| \\_/ |_|\\___\\___|_| |_|_/_/\\_\\",
+ private String[] defaultBanner = {
+" __ __ ____",
+" / //_/____ __________ _/ __/",
+" / ,< / __ `/ ___/ __ `/ /_",
+" / /| |/ /_/ / / / /_/ / __/",
+" /_/ |_|\\__,_/_/ \\__,_/_/"
};
- public ServiceMixBranding() {
- banner = kernelBanner;
- displayName = "ServiceMix Kernel";
- displayLocation = "http://servicemix.apache.org/kernel/";
+ public DefaultBranding() {
+ banner = defaultBanner;
+ displayName = "Apache Felix Karaf";
+ displayLocation = "http://felix.apache.org/site/apache-felix-karaf.html";
}
-
+
public void setEmbeddedResource(URL embeddedResource) {
Properties brandProps = loadPropertiesFile(embeddedResource);
String brandBanner = brandProps.getProperty("banner");
@@ -76,7 +76,7 @@
}
public String getName() {
- return "servicemix";
+ return "karaf";
}
public String getDisplayName() {
@@ -171,7 +171,7 @@
catch (Exception ex) {
System.err.println(
"Error loading embedded properties from " + brandPropURL);
- System.err.println("ServicemixBranding: " + ex);
+ System.err.println("DefaultBranding: " + ex);
try {
if (is != null) is.close();
}
diff --git a/karaf/gshell/gshell-core/src/main/java/org/apache/felix/karaf/gshell/core/LocalConsole.java b/karaf/gshell/gshell-core/src/main/java/org/apache/felix/karaf/gshell/core/LocalConsole.java
index bfac6ea..7c33294 100644
--- a/karaf/gshell/gshell-core/src/main/java/org/apache/felix/karaf/gshell/core/LocalConsole.java
+++ b/karaf/gshell/gshell-core/src/main/java/org/apache/felix/karaf/gshell/core/LocalConsole.java
@@ -76,7 +76,7 @@
mainServiceTracker = new ServiceTracker(bundleContext, "org.apache.felix.karaf.main.spi.MainService", null);
mainServiceTracker.open();
- shell.getContext().getVariables().set("gshell.username", "smx");
+ shell.getContext().getVariables().set("gshell.username", "karaf");
frameworkStarted = new CountDownLatch(1);
getBundleContext().addFrameworkListener(new FrameworkListener(){
public void frameworkEvent(FrameworkEvent event) {
diff --git a/karaf/gshell/gshell-core/src/main/java/org/apache/felix/karaf/gshell/core/commands/InfoAction.java b/karaf/gshell/gshell-core/src/main/java/org/apache/felix/karaf/gshell/core/commands/InfoAction.java
index b8ebb56..600a369 100644
--- a/karaf/gshell/gshell-core/src/main/java/org/apache/felix/karaf/gshell/core/commands/InfoAction.java
+++ b/karaf/gshell/gshell-core/src/main/java/org/apache/felix/karaf/gshell/core/commands/InfoAction.java
@@ -36,12 +36,12 @@
import org.apache.geronimo.gshell.command.CommandAction;
import org.apache.geronimo.gshell.command.CommandContext;
import org.apache.geronimo.gshell.io.IO;
-import org.apache.felix.karaf.gshell.core.ServiceMixBranding;
+import org.apache.felix.karaf.gshell.core.DefaultBranding;
import org.codehaus.plexus.util.StringUtils;
public class InfoAction implements CommandAction {
- private ServiceMixBranding branding;
+ private DefaultBranding branding;
private IO io;
@@ -49,7 +49,7 @@
private NumberFormat fmtI = new DecimalFormat("###,###", new DecimalFormatSymbols(Locale.ENGLISH));
private NumberFormat fmtD = new DecimalFormat("###,##0.000", new DecimalFormatSymbols(Locale.ENGLISH));
- public InfoAction(ServiceMixBranding branding) {
+ public InfoAction(DefaultBranding branding) {
this.branding = branding;
}
diff --git a/karaf/gshell/gshell-core/src/main/resources/META-INF/spring/gshell.xml b/karaf/gshell/gshell-core/src/main/resources/META-INF/spring/gshell.xml
index 174a43c..df0651b 100644
--- a/karaf/gshell/gshell-core/src/main/resources/META-INF/spring/gshell.xml
+++ b/karaf/gshell/gshell-core/src/main/resources/META-INF/spring/gshell.xml
@@ -37,7 +37,7 @@
<property name="verbosity" value="DEBUG"/>
</bean>
- <bean id="branding" class="org.apache.felix.karaf.gshell.core.ServiceMixBranding">
+ <bean id="branding" class="org.apache.felix.karaf.gshell.core.DefaultBranding">
<property name="prompt" value="@|bold %{gshell.username}|@%{application.id}:@|bold %{gshell.group}|> " />
</bean>
diff --git a/karaf/gshell/gshell-core/src/test/java/org/apache/felix/karaf/gshell/core/Test.java b/karaf/gshell/gshell-core/src/test/java/org/apache/felix/karaf/gshell/core/Test.java
index 90a61eb..3043692 100644
--- a/karaf/gshell/gshell-core/src/test/java/org/apache/felix/karaf/gshell/core/Test.java
+++ b/karaf/gshell/gshell-core/src/test/java/org/apache/felix/karaf/gshell/core/Test.java
@@ -60,9 +60,9 @@
ApplicationManager appMgr = (ApplicationManager) context.getBean("applicationManager");
assertNotNull(appMgr);
Shell shell = appMgr.create();
- ServiceMixBranding smxBrandng = (ServiceMixBranding)appMgr.getApplication().getModel().getBranding();
- assertNotNull(smxBrandng.getWelcomeMessage());
- System.out.println(smxBrandng.getWelcomeMessage());
+ DefaultBranding branding = (DefaultBranding)appMgr.getApplication().getModel().getBranding();
+ assertNotNull(branding.getWelcomeMessage());
+ System.out.println(branding.getWelcomeMessage());
assertNotNull(shell);
shell.execute("about");
} finally {
@@ -86,9 +86,9 @@
ApplicationManager appMgr = (ApplicationManager) context.getBean("applicationManager");
assertNotNull(appMgr);
Shell shell = appMgr.create();
- ServiceMixBranding smxBrandng = (ServiceMixBranding)appMgr.getApplication().getModel().getBranding();
- assertNotNull(smxBrandng.getWelcomeMessage());
- System.out.println(smxBrandng.getWelcomeMessage());
+ DefaultBranding branding = (DefaultBranding)appMgr.getApplication().getModel().getBranding();
+ assertNotNull(branding.getWelcomeMessage());
+ System.out.println(branding.getWelcomeMessage());
assertNotNull(shell);
shell.execute("vfs/ls meta:/commands/");
} finally {
@@ -112,9 +112,9 @@
ApplicationManager appMgr = (ApplicationManager) context.getBean("applicationManager");
assertNotNull(appMgr);
Shell shell = appMgr.create();
- ServiceMixBranding smxBrandng = (ServiceMixBranding)appMgr.getApplication().getModel().getBranding();
- assertNotNull(smxBrandng.getWelcomeMessage());
- System.out.println(smxBrandng.getWelcomeMessage());
+ DefaultBranding branding = (DefaultBranding)appMgr.getApplication().getModel().getBranding();
+ assertNotNull(branding.getWelcomeMessage());
+ System.out.println(branding.getWelcomeMessage());
assertNotNull(shell);
shell.execute("vfs");