|
||||||||||
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 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 String |
getHeaderValue(Bundle bundle,
String headerName)
Returns the value of the header or the empty string if the header is not available. |
static String |
getName(Bundle bundle,
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 ArrayList |
list(Enumeration e)
This method is the same as Collections#list(Enumeration). |
static Locale |
parseLocaleString(String locale)
This method expects a locale string in format language_COUNTRY, or language. |
static void |
sort(Bundle[] bundles,
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 String PAGE_WEBAPPS
public static final String PAGE_VM_STAT
public static final String PAGE_LOGS
public static final String PARAM_ACTION
public static final String PARAM_CONTENT
public static final String PARAM_SHUTDOWN
public static final String VALUE_SHUTDOWN
Constructor Detail |
---|
public Util()
Method Detail |
---|
public static String getName(Bundle bundle, 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 String getHeaderValue(Bundle bundle, String headerName)
bundle
- the bundle which header to retrieveheaderName
- the name of the header to retrieve
public static void sort(Bundle[] bundles, 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 ArrayList list(Enumeration e)
e
- the enumeration which to convert
public static final Locale parseLocaleString(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 |