|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.isomorphic.base.Base | +--com.isomorphic.rpc.BuiltinRPC
This class implements a set of "built-in" RPC methods that are available to all applications as part of the standard SmartClient distribution. Most of these methods should not be callable from the client in a production setting. By default, all of these are enabled in the smartclientSDK and only the methods flagged as enabled in smartclientRuntime are enabled there by default.
You can control which methods are enabled by listing the enabled methods under the
server.properties attribute RPCManager.enabledBuiltinMethods
. Additionally,
you must set RPCManager.enableBuiltinRPCs: true
in server.properties to enable
bulitin RPCs.
Method Summary | |
static RPCResponse |
appendToFile(java.lang.String path,
java.lang.String data)
Appends the supplied contents to a file under webroot. |
static RPCResponse |
deleteFile(java.lang.String path)
Deletes an arbitrary file under webRoot. |
static void |
downloadWSDL(java.lang.String url,
java.lang.String format,
java.lang.String fileName,
RPCManager rpc,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Loads a WSDL file from the specified URL, optionally translates it to SmartClient-compatiable JS format and streams the file back to the requester via content-disposition: attachment. |
static RPCResponse |
evalJava(java.lang.String javaCode,
RequestContext context)
This method is used by the "Evaluate Java" section of the Developer Console (in the Results tab). |
static java.util.List |
getLogEntries(java.lang.String logName)
Returns the contents of the specified log4j log. |
static java.util.List |
getLogNames()
Returns the list of available log4j log names. |
static RPCResponse |
loadFile(java.lang.String path)
Returns the contents of any file under webRoot as a String. |
static RPCResponse |
loadSharedXML(java.lang.String type,
java.lang.String ID)
Load a DS, UI, or APP file from the standard search path. |
static RPCResponse |
saveFile(java.lang.String path,
java.lang.String data)
Saves a file under webRoot with the supplied contents. |
static RPCResponse |
saveSharedXML(java.lang.String type,
java.lang.String ID,
java.lang.String contents)
Writes or overwrites a UI, DS or APP file with the provided contents. |
static RPCResponse |
uploadProgressCheck(javax.servlet.http.HttpSession session,
java.lang.String formID)
Used by the FileUpload control to periodically check the progress of a file upload. |
static RPCResponse |
xmlToJS(java.lang.String xmlString)
Translates XML to JS in exactly the same fashion as done by the <isomorphicXML> JSP tag. |
Method Detail |
public static void downloadWSDL(java.lang.String url, java.lang.String format, java.lang.String fileName, RPCManager rpc, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.lang.Exception
This method is used by the Download feature of the WSDL tab in the Developer Console.
url
- The URL from which to load the WSDL file. Can be relative or absolute.format
- Set to 'xml' to stream the file without translation to JS or 'js' to get
translated output.fileName
- This method returns a stream with content-disposition: attachment. This
argument specifies the default filename that will be shown to the user in the "save as"
dialog that comes up in the browser.public static RPCResponse xmlToJS(java.lang.String xmlString) throws java.lang.Exception
This method is enabled by default in smartclientRuntime
xmlString
- String of XML to be translated to JS.public static RPCResponse uploadProgressCheck(javax.servlet.http.HttpSession session, java.lang.String formID) throws java.lang.Exception
This method is enabled by default in smartclientRuntime
formID
- The ID of the form uploading the file.public static RPCResponse deleteFile(java.lang.String path) throws java.lang.Exception
This method is used by the Visual Builder tool.
path
- file to delete, must be relative to webRoot.public static RPCResponse saveFile(java.lang.String path, java.lang.String data) throws java.lang.Exception
This method is used by the Visual Builder tool.
path
- location of new file, must be relative to webRootdata
- contents of new filepublic static RPCResponse appendToFile(java.lang.String path, java.lang.String data) throws java.lang.Exception
path
- location of file, must be relative to webRootdata
- text to append to filepublic static RPCResponse loadFile(java.lang.String path) throws java.lang.Exception
This method is used by the Visual Builder tool.
path
- location of file to loadpublic static RPCResponse evalJava(java.lang.String javaCode, RequestContext context) throws java.lang.Exception
javaCode
- Arbitrary JSP content, java sections must be enclosed in standard Java
escape tags (<% %>).public static RPCResponse loadSharedXML(java.lang.String type, java.lang.String ID) throws java.lang.Exception
This method is used by the Visual Builder tool.
type
- UI or DS or APPID
- the ID of the file to loadpublic static RPCResponse saveSharedXML(java.lang.String type, java.lang.String ID, java.lang.String contents) throws java.lang.Exception
This method is used by the Visual Builder tool.
type
- UI or DS or APPID
- Specifies the base filename, .ui.xml or .ds.xml or .app.xml is automatically appended,
based on the type.contents
- The contents of the file.public static java.util.List getLogNames() throws java.lang.Exception
This method is used by the Server Logs tab of the Developer Console.
public static java.util.List getLogEntries(java.lang.String logName) throws java.lang.Exception
This method is used by the Server Logs tab of the Developer Console.
logName
- The name of the log.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |