public class IlvFacesDiagrammerServletSupport extends IlvDiagrammerServletSupport implements IlvFacesDiagrammerConstants, IlvDHTMLFrameworkConstants
IlvFacesDiagrammerServletSupport
class is an extension of the
IlvDiagrammerServletSupport
that handle requests that are coming from the DHTML faces diagrammer component.ImageMapAreaGeneratorProperty
DASHBOARD_DIAGRAM, DATA_SOURCE, DATA_URL, DIAGRAMMER, EDITABLE, INPUT_XSL, OUTPUT_XSL, PARAM_CSS, PARAM_XML, 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 |
---|
IlvFacesDiagrammerServletSupport()
Deprecated.
Beginning with JViews 7.5 use
IlvFacesDiagrammerServletSupport(ServletContext) instead. |
IlvFacesDiagrammerServletSupport(jakarta.servlet.ServletContext context)
Creates a new
IlvFacesDiagrammerServletSupport instance. |
Modifier and Type | Method and Description |
---|---|
protected void |
additionalCapabilities(jakarta.servlet.http.HttpServletRequest request,
jakarta.servlet.ServletOutputStream out,
String mimeFormat)
Allows you to add additional capabilities to the capability request.
|
protected void |
addJSFActionListeners()
Adds the server actions that are needed by various client-side interactions.
|
protected IlvPopupMenuServletSupport |
createPopupMenuSupport()
Creates a new instance of pop-up menu servlet support.
|
protected IlvSelectionSupport |
createSelectionSupport()
Overrides
IlvManagerServletSupport.createSelectionSupport() to
return an IlvDiagrammerSelectionSupport selection support. |
protected String |
findFile(String file)
Finds a data file on the server given a relative URL.
|
protected BufferedImage |
generateImage(jakarta.servlet.http.HttpServletRequest request,
IlvRect bbox,
int width,
int height,
String[] requestedLayers,
Color bgColor,
boolean transparent)
Generates the image.
|
protected jakarta.faces.context.FacesContext |
getFacesContext(jakarta.servlet.http.HttpServletRequest request,
jakarta.servlet.http.HttpServletResponse response,
boolean forceCreation)
Returns an artificial faces context to retrieve value bindings.
|
protected IlvImageMapAreaGenerator |
getImageMapAreaGenerator(jakarta.servlet.http.HttpServletRequest request)
Returns the current image map area generator.
|
protected IlvImageMapAreaGenerator |
getImageMapAreaGenerator(jakarta.servlet.http.HttpServletRequest request,
IlvGraphic obj,
IlvManagerView view,
IlvTransformer t)
Returns the area generator for the specified graphic object.
|
protected Object |
getLock(jakarta.servlet.http.HttpServletRequest request)
Returns a locking object that is used to lock the contents of the manager.
|
protected IlvMenuFactory |
getMenuFactory(jakarta.servlet.http.HttpServletRequest request,
jakarta.servlet.http.HttpServletResponse response)
Retrieves or creates the menu factory used in this pop-up menu request.
|
IlvSDMView |
getSDMView(jakarta.servlet.http.HttpServletRequest request)
Returns the SDM view associated with this servlet.
|
IlvTileManager |
getTileManager(jakarta.servlet.http.HttpServletRequest request)
Returns the tile manager.
|
protected Object |
getValue(jakarta.servlet.http.HttpServletRequest request,
String key)
This method is used to retrieve any data that is used by the
implementation of the servlet.
|
boolean |
handleRequest(jakarta.servlet.http.HttpServletRequest request,
jakarta.servlet.http.HttpServletResponse response)
This method is overridden to handle the
"project"
parameter. |
protected boolean |
isSessionExpired(jakarta.servlet.http.HttpServletRequest request)
This method returns
true if the session has expired. |
protected void |
prepareManagerView(jakarta.servlet.http.HttpServletRequest request,
IlvManagerView view)
This method is overridden to set the reference zoom of the view and to
add support for
IlvJComponentGraphic objects. |
protected void |
setDataSource(jakarta.servlet.http.HttpServletRequest request,
String source)
Sets the data source specified in the request to the diagrammer.
|
protected void |
setValue(jakarta.servlet.http.HttpServletRequest request,
String key,
Object value)
This method is used to store any data that is used by the implementation
of the servlet.
|
protected boolean |
shouldGenerateImageMap(jakarta.servlet.http.HttpServletRequest request,
IlvManagerLayer layer,
IlvManagerView view,
IlvTransformer t)
Returns
true if image map information should be
generated for the specified layer. |
getDefaultProject, getDiagrammer, initSDMView, setDefaultProject, setProject
getDataURL, getDefaultStyleSheet, getDefaultXmlFile, getImageMapAreaGenerator, getLayers, getManagerView, installImageMapAreaGenerator, installImageMapAreaGenerator, isMultiSession, setDataURL, setDefaultStyleSheet, setDefaultXmlFile, setMultiSession, setStyleSheet, setXmlFile
additionalCapabilities, addServerActionListener, addServerActionListener, beforeDraw, encodeImage, generateImageWhenSessionExpired, getAdditionalCapabilities, getAntialiasing, getContentLengthEnable, getContext, getDefaultImageMapHREF, getDynamicLayers, getExpirationDate, getGraphicObjectComparator, getHitmapSupport, getInternalLock, getJPEGQuality, getKey, getManagerBBox, getManagerLayerComparator, getMaxZoomLevel, getMinZoomLevel, getPopupMenuSupport, getSelectionSupport, getZoomLevels, isOverviewLayer, isPopupEnabled, isSelectionEnabled, isVerbose, removeServerActionListener, removeServerActionListener, setAntialiasing, setContentLengthEnable, setImageResponseCachePolicy, setJPEGQuality, setPopupEnabled, setSelectionEnabled, setVerbose, useTileManager
doGetScriptMessage, getParameterValidationListener, getScriptMessageSupport, setParameterValidationListener
@Deprecated public IlvFacesDiagrammerServletSupport()
IlvFacesDiagrammerServletSupport(ServletContext)
instead.IlvFacesDiagrammerServletSupport(ServletContext)
instead.public IlvFacesDiagrammerServletSupport(jakarta.servlet.ServletContext context)
IlvFacesDiagrammerServletSupport
instance.context
- The servlet contextprotected IlvPopupMenuServletSupport createPopupMenuSupport()
createPopupMenuSupport
in class IlvManagerServletSupport
protected IlvSelectionSupport createSelectionSupport()
IlvManagerServletSupport.createSelectionSupport()
to
return an IlvDiagrammerSelectionSupport
selection support.
During the creation of this support, listeners to handle selection and move are installed.
createSelectionSupport
in class IlvDiagrammerServletSupport
protected jakarta.faces.context.FacesContext getFacesContext(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, boolean forceCreation)
request
- The HTTP request.response
- The HTTP response.forceCreation
- Set to true
to force the creation of
faces context even when FacesContext.getCurrentInstance()
does not return null
.null
.protected void addJSFActionListeners()
This method registers an instance of the following listeners:
protected String findFile(String file)
findFile
in class IlvSDMServletSupport
file
- The relative URL of the file to find on the server.null
if the file
could not be found.protected boolean isSessionExpired(jakarta.servlet.http.HttpServletRequest request)
true
if the session has expired.request
- The request being processed.true
if the session expired.protected Object getValue(jakarta.servlet.http.HttpServletRequest request, String key)
This method is used to retrieve any data that is used by the implementation of the servlet. The default implementation of this method depends on whether the servlet is in monosession or in multisession mode:
Hashtable
member variable of the servlet.IlvServletPageIdUtil.getSessionAttributeWithPageId(HttpServletRequest, String)
.If you want to implement another strategy to allocate views
to sessions, you need to override this method and the
IlvSDMServletSupport.setValue(jakarta.servlet.http.HttpServletRequest, java.lang.String, java.lang.Object)
method.
getValue
in class IlvSDMServletSupport
request
- The current HTTP request.key
- The key to restore the data.protected void setValue(jakarta.servlet.http.HttpServletRequest request, String key, Object value)
This method is used to store any data that is used by the implementation of the servlet. The default implementation of this method depends on whether the servlet is in monosession or in multisession mode:
Hashtable
member variable of the servlet.IlvServletPageIdUtil.setSessionAttributeWithPageId(HttpServletRequest, String, Object)
.If you want to implement another strategy to allocate views
to sessions, you need to override this method and the
IlvSDMServletSupport.getValue(jakarta.servlet.http.HttpServletRequest, java.lang.String)
method.
setValue
in class IlvSDMServletSupport
request
- The current HTTP request.key
- The key to store the value
.value
- The value to be stored.public IlvSDMView getSDMView(jakarta.servlet.http.HttpServletRequest request)
getSDMView
in class IlvSDMServletSupport
request
- The request being processed.protected IlvMenuFactory getMenuFactory(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws jakarta.servlet.ServletException
request
- The http request.response
- The http response.jakarta.servlet.ServletException
public boolean handleRequest(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws IOException, jakarta.servlet.ServletException
"project"
parameter.handleRequest
in class IlvDiagrammerServletSupport
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 void setDataSource(jakarta.servlet.http.HttpServletRequest request, String source)
request
- The http request.source
- The data source request parameter value.protected boolean shouldGenerateImageMap(jakarta.servlet.http.HttpServletRequest request, IlvManagerLayer layer, IlvManagerView view, IlvTransformer t)
true
if image map information should be
generated for the specified layer.shouldGenerateImageMap
in class IlvManagerServletSupport
request
- The current HTTP request.layer
- The layer.view
- The manager view for the specified request.t
- The transformer used to draw the view.protected IlvImageMapAreaGenerator getImageMapAreaGenerator(jakarta.servlet.http.HttpServletRequest request)
getImageMapAreaGenerator
in class IlvSDMServletSupport
request
- The HttpServletRequest
object.protected IlvImageMapAreaGenerator getImageMapAreaGenerator(jakarta.servlet.http.HttpServletRequest request, IlvGraphic obj, IlvManagerView view, IlvTransformer t)
getImageMapAreaGenerator
in class IlvManagerServletSupport
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 BufferedImage generateImage(jakarta.servlet.http.HttpServletRequest request, IlvRect bbox, int width, int height, String[] requestedLayers, Color bgColor, boolean transparent) throws jakarta.servlet.ServletException
generateImage
in class IlvManagerServletSupport
request
- The current HTTP request.bbox
- The area of the manager to draw.width
- The width of the image.height
- The height of the image.requestedLayers
- An array of layer names to draw.bgColor
- The background color of the imagetransparent
- Indicates if the image should be transparent.jakarta.servlet.ServletException
protected void additionalCapabilities(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.ServletOutputStream out, String mimeFormat)
, 'myprop1' : 'myvalue1', 'myprop2' : 'myvalue2'
additionalCapabilities
in class IlvManagerServletSupport
request
- The current HTTP request.out
- The servlet output stream for writing additional
capabilities.mimeFormat
- since JViews 8.1 always set to "json"public IlvTileManager getTileManager(jakarta.servlet.http.HttpServletRequest request) throws jakarta.servlet.ServletException
getTileManager
in class IlvManagerServletSupport
request
- The http request.jakarta.servlet.ServletException
protected void prepareManagerView(jakarta.servlet.http.HttpServletRequest request, IlvManagerView view) throws jakarta.servlet.ServletException
IlvJComponentGraphic
objects.
This method has been overridden to configure the manager view for tiling.prepareManagerView
in class IlvSDMServletSupport
request
- The current HTTP request.view
- The manager view.jakarta.servlet.ServletException
protected Object getLock(jakarta.servlet.http.HttpServletRequest request)
IlvSDMServletSupport
Hashtable
member variable of the servlet.
getLock
in class IlvSDMServletSupport
request
- The current HTTP request.IlvSDMServletSupport.setValue(HttpServletRequest, String, Object)
,
IlvSDMServletSupport.getValue(HttpServletRequest, String)
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.