|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.felix.webconsole.internal.Util
public class Util
The Util class contains various utility methods used internally
by the web console implementation and the build-in plugins.
| Field Summary | |
|---|---|
static java.lang.String |
PAGE_LOGS
Logs subpage |
static java.lang.String |
PAGE_VM_STAT
vm statistics subpage |
static java.lang.String |
PAGE_WEBAPPS
web apps subpage |
static java.lang.String |
PARAM_ACTION
Parameter name |
static java.lang.String |
PARAM_CONTENT
Parameter name |
static java.lang.String |
PARAM_SHUTDOWN
Parameter name |
static java.lang.String |
VALUE_SHUTDOWN
Parameter value |
| Constructor Summary | |
|---|---|
Util()
|
|
| Method Summary | |
|---|---|
static java.lang.String |
getHeaderValue(org.osgi.framework.Bundle bundle,
java.lang.String headerName)
Returns the value of the header or the empty string if the header is not available. |
static java.lang.String |
getName(org.osgi.framework.Bundle bundle,
java.util.Locale locale)
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 resort, the bundles id is returned
|
static java.util.ArrayList |
list(java.util.Enumeration e)
This method is the same as Collections#list(Enumeration). |
static java.util.Locale |
parseLocaleString(java.lang.String locale)
This method expects a locale string in format language_COUNTRY, or language. |
static void |
sort(org.osgi.framework.Bundle[] bundles,
java.util.Locale locale)
Orders the bundles according to their name as returned by getName(Bundle, Locale), with the exception that the system bundle is
always place as the first entry. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String PAGE_WEBAPPS
public static final java.lang.String PAGE_VM_STAT
public static final java.lang.String PAGE_LOGS
public static final java.lang.String PARAM_ACTION
public static final java.lang.String PARAM_CONTENT
public static final java.lang.String PARAM_SHUTDOWN
public static final java.lang.String VALUE_SHUTDOWN
| Constructor Detail |
|---|
public Util()
| Method Detail |
|---|
public static java.lang.String getName(org.osgi.framework.Bundle bundle,
java.util.Locale locale)
bundle:
Bundle-Name manifest
header that value is returned.
bundle - the bundle which name to retrievelocale - the locale, in which the bundle name is requested
public static java.lang.String getHeaderValue(org.osgi.framework.Bundle bundle,
java.lang.String headerName)
bundle - the bundle which header to retrieveheaderName - the name of the header to retrieve
public static void sort(org.osgi.framework.Bundle[] bundles,
java.util.Locale locale)
getName(Bundle, Locale), 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.
bundles - the bundles to sortlocale - the locale, used to obtain the localized bundle namepublic static final java.util.ArrayList list(java.util.Enumeration e)
e - the enumeration which to convert
public static final java.util.Locale parseLocaleString(java.lang.String locale)
Locale object.
locale - the locale string, if null - default locale is
returned
Locale
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||