remove old readme
[atutor.git] / docs / jscripts / opensocial / organization.js
1 /**
2  * Licensed under the Apache License, Version 2.0 (the "License");
3  * you may not use this file except in compliance with the License.
4  * You may obtain a copy of the License at
5  *
6  *     http://www.apache.org/licenses/LICENSE-2.0
7  *
8  * Unless required by applicable law or agreed to in writing, software
9  * distributed under the License is distributed on an "AS IS" BASIS,
10  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11  * See the License for the specific language governing permissions and
12  * limitations under the License.
13  */
14
15 /**
16  * @fileoverview Representation of a organization.
17  */
18
19
20 /**
21  * @class
22  * Base interface for all organization objects.
23  *
24  * @name opensocial.Organization
25  */
26
27
28 /**
29  * Base interface for all organization objects.
30  *
31  * @private
32  * @constructor
33  */
34 opensocial.Organization = function() {};
35
36
37 /**
38  * @static
39  * @class
40  * All of the fields that a organization has. These are the supported keys for
41  * the <a href="opensocial.Organization.html#getField">
42  * Organization.getField()</a> method.
43  *
44  * @name opensocial.Organization.Field
45  */
46 opensocial.Organization.Field = {
47   /**
48    * The name of the organization, specified as a string.
49    * For example, could be a school name or a job company. 
50    * Container support for this field is OPTIONAL.
51    * This field may be used interchangeably with the string 'name'.
52    * @member opensocial.Organization.Field
53    */
54   NAME : 'name',
55
56   /**
57    * The title or role the person has in the organization, specified as a
58    * string. This could be graduate student, or software engineer.
59    * Container support for this field is OPTIONAL.
60    * This field may be used interchangeably with the string 'title'.
61    * @member opensocial.Organization.Field
62    */
63   TITLE : 'title',
64
65   /**
66    * A description or notes about the person's work in the organization,
67    * specified as a string. This could be the courses taken by a student, or a
68    * more detailed description about a Organization role.
69    * Container support for this field is OPTIONAL.
70    * This field may be used interchangeably with the string 'description'.
71    * @member opensocial.Organization.Field
72    */
73   DESCRIPTION : 'description',
74
75   /**
76    * The field the organization is in, specified as a string. This could be the
77    * degree pursued if the organization is a school.
78    * Container support for this field is OPTIONAL.
79    * This field may be used interchangeably with the string 'field'.
80    * @member opensocial.Organization.Field
81    */
82   FIELD : 'field',
83
84   /**
85    * The subfield the Organization is in, specified as a string.
86    * Container support for this field is OPTIONAL.
87    * This field may be used interchangeably with the string 'subField'.
88    * @member opensocial.Organization.Field
89    */
90   SUB_FIELD : 'subField',
91
92   /**
93    * The date the person started at the organization, specified as a Date.
94    * Container support for this field is OPTIONAL.
95    * This field may be used interchangeably with the string 'startDate'.
96    * @member opensocial.Organization.Field
97    */
98   START_DATE : 'startDate',
99
100   /**
101    * The date the person stopped at the organization, specified as a Date.
102    * A null date indicates that the person is still involved with the
103    * organization.
104    * Container support for this field is OPTIONAL.
105    * This field may be used interchangeably with the string 'endDate'.
106    * @member opensocial.Organization.Field
107    */
108   END_DATE : 'endDate',
109
110  /**
111    * The salary the person receieves from the organization, specified as a
112    * string.
113    * Container support for this field is OPTIONAL.
114    * This field may be used interchangeably with the string 'salary'.
115    * @member opensocial.Organization.Field
116    */
117   SALARY : 'salary',
118
119  /**
120    * The address of the organization, specified as an opensocial.Address.
121    * Container support for this field is OPTIONAL.
122    * This field may be used interchangeably with the string 'address'.
123    * @member opensocial.Organization.Field
124    */
125   ADDRESS : 'address',
126
127  /**
128    * A webpage related to the organization, specified as a string.
129    * Container support for this field is OPTIONAL.
130    * This field may be used interchangeably with the string 'webpage'.
131    * @member opensocial.Organization.Field
132    */
133   WEBPAGE : 'webpage'
134 };
135
136
137 /**
138  * Gets data for this body type that is associated with the specified key.
139  *
140  * @param {String} key The key to get data for;
141  *    keys are defined in <a href="opensocial.Organization.Field.html"><code>
142  *    Organization.Field</code></a>
143  * @param {Map.&lt;opensocial.DataRequest.DataRequestFields, Object&gt;}
144  *  opt_params Additional
145  *    <a href="opensocial.DataRequest.DataRequestFields.html">params</a>
146  *    to pass to the request
147  * @return {String} The data
148  */
149 opensocial.Organization.prototype.getField = function(key, opt_params) {};