|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.birt.report.model.api.ModuleUtil
Provides some tool methods about the modules.
Field Summary | |
static int |
INVALID_MODULE
The invalid module. |
static int |
LIBRARY
The library type. |
static int |
REPORT_DESIGN
The report design type. |
Constructor Summary | |
ModuleUtil()
|
Method Summary | |
static int |
checkModule(SessionHandle sessionHandle,
java.lang.String fileName,
java.io.InputStream is)
Checks the input stream with given file name. |
static ActionHandle |
deserializeAction(java.io.InputStream streamData)
Deserialize an input stream into an Action. |
static ActionHandle |
deserializeAction(java.lang.String strData)
Deserialize a string into an ActionHandle, notice that the handle is faked, the action is not in the design tree, the operation to the handle is not able to be undoned. |
static boolean |
isValidDesign(SessionHandle sessionHandle,
java.lang.String fileName,
java.io.InputStream is)
Justifies whether a given input stream is a valid report design. |
static boolean |
isValidLibrary(SessionHandle sessionHandle,
java.lang.String fileName,
java.io.InputStream is)
Justifies whether a library resource with the given file name is a valid library. |
static java.lang.String |
serializeAction(ActionHandle action)
Serialize an action into a stream, the stream is in UTF-8 encoding. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int LIBRARY
public static final int REPORT_DESIGN
public static final int INVALID_MODULE
Constructor Detail |
public ModuleUtil()
Method Detail |
public static ActionHandle deserializeAction(java.io.InputStream streamData) throws DesignFileException
streamData
- a stream represent an action.
DesignFileException
- if the exception occur when interpret the stream data.public static ActionHandle deserializeAction(java.lang.String strData) throws DesignFileException
strData
- a string represent an action.
DesignFileException
- if the exception occur when interpret the stream data.public static java.lang.String serializeAction(ActionHandle action) throws java.io.IOException
action
- a given action structure.
java.io.IOException
- if I/O exception occur when writing the stream.public static boolean isValidDesign(SessionHandle sessionHandle, java.lang.String fileName, java.io.InputStream is)
sessionHandle
- the current session of the report designfileName
- the file name of the report designis
- the input stream of the report design
public static boolean isValidLibrary(SessionHandle sessionHandle, java.lang.String fileName, java.io.InputStream is)
sessionHandle
- the current session of the libraryfileName
- the file name of the libraryis
- the input stream of the library
public static int checkModule(SessionHandle sessionHandle, java.lang.String fileName, java.io.InputStream is)
ModuleUtil.REPORT_DESIGN
/ModuleUtil.LIBRARY
,
otherwise, ModuleUtil.INVALID
is return.
sessionHandle
- the current session of the libraryfileName
- the file name of the libraryis
- the input stream of the library
ModuleUtil.REPORT_DESIGN
if the input stream is a
report design, ModuleUtil.LIBRARY
if the input
stream is a library, ModuleUtil.INVALID
otherwise.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |