forked from acumenbrands/rest_suite
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinitialize.js.html
109 lines (86 loc) · 3.39 KB
/
initialize.js.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Source: initialize.js</title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Source: initialize.js</h1>
<section>
<article>
<pre class="prettyprint source"><code>/**
* Initializer Class
* @class Initializer
* @param {object} request The body of the HTTP Post request from the client
* @return {Initializer} A new instance of Initializer
*/
this.Initializer = (function() {
/* @consturctor */
function Initializer(request) {
this.params = request;
this.record_type = request['record_type'];
this.initialized_record = null;
this.exception = null;
}
/**
* Request the NetsuiteToolkit to return a new, blank record.
*
* @method
* @memberof Initializer
* @return {null}
*/
Initializer.prototype.initializeRecord = function() {
try {
this.initialized_record = NetsuiteToolkit.initializeRecord(this.record_type);
} catch(exception) {
this.exception = exception;
}
}
/**
* Return a formatted reply object generate by NetsuiteToolkit
*
* @method
* @memberof Initializer
* @return {object} The object containing the formatted reply data
*/
Initializer.prototype.generateReply = function() {
return NetsuiteToolkit.formatReply(this.params, this.initialized_record, this.exception);
}
return Initializer;
})();
/** @namespace global */
/**
* Request the NetsuiteToolkit to return a new, blank record.
*
* @method
* @param {string} record_type The String representing the record type to be initialized
* @memberof Initializer
* @return {null}
*/
var initializePostHandler = function(request) {
initializer = new Initializer(request);
initializer.initializeRecord();
return initializer.generateReply();
}
</code></pre>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Index</a></h2><h3>Classes</h3><ul><li><a href="Deleter.html">Deleter</a></li><li><a href="DeleteRequest.html">DeleteRequest</a></li><li><a href="Initializer.html">Initializer</a></li><li><a href="Loader.html">Loader</a></li><li><a href="LoadRequest.html">LoadRequest</a></li><li><a href="NetsuiteToolkit.SublistProcessor.html">SublistProcessor</a></li><li><a href="SavedSearch.html">SavedSearch</a></li><li><a href="Searcher.html">Searcher</a></li><li><a href="Transformer.html">Transformer</a></li><li><a href="TransformRequest.html">TransformRequest</a></li><li><a href="Upserter.html">Upserter</a></li><li><a href="UpsertRequest.html">UpsertRequest</a></li></ul><h3>Namespaces</h3><ul><li><a href="global.html">global</a></li><li><a href="NetsuiteToolkit.html">NetsuiteToolkit</a></li><li><a href="NetsuiteToolkit.RecordProcessor.html">RecordProcessor</a></li></ul>
</nav>
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.1.1</a> on Thu May 16 2013 11:16:09 GMT-0500 (CDT)
</footer>
<script> prettyPrint(); </script>
</body>
</html>