ilog.views.util.servlet
Class IlvSelectionSupport.IlvSelectionResponse

java.lang.Object
  extended by ilog.views.util.servlet.IlvSelectionSupport.IlvSelectionResponse
Enclosing class:
IlvSelectionSupport

public static class IlvSelectionSupport.IlvSelectionResponse
extends Object

IlvSelectionResponse provides the context for handling a selection request. It also stores the changes of the selection to be reflected on the client side selection.

Since:
JViews 7.5

Constructor Summary
IlvSelectionSupport.IlvSelectionResponse(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Creates a new IlvSelectionResponse instance.
 
Method Summary
 void addAllToSelection(List list)
          Adds several selections to the client's selection.
 void addToSelection(Rectangle bbox, List properties)
          Adds a selection to the client's selection.
 void addUpdatedCapability(String name, float value)
          Adds an updated capability to be processed by the client.
 void addUpdatedCapability(String name, int value)
          Adds an updated capability to be processed by the client.
 void addUpdatedCapability(String name, Object value)
          Adds an updated capability to be processed by the client.
 void addUpdatedCapability(String name, String value)
          Adds an updated capability to be processed by the client.
 void addUpdatedCapability(String name, String value, boolean isString)
          Deprecated. Beginning with ILOG JViews 8.1 use addUpdatedCapability(String, Object) instead.
 List getAddList()
          Returns the list of selections to be added to the client side selection.
 javax.servlet.http.HttpServletRequest getHttpRequest()
          Returns the servlet request.
 javax.servlet.http.HttpServletResponse getHttpResponse()
          Returns the servlet response.
 Object getProperty(String name)
          Returns a property previously stored with putProperty() method.
 List getRemoveList()
          Returns the list of selections to be removed from the client side selection.
 Map getUpdatedCapablities()
          Returns the updated capabilities.
 boolean isImageRefresh()
          Returns true when the image must refreshed after selection.
 boolean isNoSelection()
          Returns true if no object was selected by the current selection request; false otherwise.
 boolean isRemoveAll()
          Returns true if the client must clear the current selection.
 void putProperty(String name, Object value)
          Adds a property to the response.
 void removeAllFromSelection(List list)
          Removes several selections from the client's selection.
 void removeAllToSelection(List list)
          Deprecated. Beginning with ILOG JViews 8.0 use removeAllFromSelection(List) instead.
 void removeFromSelection(Rectangle bbox, List properties)
          Removes a selection from the client side selection.
 void removeToSelection(Rectangle bbox, List properties)
          Deprecated. Beginning with ILOG JViews 8.0, use removeFromSelection(Rectangle, List) instead.
 void setImageRefresh(boolean imageRefresh)
          Sets the image refresh flag.
 void setNoSelection(boolean noSelection)
          Sets the no selection result.
 void setRemoveAll(boolean removeAll)
          Sets the remove flag.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlvSelectionSupport.IlvSelectionResponse

public IlvSelectionSupport.IlvSelectionResponse(javax.servlet.http.HttpServletRequest request,
                                                javax.servlet.http.HttpServletResponse response)
Creates a new IlvSelectionResponse instance.

Parameters:
request - The HTTP servlet request.
response - The HTTP servlet response.
Method Detail

getHttpRequest

public javax.servlet.http.HttpServletRequest getHttpRequest()
Returns the servlet request.

Returns:
The HTTP servlet request.

getHttpResponse

public javax.servlet.http.HttpServletResponse getHttpResponse()
Returns the servlet response.

Returns:
The HTTP servlet response.

putProperty

public void putProperty(String name,
                        Object value)
Adds a property to the response. This property can be retrieved through the getProperty() method.

Parameters:
name - The name of the property.
value - The value of the property.

getProperty

public Object getProperty(String name)
Returns a property previously stored with putProperty() method.

Parameters:
name - The name of the property.
Returns:
The property value or null if not found.

isNoSelection

public boolean isNoSelection()
Returns true if no object was selected by the current selection request; false otherwise.


setNoSelection

public void setNoSelection(boolean noSelection)
Sets the no selection result. Set to true if no object was selected by the current selection request; false otherwise.

Parameters:
noSelection - true if no object was selected, false otherwise.

isRemoveAll

public boolean isRemoveAll()
Returns true if the client must clear the current selection. This action will be executed before the process of the addition and deletion of selections.


setRemoveAll

public void setRemoveAll(boolean removeAll)
Sets the remove flag.

Set it to true when the client must clear the current selection.

The client handles this instruction before processing the addition and deletion of selections.

Parameters:
removeAll - true to instruct the client to clear the selection, false otherwise.

isImageRefresh

public boolean isImageRefresh()
Returns true when the image must refreshed after selection.


setImageRefresh

public void setImageRefresh(boolean imageRefresh)
Sets the image refresh flag. Set it to true if the client must query the image and cancel the client selection.

This action takes precedence over the client selection.

Parameters:
imageRefresh - true when the client must query a new image.

getAddList

public List getAddList()
Returns the list of selections to be added to the client side selection.


getRemoveList

public List getRemoveList()
Returns the list of selections to be removed from the client side selection.


getUpdatedCapablities

public Map getUpdatedCapablities()
Returns the updated capabilities.


addToSelection

public void addToSelection(Rectangle bbox,
                           List properties)
Adds a selection to the client's selection.

Parameters:
bbox - The bounding box of the selected object, in image coordinates.
properties - The additional properties. The first two properties are mandatory (ID and movable).

addAllToSelection

public void addAllToSelection(List list)
Adds several selections to the client's selection.

Parameters:
list - List of selection to be added. Each selection is an array Object where:
  • object[0]: bounding box of the selected object, in image coordinates.
  • object[1]: array of additional properties

removeToSelection

public void removeToSelection(Rectangle bbox,
                              List properties)
Deprecated. Beginning with ILOG JViews 8.0, use removeFromSelection(Rectangle, List) instead.

Removes a selection from the client side selection.

Parameters:
bbox - The bounding box of the selected object, in image coordinates.
properties - The additional properties. The first two properties are mandatory (ID and movable).

removeFromSelection

public void removeFromSelection(Rectangle bbox,
                                List properties)
Removes a selection from the client side selection.

Parameters:
bbox - The bounding box of the selected object, in image coordinates.
properties - The additional properties. The first two properties are mandatory (ID and movable).
Since:
JViews 8.0

removeAllToSelection

public void removeAllToSelection(List list)
Deprecated. Beginning with ILOG JViews 8.0 use removeAllFromSelection(List) instead.

Removes several selections from the client's selection.

Parameters:
list - List of array of object where
  • object[0]: rectangle of the selection
  • object[1]: array of properties

removeAllFromSelection

public void removeAllFromSelection(List list)
Removes several selections from the client's selection.

Parameters:
list - List of array of object where
  • object[0]: rectangle of the selection
  • object[1]: array of properties
Since:
JViews 8.0

addUpdatedCapability

public void addUpdatedCapability(String name,
                                 Object value)
Adds an updated capability to be processed by the client.

Parameters:
name - The capability name.
value - The capability value.
Since:
JViews 8.1

addUpdatedCapability

public void addUpdatedCapability(String name,
                                 String value,
                                 boolean isString)
Deprecated. Beginning with ILOG JViews 8.1 use addUpdatedCapability(String, Object) instead.

Adds an updated capability to be processed by the client.

Parameters:
name - The capability name.
value - The capability value.
isString - true if the capability represents a String.

addUpdatedCapability

public void addUpdatedCapability(String name,
                                 String value)
Adds an updated capability to be processed by the client.

Parameters:
name - The capability name.
value - The capability value.

addUpdatedCapability

public void addUpdatedCapability(String name,
                                 int value)
Adds an updated capability to be processed by the client.

Parameters:
name - The capability name.
value - The capability value.

addUpdatedCapability

public void addUpdatedCapability(String name,
                                 float value)
Adds an updated capability to be processed by the client.

Parameters:
name - The capability name.
value - The capability value.


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.