org.rhq.enterprise.gui.util
Class WebUtility
java.lang.Object
org.rhq.enterprise.gui.util.WebUtility
public abstract class WebUtility
- extends Object
Utilities for the web tier. Named such so as not to clash with
RequestUtils.
- Author:
- Greg Hinkle, Ian Springer
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WebUtility
public WebUtility()
getResourceId
public static Integer getResourceId(javax.servlet.ServletRequest request)
getResourceGroupId
public static Integer getResourceGroupId(javax.servlet.ServletRequest request)
getResourceIds
public static int[] getResourceIds(javax.servlet.ServletRequest request)
getPageControl
public static org.rhq.core.domain.util.PageControl getPageControl(javax.servlet.ServletRequest request)
getPageControl
public static org.rhq.core.domain.util.PageControl getPageControl(javax.servlet.ServletRequest request,
String postfix)
getResourceTypeId
public static int getResourceTypeId(javax.servlet.http.HttpServletRequest request)
throws ParameterNotFoundException
- Throws:
ParameterNotFoundException
getChildResourceTypeId
public static int getChildResourceTypeId(javax.servlet.http.HttpServletRequest request)
throws ParameterNotFoundException
- Throws:
ParameterNotFoundException
getRequiredRequestParameter
public static String getRequiredRequestParameter(javax.servlet.ServletRequest request,
String name)
getOptionalRequestParameter
public static String getOptionalRequestParameter(javax.servlet.ServletRequest request,
String name,
String defaultValue)
getRequiredIntRequestParameter
public static int getRequiredIntRequestParameter(javax.servlet.ServletRequest request,
String name)
getOptionalIntRequestParameter
public static int getOptionalIntRequestParameter(javax.servlet.ServletRequest request,
String name,
int defaultValue)
getSubject
public static org.rhq.core.domain.auth.Subject getSubject(javax.servlet.http.HttpServletRequest request)
- Return the subject of the current request
- Parameters:
request -
- Returns:
getMetricsDisplayMode
public static MetricsDisplayMode getMetricsDisplayMode(javax.servlet.http.HttpServletRequest request)
- Return the current
MetricsDisplayMode for this request. We need this to as actions often need to call
different code depending on the kind of metrics (single resource, compatible group, autogroup or definitions)
they are working on
- Parameters:
request -
- Returns:
getEntityContext
public static org.rhq.core.domain.common.EntityContext getEntityContext()
getEntityContext
public static org.rhq.core.domain.common.EntityContext getEntityContext(javax.servlet.http.HttpServletRequest request)
Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.