felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache Felix > Branding the Web Console
Date Mon, 07 Sep 2009 15:46:00 GMT
<html>
<head>
    <base href="http://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/1519/1/1/_/styles/combined.css?spaceKey=FELIX&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background-color: white" bgcolor="white">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
     <h2><a href="http://cwiki.apache.org/confluence/display/FELIX/Branding+the+Web+Console">Branding
the Web Console</a></h2>
     <h4>Page <b>edited</b> by             <a href="http://cwiki.apache.org/confluence/display/~fmeschbe">Felix
Meschberger</a>
    </h4>
     
          <br/>
     <div class="notificationGreySide">
         <h1><a name="BrandingtheWebConsole-BrandingtheWebConsole"></a>Branding
the Web Console</h1>

<p>Branding the Web Consle mainly concerns hooking into the looks of the Web Console
providing vendor-provided setup like</p>

<ul>
	<li>CSS</li>
	<li>Logo</li>
	<li>Main Title</li>
	<li>Vendor URL</li>
</ul>


<p>Branding support is currently work in progress tracked by <a href="https://issues.apache.org/jira/browse/Felix-1015"
rel="nofollow">FELIX-1015</a>.</p>


<p>Branding for the Web Console can be provided in two ways: By registering a <tt>BrandingPlugin</tt>
service or by providing a branding properties files. The Web Console uses the branding from
the <tt>BrandingPlugin</tt> service registered with the highest ranking.</p>

<p>The <tt>BrandingPlugin</tt> interface provides the following information
used for branding:</p>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
<span class="code-comment">// Returns an indicative name of the branding plugin
</span><span class="code-object">String</span> getBrandName();

<span class="code-comment">// Returns the name of the product in which the web console
is contained
</span><span class="code-comment">// and to which the web console is branded.
</span><span class="code-object">String</span> getProductName();

<span class="code-comment">// Returns an (absolute) URL to a web site representing the
product to
</span><span class="code-comment">// which the web console is branded.
</span><span class="code-object">String</span> getProductURL();

<span class="code-comment">// Returns an absolute path to an image to be rendered as
the logo of the
</span><span class="code-comment">// branding product.
</span><span class="code-object">String</span> getProductImage();

<span class="code-comment">// Returns the name of the branding product vendor.
</span><span class="code-object">String</span> getVendorName();

<span class="code-comment">// Returns an (absolute) URL to the web site of the branding
product
</span><span class="code-comment">// vendor.
</span><span class="code-object">String</span> getVendorURL();

<span class="code-comment">// Returns an absolute path to an image to be rendered as
the logo of the
</span><span class="code-comment">// branding product vendor.
</span><span class="code-object">String</span> getVendorImage();

<span class="code-comment">// Returns the absolute path to an icon to be used as the
web console
</span><span class="code-comment">// <span class="code-quote">"favicon"</span>.
</span><span class="code-object">String</span> getFavIcon();

<span class="code-comment">// Returns the absolute path to a CSS file to be used as
the main CSS <span class="code-keyword">for</span>
</span><span class="code-comment">// the basic admin site.
</span><span class="code-object">String</span> getMainStyleSheet();
</pre>
</div></div>


<p>If no <tt>BrandingPlugin</tt> service is registered, the <tt>DefaultBrandingPlugin</tt>
is used.</p>


<p>The <tt>DefaultBrandingPlugin</tt> reads the <tt>/META-INF/webconsole.properties</tt>
from the web console bundle to setup the branding using the following properties:</p>

<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'> Property Name </th>
<th class='confluenceTh'> Default Value </th>
<th class='confluenceTh'> <tt>BrandingPlugin</tt> method name </th>
</tr>
<tr>
<td class='confluenceTd'> <tt>webconsole.product.name</tt> </td>
<td class='confluenceTd'> Apache Felix </td>
<td class='confluenceTd'> <tt>getProductName()</tt> </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>webconsole.product.url</tt> </td>
<td class='confluenceTd'> <a href="http://felix.apache.org" rel="nofollow">http://felix.apache.org</a>
</td>
<td class='confluenceTd'> <tt>getProductURL()</tt> </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>webconsole.product.image</tt> </td>
<td class='confluenceTd'> /res/imgs/logo.png </td>
<td class='confluenceTd'> <tt>getProductImage()</tt> </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>webconsole.vendor.name</tt> </td>
<td class='confluenceTd'> The Apache Software Foundation </td>
<td class='confluenceTd'> <tt>getVendorName()</tt> </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>webconsole.vendor.url</tt> </td>
<td class='confluenceTd'> <a href="http://www.apache.org" rel="nofollow">http://www.apache.org</a>
</td>
<td class='confluenceTd'> <tt>getVendorURL()</tt> </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>webconsole.vendor.image</tt> </td>
<td class='confluenceTd'> /res/imgs/logo.png </td>
<td class='confluenceTd'> <tt>getVendorImage()</tt> </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>webconsole.favicon</tt> </td>
<td class='confluenceTd'> /res/imgs/favicon.ico </td>
<td class='confluenceTd'> <tt>getFavIcon()</tt> </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>webconsole.stylesheet</tt> </td>
<td class='confluenceTd'> /res/ui/webconsole.css </td>
<td class='confluenceTd'> <tt>getMainStyleSheet()</tt> </td>
</tr>
</tbody></table>

<p><b>Note:</b> The <tt>/META-INF/webconsole.properties</tt>
file is not contained in the Apache Felix Web Console bundle itself. It may be provided by
a Fragment Bundle attaching to the Apache Felix Web Console bundle. For an example of such
a fragment bundle see prototype <a href="http://svn.apache.org/repos/asf/sling/whiteboard/fmeschbe/webconsolebranding/"
rel="nofollow">Sling Web Console Branding Bundle</a></p>
     </div>
     <div id="commentsSection" class="wiki-content pageSection">
       <div style="float: right;">
            <a href="http://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey">Change Notification Preferences</a>
       </div>

       <a href="http://cwiki.apache.org/confluence/display/FELIX/Branding+the+Web+Console">View
Online</a>
       |
       <a href="http://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=2853654&revisedVersion=5&originalVersion=4">View
Change</a>
              |
       <a href="http://cwiki.apache.org/confluence/display/FELIX/Branding+the+Web+Console?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message