Using the Open APIs within your AquaScripts
All of the Open APIs are available through the global variable named "aqua", which is an instance of the "AQAqua" class. The "AQAqua" class has getter methods for all Open API objects, such as AQAqua.getArchive() and AQAqua.getRandom(). Syntactically, you may access getter methods by using the name of the method without the get or set prefix (eg aqua.archive or aqua.random). With the "aqua" variable, the user may acquire instances of objects which contain specific functionality, such as the "AQRandom" object for random data generation and the "AQArchive" object for archiving files.
aqua Global Variable | aqua.random |
Open API Reference Guide: The Open API Reference Guide provides the full technical details and documentation of each API. Getting access to the API Documentation is easy when writing AquaScripts because of its context-sensitive help that may be activated with Shift-F1 on any variable within the editor. The documentation can also be found at http://docs.aquafold.com/ads/15.0/openapi/
Open API Reference Guide |
Open API Script Examples: A downloadable standard set of scripts is available for the application and contains examples of all the functionality available through Aqua Data Studio's Scriptable Open APIs. If you need to see how to implement a specific API Package, explore the Script Examples and edit them for your particular scenario.
Script Examples |
com.aquafold.openapi.archive - accessible via aqua.archive alias in AquaScript
Create and extract cab, ear, jar, rpm, tar, war, zip files: aqua.archive provides a collection of methods and algorithms to archive and extract files. The methods allow you to archive files and folders using explicit file lists or wild card definitions to easily create backup automation. Archive options support the TAR format, and compression for ZIP, GZIP and BZIP2.
com.aquafold.openapi.chart - accessible via aqua.chart alias in AquaScript
Script the creation of a Chart: aqua.chart allows the user to render graphical representations of data sets. These data sets can be obtained from a database source, or generated programmatically using mathematical / statistics operations. The charts may be generated as a binary stream or saved to Excel or PNG files. Supported charts types include : Column, Column cluster, Stacked Column, Area, Stacked Area, Bar, Bar Cluster, Stacked Bar, Line, Stacked Line, Pie, Surface, Scatter, Bubble, High Low Close, Candlestick and World Map.
com.aquafold.openapi.compare - accessible via aqua.compare alias in AquaScript
Compare text files and database schemas: aqua.compare allows comparisons of strings on a line-by-line basis. It can compare CREATE scripts of two server objects, contents of text files, the results of queries, database schema objects and more. Also provide the generation of HTML representation of the differences to allow for generating compare reports.
com.aquafold.openapi.crypto - accessible via aqua.crypto alias in AquaScript
Generate and verify cryptographic hash values for objects, encrypt ZIP files and manipulate with opaque data types: aqua.crypto allows generation of hash strings using a number of cryptographic hash functions (MD2, MD5, SHA1, SHA-256, SHA-384 and SHA-512) for objects of the following types: byte[], File, AQProjectFile, String and Object. aqua.crypto includes functions for verification of hash values for the listed objects and cryptographic functions. aqua.crypto allows encoding ZIP files with AES-256 encryption standard using a password in an opaque object type. It also allows retrieving and passing to functions other opaque data types (passwords, PINs, private data) without revealing their actual values.
com.aquafold.openapi.data - accessible via aqua.data alias in AquaScript
Receive and manipulate with datasets returned from SQL queries: aqua.data allows retrieving datasets from SQL databases into the operational memory in the form of AQDataSet objects. In memory the datasets are logically represented in a form of tables, with logical rows and columns. AQDataSet object methods allow data processing and alteration within the datasets. Dataset objects can be passed as parameters to other Aqua Open API functions for building grids, pivot grids, reports, updating database table values or exporting into the external files.
com.aquafold.openapi.filesystem - accessible via aqua.filesystem alias in AquaScript
Access and modify local file system of the computer that runs the AquaScript environment: aqua.filesystem allows reading information about the local file system, retrieving and changing its directory structure, changing file attributes and permissions, deleting and creating new files and directories, finding specified files and performing actions on files such as concatenations. Methods of the aqua.filesystem API are used for building directory views and trees and performing file and folder management operations typical to file system browsers (Save, Save As, Copy, Move etc.).
com.aquafold.openapi.form - accessible via aqua.form alias in AquaScript
Create interactive forms in JavaScript environment and HTML: aqua.form creates a “grid based” form where each logical cell can contain several GUI components (Text Area, Password field, Buttons etc.). The form can be displayed in the JavaScript environment of Aqua Data Studio or exported as an HTML document using aqua.form.toHtml() method.
com.aquafold.openapi.io - accessible via aqua.io alias in AquaScript
Read and write text data to databases, and files of different formats: aqua.io includes methods that allow input and output operations with database tables and files. Supported file formats are TXT, HTML, XML and Excel. aqua.io provides methods for formatting delimited text and parsing text strings. The HttpLogReader() class included in the aqua.io package specifically designed for reading Apache web server access log files.
com.aquafold.openapi.mail - accessible via aqua.mail alias in AquaScript.
Send, receive e-mails via available SMPT service: aqua.mail allows constructing e-mails with file attachments and sending them via SMTP server. E-mail components managed via methods of aqua.mail include Mail Body (formatted in plain text or HTML), Subject String, Sender Address, Recipients Lists (CC, BCC). E-mail attachments can be formed from files, bite arrays, Hadoop files and Aqua Project files. aqua.mail includes methods for organizing e-mail queues that would ensure e-mail delivery in case temporal SMPTP service or network outages.
com.aquafold.openapi.math - accessible via aqua.math alias in AquaScript.
Build data analysis and data processing algorithms: aqua.math package includes an extensive set of mathematical functions divided into several categories. aqua.math – classic mathematical functions such as Sin, Cos, Exp, Factorial and others. aqua.math.stat – a set of statistical functions such as Mean, Median, Standard Deviation, Variance and others. aqua.math.curve – a collection of function intended to process datasets defining curved lines. Functions such as Interpolation, Savitzky–Golay smoothing filter, Moving Average and a few others. aqua.math.fit – a series of Curve Fitting algorithms that find the parameters of different functions best fit to a series of data points. aqua.math.financial – contains a set of functions often used in the stock technical analysis such as MACD, Price and Volume Trend, Chaikin Volatility and others.
com.aquafold.openapi.net - accessible via aqua.net alias in AquaScript.
Add networking functions to AquaScript applications: aqua.net enables FTP and HTTP communications from within AquaScript. aqua.net.webbrowser includes methods sending requests to HTTP servers from AquaScript by means of aqua.net.wepage and receiving HTTP server responses. aqua.net.ftp includes a set of methods for establishing connections to FTP servers, managing remote file directories, uploading and downloading files and working with the Hadoop file systems.
com.aquafold.openapi.project - accessible via aqua.project alias in AquaScript.
Create and manage AquaProject connections, files and folders: Aqua Open API works around the Aqua Project paradigm. Aqua Project consists of a collection of three types: AquaScripts, Connection and Aqua Project Files (or User Files). Aqua Projects are created within Aqua Data Studio GUI, there is no programmatic way to create a project. aqua.project allows invocation of the other Aqua Open API functions in the context of a specific project, accessing Aqua Project Connections, and modifying Aqua Project Files. aqua.project includes capability of creating a panel (a Dashboard) with buttons linked to another scripts in the Aqua Project.
com.aquafold.openapi.random – accessible via aqua.random alias in AquaScript.
Create datasets with random data within specified Range and Variation: aqua.random allows generation of datasets (AQDatSet objects). The random datasets are created with defined number of columns and rows. Supported data types that can be randomly generated are: Date, Number and character String. For each data type a range can be defined that would keep generated values between specified minimum and maximum values. For Date and Number types it is possible to set a Variation value that specifies maximum allowable difference between any two generated values.
com.aquafold.openapi.rdbms – accessible via aqua.rdbms alias in AquaScript.
Access databases, execute queries and process returned datasets: aqua.rdbms includes methods for specifying connection to the database servers and passing SQL statements (executeSnapshot(), executeQuery() ). It also has a method for passing a script containing multiple SQL statements to the database and receiving multiple result sets. The result sets returned by queries and scripts are uploaded into the system memory in the format of the dataset objects: AQDataSet, AQResultSet, AQScriptResult. The dataset objects are organized logically as grids (with rows and columns, related to the database structure on which the query was executed) and have methods for accessing and altering data in the cells of the grids. Dataset objects have methods for saving its data in the form of OS files. aqua.rdbms includes methods for accessing metadata of databases that allow such operations. Metadata includes lists of the database schemas, tables, users, data types, procedures (including the actual procedure code) and other information. aqua.rdbms.schema package include methods for accessing and modifying database schema objects. aqua.rdbms.util has methods for parsing and formatting SQL statements.
com.aquafold.openapi.report - accessible via aqua.report alias in AquaScript.
Build database reports and save them in TXT, HTML or MS Excel format: aqua.report allows building customized reports based on the dataset object data. Currently supported dataset objects that can be used for creating reports are AQDataSet and AQPivotDataSet. The objects are returned by executeSnapshot() and newPivotDataSet
()
methods.
aqua.report includes methods for defining settings of the report objects that would affect the way the reports are rendered.
com.aquafold.openapi.type – accessible via aqua.type alias in AquaScript.
Create, manipulate, validate and compare different data types: aqua.type include methods for working with the following data types Byte, Integer, Big Integer, Big Decimal, Credit Card, Email Address, Float, Long Short, String. For each data type there is set of functions that allows data validation (for types such as E-mail or Credit Card), compare (for all numerical data types, including dates and times), processing (for example trimming String types or formatting Date types).
com.aquafold.openapi.util – accessible via aqua.util alias in AquaScript.
Utility functions to ease the develop of AquaScripts.: aqua.util provides functions for encoding HTML, URLs and SQL string values. aqua.util includes functions for formatting text string and URL type string and creating arrays Java objects from text strings.
com.aquafold.openapi.vcs – accessible via aqua.vcs alias in AquaScript.
Build clients for Subversion and CVS version control systems: aqua.vcs provides methods for Checking-In, Checking-Out, Updating, Committing files and folders with Subversion and CVS repositories.
关于 AquaClusters 隐私政策 支持 Version - 19.0.2-4 AquaFold, Inc Copyright © 2007-2017