Skip to end of banner
Go to start of banner

Routines

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Routine Index

A complete list of routines that is useful for searching.

Array Routines

 This section contains routines that enable users to handle arrays.

  • arrayAddElementIf elem is an element of the array type, returns a new array that includes the specified element at the end.
  • arrayAddElementIfNotExistIf elem is an element of the array type, returns a new array that includes the specified element at the end. The element is added only if it is not already in the array.
  • arrayDeleteElementIf elem is an element of the array type, returns a new array without the specified element.
  • arrayDeleteElementAtIf index is less than the array size, returns a new array without the element at the specified index.
  • arrayDiffDifference between two arrays. Returns the elements from the first array that do not exist in the second array.
  • arrayElementExistsReturns "true" if the element exists in the array and "false" otherwise.
  • arrayFindFinds an element inside the collection and returns its index. If the element is not found, it returns -1.
  • arrayFindBinaryBinary search on sorted array. If the element is not found, returns -1.
  • arrayGetElementReturns the element at the specified index.
  • arrayIntersectIntersect between two arrays.
  • arrayKeysReturns the keys of the array.
  • arrayKeySortSorts the elements from an array by their keys. Works with keyed arrays only.
  • arraysConcatAdds the elements of the second array to the first one.
  • arraySetElementIf elem is an element of the array type, returns a new array with the specified element on position index1.
  • arraySizeReturns the size of the given array.
  • arraySortSorts the elements from an array.
  • arrayStructMapReturns an indexed array of structs mapped to a given field name.
  • arrayStructSortSorts the elements from an array by their specified field. Works only with arrays that contain structures.
  • arrayToSetConverts an array to a set of unique elements.
  • arrayUnionUnion between two arrays.
  • excludeSubarrayReturns an array excluding the array that starts at index 'start' and ends at index 'end'.
  • subarrayReturns an array starting with index 'start' and ending at index 'end'.

Basic Routines

This section contains routines that provide basic language behavior.

  • logPrintPrints a message in the configured Jira logs on the specified level: TRACE, DEBUG, INFO, WARN, ERROR, FATAL.
  • isNullChecks if the provided variable is null or has no value associated then returns "true", otherwise returns "false".
  • isNotNullChecks if the provided variable is not null or has a value associated and returns true. Otherwise returns false.
  • printReturns the printable string in the application log.
  • runnerLogPuts the 'message' on the console of a runner gadget.
  • lastExceptionClassReturns the class of a Java class exception when an error is thrown.
  • lastExceptionMessageReturns the message of a Java class exception when an error is thrown.

Date and Interval Routines

This section contains routines that enable users to deal with dates.

  • addMonthsAdds a number of months to a specified date, preserving the day of month where possible.
  • currentDateReturns the current date.
  • dayReturns a number representing the day of month: 1-31.
  • dayOfWeekReturns the day of week.
  • endOfMonthReturns a date set on the last day of the month for the given date.
  • formatDateFormats the given date into a date/time string accordingly to the given format expression.
  • hourReturns the hour of the provided date: 0-23.
  • millisToDateConverts milliseconds to a date.
  • millisToIntervalConverts milliseconds to a time interval.
  • minuteReturns the minutes of the provided date: 0-59.
  • monthReturns a number representing the month of the provided date (1-12).
  • monthNameReturns the month name of the provided date.
  • parseDateReturns the parsed date according to the format you provided. If parse fails, it will return a null date.
  • secondReturns the seconds of the provided date: 0-59.
  • startOfDayReturns a date, but strips off the hours, minutes and seconds.
  • startOfMonthReturns a date set on the first day of the month for the given date. Also sets hours/minutes/seconds to 0.
  • toDateCreates a date value from the specified parameters.
  • toJiraDateFormatDisplays the given date using Jira format.
  • toRawWorkingIntervalReturns a date interval converted to the specified number of hours per day.
  • toTimeZoneConverts a date to the specified time zone.
  • weekReturns the week number in the year of the provided date.
  • yearReturns the year of the provided date.

File Manipulation Routines

This section contains routines that enable users to handle directories and files.

  • readFromCSVFileReads the values from the CSV file, returning them to an array, of N rows * M columns values.
  • createDirectoryReturns "true" if the directory was created successfully and "false" otherwise.
  • createFileCreates an empty file.
  • deleteFileDeletes a file. It also returns "true" if the file was deleted successfully and "false" otherwise.
  • directoryExistsReturns "true" if the directory exists and "false" otherwise.
  • fileCloseCloses a previously opened file and removes it from memory.
  • fileContainsReturns "true" if the file contains any string that matches the specified regex.
  • fileCopyCopy a file from one location to another.
  • fileExistsReturns 'true' if the file exists and 'false' otherwise.
  • fileInfoReturns basic file information about a file such as the date it was created.
  • fileMoveMoves a file from one location to another.
  • fileOpenOpens a file in memory so that it may be read from.
  • fileReadReads a byte array from a file until it reaches the specified length or until the EOF is reached.
  • fileReadByteReads a byte from an open file.
  • fileReadLineReads a line of text from an open file until it reaches the end of the line (\n or \r\n). Stops also on EOF (end of file).
  • fileSeekMoves the file pointer to a specific spot in an already open file. If the position is negative, moves the file pointer at the end of the file. If the position is 0 (zero) it moves the pointer at the beginning of the file.
  • fileSHA256ChecksumReturns the SHA256 checksum of the file.
  • fileSizeReturns the size for a given file.
  • fileTruncateClears the content of the specified file. Creates a new file if the one you want to clear content for doesn’t exist.
  • fileWriteWrites text or byte data to an open file.
  • findDirectoriesSearches for directories that match the given regex in the specified folder.
  • findFilesSearches for files that match the given regex in the specified folder.
  • printInFilePrints the provided value in the specified file.
  • readFromBinaryFileRead the text of a binary file.
  • readFromTextFileRead the text of the file.
  • renameFileRenames a file.
  • writeToBinaryFilePrints bytes to a specified file. The file can be overwritten or appended to.
  • zipFilesAdds a file or an array of files to a zip file.
  • No labels