net.sourceforge.fixagora.basis.server.control.spreadsheet
Class SpreadSheetWorker

java.lang.Object
  extended by net.sourceforge.fixagora.basis.server.control.spreadsheet.SpreadSheetWorker

public class SpreadSheetWorker
extends java.lang.Object

The Class SpreadSheetWorker.


Constructor Summary
SpreadSheetWorker(SpreadSheet spreadSheet, org.apache.poi.ss.usermodel.Workbook workbook, SpreadSheetHandler spreadSheetHandler, java.util.Set<org.jboss.netty.channel.Channel> channels)
          Instantiates a new spread sheet worker.
 
Method Summary
 void checkTrigger(java.util.Set<org.apache.poi.hssf.usermodel.HSSFCell> updatedCells)
          Check trigger.
 void close()
          Close.
 void close(org.jboss.netty.channel.Channel channel)
          Close.
 org.apache.poi.hssf.usermodel.HSSFWorkbook copyWorkbook()
          Copy workbook.
 java.util.Set<org.jboss.netty.channel.Channel> getChannels()
          Gets the channels.
 java.lang.Double getDeltaValue(java.lang.String string)
          Gets the delta value.
 java.lang.Object getOldValue(java.lang.String string)
          Gets the old value.
 org.apache.poi.hssf.usermodel.HSSFSheet getSheet()
          Gets the sheet.
 SpreadSheet getSpreadSheet()
          Gets the spread sheet.
 SpreadSheetCellFormat getSpreadSheetCellFormat(java.lang.String formatAsString)
          Gets the spread sheet cell format.
 SpreadSheetConditionalFormat getSpreadSheetConditionalFormat(java.lang.String formatAsString)
          Gets the spread sheet conditional format.
 java.util.Set<org.apache.poi.hssf.usermodel.HSSFCell> getUpdatedCells()
          Gets the updated cells.
 void handleFIXMessage(java.util.List<MDInputEntry> mdInputEntries)
          Handle fix message.
 void init()
          Inits the.
 void onClearSpreadSheetCellFormat(int sourceRow, int sourceRowCount, int sourceColumn, int sourceColumnCount, java.util.Set<SpreadSheetCellFormat> copySpreadSheetCellFormatSet, java.util.Set<SpreadSheetConditionalFormat> copySpreadSheetConditionalFormatSet)
          On clear spread sheet cell format.
 org.apache.poi.hssf.usermodel.HSSFWorkbook onCutSpreadSheetCellRequest(CutSpreadSheetCellRequest cutSpreadSheetCellRequest)
          On cut spread sheet cell request.
 void onDeleteColumnRequest(DeleteColumnRequest deleteColumnRequest, org.jboss.netty.channel.Channel channel)
          On delete column request.
 void onDeleteRowRequest(DeleteRowRequest deleteRowRequest, org.jboss.netty.channel.Channel channel)
          On delete row request.
 void onInsertColumnRequest(InsertColumnRequest insertColumnRequest, org.jboss.netty.channel.Channel channel)
          On insert column request.
 void onInsertRowRequest(InsertRowRequest insertRowRequest, org.jboss.netty.channel.Channel channel)
          On insert row request.
 void onModifyColumnVisibleRequest(ModifyColumnVisibleRequest modifyColumnVisibleRequest, org.jboss.netty.channel.Channel channel)
          On modify column visible request.
 void onModifyColumnWidthRequest(ModifyColumnWidthRequest modifyColumnWidthRequest, org.jboss.netty.channel.Channel channel)
          On modify column width request.
 void onModifyRowVisibleResponse(ModifyRowVisibleRequest modifyRowVisibleRequest, org.jboss.netty.channel.Channel channel)
          On modify row visible response.
 void onModifySheetCellRequest(java.util.Collection<ModifySheetCellRequest> modifySheetCellRequests, org.jboss.netty.channel.Channel channel)
          On modify sheet cell request.
 void onModifySpreadSheetCellFormatRequest(ModifySpreadSheetCellFormatRequest modifySpreadSheetCellFormatRequest, org.jboss.netty.channel.Channel channel)
          On modify spread sheet cell format request.
 void onModifySpreadSheetConditionalFormatRequest(ModifySpreadSheetConditionalFormatRequest modifySpreadSheetConditionalFormatRequest, org.jboss.netty.channel.Channel channel)
          On modify spread sheet conditional format request.
 void onPasteSpreadSheetCellRequest(PasteSpreadSheetCellRequest pasteSpreadSheetCellRequest, org.apache.poi.hssf.usermodel.HSSFWorkbook pasteWorkbook, java.util.Set<SpreadSheetCellFormat> spreadSheetCellFormatSet, java.util.Set<SpreadSheetConditionalFormat> spreadSheetConditionalFormatSet, SpreadSheetLocation spreadSheetLocation, org.jboss.netty.channel.Channel channel)
          On paste spread sheet cell request.
 void open(org.jboss.netty.channel.Channel channel)
          Open.
 double parseDate(SpreadSheetCellFormat spreadSheetCellFormat, SpreadSheetCell spreadSheetCell)
          Parses the date.
 void putDeltaValue(java.lang.String string, double value)
          Put delta value.
 void sendUpdates(java.util.Set<org.apache.poi.hssf.usermodel.HSSFCell> updatedCell)
          Send updates.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpreadSheetWorker

public SpreadSheetWorker(SpreadSheet spreadSheet,
                         org.apache.poi.ss.usermodel.Workbook workbook,
                         SpreadSheetHandler spreadSheetHandler,
                         java.util.Set<org.jboss.netty.channel.Channel> channels)
Instantiates a new spread sheet worker.

Parameters:
spreadSheet - the spread sheet
workbook - the workbook
spreadSheetHandler - the spread sheet handler
channels - the channels
Method Detail

init

public void init()
Inits the.


checkTrigger

public void checkTrigger(java.util.Set<org.apache.poi.hssf.usermodel.HSSFCell> updatedCells)
Check trigger.

Parameters:
updatedCells - the updated cells

getSheet

public org.apache.poi.hssf.usermodel.HSSFSheet getSheet()
Gets the sheet.

Returns:
the sheet

getSpreadSheet

public SpreadSheet getSpreadSheet()
Gets the spread sheet.

Returns:
the spread sheet

close

public void close(org.jboss.netty.channel.Channel channel)
Close.

Parameters:
channel - the channel

open

public void open(org.jboss.netty.channel.Channel channel)
Open.

Parameters:
channel - the channel

getUpdatedCells

public java.util.Set<org.apache.poi.hssf.usermodel.HSSFCell> getUpdatedCells()
Gets the updated cells.

Returns:
the updated cells

onModifySheetCellRequest

public void onModifySheetCellRequest(java.util.Collection<ModifySheetCellRequest> modifySheetCellRequests,
                                     org.jboss.netty.channel.Channel channel)
On modify sheet cell request.

Parameters:
modifySheetCellRequests - the modify sheet cell requests
channel - the channel

parseDate

public double parseDate(SpreadSheetCellFormat spreadSheetCellFormat,
                        SpreadSheetCell spreadSheetCell)
Parses the date.

Parameters:
spreadSheetCellFormat - the spread sheet cell format
spreadSheetCell - the spread sheet cell
Returns:
the double

sendUpdates

public void sendUpdates(java.util.Set<org.apache.poi.hssf.usermodel.HSSFCell> updatedCell)
Send updates.

Parameters:
updatedCell - the updated cell

onPasteSpreadSheetCellRequest

public void onPasteSpreadSheetCellRequest(PasteSpreadSheetCellRequest pasteSpreadSheetCellRequest,
                                          org.apache.poi.hssf.usermodel.HSSFWorkbook pasteWorkbook,
                                          java.util.Set<SpreadSheetCellFormat> spreadSheetCellFormatSet,
                                          java.util.Set<SpreadSheetConditionalFormat> spreadSheetConditionalFormatSet,
                                          SpreadSheetLocation spreadSheetLocation,
                                          org.jboss.netty.channel.Channel channel)
On paste spread sheet cell request.

Parameters:
pasteSpreadSheetCellRequest - the paste spread sheet cell request
pasteWorkbook - the paste workbook
spreadSheetCellFormatSet - the spread sheet cell format set
spreadSheetConditionalFormatSet - the spread sheet conditional format set
spreadSheetLocation - the spread sheet location
channel - the channel

onModifySpreadSheetCellFormatRequest

public void onModifySpreadSheetCellFormatRequest(ModifySpreadSheetCellFormatRequest modifySpreadSheetCellFormatRequest,
                                                 org.jboss.netty.channel.Channel channel)
On modify spread sheet cell format request.

Parameters:
modifySpreadSheetCellFormatRequest - the modify spread sheet cell format request
channel - the channel

onCutSpreadSheetCellRequest

public org.apache.poi.hssf.usermodel.HSSFWorkbook onCutSpreadSheetCellRequest(CutSpreadSheetCellRequest cutSpreadSheetCellRequest)
On cut spread sheet cell request.

Parameters:
cutSpreadSheetCellRequest - the cut spread sheet cell request
Returns:
the hSSF workbook

getSpreadSheetCellFormat

public SpreadSheetCellFormat getSpreadSheetCellFormat(java.lang.String formatAsString)
Gets the spread sheet cell format.

Parameters:
formatAsString - the format as string
Returns:
the spread sheet cell format

onClearSpreadSheetCellFormat

public void onClearSpreadSheetCellFormat(int sourceRow,
                                         int sourceRowCount,
                                         int sourceColumn,
                                         int sourceColumnCount,
                                         java.util.Set<SpreadSheetCellFormat> copySpreadSheetCellFormatSet,
                                         java.util.Set<SpreadSheetConditionalFormat> copySpreadSheetConditionalFormatSet)
On clear spread sheet cell format.

Parameters:
sourceRow - the source row
sourceRowCount - the source row count
sourceColumn - the source column
sourceColumnCount - the source column count
copySpreadSheetCellFormatSet - the copy spread sheet cell format set
copySpreadSheetConditionalFormatSet - the copy spread sheet conditional format set

onModifyColumnWidthRequest

public void onModifyColumnWidthRequest(ModifyColumnWidthRequest modifyColumnWidthRequest,
                                       org.jboss.netty.channel.Channel channel)
On modify column width request.

Parameters:
modifyColumnWidthRequest - the modify column width request
channel - the channel

onModifyColumnVisibleRequest

public void onModifyColumnVisibleRequest(ModifyColumnVisibleRequest modifyColumnVisibleRequest,
                                         org.jboss.netty.channel.Channel channel)
On modify column visible request.

Parameters:
modifyColumnVisibleRequest - the modify column visible request
channel - the channel

onModifyRowVisibleResponse

public void onModifyRowVisibleResponse(ModifyRowVisibleRequest modifyRowVisibleRequest,
                                       org.jboss.netty.channel.Channel channel)
On modify row visible response.

Parameters:
modifyRowVisibleRequest - the modify row visible request
channel - the channel

getOldValue

public java.lang.Object getOldValue(java.lang.String string)
Gets the old value.

Parameters:
string - the string
Returns:
the old value

getDeltaValue

public java.lang.Double getDeltaValue(java.lang.String string)
Gets the delta value.

Parameters:
string - the string
Returns:
the delta value

putDeltaValue

public void putDeltaValue(java.lang.String string,
                          double value)
Put delta value.

Parameters:
string - the string
value - the value

onModifySpreadSheetConditionalFormatRequest

public void onModifySpreadSheetConditionalFormatRequest(ModifySpreadSheetConditionalFormatRequest modifySpreadSheetConditionalFormatRequest,
                                                        org.jboss.netty.channel.Channel channel)
On modify spread sheet conditional format request.

Parameters:
modifySpreadSheetConditionalFormatRequest - the modify spread sheet conditional format request
channel - the channel

getSpreadSheetConditionalFormat

public SpreadSheetConditionalFormat getSpreadSheetConditionalFormat(java.lang.String formatAsString)
Gets the spread sheet conditional format.

Parameters:
formatAsString - the format as string
Returns:
the spread sheet conditional format

onDeleteRowRequest

public void onDeleteRowRequest(DeleteRowRequest deleteRowRequest,
                               org.jboss.netty.channel.Channel channel)
On delete row request.

Parameters:
deleteRowRequest - the delete row request
channel - the channel

onDeleteColumnRequest

public void onDeleteColumnRequest(DeleteColumnRequest deleteColumnRequest,
                                  org.jboss.netty.channel.Channel channel)
On delete column request.

Parameters:
deleteColumnRequest - the delete column request
channel - the channel

onInsertRowRequest

public void onInsertRowRequest(InsertRowRequest insertRowRequest,
                               org.jboss.netty.channel.Channel channel)
On insert row request.

Parameters:
insertRowRequest - the insert row request
channel - the channel

onInsertColumnRequest

public void onInsertColumnRequest(InsertColumnRequest insertColumnRequest,
                                  org.jboss.netty.channel.Channel channel)
On insert column request.

Parameters:
insertColumnRequest - the insert column request
channel - the channel

getChannels

public java.util.Set<org.jboss.netty.channel.Channel> getChannels()
Gets the channels.

Returns:
the channels

handleFIXMessage

public void handleFIXMessage(java.util.List<MDInputEntry> mdInputEntries)
Handle fix message.

Parameters:
mdInputEntries - the md input entries

close

public void close()
Close.


copyWorkbook

public org.apache.poi.hssf.usermodel.HSSFWorkbook copyWorkbook()
Copy workbook.

Returns:
the hSSF workbook