IGridJsService

public interface IGridJsService

Reprensents the basic operation apis interface used in controller actions.

Methods

MethodDescription
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:

ParameterTypeDescription
pjava.lang.StringThe JSON string parameter
uidjava.lang.StringThe unique id for the file cache.
filestreamjava.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:

ParameterTypeDescription
pjava.lang.StringThe JSON string parameter
uidjava.lang.StringThe unique id for the file cache.
filestreamjava.io.InputStream
imageurljava.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:

ParameterTypeDescription
uidjava.lang.String

Returns: boolean -

copyImage(String p, String uid)

public abstract String copyImage(String p, String uid)

Applies the copy image operation.

Parameters:

ParameterTypeDescription
pjava.lang.StringThe JSON string parameter
uidjava.lang.StringThe 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:

ParameterTypeDescription
filePathjava.lang.StringThe file path
uidjava.lang.StringThe 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:

ParameterTypeDescription
streamjava.io.OutputStreamThe stream that will be written
filePathjava.lang.StringThe 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:

ParameterTypeDescription
streamjava.io.OutputStreamThe stream that will be written
filePathjava.lang.StringThe file path
uidjava.lang.StringThe 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:

ParameterTypeDescription
pjava.lang.StringThe JSON parameter
uidjava.lang.StringThe unique id for the file cache.
filenamejava.lang.StringThe file name

Returns: java.lang.String - The file URL

getFile(String fileid)

public abstract InputStream getFile(String fileid)

Get file stream

Parameters:

ParameterTypeDescription
fileidjava.lang.Stringthe 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:

ParameterTypeDescription
uidjava.lang.StringThe unique id for the file cache.
picidjava.lang.StringThe 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:

ParameterTypeDescription
baseURLjava.lang.StringThe base action URL.
picidjava.lang.StringThe image id.
uidjava.lang.StringThe 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:

ParameterTypeDescription
sheetNamejava.lang.Stringthe sheet name.
uidjava.lang.StringThe 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:

ParameterTypeDescription
streamjava.io.OutputStreamThe stream that will be written
sheetNamejava.lang.StringThe sheet name.
uidjava.lang.StringThe 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:

ParameterTypeDescription
uidjava.lang.StringThe unique id for the file cache.
filenamejava.lang.StringSpecifies 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:

ParameterTypeDescription
uidjava.lang.StringThe unique id for the file cache.
sheetnamejava.lang.StringThe worksheet name.
oleidintThe id for the embedded ole object.
labeljava.lang.StringThe 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:

ParameterTypeDescription
pjava.lang.StringThe JSON format string of update operation.
uidjava.lang.StringThe unique id for the file cache.

Returns: java.lang.String