miguelm
committed
on 27 Oct 05
file invoices-offers-project-portlet-create.sql was added on branch oacs-5-2 on 2005-11-30 16:01:58 +0000
oacs-5-2:miguelm:20051026224637
/postgresql/invoices-offers-project-portlet-create.sql (deleted)
1   --
2   --  Copyright (C) 2005 Cognovis
3   --
4   --  This file is part of dotLRN.
5   --
6   --  dotLRN is free software; you can redistribute it and/or modify it under the
7   --  terms of the GNU General Public License as published by the Free Software
8   --  Foundation; either version 2 of the License, or (at your option) any later
9   --  version.
10   --
11   --  dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY
12   --  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13   --  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
14   --  details.
15   --
16  
17   --
18   --
19  
20   -- Creates invoices offers project portlet
21  
22   -- This is free software distributed under the terms of the GNU Public
23   -- License version 2 or higher.  Full text of the license is available
24   -- from the GNU Project: http://www.fsf.org/copyleft/gpl.html
25  
26   create function inline_0()
27   returns integer as '
28   declare
29     ds_id portal_datasources.datasource_id%TYPE;
30   begin
31     ds_id := portal_datasource__new(
32            ''invoices_offers_project_portlet'',
33            ''Displays the Invoices Offers Project Portlet''
34     );
35  
36    
37     --  the standard 4 params
38  
39     -- shadeable_p
40     perform portal_datasource__set_def_param (
41           ds_id,
42           ''t'',
43           ''t'',
44           ''shadeable_p'',
45           ''t''
46   );      
47  
48  
49     -- hideable_p
50     perform portal_datasource__set_def_param (
51           ds_id,
52           ''t'',
53           ''t'',
54           ''hideable_p'',
55           ''t''
56   );      
57  
58     -- user_editable_p
59     perform portal_datasource__set_def_param (
60           ds_id,
61           ''t'',
62           ''t'',
63           ''user_editable_p'',
64           ''t''
65   );      
66  
67     -- shaded_p
68     perform portal_datasource__set_def_param (
69           ds_id,
70           ''t'',
71           ''t'',
72           ''shaded_p'',
73           ''f''
74   );      
75  
76     -- link_hideable_p
77     perform portal_datasource__set_def_param (
78           ds_id,
79           ''t'',
80           ''t'',
81           ''link_hideable_p'',
82           ''t''
83   );      
84  
85  
86       perform portal_datasource__set_def_param(
87           ds_id,
88           ''t'',
89           ''f'',
90           ''scoped_p'',
91           ''t''
92       );
93  
94  
95      return 0;
96  
97   end;' language 'plpgsql';
98   select inline_0();
99   drop function inline_0();
100  
101  
102   create function inline_0()
103   returns integer as '
104   declare
105           foo integer;
106   begin
107           -- create the implementation
108           foo := acs_sc_impl__new (
109                   ''portal_datasource'',
110                   ''invoices_offers_project_portlet'',
111                   ''invoices_offers_project_portlet''
112           );
113  
114      return 0;
115  
116   end;' language 'plpgsql';
117   select inline_0();
118   drop function inline_0();
119  
120  
121  
122   create function inline_0()
123   returns integer as '
124   declare
125           foo integer;
126   begin
127  
128           -- add all the hooks
129           foo := acs_sc_impl_alias__new (
130                  ''portal_datasource'',
131                  ''invoices_offers_project_portlet'',
132                  ''GetMyName'',
133                  ''invoices_offers_project_portlet::get_my_name'',
134                  ''TCL''
135           );
136  
137           foo := acs_sc_impl_alias__new (
138                  ''portal_datasource'',
139                  ''invoices_offers_project_portlet'',
140                  ''GetPrettyName'',
141                  ''invoices_offers_project_portlet::get_pretty_name'',
142                  ''TCL''
143           );
144  
145           foo := acs_sc_impl_alias__new (
146                  ''portal_datasource'',
147                  ''invoices_offers_project_portlet'',
148                  ''Link'',
149                  ''invoices_offers_project_portlet::link'',
150                  ''TCL''
151           );
152  
153           foo := acs_sc_impl_alias__new (
154                  ''portal_datasource'',
155                  ''invoices_offers_project_portlet'',
156                  ''AddSelfToPage'',
157                  ''invoices_offers_project_portlet::add_self_to_page'',
158                  ''TCL''
159           );
160  
161           foo := acs_sc_impl_alias__new (
162                  ''portal_datasource'',
163                  ''invoices_offers_project_portlet'',
164                  ''Show'',
165                  ''invoices_offers_project_portlet::show'',
166                  ''TCL''
167           );
168  
169           foo := acs_sc_impl_alias__new (
170                  ''portal_datasource'',
171                  ''invoices_offers_project_portlet'',
172                  ''Edit'',
173                  ''invoices_offers_project_portlet::edit'',
174                  ''TCL''
175           );
176  
177           foo := acs_sc_impl_alias__new (
178                  ''portal_datasource'',
179                  ''invoices_offers_project_portlet'',
180                  ''RemoveSelfFromPage'',
181                  ''invoices_offers_project_portlet::remove_self_from_page'',
182                  ''TCL''
183           );
184  
185      return 0;
186  
187   end;' language 'plpgsql';
188   select inline_0();
189   drop function inline_0();
190  
191  
192  
193   create function inline_0()
194   returns integer as '
195   declare
196           foo integer;
197   begin
198  
199           -- Add the binding
200           perform acs_sc_binding__new (
201               ''portal_datasource'',
202               ''invoices_offers_project_portlet''
203           );
204  
205      return 0;
206  
207   end;' language 'plpgsql';
208   select inline_0();
209   drop function inline_0();
210  
211  
212  
213