Class: Project

Project

new Project()

Create a new instance of Project
Properties:
Name Type Description
versions Array Array of versions
title String title of the project
webInterfaces Array Array of web interfaces
summary Object Contains the projects summery
author User Contains the author's information.
content Object Contains the content data
updated Date The updated date and time
creationLane Object The updated date and time
usersLanes Array The Lanes associated to the project
customLists Array The customLists associated to the project
lanes Array The lanes associated to the project
pools Array The pools associated to the project
type String The project type
childs Array A list of Child projects
isLoadedChild Boolean Flag that represents if the project was loaded as a child
Source:
See:
Example
Load project
		var proList = new ProjectList();
		proList.load({
			onSuccess : function(){
				p.load({
					onSuccess : function(){
						alert("Project loaded");
					}
				});
			}
		});

Methods

create()

Create a new Project.
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()

generate xml to create/update
Parameters:
Name Type Argument Description
options.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:

loadChildren(options)

Load a list the list of children projects.
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
pagination Object <optional>
an Object with pagination variables (nb and first)
filters Array <optional>
an array of filters
Source:
See:
Example
Load children projects
        function LoadChildren(p_project){//project object
			p_project.loadChildren({
				onSuccess:function(){
					alert(p_project.childs.length);
				}
			});
		};

loadCustomLists(options)

Load a list the CustomLists.
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
pagination Object <optional>
an Object with pagination variables (nb and first)
filters Array <optional>
an array of filters
Source:
See:
Example
Load CustomLists
        function LoadCustomLists(p_project){//project object
			var opt={};
			opt.onSuccess=function(){
				alert("there are " +p_project.customLists.length+" custom lists");
			}
			p_project.loadCustomLists(opt);
		};

loadLanes(options)

Load a list the list of UserLanes.
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
pagination Object <optional>
an Object with pagination variables (nb and first)
filters Array <optional>
an array of filters
Source:
See:
Example
Load ProjectLanes
        function LoadLanes(p_project){//project object
                p_project.loadLanes({
                    onSuccess : function(){
                        l=p_project.lanes[0];
                        l.load({
                            onSuccess : function(){
                                alert(l.title);
                            }
                        });
                    }
                });
		};

loadLanesAndPools(options)

Load a list the list of UserLanes with pools.
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
pagination Object <optional>
an Object with pagination variables (nb and first)
filters Array <optional>
an array of filters
Source:
See:
Example
Load lanes and pools
	function LoadLanesWithPools(p_project){//project object
		p_project.loadLanesAndPools({
			onSuccess:function(){
				alert("there are " +p_project.lanes.length+" lanes and "+p_project.pools.length+" pools");
			}
		});
	};

loadPreset()

Overrides Resource's loadPreset method.
Source:
See:

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:

loadVersions(options)

Load a list the list of versions.
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
pagination Object <optional>
an Object with pagination variables (nb and first)
filters Array <optional>
an array of filters
Source:
See:
Example
Load versions
        function LoadVersions(p_project){//project object
			p_project.loadVersions({
				onSuccess:function(){
					alert(p_project.versions.length);
				}
			});
		};

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
pagination Object <optional>
an Object with pagination variables (nb and first)
filters Array <optional>
an array of filters
Source:
See:
Example
Load webInterfaces
        function loadwebInterface(p_project){//project object
			p_project.loadWebInterfaces({
				onSuccess:function(){
					alert("there are " +p_project.webInterfaces.length+" web interfaces");
				}
			});
		};

loadWFReports(options)

Load a list the list of workflow Reports.
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
pagination Object <optional>
an Object with pagination variables (nb and first)
filters Array <optional>
an array of filters
Source:
See:

loadWIReports(options)

Load a list the list of Web Interface Reports.
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
pagination Object <optional>
an Object with pagination variables (nb and first)
filters Array <optional>
an array of filters
Source:
See:

saveSet(options)

Overrides Resource's saveSet.
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:
  • Resource#createSet

update()

Save a new Project.
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:

updateMode()

Update Project Mode.
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: