modules/orionode/lib/metastore/fs/store.js
function(workspaceId, workspacedata, callback) {
		var userId = metaUtil.decodeUserIdFromWorkspaceId(workspaceId);
		Promise.using(this.lock(userId, false), function() {
			return new Promise(function(resolve, reject) {
				this._readWorkspaceMetadata(workspaceId, function(error, metadata) {
					if (error) {
						return reject(error);
					}
					if (typeof workspacedata === "function") {
						workspacedata = workspacedata(this._convertWorkspace(metadata));
						if (!workspacedata) {
							return resolve();
						}
					}
					//TODO other properties 
					metadata.Properties = workspacedata.properties;
					this._updateWorkspaceMetadata(workspaceId, metadata, function(error) {
						if (error) {
							return reject(error);
						}
						resolve();
					});
				}.bind(this));
			}.bind(this));
		}.bind(this)).then(
			function(result) {
				callback(null, result);
			},
			callback /* error case */
		);
	}
function(workspaceId, workspacedata, callback) {
		var userId = metaUtil.decodeUserIdFromWorkspaceId(workspaceId);
		Promise.using(this.lock(userId, false), function() {
			return new Promise(function(resolve, reject) {
				this._readWorkspaceMetadata(workspaceId, function(error, metadata) {
					if (error) {
						return reject(error);
					}
					if (typeof workspacedata === "function") {
						workspacedata = workspacedata(this._convertWorkspace(metadata));
						if (!workspacedata) {
							return resolve();
						}
					}
					//TODO other properties 
					metadata.Properties = workspacedata.properties;
					this._updateWorkspaceMetadata(workspaceId, metadata, function(error) {
						if (error) {
							return reject(error);
						}
						resolve();
					});
				}.bind(this));
			}.bind(this));
		}.bind(this)).then(
			function(result) {
				callback(null, result);
			},
			callback /* error case */
		);
	}
function ( workspaceId , workspacedata , callback ) { var userId = metaUtil . decodeUserIdFromWorkspaceId ( workspaceId ) ; Promise . using ( this . lock ( userId , false ) , function ( ) { return new Promise ( function ( resolve , reject ) { this . _readWorkspaceMetadata ( workspaceId , function ( error , metadata ) { if ( error ) { return reject ( error ) ; } if ( typeof workspacedata === "function" ) { workspacedata = workspacedata ( this . _convertWorkspace ( metadata ) ) ; if ( ! workspacedata ) { return resolve ( ) ; } } //TODO other properties  metadata . Properties = workspacedata . properties ; this . _updateWorkspaceMetadata ( workspaceId , metadata , function ( error ) { if ( error ) { return reject ( error ) ; } resolve ( ) ; } ) ; } . bind ( this ) ) ; } . bind ( this ) ) ; } . bind ( this ) ) . then ( function ( result ) { callback ( null , result ) ; } , callback /* error case */ ) ; }
update workspace data, which is the properties of workspace metadata
update workspace data which is the properties of workspace metadata