GridJsService

Inheritance: java.lang.Object

All Implemented Interfaces: com.aspose.gridjs.IGridJsService

public class GridJsService implements IGridJsService

Provides the basic operation apis used in controller actions.

Constructors

ConstructorDescription
GridJsService(GridJsOptions options)The default constructor for GridJsService

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 local file 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 file 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
equals(Object arg0)
getClass()
getFile(String fileid)Get file stream
hashCode()
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.
notify()
notifyAll()
ole(String uid, String sheet, int oleid, String filename)Gets the byte array data of the embedded ole object .
toString()
updateCell(String p, String uid)Applies the update operation.
wait()
wait(long arg0)
wait(long arg0, int arg1)

GridJsService(GridJsOptions options)

public GridJsService(GridJsOptions options)

The default constructor for GridJsService

Parameters:

ParameterTypeDescription
optionsGridJsOptions

addImage(String p, String uid, InputStream filestream)

public 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.InputStreamThe filestream of the image

Returns: java.lang.String - The JSON string result

addImageByURL(String p, String uid, InputStream filestream, String imageurl)

public String addImageByURL(String p, String uid, InputStream filestream, String imageurl)

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.InputStreamThe filestream of the image
imageurljava.lang.StringSpecify the image URL.

Returns: java.lang.String - The JSON string result

checkInCacheForCollaborative(String uid)

public 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 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 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 void detailStreamJson(OutputStream stream, String filePath)

Write the JSON string for the file 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 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 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

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

ParameterTypeDescription
arg0java.lang.Object

Returns: boolean

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getFile(String fileid)

public InputStream getFile(String fileid)

Get file stream

Parameters:

ParameterTypeDescription
fileidjava.lang.Stringthe file id

Returns: java.io.InputStream - The stream of the file

hashCode()

public native int hashCode()

Returns: int

image(String uid, String picid)

public 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 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 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 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 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

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

ole(String uid, String sheet, int oleid, String filename)

public byte[] ole(String uid, String sheet, int oleid, String filename)

Gets the byte array data of the embedded ole object .

Parameters:

ParameterTypeDescription
uidjava.lang.StringThe unique id for the file cache.
sheetjava.lang.String
oleidintThe id for the embedded ole object.
filenamejava.lang.String

Returns: byte[] - The byte array data of the embedded ole object .

toString()

public String toString()

Returns: java.lang.String

updateCell(String p, String uid)

public 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

wait()

public final void wait()

wait(long arg0)

public final native void wait(long arg0)

Parameters:

ParameterTypeDescription
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0long
arg1int