public abstract class IltFacesGraphServletSupport extends IlvFacesManagerServletSupport implements IltFacesJTGOConstants
IltFacesGraphServlet
class.Modifier and Type | Field and Description |
---|---|
protected Comparator<IlvGraphic> |
graphicObjectComparator
Comparator used to sort the IlvGraphic instances for image map purposes.
|
protected Comparator<IlvManagerLayer> |
managerLayerComparator
Comparator used to sort the IlvManagerLayer instances for image map purposes.
|
IMAGE_MAP_GENERATOR_PARAM, TILE_MANAGER_PARAM
ImageMapAreaGeneratorProperty
CONTEXT, DATA_SOURCE, DATA_SOURCE_ID, DEFAULT_STYLE_SHEET, EQUIPMENT, NETWORK, OBJECT_ACTION_MB, PROPERTY_ACCESSOR, STYLE_SHEETS
SESSION_ID_PREFIX, STATE_URL, STATIC_LAYERS_COUNT_PARAM, TILE_MANAGER, UPDATE_INTERVAL
AUTO_REFRESH, BOUNDING_BOX, COLOR, CONSTRAINED_ON_CONTENTS, GROUPABLE, HITMAP_LAYERS, IGNORE_CONTENT_ASPECT_RATIO, INTERACTOR, INTERACTOR_ID, MAX_ZOOM_LEVEL, MIN_ZOOM_LEVEL, NB_BUTTONS, OPACITY, ORIENTATION, ORIENTATION_HORIZONTAL, ORIENTATION_VERTICAL, PAN_FACTOR, STATIC_LAYERS_COUNT, TEMPLATE, TILE_SIZE, TOLERANCE, VISIBLE_LAYERS, ZOOM_FACTOR, ZOOM_LEVELS
ACCESSIBLE, ACTION_NAME, AUTO_SUBMIT, BACKGROUND_COLOR, CAPABILITIES_LOADED_HANDLER, COMPONENT, DO_ACTION_ON_BG_DESELECT, ERROR_MESSAGE, GENERATE_IMAGE_MAP, HOTKEYS, IMAGE_FORMAT, IMAGE_LOADED_HANDLER, IMAGE_MAP_GENERATOR, IMAGE_MAP_GENERATOR_CLASS, IMAGE_MAP_VISIBLE, IMAGE_SERVLET_CONTEXT, INVOCATION_CONTEXT, JSF_CONTEXT, ON_CLICK, ON_SELECTION_CHANGED, PARTIAL_SUBMIT, PORTLET_CONTEXT_KEY, PORTLET_SESSION_KEY, REPLACE_PATTERN, RESIZABLE, SELECTION_RESIZABLE_CLASS, SESSION_EXP_HANDLER, SUBMITTED_VALUE, WAITING_IMAGE
AFTER_HANDLER, BASETEXTDIRECTION, BEFORE_HANDLER, BUTTON_GROUP_ID, BUTTON_TYPE, CHARTS_BUNDLE, CHARTS_MESSAGE_BUNDLE, CORE_BUNDLE, CORE_MESSAGE_BUNDLE, CURSOR, DATA, DECODED_PROPERTY, DEFAULT_LINE_COLOR, DELETION_ALLOWED, DIAGRAMMER_BUNDLE, DIAGRAMMER_MESSAGE_BUNDLE, ENABLED, EVENT_TYPE, FILL_ON, FORCE_UPDATE_PROPERTIES, FRAMEWORK_BUNDLE, FRAMEWORK_MESSAGE_BUNDLE, GANTT_BUNDLE, GANTT_MESSAGE_BUNDLE, HEIGHT, IMAGE, IMAGE_MODE, INFO_PROVIDER_MB, INT_NOT_DEFINED, INTERACTORS, INTERCEPT_INTERACTOR, ITEM_DISABLED_STYLE_CLASS, ITEM_HIGHLIGHTED_STYLE_CLASS, ITEM_STYLE_CLASS, LINE_COLOR, LINE_WIDTH, MAPS_BUNDLE, MAPS_MESSAGE_BUNDLE, MENU_MODEL_ID, MESSAGE, MESSAGE_BOX, MESSAGE_BOX_ID, MOVE_ALLOWED, OBJECT_FINDER, PARAM_COMPID, PARAM_DATA, PARAM_KEY, PARAM_NAMESPACE, PARAM_RESOURCE, PARAM_SERVICE, PARAM_TYPE, POPUP_MENU, POPUP_MENU_FACTORY, POPUP_MENU_FACTORY_CLASS, PORTLET_NAMESPACE, PROGRESSIVE_ZOOM, PROJECT, RENDER, RESOURCES_PATH, RESOURCES_PATH_PREFIX, ROLLOVER_IMAGE, SCROLL_BAR, SELECTED, SELECTED_IMAGE, SERVICE_FORWARD, SERVICE_FORWARD_INT, SERVLET, SERVLET_CLASS, SERVLET_URL, STYLE, STYLE_CLASS, TGO_BUNDLE, TGO_MESSAGE_BUNDLE, TITLE, TOGGLE, VALUE, VIEW, VIEW_ID, WIDTH
Constructor and Description |
---|
IltFacesGraphServletSupport(jakarta.servlet.ServletContext ctx)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected abstract void |
addJSFActionListeners()
Adds the server actions that invokes the select interactors'
value change listener.
|
protected jakarta.faces.context.FacesContext |
createFacesContext(jakarta.servlet.http.HttpServletRequest request,
jakarta.servlet.http.HttpServletResponse response,
boolean forceCreation)
Creates a faces context to be used by the select
(and select rectangle) actions.
|
protected IlvPopupMenuServletSupport |
createPopupMenuSupport()
Creates a new instance of pop-up menu servlet support.
|
protected IlvSelectionSupport |
createSelectionSupport()
Creates a new instance of selection servlet support.
|
static IlvManagerLayer[] |
FilterLayers(IlvManagerLayer[] source)
Filters out the internal JViews TGO layers from a given list
of layers.
|
IlvManagerLayer[] |
getDynamicLayers(jakarta.servlet.http.HttpServletRequest request,
IlvManagerView view)
Returns all the
IlvManagerLayer instances that are not part
of the graph's background. |
protected Comparator<IlvGraphic> |
getGraphicObjectComparator(IlvManagerLayer layer,
IlvManagerView view,
jakarta.servlet.http.HttpServletRequest request)
Returns a
Comparator implementation that will be used to
sort the IlvGraphic instances in the given layer that need to
have their image map generated. |
protected abstract IlpGraphView |
getGraphView(jakarta.servlet.http.HttpServletRequest request)
Returns the graph view stored in the session, or creates a new one
if needed.
|
protected IlvImageMapAreaGenerator |
getImageMapAreaGenerator(jakarta.servlet.http.HttpServletRequest request,
IlvGraphic obj,
IlvManagerView view,
IlvTransformer t)
Returns the area generator for the specified graphic object.
|
IlvManagerLayer[] |
getLayers(jakarta.servlet.http.HttpServletRequest request,
IlvManagerView view)
Returns the list of layers that are allowed to be rendered.
|
protected Object |
getLock(jakarta.servlet.http.HttpServletRequest request)
Overrides the default implementation of
getLock ,
instead of using IlvManagerView.getRegion , we use
the session. |
protected Comparator<IlvManagerLayer> |
getManagerLayerComparator(IlvManagerView view,
jakarta.servlet.http.HttpServletRequest request)
Returns a
Comparator implementation that will be used to
sort the IlvManagerLayer that are used to generate
the image map when requested. |
IlvManagerView |
getManagerView(jakarta.servlet.http.HttpServletRequest request)
The implementation of the
getManagerView from the
IlvManagerServletSupport class. |
protected IlvManagerView |
getOverviewManagerView(jakarta.servlet.http.HttpServletRequest request)
Returns the manager view to be used when rendering the overview.
|
protected static String |
GetViewId(jakarta.servlet.http.HttpServletRequest request)
Returns the identifier used to store the view and related objects
in session.
|
boolean |
handleRequest(jakarta.servlet.http.HttpServletRequest request,
jakarta.servlet.http.HttpServletResponse response)
Responds to HTTP requests.
|
protected void |
installImageMapAreaGenerator(IlvManager manager,
IlvImageMapAreaGenerator generator)
Deprecated.
Since JViews 8.1 use
IlvFacesManagerServletSupport.shouldGenerateImageMap(HttpServletRequest, IlvManagerLayer, IlvManagerView, IlvTransformer) } and/or
getImageMapAreaGenerator(HttpServletRequest, IlvGraphic, IlvManagerView, IlvTransformer) to filter the objects that will generate image map areas. |
protected void |
logHandleRequestException(Exception exception)
Appropriately logs a record for an exception that has been thrown while
handling a client request.
|
protected URL |
resolveFileName(jakarta.servlet.http.HttpServletRequest request,
String file)
Returns the
URL that corresponds to the given file. |
protected abstract void |
setStyleSheets(jakarta.servlet.http.HttpServletRequest request,
String stylesheets)
Sets a given list of comma separated style sheets into the underlying
JViews TGO component.
|
protected abstract boolean |
shouldGenerateImageMap(jakarta.servlet.http.HttpServletRequest request,
IlvGraphic graphic,
IlvManagerView view,
IlvTransformer t)
Returns
true if image map information should be
generated for the specified IlvGraphic . |
additionalCapabilities, generateImage, getFacesContext, getMenuFactory, getTileManager, installImageMapAreaGenerator, isOverviewRequest, isSessionExpired, prepareManagerView, shouldGenerateImageMap
additionalCapabilities, addServerActionListener, addServerActionListener, beforeDraw, encodeImage, generateImageWhenSessionExpired, getAdditionalCapabilities, getAntialiasing, getContentLengthEnable, getContext, getDefaultImageMapHREF, getExpirationDate, getHitmapSupport, getInternalLock, getJPEGQuality, getKey, getManagerBBox, getMaxZoomLevel, getMinZoomLevel, getPopupMenuSupport, getSelectionSupport, getZoomLevels, isOverviewLayer, isPopupEnabled, isSelectionEnabled, isVerbose, removeServerActionListener, removeServerActionListener, setAntialiasing, setContentLengthEnable, setImageResponseCachePolicy, setJPEGQuality, setPopupEnabled, setSelectionEnabled, setVerbose, useTileManager
doGetScriptMessage, getParameterValidationListener, getScriptMessageSupport, setParameterValidationListener
protected Comparator<IlvGraphic> graphicObjectComparator
protected Comparator<IlvManagerLayer> managerLayerComparator
public IltFacesGraphServletSupport(jakarta.servlet.ServletContext ctx)
ctx
- The servlet context, which is stored internally.protected abstract void addJSFActionListeners()
Adds the server actions that invokes the select interactors' value change listener.
protected abstract IlpGraphView getGraphView(jakarta.servlet.http.HttpServletRequest request)
request
- The current servlet request.protected abstract void setStyleSheets(jakarta.servlet.http.HttpServletRequest request, String stylesheets) throws jakarta.servlet.ServletException
request
- The request being processed.stylesheets
- The style sheet being set.jakarta.servlet.ServletException
public boolean handleRequest(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws IOException, jakarta.servlet.ServletException
false
if the request is not a request
recognized by this servlet.handleRequest
in class IlvFacesManagerServletSupport
request
- The current HTTP request.response
- The HTTP response.false
when the request is not recognized by this
servlet.IOException
- The IOException
jakarta.servlet.ServletException
- The ServletException
protected IlvPopupMenuServletSupport createPopupMenuSupport()
createPopupMenuSupport
in class IlvFacesManagerServletSupport
protected IlvSelectionSupport createSelectionSupport()
This implementation returns null
. Subclasses must override
this method to support selection requests.
createSelectionSupport
in class IlvManagerServletSupport
public IlvManagerLayer[] getLayers(jakarta.servlet.http.HttpServletRequest request, IlvManagerView view) throws jakarta.servlet.ServletException
getLayers
in class IlvManagerServletSupport
request
- The current HTTP request.view
- The manager view (returned by getManagerView
).jakarta.servlet.ServletException
public IlvManagerView getManagerView(jakarta.servlet.http.HttpServletRequest request) throws jakarta.servlet.ServletException
getManagerView
from the
IlvManagerServletSupport
class.getManagerView
in class IlvFacesManagerServletSupport
request
- The current HTTP request.jakarta.servlet.ServletException
IlvManagerServletSupport.getManagerView(HttpServletRequest)
protected Object getLock(jakarta.servlet.http.HttpServletRequest request)
getLock
,
instead of using IlvManagerView.getRegion
, we use
the session.getLock
in class IlvFacesManagerServletSupport
request
- the current Http request.IlvManagerServletSupport.getManagerView(jakarta.servlet.http.HttpServletRequest)
protected static String GetViewId(jakarta.servlet.http.HttpServletRequest request)
request
- The current servlet request.protected jakarta.faces.context.FacesContext createFacesContext(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, boolean forceCreation)
request
- The current Http request.response
- The Http response.protected URL resolveFileName(jakarta.servlet.http.HttpServletRequest request, String file)
URL
that corresponds to the given file.request
- The current request being processed.file
- The path to a file.public static IlvManagerLayer[] FilterLayers(IlvManagerLayer[] source)
source
- The raw list of layers to be renderedprotected IlvManagerView getOverviewManagerView(jakarta.servlet.http.HttpServletRequest request) throws jakarta.servlet.ServletException
The overview cannot be rendered directly from the main manager view because JTGO has its own zoom policies that may conflict (the "Logical" zoom policy, for example). This method creates a specific manager view for rendering the overview, storing it in the session for reuse.
request
- The current servlet request.jakarta.servlet.ServletException
@Deprecated protected void installImageMapAreaGenerator(IlvManager manager, IlvImageMapAreaGenerator generator)
IlvFacesManagerServletSupport.shouldGenerateImageMap(HttpServletRequest, IlvManagerLayer, IlvManagerView, IlvTransformer)
} and/or
getImageMapAreaGenerator(HttpServletRequest, IlvGraphic, IlvManagerView, IlvTransformer)
to filter the objects that will generate image map areas.Installs the given image map generator into all the appropriate objects of the manager view.
installImageMapAreaGenerator
in class IlvFacesManagerServletSupport
manager
- The manager containing the graphic objectsgenerator
- The image map generator to be installedprotected void logHandleRequestException(Exception exception)
It addresses the special cases by adjusting the log level appropriately.
See implementation for details.
public IlvManagerLayer[] getDynamicLayers(jakarta.servlet.http.HttpServletRequest request, IlvManagerView view)
IlvManagerLayer
instances that are not part
of the graph's background.getDynamicLayers
in class IlvManagerServletSupport
request
- The current HttpServletRequest
.view
- The IlvManagerView
returned by getManagerView()
.IlvManagerServletSupport.getDynamicLayers(jakarta.servlet.http.HttpServletRequest, ilog.views.IlvManagerView)
protected IlvImageMapAreaGenerator getImageMapAreaGenerator(jakarta.servlet.http.HttpServletRequest request, IlvGraphic obj, IlvManagerView view, IlvTransformer t)
getImageMapAreaGenerator
in class IlvFacesManagerServletSupport
request
- The current HTTP request.obj
- The graphic object for which the area will be generated.view
- The manager view for the specified request.t
- The transformer used to draw the view.protected abstract boolean shouldGenerateImageMap(jakarta.servlet.http.HttpServletRequest request, IlvGraphic graphic, IlvManagerView view, IlvTransformer t)
true
if image map information should be
generated for the specified IlvGraphic
.request
- The current HTTP request.graphic
- The graphic object.view
- The manager view for the specified request.t
- The transformer used to draw the view.protected Comparator<IlvGraphic> getGraphicObjectComparator(IlvManagerLayer layer, IlvManagerView view, jakarta.servlet.http.HttpServletRequest request)
Comparator
implementation that will be used to
sort the IlvGraphic
instances in the given layer that need to
have their image map generated.
When used, the Comparator
should yield an ordered collection in
descending order with the IlvGraphic
instances of higher
priority being listed first.
A null
value can be returned to indicate that no sorting needs
to take place.getGraphicObjectComparator
in class IlvManagerServletSupport
layer
- The layer that contains IlvGraphic
instances
to be potentially sorted.view
- The manager view for the specified request.request
- The current HTTP request.Comparator
that will be used to sort the
IlvGraphic
instances that need to have their
image map generated. Or null
if no sorting
is needed.protected Comparator<IlvManagerLayer> getManagerLayerComparator(IlvManagerView view, jakarta.servlet.http.HttpServletRequest request)
Comparator
implementation that will be used to
sort the IlvManagerLayer
that are used to generate
the image map when requested.
When used, the Comparator
should yield an ordered collection in
descending order with the IlvManagerLayer
instances of higher
priority being listed first.
A null
value can be returned to indicate that no sorting needs
to take place.getManagerLayerComparator
in class IlvManagerServletSupport
view
- The manager view for the specified request.request
- The current HTTP request.Comparator
that will be used to sort the
IlvManagerLayer
that are used to generate the
image map when requested. Or null
if no sorting
is needed.© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.