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.ImageMapAreaGeneratorPropertyDASHBOARD_DIAGRAM, DATA_SOURCE, DATA_URL, DIAGRAMMER, EDITABLE, INPUT_XSL, OUTPUT_XSL, PARAM_CSS, PARAM_XML, PROPERTY_ACCESSOR, STYLE_SHEETSSESSION_ID_PREFIX, STATE_URL, STATIC_LAYERS_COUNT_PARAM, TILE_MANAGER, UPDATE_INTERVALAUTO_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_LEVELSACCESSIBLE, 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_IMAGEAFTER_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(javax.servlet.ServletContext context)
Creates a new
IlvFacesDiagrammerServletSupport instance. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
additionalCapabilities(javax.servlet.http.HttpServletRequest request,
javax.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(javax.servlet.http.HttpServletRequest request,
IlvRect bbox,
int width,
int height,
String[] requestedLayers,
Color bgColor,
boolean transparent)
Generates the image.
|
protected FacesContext |
getFacesContext(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
boolean forceCreation)
Returns an artificial faces context to retrieve value bindings.
|
protected IlvImageMapAreaGenerator |
getImageMapAreaGenerator(javax.servlet.http.HttpServletRequest request)
Returns the current image map area generator.
|
protected IlvImageMapAreaGenerator |
getImageMapAreaGenerator(javax.servlet.http.HttpServletRequest request,
IlvGraphic obj,
IlvManagerView view,
IlvTransformer t)
Returns the area generator for the specified graphic object.
|
protected Object |
getLock(javax.servlet.http.HttpServletRequest request)
Returns a locking object that is used to lock the contents of the manager.
|
protected IlvMenuFactory |
getMenuFactory(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Retrieves or creates the menu factory used in this pop-up menu request.
|
IlvSDMView |
getSDMView(javax.servlet.http.HttpServletRequest request)
Returns the SDM view associated with this servlet.
|
IlvTileManager |
getTileManager(javax.servlet.http.HttpServletRequest request)
Returns the tile manager.
|
protected Object |
getValue(javax.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(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
This method is overridden to handle the
"project"
parameter. |
protected boolean |
isSessionExpired(javax.servlet.http.HttpServletRequest request)
This method returns
true if the session has expired. |
protected void |
prepareManagerView(javax.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(javax.servlet.http.HttpServletRequest request,
String source)
Sets the data source specified in the request to the diagrammer.
|
protected void |
setValue(javax.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(javax.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, setProjectgetDataURL, getDefaultStyleSheet, getDefaultXmlFile, getImageMapAreaGenerator, getLayers, getManagerView, installImageMapAreaGenerator, installImageMapAreaGenerator, isMultiSession, setDataURL, setDefaultStyleSheet, setDefaultXmlFile, setMultiSession, setStyleSheet, setXmlFileadditionalCapabilities, 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, useTileManagerdoGetScriptMessage, getParameterValidationListener, getScriptMessageSupport, setParameterValidationListener@Deprecated public IlvFacesDiagrammerServletSupport()
IlvFacesDiagrammerServletSupport(ServletContext) instead.IlvFacesDiagrammerServletSupport(ServletContext) instead.public IlvFacesDiagrammerServletSupport(javax.servlet.ServletContext context)
IlvFacesDiagrammerServletSupport instance.context - The servlet contextprotected IlvPopupMenuServletSupport createPopupMenuSupport()
createPopupMenuSupport in class IlvManagerServletSupportprotected 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 IlvDiagrammerServletSupportprotected FacesContext getFacesContext(javax.servlet.http.HttpServletRequest request, javax.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 IlvSDMServletSupportfile - The relative URL of the file to find on the server.null if the file
could not be found.protected boolean isSessionExpired(javax.servlet.http.HttpServletRequest request)
true if the session has expired.request - The request being processed.true if the session expired.protected Object getValue(javax.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(javax.servlet.http.HttpServletRequest, java.lang.String, java.lang.Object) method.
getValue in class IlvSDMServletSupportrequest - The current HTTP request.key - The key to restore the data.protected void setValue(javax.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(javax.servlet.http.HttpServletRequest, java.lang.String) method.
setValue in class IlvSDMServletSupportrequest - The current HTTP request.key - The key to store the value.value - The value to be stored.public IlvSDMView getSDMView(javax.servlet.http.HttpServletRequest request)
getSDMView in class IlvSDMServletSupportrequest - The request being processed.protected IlvMenuFactory getMenuFactory(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException
request - The http request.response - The http response.javax.servlet.ServletExceptionpublic boolean handleRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws IOException,
javax.servlet.ServletException
"project"
parameter.handleRequest in class IlvDiagrammerServletSupportrequest - The current HTTP request.response - The HTTP response.false when the request is not recognized by this
servlet.IOException - The IOExceptionjavax.servlet.ServletException - The ServletExceptionprotected void setDataSource(javax.servlet.http.HttpServletRequest request,
String source)
request - The http request.source - The data source request parameter value.protected boolean shouldGenerateImageMap(javax.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 IlvManagerServletSupportrequest - 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(javax.servlet.http.HttpServletRequest request)
getImageMapAreaGenerator in class IlvSDMServletSupportrequest - The HttpServletRequest object.protected IlvImageMapAreaGenerator getImageMapAreaGenerator(javax.servlet.http.HttpServletRequest request, IlvGraphic obj, IlvManagerView view, IlvTransformer t)
getImageMapAreaGenerator in class IlvManagerServletSupportrequest - 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(javax.servlet.http.HttpServletRequest request, IlvRect bbox, int width, int height, String[] requestedLayers, Color bgColor, boolean transparent) throws javax.servlet.ServletException
generateImage in class IlvManagerServletSupportrequest - 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.javax.servlet.ServletExceptionprotected void additionalCapabilities(javax.servlet.http.HttpServletRequest request,
javax.servlet.ServletOutputStream out,
String mimeFormat)
, 'myprop1' : 'myvalue1', 'myprop2' : 'myvalue2'
additionalCapabilities in class IlvManagerServletSupportrequest - 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(javax.servlet.http.HttpServletRequest request) throws javax.servlet.ServletException
getTileManager in class IlvManagerServletSupportrequest - The http request.javax.servlet.ServletExceptionprotected void prepareManagerView(javax.servlet.http.HttpServletRequest request,
IlvManagerView view)
throws javax.servlet.ServletException
IlvJComponentGraphic objects.
This method has been overridden to configure the manager view for tiling.prepareManagerView in class IlvSDMServletSupportrequest - The current HTTP request.view - The manager view.javax.servlet.ServletExceptionprotected Object getLock(javax.servlet.http.HttpServletRequest request)
IlvSDMServletSupportHashtable member variable of the servlet.
getLock in class IlvSDMServletSupportrequest - The current HTTP request.IlvSDMServletSupport.setValue(HttpServletRequest, String, Object),
IlvSDMServletSupport.getValue(HttpServletRequest, String)© Copyright Rogue Wave Software, Inc. 1997, 2017. All Rights Reserved.