Skip to content

Home

Development

IDEs

JAR services

API Explorer

SpringFunctions

The Spring class contains functions for adding and removing Spring context files from a Martini package.

addContextFile

The addContextFile(...) function is used to add a Spring context file to a Martini package. There are two variations of this function that can be used:

  • Spring.addContextFile(String, InputStream, String, boolean)
  • Spring.addContextFile(String, String, String, boolean)

Parameters

Property index Type Description
fileName 0 java.lang.String The name of the Spring context file.
contents 1 java.lang.String The string content of the Spring context file.
contents 1 java.io.InputStream The InputStream of the Spring context file.
packageName 2 java.lang.String The name of the Martini package where the context file will reside.
replaceExisting 3 java.lang.boolean Whether or not to overwrite the Spring context file, if it already exists.

Usage

Sample service showing how to use the `addContextFile(String, String, String, boolean)` function of `SpringFunctions`

removeContextFile

The removeContextFile(String, String, boolean) function is used to remove a Spring context file from a Martini package.

Parameters

Property index Type Description
fileName 0 java.lang.String The name of the context file to delete.
packageName 1 java.lang.String The name of the Martini package where the context file resides.
removeFiles 2 java.lang.boolean If false, Martini will only unregister the Spring context from memory. If true, Martini will do the same but also delete the context file nn the file system.

Usage

Sample service showing how to use the `removeContextFile(String, String, boolean)` function of `SpringFunctions`