org.apache.felix.webconsole.internal
Class Util

java.lang.Object
  extended by org.apache.felix.webconsole.internal.Util

public class Util
extends Object

The Util TODO


Field Summary
static String PAGE_LOGS
          Logs subpage
static String PAGE_VM_STAT
          vm statistics subpage
static String PAGE_WEBAPPS
          web apps subpage
static String PARAM_ACTION
          Parameter name
static String PARAM_CONTENT
          Parameter name
static String PARAM_SHUTDOWN
          Parameter name
static String VALUE_SHUTDOWN
          Parameter value
 
Constructor Summary
Util()
           
 
Method Summary
static void endScript(PrintWriter pw)
           
static String getName(Bundle bundle)
          Return a display name for the given bundle: If the bundle has a non-empty Bundle-Name manifest header that value is returned. Otherwise the symbolic name is returned if set Otherwise the bundle's location is returned if defined Finally, as a last ressort, the bundles id is returned
static void script(PrintWriter pw, String appRoot, String scriptName)
           
static void sort(Bundle[] bundles)
          Orders the bundles according to their name as returned by getName(Bundle), with the exception that the system bundle is always place as the first entry.
static void spool(String res, HttpServletResponse resp)
           
static void startScript(PrintWriter pw)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PAGE_WEBAPPS

public static final String PAGE_WEBAPPS
web apps subpage

See Also:
Constant Field Values

PAGE_VM_STAT

public static final String PAGE_VM_STAT
vm statistics subpage

See Also:
Constant Field Values

PAGE_LOGS

public static final String PAGE_LOGS
Logs subpage

See Also:
Constant Field Values

PARAM_ACTION

public static final String PARAM_ACTION
Parameter name

See Also:
Constant Field Values

PARAM_CONTENT

public static final String PARAM_CONTENT
Parameter name

See Also:
Constant Field Values

PARAM_SHUTDOWN

public static final String PARAM_SHUTDOWN
Parameter name

See Also:
Constant Field Values

VALUE_SHUTDOWN

public static final String VALUE_SHUTDOWN
Parameter value

See Also:
Constant Field Values
Constructor Detail

Util

public Util()
Method Detail

startScript

public static void startScript(PrintWriter pw)

endScript

public static void endScript(PrintWriter pw)

script

public static void script(PrintWriter pw,
                          String appRoot,
                          String scriptName)

spool

public static void spool(String res,
                         HttpServletResponse resp)
                  throws IOException
Throws:
IOException

getName

public static String getName(Bundle bundle)
Return a display name for the given bundle:
  1. If the bundle has a non-empty Bundle-Name manifest header that value is returned.
  2. Otherwise the symbolic name is returned if set
  3. Otherwise the bundle's location is returned if defined
  4. Finally, as a last ressort, the bundles id is returned


sort

public static void sort(Bundle[] bundles)
Orders the bundles according to their name as returned by getName(Bundle), with the exception that the system bundle is always place as the first entry. If two bundles have the same name, they are ordered according to their version. If they have the same version, the bundle with the lower bundle id comes before the other.



Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.