Utility functions to find, install, upload and remove packages from the package repository.
apputil:deploy-upload($pkg-metadata as element(), $server-uri as xs:anyURI) as xs:string
Deploys an uploaded XAR to the database.
$pkg-metadata | $pkg-metadata |
$server-uri | $server-uri |
apputil:deploy-upload($package as xs:string, $repo-path as xs:string, $file-name as xs:string, $server-uri as xs:anyURI) as xs:string
Deploys an uploaded XAR to the database.
$package | $package |
$repo-path | $repo-path |
$file-name | $file-name |
$server-uri | $server-uri |
apputil:get-resource($app as xs:string, $path as xs:string) as document-node()?
Retrieve an XML resource from the application package identified by the unique name given in the first parameter. The resource is parsed an returned as an XML document node.
$app | the unique name of the application |
$path | $path |
apputil:install-from-repo($name as xs:string?, $package-path as xs:anyURI?, $server-uri as xs:anyURI) as item()*
$name? | $name? |
$package-path? | $package-path? |
$server-uri | $server-uri |
apputil:install-from-repo($name as xs:string?, $package-path as xs:anyURI?, $server-uri as xs:anyURI, $version as xs:string?) as item()*
Install a package from the public repository. The package is either specified by its unique name in the first parameter or its file name, e.g. "dashboard-0.1.xar".
$name? | unique name of the package to install (optional) |
$package-path? | the file name of the package to install (optional) |
$server-uri | the URI of the public-repo app on the server |
$version? | $version? |
apputil:is-installed($pkgURI as xs:anyURI, $version as xs:string?) as element()?
Check if the application identified by the given unique name is installed. Returns the package descriptor of the application if found or the empty sequence otherwise.
$pkgURI | unique name of the application |
$version? | $version? |
apputil:link-to-app($uri as xs:string, $relLink as xs:string?) as xs:string
Locates the package identified by $uri and returns a path which can be used to link to this package from within the HTML view of another package. $uri the unique name of the package to locate $relLink a relative path to be added to the returned path
$uri | $uri |
$relLink? | $relLink? |
apputil:remove($package-url as xs:string) as xs:boolean
Remove the package identified by its unique name.
$package-url | $package-url |
apputil:resolve($uri as xs:string) as xs:string?
Try to find an application by its unique name and return the relative path to which it has been deployed inside the database.
$uri | $uri |
apputil:resolve-abbrev($abbrev as xs:string) as xs:string?
Try to find an application by its abbreviated name and return the relative path to which it has been deployed inside the database.
$abbrev | $abbrev |
apputil:scan-repo($callback as function(*)) as item()*
Scan all installed application and library packages. Calls the provided callback function once for every package, passing the package URI as first parameter, the expath pkg descriptor XML as second, and the repo.xml descriptor as third.
$callback | the callback function to call for every package found |
apputil:store-upload() as element()
Stores an uploaded XAR to the repo, and returns the metadata.
apputil:upload($server-uri as xs:anyURI) as xs:string
$server-uri | $server-uri |