org.netxms.api.client.scripts
Interface ScriptLibraryManager


public interface ScriptLibraryManager


Method Summary
 void deleteScript(long scriptId)
          Delete script from library
 Script getScript(long scriptId)
          Get script from library
 java.util.List<Script> getScriptLibrary()
          Get list of all scripts in script library.
 long modifyScript(long scriptId, java.lang.String name, java.lang.String source)
          Modify script.
 void renameScript(long scriptId, java.lang.String name)
          Rename script in script library.
 

Method Detail

getScriptLibrary

java.util.List<Script> getScriptLibrary()
                                        throws java.io.IOException,
                                               NetXMSClientException
Get list of all scripts in script library.

Returns:
ID/name pairs for scripts in script library
Throws:
java.io.IOException - if socket or file I/O error occurs
NXCException - if NetXMS server returns an error or operation was timed out
NetXMSClientException

getScript

Script getScript(long scriptId)
                 throws java.io.IOException,
                        NetXMSClientException
Get script from library

Parameters:
scriptId - script ID
Returns:
script source code
Throws:
java.io.IOException - if socket or file I/O error occurs
NXCException - if NetXMS server returns an error or operation was timed out
NetXMSClientException

modifyScript

long modifyScript(long scriptId,
                  java.lang.String name,
                  java.lang.String source)
                  throws java.io.IOException,
                         NetXMSClientException
Modify script. If scriptId is 0, new script will be created in library.

Parameters:
scriptId - script ID
name - script name
source - script source code
Returns:
script ID (newly assigned if new script was created)
Throws:
java.io.IOException - if socket or file I/O error occurs
NXCException - if NetXMS server returns an error or operation was timed out
NetXMSClientException

renameScript

void renameScript(long scriptId,
                  java.lang.String name)
                  throws java.io.IOException,
                         NetXMSClientException
Rename script in script library.

Parameters:
scriptId - script ID
name - new script name
Throws:
java.io.IOException - if socket or file I/O error occurs
NXCException - if NetXMS server returns an error or operation was timed out
NetXMSClientException

deleteScript

void deleteScript(long scriptId)
                  throws java.io.IOException,
                         NetXMSClientException
Delete script from library

Parameters:
scriptId - script ID
Throws:
java.io.IOException - if socket or file I/O error occurs
NXCException - if NetXMS server returns an error or operation was timed out
NetXMSClientException


Copyright © 2012. All Rights Reserved.