webgme-engine
Version:
WebGME server and Client API without a GUI
10 lines (9 loc) • 374 kB
HTML
<html>
<head>
</head>
<body style="background: transparent;">
<script src="scripts/docstrap.lib.js"></script>
<script src="scripts/lunr.min.js"></script>
<script src="scripts/fulltext-search.js"></script>
<script type="text/x-docstrap-searchdb">
{"global.html":{"id":"global.html","title":"Global","body":" WebGME Modules CorecrosscutsserializationStorageServer:GMEAuthServer:SafeStorageServer:UserProject Classes AddOnBaseAddOnUpdateResultArtifactBlobClientBlobMetadataBlobRunPluginClientClientCoreExecutorClientGmeLoggerGMENodeInterPluginResultJobInfoOutputInfoPluginBasePluginConfigPluginMessagePluginNodeDescriptionPluginResultProjectProjectInterfaceServer:GMEAuth~GMEAuthServer:SafeStorage~SafeStorageServer:UserProject~UserProjectWebsocketRouterWebsocketRouterUser Events Client#event:BRANCH_CHANGEDClient#event:BRANCH_CLOSEDClient#event:BRANCH_OPENEDClient#event:BRANCH_STATUS_CHANGEDClient#event:CONNECTED_USERS_CHANGEDClient#event:NETWORK_STATUS_CHANGEDClient#event:NOTIFICATIONClient#event:PLUGIN_FINISHEDClient#event:PLUGIN_INITIATEDClient#event:PLUGIN_NOTIFICATIONClient#event:PROJECT_CLOSEDClient#event:PROJECT_OPENED Global Global Externals Promise Global Type Definitions Array Javascript Array class. For more information, look up the reference. Type: Array boolean Javascript Boolean class. For more information, look up the reference Type: boolean Error JavaScript Error class. For more information, look up the reference. Type: object Properties: Name Type Description message string Message typically set in the constructor. stack stack Detailed stack trace. function() Javascript function class. For more information, look up the reference. GmeConfig The main configuration object of the WebGME. For detailed information about the individual options, look up the wiki pages. Type: object Properties: Name Type Description addOn object Add-on related settings. authentication object Authentication related settings. bin object Bin script related settings. blob object Blob related settings. client object Client related settings. core object Client related settings. debug boolean Enables debug mode. executor object Executor related settings. mongo object Mongo database related settings. plugin object Plugin related settings. requirejsPaths object Additional paths to for requirejs. rest object REST related settings. seedProjects object Seed related settings. server object Server related settings. socketIO object Socket IO related settings. storage object Storage related settings. visualization object Visualization related settings. integer Represents an integer from the Number class of Javascript. For more information, look up the reference. Type: integer null Javascript null literal. For more information, look up the reference. Type: null number Javascript Number class. For more information, look up the reference. Type: number object Javascript Object class. For more information, look up the reference. Type: object string Javascript String class. For more information, look up the reference. Type: string undefined Javascript undefined literal. For more information, look up the reference. Type: undefined × Search results Close "},"modules.list.html":{"id":"modules.list.html","title":"Modules","body":" WebGME Modules CorecrosscutsserializationStorageServer:GMEAuthServer:SafeStorageServer:UserProject Classes AddOnBaseAddOnUpdateResultArtifactBlobClientBlobMetadataBlobRunPluginClientClientCoreExecutorClientGmeLoggerGMENodeInterPluginResultJobInfoOutputInfoPluginBasePluginConfigPluginMessagePluginNodeDescriptionPluginResultProjectProjectInterfaceServer:GMEAuth~GMEAuthServer:SafeStorage~SafeStorageServer:UserProject~UserProjectWebsocketRouterWebsocketRouterUser Events Client#event:BRANCH_CHANGEDClient#event:BRANCH_CLOSEDClient#event:BRANCH_OPENEDClient#event:BRANCH_STATUS_CHANGEDClient#event:CONNECTED_USERS_CHANGEDClient#event:NETWORK_STATUS_CHANGEDClient#event:NOTIFICATIONClient#event:PLUGIN_FINISHEDClient#event:PLUGIN_INITIATEDClient#event:PLUGIN_NOTIFICATIONClient#event:PROJECT_CLOSEDClient#event:PROJECT_OPENED Global Global Externals Promise Modules Classes AddOnBase AddOnUpdateResult Artifact BlobClient BlobMetadata BlobRunPluginClient Client Core ExecutorClient GmeLogger GMENode InterPluginResult JobInfo OutputInfo PluginBase PluginConfig PluginMessage PluginNodeDescription PluginResult Project ProjectInterface GMEAuth SafeStorage UserProject WebsocketRouter WebsocketRouterUser Events BRANCH_CHANGED Fired when the open branch changed. The event could either return the name of the newly opened branch or null if there no longer is a branch opened. Type: string | null BRANCH_CLOSED Fired when the currently opened branch is closed. Type: string BRANCH_OPENED Fired when a branch is opened. Type: string BRANCH_STATUS_CHANGED Fired when the branch status changes. The returned value is one of: 'SYNC' - The local branch is in sync with the server. 'AHEAD_SYNC' - There are changes in the local branch that has not been sent to the server. The latest commit was synchronized. 'AHEAD_NOT_SYNC' - There are changes in the local branch that has not been sent to the server. The latest commit did not update the branch head. An action is required. 'PULLING' - External changes to the branch are being pulled into the branch. 'ERROR' - Some unexpected error happened. ('MERGING' - a forked commit is attempted to be merged by the server (this is disabled by default)) Type: object CONNECTED_USERS_CHANGED Fired when there are changes among the users connected to the same branch-room (have the same project and branch opened). Type: object Properties: Name Type Argument Description type string 'BRANCH_ROOM_SOCKETS', 'CLIENT_STATE_NOTIFICATION' projectId string The id of the project branchName string The name of the branch userId string The user-id of the user who joined or left socketId string The unique socket-id of the user who joined or left (this can become hashed) join boolean | undefined <optional> Whether or not the user joined or left the room (undefined -> false) this only applies to the 'BRANCH_ROOM_SOCKETS' event. state object | null <optional> This only applies to the 'CLIENT_STATE_NOTIFICATION' event and is defined by the return value of the function passed in at client.registerUIStateGetter. Behind the scenes this emitted by the client when it receives a 'BRANCH_ROOM_SOCKETS' event in order to notify that new client that it has a user in the same room. But can also be emitted from the GUI by invoking client.emitStateNotification() (which is invoked by the generic webgme UI whenever its state changes). The state in the example below is specific for the generic webgme UI. Examples { "type": "CLIENT_STATE_NOTIFICATION", "state": { "activeAspect": "All", "activeTab": 0, "layout": "DefaultLayout", "activeVisualizer": "ModelEditor", "activeProjectName": "demo+SignalFlowSystem", "activeBranchName": "master", "activeCommit": null, "_toBeActiveObject": "/682825457/607500954", "activeObject": "/682825457/607500954", "activeSelection": [ "/682825457/607500954" ] }, "projectId": "demo+SignalFlowSystem", "branchName": "master", "userId": "demo", "socketId": "nczll3cDYPfoK7IeAAAT" } { "projectId": "demo+SignalFlowSystem", "branchName": "master", "userId": "demo", "socketId": "nczll3cDYPfoK7IeAAAT", "type": "BRANCH_ROOM_SOCKETS", "join": true } NETWORK_STATUS_CHANGED Fired when the network status changes. The returned value is one of: 'CONNECTED' - The websocket connection has been established (a project can be selected) 'DISCONNECTED' - The websocket connection is broken, the user can continue offline and any commits will be pushed automatically by the client when reconnected. 'RECONNECTED' - After a disconnect, the connection has been established again. 'INCOMPATIBLE_CONNECTION' - If the version of webgme-engine the server is different from the one loaded in the client at this point the browser must be refreshed. 'CONNECTION_ERROR' - Some unexpected error happened and the browser needs to be refreshed. Type: string NOTIFICATION A notification with a message to the end-user. Could be generated by plugins or add-ons, but also by GUI widgets. Type: object Properties: Name Type Description message string The content of the message. severity string One of 'success', 'info', 'warn', 'error' PLUGIN_FINISHED Fired when the execution of a plugin - initiated by this given client - finished. The event data contains information about the executed plugin. Type: object Properties: Name Type Description id string the id of the plugin name string the name of the plugin executionId string unique identifier that can be used for managing the execution and communicating with the running plugin metadata object the original metadata of the plugin context object the context of the plugin that has information about the project, active object, and configuration settings for the run canBeAborted boolean flag that show if the plugin can be aborted start string the exact time of the initiation of the plugin clientSide boolean flag showing if the execution is done on the client or the server side result object the result of the plugin - once it became available PLUGIN_INITIATED Fired when the client initiates a plugin execution. The event data contains information about the executed plugin. Type: object Properties: Name Type Description id string the id of the plugin name string the name of the plugin executionId string unique identifier that can be used for managing the execution and communicating with the running plugin metadata object the original metadata of the plugin context object the context of the plugin that has information about the project, active object, and configuration settings for the run canBeAborted boolean flag that show if the plugin can be aborted start string the exact time of the initiation of the plugin clientSide boolean flag showing if the execution is done on the client or the server side result object the result of the plugin - once it became available PLUGIN_NOTIFICATION Fired when the plugin sends a notification to the initiating client. The event data contains information about the executed plugin. Type: object Properties: Name Type Argument Description pluginId string the id of the plugin pluginName string the name of the plugin pluginVersion string the version of the plugin normally in the form of x.y.z executionId string unique identifier that can be used for managing the execution and communicating with the running plugin projectId string the id of the project context the plugin uses branchName string <optional> the name of the branch the plugin runs in. commitHash string <optional> the hash of the commit that represent the version that the plugin runs at. notification object the content of the notification, as the plugin control the content there are no mandatory fields Properties Name Type Argument Description message string <optional> the text content of the notification severity string <optional> the severity of the notification ('debug', 'info' (default), 'warning', 'error'). type string the exact type of the notification which should always be 'PLUGIN_NOTIFICATION'. PROJECT_CLOSED Fired when the currently opened project is closed. Type: string PROJECT_OPENED Fired when a project is opened. Type: string × Search results Close "},"classes.list.html":{"id":"classes.list.html","title":"Classes","body":" WebGME Modules CorecrosscutsserializationStorageServer:GMEAuthServer:SafeStorageServer:UserProject Classes AddOnBaseAddOnUpdateResultArtifactBlobClientBlobMetadataBlobRunPluginClientClientCoreExecutorClientGmeLoggerGMENodeInterPluginResultJobInfoOutputInfoPluginBasePluginConfigPluginMessagePluginNodeDescriptionPluginResultProjectProjectInterfaceServer:GMEAuth~GMEAuthServer:SafeStorage~SafeStorageServer:UserProject~UserProjectWebsocketRouterWebsocketRouterUser Events Client#event:BRANCH_CHANGEDClient#event:BRANCH_CLOSEDClient#event:BRANCH_OPENEDClient#event:BRANCH_STATUS_CHANGEDClient#event:CONNECTED_USERS_CHANGEDClient#event:NETWORK_STATUS_CHANGEDClient#event:NOTIFICATIONClient#event:PLUGIN_FINISHEDClient#event:PLUGIN_INITIATEDClient#event:PLUGIN_NOTIFICATIONClient#event:PROJECT_CLOSEDClient#event:PROJECT_OPENED Global Global Externals Promise Classes Classes AddOnBase AddOnUpdateResult Artifact BlobClient BlobMetadata BlobRunPluginClient Client Core ExecutorClient GmeLogger GMENode InterPluginResult JobInfo OutputInfo PluginBase PluginConfig PluginMessage PluginNodeDescription PluginResult Project ProjectInterface GMEAuth SafeStorage UserProject WebsocketRouter WebsocketRouterUser Events BRANCH_CHANGED Fired when the open branch changed. The event could either return the name of the newly opened branch or null if there no longer is a branch opened. Type: string | null BRANCH_CLOSED Fired when the currently opened branch is closed. Type: string BRANCH_OPENED Fired when a branch is opened. Type: string BRANCH_STATUS_CHANGED Fired when the branch status changes. The returned value is one of: 'SYNC' - The local branch is in sync with the server. 'AHEAD_SYNC' - There are changes in the local branch that has not been sent to the server. The latest commit was synchronized. 'AHEAD_NOT_SYNC' - There are changes in the local branch that has not been sent to the server. The latest commit did not update the branch head. An action is required. 'PULLING' - External changes to the branch are being pulled into the branch. 'ERROR' - Some unexpected error happened. ('MERGING' - a forked commit is attempted to be merged by the server (this is disabled by default)) Type: object CONNECTED_USERS_CHANGED Fired when there are changes among the users connected to the same branch-room (have the same project and branch opened). Type: object Properties: Name Type Argument Description type string 'BRANCH_ROOM_SOCKETS', 'CLIENT_STATE_NOTIFICATION' projectId string The id of the project branchName string The name of the branch userId string The user-id of the user who joined or left socketId string The unique socket-id of the user who joined or left (this can become hashed) join boolean | undefined <optional> Whether or not the user joined or left the room (undefined -> false) this only applies to the 'BRANCH_ROOM_SOCKETS' event. state object | null <optional> This only applies to the 'CLIENT_STATE_NOTIFICATION' event and is defined by the return value of the function passed in at client.registerUIStateGetter. Behind the scenes this emitted by the client when it receives a 'BRANCH_ROOM_SOCKETS' event in order to notify that new client that it has a user in the same room. But can also be emitted from the GUI by invoking client.emitStateNotification() (which is invoked by the generic webgme UI whenever its state changes). The state in the example below is specific for the generic webgme UI. Examples { "type": "CLIENT_STATE_NOTIFICATION", "state": { "activeAspect": "All", "activeTab": 0, "layout": "DefaultLayout", "activeVisualizer": "ModelEditor", "activeProjectName": "demo+SignalFlowSystem", "activeBranchName": "master", "activeCommit": null, "_toBeActiveObject": "/682825457/607500954", "activeObject": "/682825457/607500954", "activeSelection": [ "/682825457/607500954" ] }, "projectId": "demo+SignalFlowSystem", "branchName": "master", "userId": "demo", "socketId": "nczll3cDYPfoK7IeAAAT" } { "projectId": "demo+SignalFlowSystem", "branchName": "master", "userId": "demo", "socketId": "nczll3cDYPfoK7IeAAAT", "type": "BRANCH_ROOM_SOCKETS", "join": true } NETWORK_STATUS_CHANGED Fired when the network status changes. The returned value is one of: 'CONNECTED' - The websocket connection has been established (a project can be selected) 'DISCONNECTED' - The websocket connection is broken, the user can continue offline and any commits will be pushed automatically by the client when reconnected. 'RECONNECTED' - After a disconnect, the connection has been established again. 'INCOMPATIBLE_CONNECTION' - If the version of webgme-engine the server is different from the one loaded in the client at this point the browser must be refreshed. 'CONNECTION_ERROR' - Some unexpected error happened and the browser needs to be refreshed. Type: string NOTIFICATION A notification with a message to the end-user. Could be generated by plugins or add-ons, but also by GUI widgets. Type: object Properties: Name Type Description message string The content of the message. severity string One of 'success', 'info', 'warn', 'error' PLUGIN_FINISHED Fired when the execution of a plugin - initiated by this given client - finished. The event data contains information about the executed plugin. Type: object Properties: Name Type Description id string the id of the plugin name string the name of the plugin executionId string unique identifier that can be used for managing the execution and communicating with the running plugin metadata object the original metadata of the plugin context object the context of the plugin that has information about the project, active object, and configuration settings for the run canBeAborted boolean flag that show if the plugin can be aborted start string the exact time of the initiation of the plugin clientSide boolean flag showing if the execution is done on the client or the server side result object the result of the plugin - once it became available PLUGIN_INITIATED Fired when the client initiates a plugin execution. The event data contains information about the executed plugin. Type: object Properties: Name Type Description id string the id of the plugin name string the name of the plugin executionId string unique identifier that can be used for managing the execution and communicating with the running plugin metadata object the original metadata of the plugin context object the context of the plugin that has information about the project, active object, and configuration settings for the run canBeAborted boolean flag that show if the plugin can be aborted start string the exact time of the initiation of the plugin clientSide boolean flag showing if the execution is done on the client or the server side result object the result of the plugin - once it became available PLUGIN_NOTIFICATION Fired when the plugin sends a notification to the initiating client. The event data contains information about the executed plugin. Type: object Properties: Name Type Argument Description pluginId string the id of the plugin pluginName string the name of the plugin pluginVersion string the version of the plugin normally in the form of x.y.z executionId string unique identifier that can be used for managing the execution and communicating with the running plugin projectId string the id of the project context the plugin uses branchName string <optional> the name of the branch the plugin runs in. commitHash string <optional> the hash of the commit that represent the version that the plugin runs at. notification object the content of the notification, as the plugin control the content there are no mandatory fields Properties Name Type Argument Description message string <optional> the text content of the notification severity string <optional> the severity of the notification ('debug', 'info' (default), 'warning', 'error'). type string the exact type of the notification which should always be 'PLUGIN_NOTIFICATION'. PROJECT_CLOSED Fired when the currently opened project is closed. Type: string PROJECT_OPENED Fired when a project is opened. Type: string × Search results Close "},"externals.list.html":{"id":"externals.list.html","title":"Externals","body":" WebGME Modules CorecrosscutsserializationStorageServer:GMEAuthServer:SafeStorageServer:UserProject Classes AddOnBaseAddOnUpdateResultArtifactBlobClientBlobMetadataBlobRunPluginClientClientCoreExecutorClientGmeLoggerGMENodeInterPluginResultJobInfoOutputInfoPluginBasePluginConfigPluginMessagePluginNodeDescriptionPluginResultProjectProjectInterfaceServer:GMEAuth~GMEAuthServer:SafeStorage~SafeStorageServer:UserProject~UserProjectWebsocketRouterWebsocketRouterUser Events Client#event:BRANCH_CHANGEDClient#event:BRANCH_CLOSEDClient#event:BRANCH_OPENEDClient#event:BRANCH_STATUS_CHANGEDClient#event:CONNECTED_USERS_CHANGEDClient#event:NETWORK_STATUS_CHANGEDClient#event:NOTIFICATIONClient#event:PLUGIN_FINISHEDClient#event:PLUGIN_INITIATEDClient#event:PLUGIN_NOTIFICATIONClient#event:PROJECT_CLOSEDClient#event:PROJECT_OPENED Global Global Externals Promise Externals Classes AddOnBase AddOnUpdateResult Artifact BlobClient BlobMetadata BlobRunPluginClient Client Core ExecutorClient GmeLogger GMENode InterPluginResult JobInfo OutputInfo PluginBase PluginConfig PluginMessage PluginNodeDescription PluginResult Project ProjectInterface GMEAuth SafeStorage UserProject WebsocketRouter WebsocketRouterUser Events BRANCH_CHANGED Fired when the open branch changed. The event could either return the name of the newly opened branch or null if there no longer is a branch opened. Type: string | null BRANCH_CLOSED Fired when the currently opened branch is closed. Type: string BRANCH_OPENED Fired when a branch is opened. Type: string BRANCH_STATUS_CHANGED Fired when the branch status changes. The returned value is one of: 'SYNC' - The local branch is in sync with the server. 'AHEAD_SYNC' - There are changes in the local branch that has not been sent to the server. The latest commit was synchronized. 'AHEAD_NOT_SYNC' - There are changes in the local branch that has not been sent to the server. The latest commit did not update the branch head. An action is required. 'PULLING' - External changes to the branch are being pulled into the branch. 'ERROR' - Some unexpected error happened. ('MERGING' - a forked commit is attempted to be merged by the server (this is disabled by default)) Type: object CONNECTED_USERS_CHANGED Fired when there are changes among the users connected to the same branch-room (have the same project and branch opened). Type: object Properties: Name Type Argument Description type string 'BRANCH_ROOM_SOCKETS', 'CLIENT_STATE_NOTIFICATION' projectId string The id of the project branchName string The name of the branch userId string The user-id of the user who joined or left socketId string The unique socket-id of the user who joined or left (this can become hashed) join boolean | undefined <optional> Whether or not the user joined or left the room (undefined -> false) this only applies to the 'BRANCH_ROOM_SOCKETS' event. state object | null <optional> This only applies to the 'CLIENT_STATE_NOTIFICATION' event and is defined by the return value of the function passed in at client.registerUIStateGetter. Behind the scenes this emitted by the client when it receives a 'BRANCH_ROOM_SOCKETS' event in order to notify that new client that it has a user in the same room. But can also be emitted from the GUI by invoking client.emitStateNotification() (which is invoked by the generic webgme UI whenever its state changes). The state in the example below is specific for the generic webgme UI. Examples { "type": "CLIENT_STATE_NOTIFICATION", "state": { "activeAspect": "All", "activeTab": 0, "layout": "DefaultLayout", "activeVisualizer": "ModelEditor", "activeProjectName": "demo+SignalFlowSystem", "activeBranchName": "master", "activeCommit": null, "_toBeActiveObject": "/682825457/607500954", "activeObject": "/682825457/607500954", "activeSelection": [ "/682825457/607500954" ] }, "projectId": "demo+SignalFlowSystem", "branchName": "master", "userId": "demo", "socketId": "nczll3cDYPfoK7IeAAAT" } { "projectId": "demo+SignalFlowSystem", "branchName": "master", "userId": "demo", "socketId": "nczll3cDYPfoK7IeAAAT", "type": "BRANCH_ROOM_SOCKETS", "join": true } NETWORK_STATUS_CHANGED Fired when the network status changes. The returned value is one of: 'CONNECTED' - The websocket connection has been established (a project can be selected) 'DISCONNECTED' - The websocket connection is broken, the user can continue offline and any commits will be pushed automatically by the client when reconnected. 'RECONNECTED' - After a disconnect, the connection has been established again. 'INCOMPATIBLE_CONNECTION' - If the version of webgme-engine the server is different from the one loaded in the client at this point the browser must be refreshed. 'CONNECTION_ERROR' - Some unexpected error happened and the browser needs to be refreshed. Type: string NOTIFICATION A notification with a message to the end-user. Could be generated by plugins or add-ons, but also by GUI widgets. Type: object Properties: Name Type Description message string The content of the message. severity string One of 'success', 'info', 'warn', 'error' PLUGIN_FINISHED Fired when the execution of a plugin - initiated by this given client - finished. The event data contains information about the executed plugin. Type: object Properties: Name Type Description id string the id of the plugin name string the name of the plugin executionId string unique identifier that can be used for managing the execution and communicating with the running plugin metadata object the original metadata of the plugin context object the context of the plugin that has information about the project, active object, and configuration settings for the run canBeAborted boolean flag that show if the plugin can be aborted start string the exact time of the initiation of the plugin clientSide boolean flag showing if the execution is done on the client or the server side result object the result of the plugin - once it became available PLUGIN_INITIATED Fired when the client initiates a plugin execution. The event data contains information about the executed plugin. Type: object Properties: Name Type Description id string the id of the plugin name string the name of the plugin executionId string unique identifier that can be used for managing the execution and communicating with the running plugin metadata object the original metadata of the plugin context object the context of the plugin that has information about the project, active object, and configuration settings for the run canBeAborted boolean flag that show if the plugin can be aborted start string the exact time of the initiation of the plugin clientSide boolean flag showing if the execution is done on the client or the server side result object the result of the plugin - once it became available PLUGIN_NOTIFICATION Fired when the plugin sends a notification to the initiating client. The event data contains information about the executed plugin. Type: object Properties: Name Type Argument Description pluginId string the id of the plugin pluginName string the name of the plugin pluginVersion string the version of the plugin normally in the form of x.y.z executionId string unique identifier that can be used for managing the execution and communicating with the running plugin projectId string the id of the project context the plugin uses branchName string <optional> the name of the branch the plugin runs in. commitHash string <optional> the hash of the commit that represent the version that the plugin runs at. notification object the content of the notification, as the plugin control the content there are no mandatory fields Properties Name Type Argument Description message string <optional> the text content of the notification severity string <optional> the severity of the notification ('debug', 'info' (default), 'warning', 'error'). type string the exact type of the notification which should always be 'PLUGIN_NOTIFICATION'. PROJECT_CLOSED Fired when the currently opened project is closed. Type: string PROJECT_OPENED Fired when a project is opened. Type: string × Search results Close "},"index.html":{"id":"index.html","title":"Index","body":" WebGME Modules CorecrosscutsserializationStorageServer:GMEAuthServer:SafeStorageServer:UserProject Classes AddOnBaseAddOnUpdateResultArtifactBlobClientBlobMetadataBlobRunPluginClientClientCoreExecutorClientGmeLoggerGMENodeInterPluginResultJobInfoOutputInfoPluginBasePluginConfigPluginMessagePluginNodeDescriptionPluginResultProjectProjectInterfaceServer:GMEAuth~GMEAuthServer:SafeStorage~SafeStorageServer:UserProject~UserProjectWebsocketRouterWebsocketRouterUser Events Client#event:BRANCH_CHANGEDClient#event:BRANCH_CLOSEDClient#event:BRANCH_OPENEDClient#event:BRANCH_STATUS_CHANGEDClient#event:CONNECTED_USERS_CHANGEDClient#event:NETWORK_STATUS_CHANGEDClient#event:NOTIFICATIONClient#event:PLUGIN_FINISHEDClient#event:PLUGIN_INITIATEDClient#event:PLUGIN_NOTIFICATIONClient#event:PROJECT_CLOSEDClient#event:PROJECT_OPENED Global Global Externals Promise Developer documentation The following pages are intended for WebGME users that intend to extend the basic WebGME framework with plugins or user-defined UI pieces. Core - The most important API that holds the key for basic model manipulation and interpretation. Client - The main entrypoint for UI extensions. This is the API that developers use for communication with the core on the client side in the UI. × Search results Close "},"AddOnBase.html":{"id":"AddOnBase.html","title":"Class: AddOnBase","body":" WebGME Modules CorecrosscutsserializationStorageServer:GMEAuthServer:SafeStorageServer:UserProject Classes AddOnBaseAddOnUpdateResultArtifactBlobClientBlobMetadataBlobRunPluginClientClientCoreExecutorClientGmeLoggerGMENodeInterPluginResultJobInfoOutputInfoPluginBasePluginConfigPluginMessagePluginNodeDescriptionPluginResultProjectProjectInterfaceServer:GMEAuth~GMEAuthServer:SafeStorage~SafeStorageServer:UserProject~UserProjectWebsocketRouterWebsocketRouterUser Events Client#event:BRANCH_CHANGEDClient#event:BRANCH_CLOSEDClient#event:BRANCH_OPENEDClient#event:BRANCH_STATUS_CHANGEDClient#event:CONNECTED_USERS_CHANGEDClient#event:NETWORK_STATUS_CHANGEDClient#event:NOTIFICATIONClient#event:PLUGIN_FINISHEDClient#event:PLUGIN_INITIATEDClient#event:PLUGIN_NOTIFICATIONClient#event:PROJECT_CLOSEDClient#event:PROJECT_OPENED Global Global Externals Promise Class: AddOnBase AddOnBase new AddOnBase(logger, gmeConfig) BaseClass for AddOns which run on the server and act upon changes in a branch. Use the AddOnGenerator to generate a new AddOn that implements this class. Parameters: Name Type Description logger GmeLogger gmeConfig GmeConfig Members blobClient :BlobClient Type: BlobClient branchName :string Type: string core :Core Type: Core gmeConfig :GmeConfig Type: GmeConfig logger :GmeLogger Type: GmeLogger project :Project Type: Project updateResult :AddOnUpdateResult Type: AddOnUpdateResult Methods addCommitMessage(msg) Creats or appends commit message for the current update-cycle. Parameters: Name Type Description msg string addNotification(message) Adds a notification to all sockets connected to the branch room. The notification will be sent after the update-callback has been invoked. Parameters: Name Type Description message string | object Message string or object containing message. Properties Name Type Argument Default Description message string If object it must contain a message. severity string <optional> 'info' Severity level ('success', 'info', 'warn', 'error') configure(configuration, callback) Configures the AddOn Parameters: Name Type Description configuration object callback function getDefaultQueryParams() Returns the default values of the Query Parameters. Returns: Type object getDescription() A detailed description of this AddOn and its purpose. It can be one or more sentences. Returns: Type string getName() Readable name of this AddOn that can contain spaces. Returns: Type string getQueryParamsStructure() Structure of query parameters with names, descriptions, minimum, maximum values, default values and type definitions. Returns: Type Array.<object> getVersion() Current version of this AddOn using semantic versioning. Returns: Type string initialize(rootNode, commitObj, callback) Called once when the AddOn is started for the first time. Parameters: Name Type Description rootNode object commitObj object callback function query(commitHash, queryParams, callback) Queries are typically invoked by users from a client. The AddOn is not suppose to make any changes to either the model's or the AddOn's state. (Since users can share a running instance of an AddOn). Parameters: Name Type Description commitHash string State of the invoker. queryParams object Values based on the 'getQueryParametersStructure'. callback function resolves with PluginResult. setToken(token) Overwrite this if you are sending requests to the webgme server. Make sure to still update the blob-clients token. Parameters: Name Type Description token update(rootNode, commitObj, callback) This is invoked after each commit to the branch. AddOns are allowed to make changes on updates, but should not persist by themselves. The manager/monitor will persist after each AddOn has had its way (ordered by the "usedAddOn" registry in the rootNode). Changes made by AddOns do not trigger a new update for other addOns. Parameters: Name Type Description rootNode module:Core~Node commitObj module:Storage~CommitObject callback function × Search results Close "},"AddOnUpdateResult.html":{"id":"AddOnUpdateResult.html","title":"Class: AddOnUpdateResult","body":" WebGME Modules CorecrosscutsserializationStorageServer:GMEAuthServer:SafeStorageServer:UserProject Classes AddOnBaseAddOnUpdateResultArtifactBlobClientBlobMetadataBlobRunPluginClientClientCoreExecutorClientGmeLoggerGMENodeInterPluginResultJobInfoOutputInfoPluginBasePluginConfigPluginMessagePluginNodeDescriptionPluginResultProjectProjectInterfaceServer:GMEAuth~GMEAuthServer:SafeStorage~SafeStorageServer:UserProject~UserProjectWebsocketRouterWebsocketRouterUser Events Client#event:BRANCH_CHANGEDClient#event:BRANCH_CLOSEDClient#event:BRANCH_OPENEDClient#event:BRANCH_STATUS_CHANGEDClient#event:CONNECTED_USERS_CHANGEDClient#event:NETWORK_STATUS_CHANGEDClient#event:NOTIFICATIONClient#event:PLUGIN_FINISHEDClient#event:PLUGIN_INITIATEDClient#event:PLUGIN_NOTIFICATIONClient#event:PROJECT_CLOSEDClient#event:PROJECT_OPENED Global Global Externals Promise Class: AddOnUpdateResult AddOnUpdateResult new AddOnUpdateResult(commitObj) Represents the report format add-ons resolves with after an update. There is no need for the add-on to report if it made changes or not, the monitor/manager will always persist and if there are no changed objects it won't commit to the storage. Parameters: Name Type Description commitObj object commitObj Methods addCommitMessage(addOn, msg) Create or appends to the commit message. Parameters: Name Type Description addOn AddOnBase msg string addNotification(addOn, notification) Parameters: Name Type Description addOn AddOnBase notification Notification × Search results Close "},"Artifact.html":{"id":"Artifact.html","title":"Class: Artifact","body":" WebGME Modules CorecrosscutsserializationStorageServer:GMEAuthServer:SafeStorageServer:UserProject Classes AddOnBaseAddOnUpdateResultArtifactBlobClientBlobMetadataBlobRunPluginClientClientCoreExecutorClientGmeLoggerGMENodeInterPluginResultJobInfoOutputInfoPluginBasePluginConfigPluginMessagePluginNodeDescriptionPluginResultProjectProjectInterfaceServer:GMEAuth~GMEAuthServer:SafeStorage~SafeStorageServer:UserProject~UserProjectWebsocketRouterWebsocketRouterUser Events Client#event:BRANCH_CHANGEDClient#event:BRANCH_CLOSEDClient#event:BRANCH_OPENEDClient#event:BRANCH_STATUS_CHANGEDClient#event:CONNECTED_USERS_CHANGEDClient#event:NETWORK_STATUS_CHANGEDClient#event:NOTIFICATIONClient#event:PLUGIN_FINISHEDClient#event:PLUGIN_INITIATEDClient#event:PLUGIN_NOTIFICATIONClient#event:PROJECT_CLOSEDClient#event:PROJECT_OPENED Global Global Externals Promise Class: Artifact Artifact new Artifact(name, blobClient, descriptor) Creates a new instance of artifact, i.e. complex object, in memory. This object can be saved in the blob-storage on the server and later retrieved with its metadata hash. Parameters: Name Type Description name string Artifact's name without extension blobClient BlobClient descriptor BlobMetadata Methods addFile(name, content [, callback]) Adds content to the artifact as a file. Parameters: Name Type Argument Description name string filename content Blob File object or Blob. callback function <optional> if provided no promise will be returned. Returns: On success the promise will be resolved with {string} metadataHash. On error the promise will be rejected with Error error. Type external:Promise addFileAsSoftLink(name, content [, callback]) Adds files as soft-link. Parameters: Name Type Argument Description name string filename. content Blob File object or Blob. callback function <optional> if provided no promise will be returned. Returns: On success the promise will be resolved with {string} metadataHash. On error the promise will be rejected with Error error. Type external:Promise addFiles(files [, callback]) Adds multiple files. Parameters: Name Type Argument Description files Object.<string, Blob> files to add callback function <optional> if provided no promise will be returned. Returns: On success the promise will be resolved with {string[]} metadataHashes. On error the promise will be rejected with string error. Type external:Promise addFilesAsSoftLinks(files [, callback]) Adds multiple files as soft-links. Parameters: Name Type Argument Description files Object.<string, Blob> files to add callback function <optional> if provided no promise will be returned. Returns: On success the promise will be resolved with {string[]} metadataHashes. On error the promise will be rejected with Error error. Type external:Promise addMetadataHash(name, metadataHash [, size] [, callback]) Adds a hash to the artifact using the given file path. Parameters: Name Type Argument Description name string Path to the file in the artifact. Note: 'a/b/c.txt' metadataHash string Metadata hash that has to be added. size number <optional> Size of the referenced blob. callback function <optional> if provided no promise will be returned. Returns: On success the promise will be resolved with {string} hash. On error the promise will be rejected with Error error. Type external:Promise addMetadataHashes(metadataHashes [, callback]) Adds hashes to the artifact using the given file paths. Parameters: Name Type Argument Description metadataHashes object.<string, string> Keys are file paths and values metadata hashes. callback function <optional> if provided no promise will be returned. Returns: On success the promise will be resolved with {string[]} hashes. On error the promise will be rejected with Error error. Type external:Promise addObjectHash(name, metadataHash [, callback]) Adds a hash to the artifact using the given file path. Parameters: Name Type Argument Description name string Path to the file in the artifact. Note: 'a/b/c.txt' metadataHash string Metadata hash that has to be added. callback function <optional> if provided no promise will be returned. Returns: On success the promise will be resolved with {string} hash. On error the promise will be rejected with Error error. Type external:Promise addObjectHashes(metadataHashes [, callback]) Adds hashes to the artifact using the given file paths. Parameters: Name Type Argument Description metadataHashes object.<string, string> Keys are file paths and values metadata hashes. callback function <optional> if provided no promise will be returned. Returns: On success the promise will be resolved with {string[]} hashes. On error the promise will be rejected with Error error. Type external:Promise save( [callback]) Saves this artifact and uploads the metadata to the server's storage. Parameters: Name Type Argument Description callback function <optional> if provided no promise will be returned. Returns: On success the promise will be resolved with {string} metadataHash. On error the promise will be rejected with Error error. Type external:Promise × Search results Close "},"BlobClient.html":{"id":"BlobClient.html","title":"Class: BlobClient","body":" WebGME Modules CorecrosscutsserializationStorageServer:GMEAuthServer:SafeStorageServer:UserProject Classes AddOnBaseAddOnUpdateResultArtifactBlobClientBlobMetadataBlobRunPluginClientClientCoreExecutorClientGmeLoggerGMENodeInterPluginResultJobInfoOutputInfoPluginBasePluginConfigPluginMessagePluginNodeDescriptionPluginResultProjectProjectInterfaceServer:GMEAuth~GMEAuthServer:SafeStorage~SafeStorageServer:UserProject~UserProjectWebsocketRouterWebsocketRouterUser Events Client#event:BRANCH_CHANGEDClient#event:BRANCH_CLOSEDClient#event:BRANCH_OPENEDClient#event:BRANCH_STATUS_CHANGEDClient#event:CONNECTED_USERS_CHANGEDClient#event:NETWORK_STATUS_CHANGEDClient#event:NOTIFICATIONClient#event:PLUGIN_FINISHEDClient#event:PLUGIN_INITIATEDClient#event:PLUGIN_NOTIFICATIONClient#event:PROJECT_CLOSEDClient#event:PROJECT_OPENED Global Global Externals Promise Class: BlobClient BlobClient new BlobClient(parameters) Client to interact with the blob-storage. Parameters: Name Type Description parameters object Properties Name Type Description logger object Methods createArtifact(name) Creates a new artifact and adds it to array of artifacts of the instance. Parameters: Name Type Description name string Name of artifact Returns: Type Artifact getArtifact(metadataHash [, callback]) Retrieves the Artifact from the blob storage. Parameters: Name Type Argument Description metadataHash hash hash associated with the artifact. callback function <optional> if provided no promise will be returned. Returns: On success the promise will be resolved with Artifact artifact. On error the promise will be rejected with Error error. Type external:Promise getDownloadURL(metadataHash [, subpath]) Returns the get-url for downloading a blob. Parameters: Name Type Argument Description metadataHash string subpath string <optional> optional file-like path to sub-object if complex blob Returns: get-url for blob Type string getHumanSize(bytes [, si]) Converts bytes to a human readable string. Parameters: Name Type Argument Description bytes number File size in bytes. si boolean <optional> If true decimal conversion will be used (by default binary is used). Returns: Type string getMetadata(metadataHash [, callback]) Retrieves metadata from blob storage. Parameters: Name Type Argument Description metadataHash string hash of metadata. callback function <optional> if provided no promise will be returned. Returns: On success the promise will be resolved with {object} metadata. On error the promise will be rejected with Error error. Type external:Promise getNewInstance() Creates and returns a new instance of a BlobClient with the same settings as the current one. This can be used to avoid issues with the artifacts being book-kept at the instance. Returns: A new instance of a BlobClient Type BlobClient getObject(metadataHash [, callback] [, subpath]) Retrieves object from blob storage as a Buffer under node and as an ArrayBuffer in the client. N.B. if the retrieved file is a json-file and running in a browser, the content will be decoded and the string parsed as a JSON. Parameters: Name Type Argument Description metadataHash string hash of metadata for object. callback function <optional> if provided no promise will be returned. subpath string <optional> optional file-like path to sub-object if complex blob Returns: On success the promise will be resolved with {Buffer|ArrayBuffer|object} content. On error the promise will be rejected with Error error. Type external:Promise getObjectAsJSON(metadataHash [, callback]) Retrieves object from blob storage and parses the content as a JSON. (Will resolve with error if not valid JSON.) Parameters: Name Type Argument Description metadataHash string hash of metadata for object. callback function <optional> if provided no promise will be returned. Returns: On success the promise will be resolved with {object} contentJSON. On error the promise will be rejected with Error error. Type external:Promise getObjectAsString(metadataHash [, callback]) Retrieves object from blob storage and parses the content as a string. Parameters: Name Type Argument Description metadataHash string hash of metadata for object. callback function <optional> if provided no promise will be returned. Returns: On success the promise will be resolved with {string} contentString. On error the promise will be rejected with Error error. Type external:Promise getStreamObject(metadataHash, writeStream [, subpath]) If running under nodejs and getting large objects use this method to pipe the downloaded object to your provided writeStream. Parameters: Name Type Argument Description metadataHash string hash of metadata for object. writeStream stream.Writable stream the requested data will be piped to. subpath string <optional> optional file-like path to sub-object if complex blob Example // Piping object to the filesystem.. var writeStream = fs.createWriteStream('my.zip'); writeStream.on('error', function (err) { // handle error }); writeStream.on('finish', function () { // my.zip exists at this point }); blobClient.getStreamObject(metadataHash, writeStream); putFile(name, data [, callback]) Adds a file to the blob storage. Parameters: Name Type Argument Description name string file name. data string | Buffer | ArrayBuffer | stream.Readable file content. !ReadStream currently only available from a nodejs setting callback function <optional> if provided no promise will be returned. Returns: On success the promise will be resolved with {string} metadataHash. On error the promise will be rejected with Error error. Type external:Promise putFiles(o [, callback]) Adds multiple files to the blob storage. Parameters: Name Type Argument Description o object.<string, (string|Buffer|ArrayBuffer)> Keys are file names and values the content. callback function <optional> if provided no promise will be returned. Returns: On success the promise will be resolved with {object} fileNamesToMetadataHashes. On error the promise will be rejected with Error error. Type external:Promise saveAllArtifacts( [callback]) Saves all the artifacts associated with the current instance. Parameters: Name Type Argument Description callback function <optional> if provided no promise will be returned. Returns: On success the promise will be resolved with {string[]} artifactHashes (metadataHashes). On error the promise will be rejected with Error error. Type external:Promise × Search results Close "},"BlobMetadata.html":{"id":"BlobMetadata.html","title":"Class: BlobMetadata","body":" WebGME Modules CorecrosscutsserializationStorageServer:GMEAuthServer:SafeStorageServer:UserProject Classes AddOnBaseAddOnUpdateResultArtifactBlobClientBlobMetadataBlobRunPluginClientClientCoreExecutorClientGmeLoggerGMENodeInterPluginResultJobInfoOutputInfoPluginBasePluginConfigPluginMessagePluginNodeDescriptionPluginResultProjectProjectInterfaceServer:GMEAuth~GMEAuthServer:SafeStorage~SafeStorageServer:UserProject~UserProjectWebsocketRouterWebsocketRouterUser Events Client#event:BRANCH_CHANGEDClient#event:BRANCH_CLOSEDClient#event:BRANCH_OPENEDClient#event:BRANCH_STATUS_CHANGEDClient#event:CONNECTED_USERS_CHANGEDClient#event:NETWORK_STATUS_CHANGEDClient#event:NOTIFICATIONClient#event:PLUGIN_FINISHEDClient#event:PLUGIN_INITIATEDClient#event:PLUGIN_NOTIFICATIONClient#event:PROJECT_CLOSEDClient#event:PROJECT_OPENED Global Global Externals Promise Class: BlobMetadata BlobMetadata new BlobMetadata(metadata) Initializes a new instance of BlobMetadata Parameters: Name Type Description metadata object A serialized metadata object. Properties Name Type Argument Default Description name string content string | Object size number <optional> 0 contentType BlobMetadata.CONTENT_TYPES <optional> BlobMetadata.CONTENT_TYPES.OBJECT mime string <optional> '' isPublic boolean <optional> false tags Array.<string> <optional> [] Members <static> CONTENT_TYPES :Object Type of the metadata Type: Object Methods serialize() Serializes the metadata to a JSON object. Returns: Type Object × Search results Close "},"BlobRunPluginClient.html":{"id":"BlobRunPluginClient.html","title":"Class: BlobRunPluginClient","body":" WebGME Modules CorecrosscutsserializationStorageServer:GMEAuthServer:SafeStorageServer:UserProject Classes AddOnBaseAddOnUpdateResultArtifactBlobClientBlobMetadataBlobRunPluginClientClientCoreExecutorClientGmeLoggerGMENodeInterPluginResultJobInfoOutputInfoPluginBasePluginConfigPluginMessagePluginNodeDescriptionPluginResultProjectProjectInterfaceServer:GMEAuth~GMEAuthServer:SafeStorage~SafeStorageServer:UserProject~UserProjectWebso