IGridJsService
public interface IGridJsService
Reprensents the basic operation apis interface used in controller actions.
Methods
| Method | Description |
|---|---|
| addImage(String p, String uid, InputStream filestream) | Applies the add image from local file operation. |
| addImageByURL(String p, String uid, InputStream filestream, String imageurl) | Applies the add image from remote URL operation. |
| checkInCacheForCollaborative(String uid) | Check wether workbook instance is in memory cache .this method is apply for Collaborative mode only. |
| copyImage(String p, String uid) | Applies the copy image operation. |
| detailFileJsonWithUid(String filePath, String uid) | Gets JSON string for the file by the specified unique id. . |
| detailStreamJson(OutputStream stream, String filePath) | Write the JSON string for the Workbook to the stream |
| detailStreamJsonWithUid(OutputStream stream, String filePath, String uid) | Write the JSON string for the file to the stream by the specified unique id. |
| download(String p, String uid, String filename) | Applies the download file operation |
| getFile(String fileid) | Get file stream |
| image(String uid, String picid) | Get Stream of image. |
| imageUrl(String baseURL, String picid, String uid) | Gets the image URL. |
| lazyLoadingJson(String sheetName, String uid) | Gets the JSON string of the specified sheet in the file from the cache using the specified unique id. |
| lazyLoadingStreamJson(OutputStream stream, String sheetName, String uid) | Writes the JSON string of the specified sheet in the file from the cache using the specified unique id to the stream.. |
| load(String uid, String filename) | Gets the JSON string of the file from the cache using the specified unique id,set the output filename in the JSON. |
| ole(String uid, String sheetname, int oleid, String label) | Gets the byte array data of the embedded ole object . |
| updateCell(String p, String uid) | Applies the update operation. |
addImage(String p, String uid, InputStream filestream)
public abstract String addImage(String p, String uid, InputStream filestream)
Applies the add image from local file operation.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| p | java.lang.String | The JSON string parameter |
| uid | java.lang.String | The unique id for the file cache. |
| filestream | java.io.InputStream |
Returns: java.lang.String
addImageByURL(String p, String uid, InputStream filestream, String imageurl)
public abstract String addImageByURL(String p, String uid, InputStream filestream, String imageurl)
Applies the add image from remote URL operation.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| p | java.lang.String | The JSON string parameter |
| uid | java.lang.String | The unique id for the file cache. |
| filestream | java.io.InputStream | |
| imageurl | java.lang.String |
Returns: java.lang.String
checkInCacheForCollaborative(String uid)
public abstract boolean checkInCacheForCollaborative(String uid)
Check wether workbook instance is in memory cache .this method is apply for Collaborative mode only.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| uid | java.lang.String |
Returns: boolean -
copyImage(String p, String uid)
public abstract String copyImage(String p, String uid)
Applies the copy image operation.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| p | java.lang.String | The JSON string parameter |
| uid | java.lang.String | The unique id for the file cache. |
Returns: java.lang.String - The JSON string result
detailFileJsonWithUid(String filePath, String uid)
public abstract StringBuilder detailFileJsonWithUid(String filePath, String uid)
Gets JSON string for the file by the specified unique id. .
Parameters:
| Parameter | Type | Description |
|---|---|---|
| filePath | java.lang.String | The file path |
| uid | java.lang.String | The unique id for the file cache. |
Returns: java.lang.StringBuilder
detailStreamJson(OutputStream stream, String filePath)
public abstract void detailStreamJson(OutputStream stream, String filePath)
Write the JSON string for the Workbook to the stream
Parameters:
| Parameter | Type | Description |
|---|---|---|
| stream | java.io.OutputStream | The stream that will be written |
| filePath | java.lang.String | The file path |
detailStreamJsonWithUid(OutputStream stream, String filePath, String uid)
public abstract void detailStreamJsonWithUid(OutputStream stream, String filePath, String uid)
Write the JSON string for the file to the stream by the specified unique id.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| stream | java.io.OutputStream | The stream that will be written |
| filePath | java.lang.String | The file path |
| uid | java.lang.String | The unique id for the file cache. |
download(String p, String uid, String filename)
public abstract String download(String p, String uid, String filename)
Applies the download file operation
Parameters:
| Parameter | Type | Description |
|---|---|---|
| p | java.lang.String | The JSON parameter |
| uid | java.lang.String | The unique id for the file cache. |
| filename | java.lang.String | The file name |
Returns: java.lang.String - The file URL
getFile(String fileid)
public abstract InputStream getFile(String fileid)
Get file stream
Parameters:
| Parameter | Type | Description |
|---|---|---|
| fileid | java.lang.String | the file id |
Returns: java.io.InputStream - The stream of the file
image(String uid, String picid)
public abstract InputStream image(String uid, String picid)
Get Stream of image.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| uid | java.lang.String | The unique id for the file cache. |
| picid | java.lang.String | The image id. |
Returns: java.io.InputStream - The image stream
imageUrl(String baseURL, String picid, String uid)
public abstract String imageUrl(String baseURL, String picid, String uid)
Gets the image URL.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| baseURL | java.lang.String | The base action URL. |
| picid | java.lang.String | The image id. |
| uid | java.lang.String | The unique id for the file cache. |
Returns: java.lang.String - The image URL
lazyLoadingJson(String sheetName, String uid)
public abstract StringBuilder lazyLoadingJson(String sheetName, String uid)
Gets the JSON string of the specified sheet in the file from the cache using the specified unique id.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| sheetName | java.lang.String | the sheet name. |
| uid | java.lang.String | The unique id for the file cache. |
Returns: java.lang.StringBuilder
lazyLoadingStreamJson(OutputStream stream, String sheetName, String uid)
public abstract void lazyLoadingStreamJson(OutputStream stream, String sheetName, String uid)
Writes the JSON string of the specified sheet in the file from the cache using the specified unique id to the stream..
Parameters:
| Parameter | Type | Description |
|---|---|---|
| stream | java.io.OutputStream | The stream that will be written |
| sheetName | java.lang.String | The sheet name. |
| uid | java.lang.String | The unique id for the file cache. |
load(String uid, String filename)
public abstract String load(String uid, String filename)
Gets the JSON string of the file from the cache using the specified unique id,set the output filename in the JSON.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| uid | java.lang.String | The unique id for the file cache. |
| filename | java.lang.String | Specifies the file name in the JSON. If set to null,the default filename is: book1. |
Returns: java.lang.String - The JSON string
ole(String uid, String sheetname, int oleid, String label)
public abstract byte[] ole(String uid, String sheetname, int oleid, String label)
Gets the byte array data of the embedded ole object .
Parameters:
| Parameter | Type | Description |
|---|---|---|
| uid | java.lang.String | The unique id for the file cache. |
| sheetname | java.lang.String | The worksheet name. |
| oleid | int | The id for the embedded ole object. |
| label | java.lang.String | The display label of the embedded ole object. |
Returns: byte[] - The byte array data of the embedded ole object .
updateCell(String p, String uid)
public abstract String updateCell(String p, String uid)
Applies the update operation.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| p | java.lang.String | The JSON format string of update operation. |
| uid | java.lang.String | The unique id for the file cache. |
Returns: java.lang.String