Class: ProjectVersion

ProjectVersion

new ProjectVersion()

Create a new instance of ProjectVersion
Properties:
Name Type Description
title String Array of projects
webInterfaces Array Array of webInterfaces
processes Array Array of processes
summary Object Contains the projects summery
author User Contains the author's informations
project Project Contains the project associated to the version
Source:
See:
Example
Load version
		function loadVersionList(p_project){//loaded project object
            p_project.loadVersions({
				onSuccess:function(){
					var version = p_project.versions[1];
					version.load({
						onSuccess:function(){
							alert("Version loaded");
						}
					});
				}
			});
		};

Methods

create()

Create a new ProjectVersion.
Parameters:
Name Type Argument Description
options.onSuccess Resource~onSuccess a callback function called in case of a success
options.onFailure Resource~onFailure <optional>
a callback function called in case of a failure
options.baseUrl String <optional>
base URL. If not set the current base URL will be used
Source:
See:

generate_xml(options)

generate xml to create/update
Parameters:
Name Type Description
options object options to be used during the call
Properties
Name Type Argument Description
update Boolean Is this an xml for update
baseUrl String <optional>
base URL. If not set the current base URL will be used
Source:
See:

generateUrl()

Overrides Resource's generateUrl method to return the request url
Source:
See:

loadPreset()

Overrides Resource's loadPreset method.
Source:
See:

loadProcesses(options)

Load a list the list of processes.
Parameters:
Name Type Description
options object options to be used during the call
Properties
Name Type Argument Description
onSuccess Resource~onSuccess a callback function called in case of a success
onFailure Resource~onFailure <optional>
a callback function called in case of a failure
baseUrl String <optional>
base URL. If not set the current base URL will be used
Source:
See:
Example
Load processes
    function loadProcess(p_version){//version object
		p_version.loadProcesses({
			onSuccess:function(){
				alert("there are " +p_version.processes.length+" processes");
			}
		});
	};

loadSet(rObject)

Overrides Resource's loadSet method to set local variables after request.
Parameters:
Name Type Description
rObject json JSON representation of the loaded data.
Source:
See:

loadWebInterfaces(options)

Load a list the list of webInterfaces.
Parameters:
Name Type Description
options object options to be used during the call
Properties
Name Type Argument Description
onSuccess Resource~onSuccess a callback function called in case of a success
onFailure Resource~onFailure <optional>
a callback function called in case of a failure
baseUrl String <optional>
base URL. If not set the current base URL will be used
Source:
See:
Example
Load webInterfaces
        function loadWebinterface(p_version){//version object
			p_version.loadWebInterfaces({
				onSuccess:function(){
					alert("there are " +p_version.webInterfaces.length+" web interfaces");
				}
			});
		};

update()

Update an Existing WebInterface.
Parameters:
Name Type Argument Description
options.onSuccess Resource~onSuccess a callback function called in case of a success
options.onFailure Resource~onFailure <optional>
a callback function called in case of a failure
options.baseUrl String <optional>
base URL. If not set the current base URL will be used
Source:
See: