1- <!--
2- /*
3- * © Copyright IBM Corp. 2013
4- *
5- * Licensed under the Apache License, Version 2.0 (the "License");
6- * you may not use this file except in compliance with the License.
7- * You may obtain a copy of the License at:
8- *
9- * http://www.apache.org/licenses/LICENSE-2.0
10- *
11- * Unless required by applicable law or agreed to in writing, software
12- * distributed under the License is distributed on an "AS IS" BASIS,
13- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
14- * implied. See the License for the specific language governing
15- * permissions and limitations under the License.
16- */ -->
17-
18- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" >
19-
20- <%@page import =" com.ibm.sbt.services.client.connections.forums.ForumService" %>
21- <%@page import =" com.ibm.sbt.services.client.connections.forums.model.BaseForumEntity" %>
22- <%@page import =" com.ibm.sbt.services.client.connections.forums.TopicList" %>
23- <%@page import =" com.ibm.sbt.services.client.connections.forums.ForumList" %>
24- <%@page import =" com.ibm.sbt.services.client.connections.forums.model.Author" %>
25- <%@page import =" java.io.PrintWriter" %>
26- <%@page import =" com.ibm.sbt.services.client.connections.activitystreams.model.Reply" %>
27- <%@page import =" java.util.List" %>
28- <%@page import =" java.util.Iterator" %>
29-
30- <html >
31-
32- <head >
33- <title >SBT JAVA Sample - AS</title >
34- <meta http-equiv =" Content-Type" content =" text/html; charset=ISO-8859-1" >
35- </head >
36-
37- <body >
38- <h4 >Public Forums</h4 >
39- <div id =" content" >
40- <%
41- try {
42- ForumService _service = new ForumService ();
43- ForumList _entries = _service. getPublicForums();
44-
45- if (_entries. size() <= 0 )
46- out. println(" No updates to be displayed" );
47-
48- for (BaseForumEntity entry : _entries) {
49- Author author = entry. getAuthor();
50- out. println(" uid of forum :" + entry. getUid());
51- out. println(" date published :" + entry. getPublished());
52- out. println(" date updated : " + entry. getUpdated());
53- out. println(" author name : " + author. getName());
54- out. println(" author state : " + author. getState());
55- out. println(" author email : " + author. getEmail());
56- out. println(" author uid : " + author. getUid ());
57- out. println(" forum title : " + entry. getTitle());
58- out. println(" <br><br>" );
59- }
60- } catch (Throwable e) {
61- out. println(" <pre>" );
62- e. printStackTrace(new PrintWriter (out));
63- out. println(" </pre>" );
64- }
65- % >
66- </div >
67- </body >
1+ <!--
2+ /*
3+ * © Copyright IBM Corp. 2013
4+ *
5+ * Licensed under the Apache License, Version 2.0 (the "License");
6+ * you may not use this file except in compliance with the License.
7+ * You may obtain a copy of the License at:
8+ *
9+ * http://www.apache.org/licenses/LICENSE-2.0
10+ *
11+ * Unless required by applicable law or agreed to in writing, software
12+ * distributed under the License is distributed on an "AS IS" BASIS,
13+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
14+ * implied. See the License for the specific language governing
15+ * permissions and limitations under the License.
16+ */ -->
17+
18+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" >
19+
20+ <%@page import =" com.ibm.sbt.services.client.connections.forums.ForumService" %>
21+ <%@page import =" com.ibm.sbt.services.client.connections.forums.model.BaseForumEntity" %>
22+ <%@page import =" com.ibm.sbt.services.client.connections.forums.TopicList" %>
23+ <%@page import =" com.ibm.sbt.services.client.connections.forums.ForumList" %>
24+ <%@page import =" com.ibm.sbt.services.client.connections.forums.model.Author" %>
25+ <%@page import =" java.io.PrintWriter" %>
26+ <%@page import =" com.ibm.sbt.services.client.connections.activitystreams.model.Reply" %>
27+ <%@page import =" java.util.List" %>
28+ <%@page import =" java.util.Iterator" %>
29+
30+ <html >
31+
32+ <head >
33+ <title >SBT JAVA Sample - AS</title >
34+ <meta http-equiv =" Content-Type" content =" text/html; charset=ISO-8859-1" >
35+ </head >
36+
37+ <body >
38+ <h4 >Public Forums</h4 >
39+ <div id =" content" >
40+ <%
41+ try {
42+ ForumService _service = new ForumService ();
43+ ForumList _entries = _service. getPublicForums();
44+
45+ if (_entries. size() <= 0 )
46+ out. println(" No updates to be displayed" );
47+
48+ for (BaseForumEntity entry : _entries) {
49+ Author author = entry. getAuthor();
50+ out. println(" uid of forum :" + entry. getUid());
51+ out. println(" date published :" + entry. getPublished());
52+ out. println(" date updated : " + entry. getUpdated());
53+ out. println(" author name : " + author. getName());
54+ out. println(" author state : " + author. getState());
55+ out. println(" author email : " + author. getEmail());
56+ out. println(" author uid : " + author. getUserid ());
57+ out. println(" forum title : " + entry. getTitle());
58+ out. println(" <br><br>" );
59+ }
60+ } catch (Throwable e) {
61+ out. println(" <pre>" );
62+ e. printStackTrace(new PrintWriter (out));
63+ out. println(" </pre>" );
64+ }
65+ % >
66+ </div >
67+ </body >
6868</html >
0 commit comments