|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.esri.adf.web.util.WebUtil
public class WebUtil
Utility methods to retrieve information about the controls.
Field Summary | |
---|---|
static String |
COMPONENT_FAMILY_PREFIX
The prefix for name of the family of GIS server web controls. |
static String |
COMPONENT_TYPE_PREFIX
The prefix for name of the component type for GIS server web controls. |
static String |
VALIDATOR_PREFIX
The prefix for name of the validators for GIS server web controls. |
Constructor Summary | |
---|---|
WebUtil()
|
Method Summary | ||
---|---|---|
static
|
copy(T src)
Deprecated. As of ArcGIS Server 10.0, instead use ADFUtil.copy(Serializable) |
|
static ContextControl |
findParentContextControl(javax.faces.component.UIComponent component)
Finds the most immediate ContextControl parent for this component. |
|
static List<javax.faces.component.UIComponent> |
getAllChildren(javax.faces.component.UIComponent comp)
The method will retrieve all children components under given component. |
|
static Map<String,TaskControl> |
getAllTaskControls(javax.faces.component.UIComponent component)
Returns all Task controls in a map with id and object pair under the given component. |
|
static String |
getClient(javax.faces.context.FacesContext facesContext)
Extracts the user-agent header from the HTTP Servlet request. |
|
static javax.faces.component.UIComponent |
getComponentById(String id)
Returns the |
|
static javax.faces.component.UIComponent |
getComponentById(javax.faces.component.UIComponent comp,
String id)
Returns the |
|
static javax.faces.context.ExternalContext |
getExternalContext()
|
|
static javax.faces.context.FacesContext |
getFacesContext()
|
|
static String |
getMimeId(Object obj)
Return the unique identifier used for MIME data. |
|
static String |
getMimeURL(String id,
byte[] mimeData,
WebSession webSession)
Returns the URL for MIME data. |
|
static String |
getMimeURL(String id,
WebSession webSession)
|
|
static String |
getRequestContextPath()
|
|
static URL |
getResource(String name)
Finds the resource with the given name. |
|
static String |
getTileURL(String id,
Object value,
WebSession webSession,
String tileImageFormat)
Returns the URL for Tile data. |
|
static String |
getTileURL(String id,
String value,
WebSession webSession)
Returns the URL for Tile data. |
|
static WebContext |
getWebContext(javax.faces.context.FacesContext facesContext,
String contextId)
Finds the WebContext in the request map of this FacesContext . |
|
static WebContext |
getWebContext(javax.faces.component.UIComponent component)
Finds the parent ContextControl for this component and returns the associated WebContext . |
|
static WebContext |
getWebContext(javax.faces.component.UIComponent component,
String contextId)
If contextId is not null, return the WebContext associated with that ID. |
|
static boolean |
isCommonResourcesRegistered(javax.faces.context.FacesContext facesContext)
Indicates if the common resources have been registered in this request. |
|
static boolean |
isGeoTransformAvailable(WebSpatialReference sr1,
WebSpatialReference sr2)
Deprecated. As of ArcGIS Server 10.0, instead use ADFUtil.isGeoTransformAvailable(WebSpatialReference, WebSpatialReference) |
|
static WebExtent |
reaspect(WebExtent extent,
double width,
double height)
Deprecated. As of ArcGIS Server 10.0, instead use ADFUtil.reaspect(WebExtent, double, double) |
|
static void |
setFacesContext(javax.faces.context.FacesContext facesContext)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String COMPONENT_FAMILY_PREFIX
public static final String COMPONENT_TYPE_PREFIX
public static final String VALIDATOR_PREFIX
Constructor Detail |
---|
public WebUtil()
Method Detail |
---|
public static ContextControl findParentContextControl(javax.faces.component.UIComponent component)
ContextControl
parent for this component. If a parent context control cannot be
found, it returns the first available context on the page.
component
- the JSF component
ContextControl
- the parent contextpublic static WebContext getWebContext(javax.faces.component.UIComponent component, String contextId)
ContextControl
for this component and return the associated WebContext
. If a parent context control
cannot be found, it returns the first available context on the page.
component
- the JSF componentcontextId
- the ID of the WebContext
WebContext
- the WebContext
public static WebContext getWebContext(javax.faces.component.UIComponent component)
ContextControl
for this component and returns the associated WebContext
. If a
parent context control cannot be found, it returns the first available context control on the page.
component
- the JSF component
WebContext
- the WebContext
public static WebContext getWebContext(javax.faces.context.FacesContext facesContext, String contextId)
WebContext
in the request map of this FacesContext
.
facesContext
- the FacesContext
contextId
- the ID of the WebContext
stored in session
WebContext
- the WebContext
public static javax.faces.component.UIComponent getComponentById(String id)
id
- - A String
public static javax.faces.component.UIComponent getComponentById(javax.faces.component.UIComponent comp, String id)
id
- - A String
public static List<javax.faces.component.UIComponent> getAllChildren(javax.faces.component.UIComponent comp)
comp
- - a javax.faces.component.UIComponent
public static Map<String,TaskControl> getAllTaskControls(javax.faces.component.UIComponent component)
component
- - an UIComponent object
public static String getClient(javax.faces.context.FacesContext facesContext)
facesContext
- the FacesContext
String
- the clientpublic static boolean isCommonResourcesRegistered(javax.faces.context.FacesContext facesContext)
facesContext
- the FacesContext
public static javax.faces.context.FacesContext getFacesContext()
public static javax.faces.context.ExternalContext getExternalContext()
public static void setFacesContext(javax.faces.context.FacesContext facesContext)
public static String getRequestContextPath()
public static String getMimeURL(String id, byte[] mimeData, WebSession webSession)
id
- unique id for the controlmimeData
- the MIME data byte streamwebSession
- the WebSession
String
- the URL of the MIME datapublic static String getMimeURL(String id, WebSession webSession)
public static String getTileURL(String id, Object value, WebSession webSession, String tileImageFormat)
id
- unique id for the controlvalue
- the tile information store in the session objectwebSession
- the WebSession
tileImageFormat
- the format of the tiled images. (For ex. jpg, png, etc.)
String
- the URL of the Tile datapublic static String getTileURL(String id, String value, WebSession webSession)
id
- unique id for the controlvalue
- the virtual directory URL string to store in the session objectwebSession
- the WebSession
String
- the URL of the Tile datapublic static String getMimeId(Object obj)
obj
- the control data object
String
- the unique string identifierpublic static URL getResource(String name)
name
- The resource name
@Deprecated public static boolean isGeoTransformAvailable(WebSpatialReference sr1, WebSpatialReference sr2)
ADFUtil.isGeoTransformAvailable(WebSpatialReference, WebSpatialReference)
WebContext
can be
safely reprojected to a new spatial reference.
sr1
- from spatial referencesr2
- to spatial reference
WebContext.setSpatialReference(WebSpatialReference)
@Deprecated public static WebExtent reaspect(WebExtent extent, double width, double height)
ADFUtil.reaspect(WebExtent, double, double)
extent
- the extent to be reaspectwidth
- the image width in pixels.height
- the image height in pixels.
@Deprecated public static <T extends Serializable> T copy(T src) throws ADFException
ADFUtil.copy(Serializable)
src
- the object to create a copy
ADFException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |