public static webappos.getAppPropertiesByFullName( |
| ) |
Returns some properties of the given app.
appFullName | full app name |
a JSON object
{
fullName: "<name-of-webAppOS-app.webapp>",
displayedName:: "<name-of-webAppOS-web-app>",
urlName: "<name-of-app-without-blanks-lower-case>",
iconURL: "<icon-path>",
projectExtension: "app-project-extension",
singleton: true|false
}
or {}, if no app corresponds to the given full app name;
public static webappos.getAppPropertiesByUrlName( |
| ) |
Returns some properties of the given app.
appUrlName | app URL name |
a JSON object
{
fullName: "<name-of-webAppOS-app.webapp>",
displayedName:: "<name-of-webAppOS-web-app>",
urlName: "<name-of-app-without-blanks-lower-case>",
iconURL: "<icon-path>",
projectExtension: "app-project-extension",
singleton: true|false
}
or {}, if no app corresponds to the given URL name;
static webappos.getAssociatedAppsByExtension( |
| ) |
Finds installed webAppOS apps (availabe for the current login) that are able to handle projects or files with the given file extension.
extension | project file extension (with or without a dot) |
a JSON array of objects
{
fullName: "<name-of-webAppOS-app.webapp>",
displayedName:: "<name-of-webAppOS-web-app>",
urlName: "<name-of-app-without-blanks-lower-case>",
iconURL: "<icon-path>",
projectExtension: "app-project-extension"
}
Finds installed webAppOS apps that are available for the current login.
a JSON array of objects
{
fullName: "<name-of-webAppOS-app.webapp>",
displayedName:: "<name-of-webAppOS-web-app>",
urlName: "<name-of-app-without-blanks-lower-case>",
iconURL: "<icon-path>"
}
public static webappos.appRequiresTemplate( |
| ) |
Returns wheter the given app requires initial template to create a new project. If not, then a new project can be bootstrapped via the initial transformation specified for this app.
appFullName | the full name of the application |
{
result: true|false //true (if a template is required) or false (if the initial transformation can be used)
}
or
{
error: "<message>"
}
public static webappos.getAppTemplates( |
| ) |
Returns all app templates that can be used to create a new project for the given app.
appFullName | the full name of the application |
a JSON array of template names (strings); [], if no app templates found;
public static webappos.getPublishedTemplates( |
| ) |
Returns all published templates that can be used to create a new project for the given app.
appFullName | the full name of the application |
a JSON array of template names (strings); [], if no app templates found;
static webappos.getUserTemplates( |
| ) |
Returns local user templates (from the user's home folder) that can be used to create a new project for the given app.
appFullName | the full name of the application |
a JSON array of template names (strings); [], if no user templates found;
Launches the main web call of the current app.
{}
static webappos.getFileContentAsUTF8String( |
| ) |
Reads the given file from the user's home directory.
fileName | the file name relative to the global webAppOS /home directory (user login must be the first path element) |
a JSON object
{
content: "<file-content-as-string>"
}
or
{
error: "<message>"
}
static webappos.fileExists( |
| ) |
Checks whether the given path exists in the user's home directory.
fileName | the file name relative to the global webAppOS /home directory (user login must be the first path element) |
a JSON object
{
result: true|false
}
or
{
error: "<message>"
}
static webappos.fileExistsInCurrentProject( |
| ) |
Checks whether the given path exists in the cache folder of the current webAppOS project.
fileName | the file name relative to the project cache folder |
a JSON object
{
result: true|false
}
or
{
error: "<message>"
}
static webappos.isDirectory( |
| ) |
Checks whether the given path exists and is a directory.
fileName | the file/directory name relative to the global webAppOS /home directory (user login must be the first path element) |
a JSON object
{
result: true|false
}
or
{
error: "<message>"
}
static webappos.isDirectoryInCurrentProject( |
| ) |
Checks whether the given path exists and is a directory in the cache folder of the current webAppOS project.
fileName | the file/directory name relative to the project cache folder |
a JSON object
{
result: true|false
}
or
{
error: "<message>"
}
webappos.getFileContentFromCurrentProjectAsUTF8String( |
| ) |
Reads the given file from the cache folder of the current webAppOS project.
fileName | the file name relative to the project cache folder |
a JSON object
{
content: "<file-content-as-string>"
}
or
{
error: "<message>"
}
static webappos.deleteFile( |
| ) |
deletes the the given file from the user's home directory
fileName | the file name relative to the global webAppOS /home directory (user login must be the first path element) |
{
result: true|false
}
or
{
error: "<message>"
}
webappos.deleteFileFromCurrentProject( |
| ) |
deletes the the given file from the cache folder of the current webAppOS project
fileName | the file name relative to the project cache folder |
a JSON object
{
result: true|false
}
or
{
error: "<message>"
}
static webappos.uploadFile( |
| ) |
creates (uploads) the file with the given content in the user's home directory
a JSON object
{
fileName: "<file-name-relative-to-the-/home-folder>", // (user login must be the first path element)
content: "<file-content-as-string>"
}
a JSON object
{
result: true|false
}
or
{
error: "<message>"
}
webappos.uploadFileToCurrentProject( |
| ) |
creates (uploads) the file with the given content within the cache folder of the current webAppOS project
a JSON object
{
fileName: "<file-name-relative-to-the-project-cache-folder>",
content: "<file-content-as-string>"
}
a JSON object
{
result: true|false
}
or
{
error: "<message>"
}
webappos.renameActiveProject( |
| ) |
Renames the active project. The current user must be the owner of the project (i.e., the old and new project_id must start with "<login>/")
a JSON object
{
project_id: "old/path/relative/to/global/home",
new_project_id: "new/path/relative/to/global/home"
}
a JSON object
{
result: true|false
}
or
{
error: "<message>"
}
static webappos.getUserRegistryValue( |
| ) |
Gets the value of the given registry key in the "users" area of the registry.
a string represeting a path to key, e.g., "path/to/key"
a JSON object
{
result: <value-as-primitive-or-JSON>
}
or
{
error: "<message>"
}
static webappos.setUserRegistryValue( |
| ) |
Sets the value of the given registry key in the "users" area of the registry.
a JSON object
{
key: "path/to/key",
value: <value-as-primitive-or-JSON>
}
a JSON object
{
result: true|false
}
or
{
result: "false",
error: "<message>"
}
Returns the currently available web calls. If called statically, only static web calls are returned, otherwise, static + app-specific web calls are returned.
a JSON object
{
<action<i>-name>: {
resolvedInstructionSet: "<instruction-set-name>",
resolvedLocation: "<specific-location>",
isPublic: true|false,
isStatic: true|false,
isInline: true|false,
isSingle: true|false,
isClient: true|false,
callingConventions: "webmemcall" or "jsoncall"
},
...
}
or
{
error: "<message>"
}
static webappos.userInGroup( |
| ) |
Checks whether the current user belongs to the given group.
groupName | the name of the group to check |
a JSON object
{
result: true|false
}
or
{
error: "<message>"
}
public static echo( |
| ) |
Returns the same JSON as passed.
json | a stringified JSON |
a JSON object that is equal to the JSON object received (formatting may differ, though)
or
{
error: "<message>"
}