API Getting Started

Purpose

The purpose of this guide is to provide an index of the classes available from some of the common modules. Because an Aussom module can contain multiple classes and enums, the module name itself may not be enough to describe all of the objects available. This guide exists to help describe the common ones.

Modules

lang.aus

This module is included by default by the interpreter when it starts up, and it contains all the most common core objects that you need available. Here's a list of those classes, there are quite a few.

  • exception: This is the class of the object that's provided in a catch block when an exception occurs.
  • date: This is the common date class used throughout Aussom. It's based on java.util.Date.
  • charset: This class defines available character set values.
  • c: This is the console class. It's a static class that you use to write to standard out. It's also used for all logging purposes.
  • bool: This class defines all functions available to the standard bool datatype. If you have a variable of type bool, you can use any of these functions on it.
  • string: This class defines all functions available to the standard string datatype. If you have a variable of type string, you can use any of these functions on it.
  • double: This class defines all functions available to the standard double datatype. If you have a variable of type double, you can use any of these functions on it.
  • int: This class defines all functions available to the standard int datatype. If you have a variable of type int, you can use any of these functions on it.
  • list: This class defines all functions available to the standard list datatype. If you have a variable of type list, you can use any of these functions on it.
  • map: This class defines all functions available to the standard map datatype. If you have a variable of type map, you can use any of these functions on it.
  • callback: This class defines all functions available to the standard callback datatype. If you have a variable of type callback, you can use any of these functions on it.
  • cnull: This class defines all functions available to the standard null datatype. If you have a variable of type null, you can use any of these functions on it. This is a bit counter intuitive because null is without value, but null is actually an instance of object as well.
  • object: This class defines all functions available to the standard object datatype. If you have a variable of type object, you can use any of these functions on it.
  • buffer: This class defines a byte array data type for working with binary data.
  • Int: This static class provides int related functions.
  • Double: This static class provides double related functions.
  • Bool: This static class provides bool related functions.
  • securitymanager: The securitymanager class provides an object that you can instantiate and provide to the Aussom engine to use for managing security decisions.
  • secman: This static secman class implements function for working with the security manager of the currently executing engine.
  • json: This static class provides functions for working with JSON data.
  • lang: This static class provides some common language functions such as the very useful type() function for getting a type value.
  • byteOrder: is a class that defines byte order.

util.aus

This module defines some common utility classes. Here's a list of them with short descriptions.

  • base64: A static class that provides functions for base64 encoding and decoding.
  • uuid: A static class that provides universal ID creation functionality.
  • hex: A static class that provides functions for hex encoding and decoding.
  • regex: A static class that provides various regular expression functionality. Aussom uses Java regular expressions.

sys.aus

This module defines a single class called sys that implements Aussom system functions such as getOsName() and getJavaVersion() to list just a couple.

file.aus

This module defines a bunch of functions for manipulating files. It has some basic read/write files, along with list, rm, rename, delete, and many others.

aunit.aus

This module defines a single class called test that implements Aussom unit test framework. It can be used from the CLI but also from within an application such as Hogan.

http.aus

This module defines a single static class called http that implements the all important HTTP client functions.

handlebars.aus

This module defines a single class called Handlebars that implements functions for working for Handlebars templating framework.

markdown.aus

This module defines a single static class called markdown that implements functions for working with markdown, specifically converting from markdown to HTML.

jdbc.aus

This module defines a single static class called jdbc that implements the Java JDBC function for working with relational database.

xml.aus

This module defines a static class called xml that implements various XML related functions and an enum called xmltype for defining node types.

reflect.aus

This module defines a static class called reflect that implements various reflection functions and another class called rclass that is an object returned from some of the reflect functions for working with class objects.

math.aus

This module defines a static class called math that implements various mathematical functions.

os.aus

This module defines a static class called os that implements functions for executing OS applications via functions such as exec().

app.aus

This module defines a static class called app that implements a function that opens the system web browser and another that will load a JAR file onto the classpath.