Revision: 2510
Author: seba.wagner
Date: Sat Oct 24 04:25:40 2009
Log: Extend Room Overview to have more room-types
http://code.google.com/p/openmeetings/source/detail?r=2510
Added:
/trunk/singlewebapp/WebContent/openmeetings/modules/meetings/resources
/trunk/singlewebapp/WebContent/openmeetings/modules/meetings/resources/messagebox_info.png
Deleted:
/trunk/singlewebapp/WebContent/openmeetings/modules/meetings/privateMeetings.lzx
/trunk/singlewebapp/WebContent/openmeetings/modules/meetings/publicMeetings.lzx
Modified:
/trunk/singlewebapp/WebContent/openmeetings/modules/library.lzx
/trunk/singlewebapp/WebContent/openmeetings/modules/meetings/allmeetings.lzx
/trunk/singlewebapp/WebContent/openmeetings/modules/meetings/library.lzx
/trunk/singlewebapp/src/app/org/openmeetings/app/data/conference/Roommanagement.java
/trunk/singlewebapp/src/app/org/openmeetings/app/remote/ConferenceService.java
=======================================
--- /dev/null
+++
/trunk/singlewebapp/WebContent/openmeetings/modules/meetings/resources/messagebox_info.png
Sat Oct 24 04:25:40 2009
Binary file, no diff available.
=======================================
---
/trunk/singlewebapp/WebContent/openmeetings/modules/meetings/privateMeetings.lzx
Mon Oct 12 03:58:23 2009
+++ /dev/null
@@ -1,65 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<library>
- <!---
-
- @deprecated Is not used anymore, see allmeetings
-
-
- This class shows usable private conference room list.
- The list would created from roomListItem object that was
declared in
modules/conference/conference/roomListItem.lzx.
-
- -->
- <class name="privateMeetings" extends="baseContentView">
- <handler name="ontabcontentleave">
- canvas._chatcontentRPC = null;
-
canvas.thishib.removeClientFromChatNotification.doCall();
- </handler>
-
- <!-- label: meeting room -->
- <labelText fontstyle="bold" y="10" labelid="128" resize="true"
width="200" />
-
- <!-- Declared conference rooms list -->
- <view y="60" x="20">
- <handler name="oninit">
- canvas.thishib.roomtype = "private";
- this.getRoomsByOrganisationAndType.doCall();
- </handler>
-
- <netRemoteCallHib name="getRoomsByOrganisationAndType"
funcname="conferenceservice.getRoomsByOrganisationAndType"
remotecontext="$once{ canvas.thishib }" >
- <netparam><method name="getValue">return
canvas.sessionId;</method></netparam>
- <netparam><method name="getValue">return
hib.currentdomainObj.organisation_id;</method></netparam>
- <netparam><method name="getValue">return
1;</method></netparam>
-
- <handler name="ondata" args="value">
- <![CDATA[
- if (value!=null){
- for(var
eg=0;eg<value.length;eg++){
- new
lz.roomListItem(parent.inn.inn.inn,{currentusers:value[eg].room.currentusers,
-
obj:value[eg],
-
ispublic:false,
-
roomid:value[eg].room.rooms_id,
-
starttime:parseDateToStringTime(value[eg].room.starttime),
-
roomname:value[eg].room.name
-
});
- }
- }
- ]]>
- </handler>
- </netRemoteCallHib>
-
- <!-- inn.inn.inn view would be setted object by above
ondata hander.
-->
- <view name="inn" width="480" height="500" bgcolor="$once{
canvas.basebgcolorizer }" >
- <view name="inn" x="1" y="1" width="478"
height="498"
bgcolor="0xFFFFFF" clip="true" >
- <view name="inn"
layout="axis:y;spacing:2"/>
- <vscrollbar />
- </view>
- </view>
- </view>
-
- <!-- description panel for eache room. right hand on this class
view.
- roomListDetails class are declared in
modules/conference/conference/roomListDetails.lzx.
- Mar 24 2008 commented by [email protected]
- -->
- <roomListDetails x="510" y="50" name="_roomlistdetails" />
- </class>
-</library>
=======================================
---
/trunk/singlewebapp/WebContent/openmeetings/modules/meetings/publicMeetings.lzx
Mon Oct 12 03:58:23 2009
+++ /dev/null
@@ -1,73 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<library>
- <!---
-
- @deprecated Is not used anymore, see allmeetings
-
- This class shows usable public conference room list.
- The list would created from roomListItem object that was
declared in
modules/conference/conference/roomListItem.lzx.
-
- -->
- <class name="publicMeetings" extends="baseContentView">
- <handler name="ontabcontentleave">
- canvas._chatcontentRPC = null;
-
canvas.thishib.removeClientFromChatNotification.doCall();
- </handler>
-
- <netRemoteCallHib name="removeClientFromChatNotification"
funcname="chatservice.removeClientFromChatNotification"
remotecontext="$once{ canvas.thishib }" >
- <handler name="ondata" args="value">
- if($debug)
Debug.write("removeClientFromChatNotification: ",value);
- this.parent.destroy();
- </handler>
- </netRemoteCallHib>
-
- <!-- label: meeting room -->
- <labelText fontstyle="bold" y="10" labelid="128" resize="true"
width="200" />
-
- <view y="60" x="20">
- <handler name="oninit">
- canvas.thishib.roomtype = "public";
- this.getRoomsPublic.doCall();
- </handler>
-
- <netRemoteCallHib name="getRoomsPublic"
funcname="conferenceservice.getRoomsPublic" remotecontext="$once{
canvas.thishib }" >
- <netparam><method name="getValue">return
canvas.sessionId;</method></netparam>
- <netparam><method name="getValue">return
1;</method></netparam>
- <handler name="ondata" args="value">
- <![CDATA[
- if($debug)
Debug.write("getRoomsPublic: ",value);
- if (value!=null){
- for(var
eg=0;eg<value.length;eg++){
- var time =
value[eg].starttime.getHours()+':'+
-
value[eg].starttime.getMinutes()+' '+
-
value[eg].starttime.getDate()+'.'+
-
(value[eg].starttime.getMonth()+1)+'.'+
-
value[eg].starttime.getFullYear();
- new
lz.roomListItem(parent.inn.inn.inn,{currentusers:value[eg].currentusers,
-
obj:value[eg],
-
ispublic:true,
-
roomid:value[eg].rooms_id,
-
starttime:time,
-
roomname:value[eg].name
-
});
- }
- }
- ]]>
- </handler>
- </netRemoteCallHib>
-
- <!-- inn.inn.inn view would be setted object by above
ondata hander.
-->
- <view name="inn" width="480" height="500" bgcolor="$once{
canvas.basebgcolorizer }" >
- <view name="inn" x="1" y="1" width="478" height="498"
bgcolor="0xFFFFFF" clip="true" >
- <view name="inn" layout="axis:y;spacing:2"/>
- <vscrollbar />
- </view>
- </view>
- </view>
- <!-- description panel for eache room. right hand on this class
view.
- roomListDetails class are declared in
modules/conference/conference/roomListDetails.lzx.
- Mar 24 2008 commented by [email protected]
- -->
- <roomListDetails x="510" y="50" name="_roomlistdetails" />
- </class>
-</library>
=======================================
--- /trunk/singlewebapp/WebContent/openmeetings/modules/library.lzx Mon Oct
12 03:58:23 2009
+++ /trunk/singlewebapp/WebContent/openmeetings/modules/library.lzx Sat Oct
24 04:25:40 2009
@@ -15,7 +15,6 @@
<!-- -->
<include href="meetings/" />
- <include href="events/" />
<include href="recording/" />
<include href="admin/" />
=======================================
---
/trunk/singlewebapp/WebContent/openmeetings/modules/meetings/allmeetings.lzx
Mon Oct 12 03:58:23 2009
+++
/trunk/singlewebapp/WebContent/openmeetings/modules/meetings/allmeetings.lzx
Sat Oct 24 04:25:40 2009
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<library>
-<class name="allmeetings" extends="baseContentView" bgcolor="white">
+<class name="allmeetings" extends="baseContentView" bgcolor="white"
height="${ canvas.height-130 }">
<attribute name="finishedTabsQuantity" type="number" value="0"/>
<attribute name="clickedButton" value="null"/>
@@ -17,20 +17,92 @@
}
</method>
+ <handler name="oninit">
+ _mainScrollBar.setAttribute("visibility","hidden");
+ </handler>
+
<handler name="ontabcontentleave">
+ _mainScrollBar.setAttribute("visibility","visible");
canvas._chatcontentRPC = null;
canvas.thishib.removeClientFromChatNotification.doCall();
</handler>
- <simplelayout axis="y" spacing="2" />
- <!-- label: meeting room -->
+ <attribute name="refObjItem" value="null" />
+
+ <method name="doSelection" args="objRef">
+ if (this.refObjItem != null) {
+ this.refObjItem.deselect();
+ }
+ this.refObjItem = objRef;
+
+ if (this.refObjItem.name == "publicTabButton"){
+
this._conferences.PublicMeetings.setAttribute("visibility","visible");
+
this._conferences.PrivateMeetings.setAttribute("visibility","hidden");
+
this._conferences.MyMeetings.setAttribute("visibility","hidden");
+ } else if (this.refObjItem.name == "privateTabButton"){
+
this._conferences.PublicMeetings.setAttribute("visibility","hidden");
+
this._conferences.PrivateMeetings.setAttribute("visibility","visible");
+
this._conferences.MyMeetings.setAttribute("visibility","hidden");
+ } else if (this.refObjItem.name == "myTabButton"){
+
this._conferences.PublicMeetings.setAttribute("visibility","hidden");
+
this._conferences.PrivateMeetings.setAttribute("visibility","hidden");
+
this._conferences.MyMeetings.setAttribute("visibility","visible");
+ }
+
+ this.refObjItem.select();
+ </method>
+
+ <!-- label: meeting room
<labelText fontstyle="bold" y="10" labelid="128" resize="true"
width="200" />
-
+ -->
+ <view width="${ canvas.width }">
+
+ <view width="${ parent.width }" height="$once{ parent.height }"
+ stretches="both" resource="presenter_thumb_rsc" >
+ <handler name="oninit">
+ <![CDATA[
+ this.setTintRGB(canvas.basebgcolorizer,90);
+ ]]>
+ </handler>
+ <method name="setTintRGB" args="color, brightness">
+ <![CDATA[
+ if (color != "" && color != null){
+
+ if (brightness == null) { brightness = 0; }
+ var rgb = color;
+ var red=(rgb >> 16) & 0xFF;
+ var green=(rgb >> 8) & 0xFF;
+ var blue=rgb & 0xFF;
+
+ this.setColorTransform( { ra : red, ga : green,
ba : blue,
+ rb : 0, gb : 0, bb : 0
} );
+
+ }
+ ]]>
+ </method>
+ </view>
+
+ <conferenceRoomSidebarTabButton name="publicTabButton"
selected="true"
+ currentIconRsc="users_tab_btn" x="0" labelid="777"
width="${
(parent.width-6)/3 }"/>
+
+ <conferenceRoomSidebarTabButton name="privateTabButton"
width="${
(parent.width-6)/3 }"
+ x="$once{ ((parent.width)/3)+2 }"
currentIconRsc="users_tab_btn"
labelid="779" />
+
+ <conferenceRoomSidebarTabButton name="myTabButton" width="${
(parent.width-6)/3 }"
+ x="$once{ (((parent.width)/3)*2)+4 }"
currentIconRsc="users_tab_btn" labelid="781" />
+
+
+ </view>
<!-- public rooms -->
- <tabs>
- <tabpane text="Public Meetings" >
- <view>
+ <view name="_conferences" height="${ parent.height-40 }" y="40">
+ <view name="PublicMeetings" height="${ parent.height }">
+
+ <view x="4" resource="info_text_icon_rsc" />
+
+ <labelText labelid="778" x="30" width="400"
multiline="true" />
+
+ <view y="40" height="${ parent.height-20 }">
<netRemoteCallHib
name="removeClientFromChatNotification"
funcname="chatservice.removeClientFromChatNotification"
remotecontext="$once{ canvas.thishib }"
>
@@ -41,56 +113,48 @@
</netRemoteCallHib>
- <view y="4" x="4" >
+ <view y="4" x="4" height="${ parent.height-4 }">
+
<handler name="oninit">
canvas.thishib.roomtype =
"public";
- this.getRoomsPublic.doCall();
+
this.getRoomsPublicWithoutType.doCall();
</handler>
- <netRemoteCallHib name="getRoomsPublic"
funcname="conferenceservice.getRoomsPublic"
+ <netRemoteCallHib
name="getRoomsPublicWithoutType"
funcname="conferenceservice.getRoomsPublicWithoutType"
remotecontext="$once{
canvas.thishib }" >
- <netparam>
- <method name="getValue">
- return
canvas.sessionId;
- </method>
- </netparam>
- <netparam>
- <method name="getValue">
- return 1;
- </method>
- </netparam>
+ <netparam><method
name="getValue">return
canvas.sessionId;</method></netparam>
<handler name="ondata"
args="value">
- <![CDATA[
- if ($debug)
Debug.write("getRoomsPublic: ", value);
- if (value != null) {
- for (var eg =
0; eg < value.length; eg++) {
- var
time = value[eg].starttime.getHours()
-
+ ':' + value[eg].starttime.getMinutes()
-
+ ' ' + value[eg].starttime.getDate()
-
+ '.' + (value[eg].starttime.getMonth() + 1)
-
+ '.' + value[eg].starttime.getFullYear();
-
- new
lz.roomListItem(parent.inn.inn.inn,
-
{
-
roomClassName:canvas.conferenceRoomModule,
-
currentusers : value[eg].currentusers,
-
obj : value[eg],
-
ispublic : true,
-
roomid : value[eg].rooms_id,
-
starttime : time,
-
roomname : value[eg].name
-
});
- }
- }
-
parent.parent.parent.parent.parent
-
.updateFinishedTabsQuantity();
- ]]>
+ <![CDATA[
+ if ($debug)
Debug.write("getRoomsPublicWithoutType: ", value);
+ if (value !=
null) {
+ for
(var eg = 0; eg < value.length; eg++) {
+
var time = value[eg].starttime.getHours()
+
+ ':' + value[eg].starttime.getMinutes()
+
+ ' ' + value[eg].starttime.getDate()
+
+ '.' + (value[eg].starttime.getMonth() + 1)
+
+ '.' + value[eg].starttime.getFullYear();
+
+
new lz.roomListItem(parent.inn.inn.inn,
+
{
+
roomClassName:canvas.conferenceRoomModule,
+
currentusers : value[eg].currentusers,
+
obj : value[eg],
+
ispublic : true,
+
roomid : value[eg].rooms_id,
+
starttime : time,
+
roomname : value[eg].name
+
});
+ }
+ }
+
parent.parent.parent.parent.parent.updateFinishedTabsQuantity();
+ ]]>
</handler>
</netRemoteCallHib>
<!-- inn.inn.inn view would be setted
object by above ondata hander.
-->
- <view name="inn" width="480"
height="500" bgcolor="$once{
canvas.basebgcolorizer }" >
- <view name="inn" x="1" y="1"
width="478" height="498"
bgcolor="0xFFFFFF" clip="true" >
+ <view name="inn" width="480" height="${
parent.height }"
bgcolor="$once{ canvas.basebgcolorizer }" >
+ <view name="inn" x="1" y="1"
width="478" height="${ parent.height-2
}"
+
bgcolor="0xFFFFFF" clip="true" >
<view name="inn"
layout="axis:y;spacing:2"/>
<vscrollbar />
</view>
@@ -102,43 +166,33 @@
-->
<roomListDetails x="510" y="4"
name="_roomlistdetails" bgcolor="white"
/>
</view>
- </tabpane>
+ </view>
<!-- private Meetings -->
- <tabpane text="Private Meetings" >
- <view>
-
+ <view name="PrivateMeetings" visibility="hidden" height="${
parent.height }">
+
+ <view x="4" resource="info_text_icon_rsc" />
+
+ <labelText labelid="780" x="30" width="400"
multiline="true" />
+
+ <view y="40" height="${ parent.height-20 }">
+
<!-- Declared conference rooms list -->
- <view y="4" x="4">
+ <view y="4" x="4" height="${ parent.height-4 }">
<handler name="oninit">
canvas.thishib.roomtype =
"private";
-
this.getRoomsByOrganisationAndType.doCall();
+
this.getRoomsByOrganisationWithoutType.doCall();
</handler>
- <netRemoteCallHib
name="getRoomsByOrganisationAndType"
funcname="conferenceservice.getRoomsByOrganisationAndType"
remotecontext="$once{ canvas.thishib }" >
- <netparam>
- <method name="getValue">
- return
canvas.sessionId;
- </method>
- </netparam>
- <netparam>
- <method name="getValue">
- return
hib.currentdomainObj.organisation_id;
- </method>
- </netparam>
- <netparam>
- <method name="getValue">
- return 1;
- </method>
- </netparam>
-
+ <netRemoteCallHib
name="getRoomsByOrganisationWithoutType"
funcname="conferenceservice.getRoomsByOrganisationWithoutType"
remotecontext="$once{ canvas.thishib }" >
+ <netparam><method
name="getValue">return
canvas.sessionId;</method></netparam>
+ <netparam><method
name="getValue">return
hib.currentdomainObj.organisation_id;</method></netparam>
<handler name="ondata"
args="value">
<![CDATA[
if (value != null) {
for (var eg =
0; eg < value.length; eg++) {
- new
lz.roomListItem(parent.inn.inn.inn,
-
{
+ new
lz.roomListItem(parent.inn.inn.inn,{
roomClassName:canvas.conferenceRoomModule,
currentusers : value[eg].room.currentusers,
obj : value[eg],
@@ -157,8 +211,8 @@
</netRemoteCallHib>
<!-- inn.inn.inn view would be setted
object by above ondata hander.
-->
- <view name="inn" width="480"
height="500" bgcolor="$once{
canvas.basebgcolorizer }" >
- <view name="inn" x="1" y="1"
width="478" height="498"
bgcolor="0xFFFFFF" clip="true" >
+ <view name="inn" width="480" height="${
parent.height }"
bgcolor="$once{ canvas.basebgcolorizer }" >
+ <view name="inn" x="1" y="1"
width="478" height="${ parent.height-2
}" bgcolor="0xFFFFFF" clip="true" >
<view name="inn"
layout="axis:y;spacing:2"/>
<vscrollbar />
</view>
@@ -172,67 +226,60 @@
<roomListDetails x="510" y="4"
name="_roomlistdetails" bgcolor="white"
/>
</view>
- </tabpane>
+ </view>
<!-- Appointed Meetings -->
- <tabpane text="My Meetings" >
+ <view name="MyMeetings" visibility="hidden" height="${
parent.height }">
+
+ <view x="4" resource="info_text_icon_rsc" />
+
+ <labelText labelid="782" x="30" width="400"
multiline="true" />
<!-- Declared conference rooms list -->
- <view y="4" x="4">
+ <view y="50" height="${ parent.height-30 }">
+
<handler name="oninit">
canvas.thishib.roomtype = "public";
- this.getAppointedRooms.doCall();
+
this.getAppointedMeetingRoomsWithoutType.doCall();
</handler>
- <netRemoteCallHib name="getAppointedRooms"
funcname="conferenceservice.getAppointedMeetings" remotecontext="$once{
canvas.thishib }" >
- <netparam>
- <method name="getValue">
- return canvas.sessionId;
- </method>
- </netparam>
- <netparam>
- <method name="getValue">
- return 1;
- </method>
- </netparam>
-
-
+ <netRemoteCallHib
name="getAppointedMeetingRoomsWithoutType"
funcname="conferenceservice.getAppointedMeetingRoomsWithoutType"
remotecontext="$once{ canvas.thishib }" >
+ <netparam><method
name="getValue">return
canvas.sessionId;</method></netparam>
<handler name="ondata" args="value">
- <![CDATA[
- if ($debug)
Debug.write("getRoomsPublic: ", value);
- if (value != null) {
- for (var eg = 0; eg <
value.length; eg++) {
- var time =
value[eg].starttime.getHours()
-
+ ':'
-
+ value[eg].starttime.getMinutes()
-
+ ' '
-
+ value[eg].starttime.getDate()
-
+ '.'
-
+ (value[eg].starttime.getMonth() + 1)
-
+ '.'
-
+ value[eg].starttime.getFullYear();
- new
lz.roomListItem(parent.inn.inn.inn,
- {
-
roomClassName:canvas.conferenceRoomModule,
-
currentusers : value[eg].currentusers,
-
obj : value[eg],
-
ispublic : true,
-
roomid : value[eg].rooms_id,
-
starttime : time,
-
roomname : value[eg].name
-
});
- }
-
-
parent.parent.parent.parent
-
.updateFinishedTabsQuantity();
- }
- ]]>
+ <![CDATA[
+ if ($debug)
Debug.write("getRoomsPublic: ", value);
+ if (value != null) {
+ for (var eg =
0; eg < value.length; eg++) {
+ var
time = value[eg].starttime.getHours()
+
+ ':'
+
+ value[eg].starttime.getMinutes()
+
+ ' '
+
+ value[eg].starttime.getDate()
+
+ '.'
+
+ (value[eg].starttime.getMonth() + 1)
+
+ '.'
+
+ value[eg].starttime.getFullYear();
+ new
lz.roomListItem(parent.inn.inn.inn,
+
{
+
roomClassName:canvas.conferenceRoomModule,
+
currentusers : value[eg].currentusers,
+
obj : value[eg],
+
ispublic : true,
+
roomid : value[eg].rooms_id,
+
starttime : time,
+
roomname : value[eg].name
+
});
+ }
+
+
parent.parent.parent.parent.updateFinishedTabsQuantity();
+ }
+ ]]>
</handler>
</netRemoteCallHib>
<!-- inn.inn.inn view would be setted object by
above ondata hander.
-->
- <view name="inn" width="480" height="500"
bgcolor="$once{
canvas.basebgcolorizer }" >
- <view name="inn" x="1" y="1"
width="478" height="498"
bgcolor="0xFFFFFF" clip="true" >
+ <view name="inn" width="480" height="${
parent.height }"
bgcolor="$once{ canvas.basebgcolorizer }" >
+ <view name="inn" x="1" y="1"
width="478" height="${ parent.height-2
}" bgcolor="0xFFFFFF" clip="true" >
<view name="inn"
layout="axis:y;spacing:2"/>
<vscrollbar />
</view>
@@ -245,8 +292,9 @@
-->
<roomListDetails x="510" y="4" name="_roomlistdetails"
bgcolor="white"/>
- </tabpane>
- </tabs>
+ </view>
+
+ </view>
</class>
=======================================
---
/trunk/singlewebapp/WebContent/openmeetings/modules/meetings/library.lzx
Mon Oct 12 03:58:23 2009
+++
/trunk/singlewebapp/WebContent/openmeetings/modules/meetings/library.lzx
Sat Oct 24 04:25:40 2009
@@ -1,6 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
<library>
+ <resource name="info_text_icon_rsc" src="resources/messagebox_info.png"
/>
+
<include href="allmeetings.lzx" />
</library>
=======================================
---
/trunk/singlewebapp/src/app/org/openmeetings/app/data/conference/Roommanagement.java
Mon Oct 12 02:51:43 2009
+++
/trunk/singlewebapp/src/app/org/openmeetings/app/data/conference/Roommanagement.java
Sat Oct 24 04:25:40 2009
@@ -374,6 +374,40 @@
return null;
}
+ public List<Rooms> getPublicRoomsWithoutType(long user_level){
+ try {
+ if
(AuthLevelmanagement.getInstance().checkUserLevel(user_level)){
+ Object idf = HibernateUtil.createSession();
+ Session session = HibernateUtil.getSession();
+ Transaction tx = session.beginTransaction();
+// Criteria crit =
session.createCriteria(Rooms.class);
+// Criteria subcriteriaRoomType =
crit.createCriteria("roomtype");
+//
subcriteriaRoomType.add(Restrictions.eq("roomtypes_id",
roomtypes_id));
+// crit.add(Restrictions.eq("ispublic", true));
+// crit.add(Restrictions.ne("deleted", "true"));
+// List ll = crit.list();
+ String queryString = "SELECT r from Rooms r " +
+ "JOIN r.roomtype as rt " +
+ "WHERE " +
+ "r.ispublic=:ispublic and
r.deleted=:deleted";
+ Query q = session.createQuery(queryString);
+ //
+ q.setBoolean("ispublic", true);
+ q.setString("deleted", "false");
+
+ List<Rooms> ll = q.list();
+ tx.commit();
+ HibernateUtil.closeSession(idf);
+ log.error("### getPublicRooms: size Room List
"+ll.size());
+ return ll;
+ }
+ } catch (HibernateException ex) {
+ log.error("[getPublicRoomsWithoutType] ", ex);
+ } catch (Exception ex2) {
+ log.error("[getPublicRoomsWithoutType] ", ex2);
+ }
+ return null;
+ }
/**
@@ -627,7 +661,7 @@
Criteria subcrit =
crit.createCriteria("organisation");
subcrit.add(Restrictions.eq("organisation_id",
organisation_id));
crit.add(Restrictions.ne("deleted", "true"));
- List ll = crit.list();
+ List<Rooms_Organisation> ll = crit.list();
tx.commit();
HibernateUtil.closeSession(idf);
=======================================
---
/trunk/singlewebapp/src/app/org/openmeetings/app/remote/ConferenceService.java
Mon Oct 12 02:51:43 2009
+++
/trunk/singlewebapp/src/app/org/openmeetings/app/remote/ConferenceService.java
Sat Oct 24 04:25:40 2009
@@ -71,6 +71,35 @@
List<Rooms_Organisation> filtered = new
ArrayList<Rooms_Organisation>();
+ for (Iterator<Rooms_Organisation> iter =
roomOrgsList.iterator();iter.hasNext();) {
+ Rooms_Organisation orgRoom = iter.next();
+
+ if(!orgRoom.getRoom().getAppointment()){
+
orgRoom.getRoom().setCurrentusers(this.getRoomClientsListByRoomId(orgRoom.getRoom().getRooms_id()));
+ filtered.add(orgRoom);
+ }
+ }
+ return filtered;
+ } catch (Exception err) {
+ log.error("[getRoomsByOrganisationAndType]",err);
+ }
+ return null;
+ }
+
+ public List<Rooms_Organisation>
getRoomsByOrganisationWithoutType(String
SID, long organisation_id){
+ try {
+ Long users_id =
Sessionmanagement.getInstance().checkSession(SID);
+ Long User_level =
Usermanagement.getInstance().getUserLevelByID(users_id);
+
+ log.debug("getRoomsByOrganisationAndType");
+
+ if (User_level == null) {
+ return null;
+ }
+ List<Rooms_Organisation> roomOrgsList =
Roommanagement.getInstance().getRoomsOrganisationByOrganisationId(User_level,
organisation_id);
+
+ List<Rooms_Organisation> filtered = new
ArrayList<Rooms_Organisation>();
+
for (Iterator<Rooms_Organisation> iter =
roomOrgsList.iterator();iter.hasNext();) {
Rooms_Organisation orgRoom = iter.next();
@@ -140,6 +169,36 @@
return null;
}
+ public List<Rooms> getRoomsPublicWithoutType(String SID){
+ try {
+ log.debug("getRoomsPublic");
+
+ Long users_id =
Sessionmanagement.getInstance().checkSession(SID);
+ Long user_level =
Usermanagement.getInstance().getUserLevelByID(users_id);
+ log.error("getRoomsPublic user_level: "+user_level);
+
+ List<Rooms> roomList =
Roommanagement.getInstance().getPublicRoomsWithoutType(user_level);
+
+ // Filter : no appointed meetings
+ List<Rooms> filtered = new ArrayList<Rooms>();
+
+ for (Iterator<Rooms> iter =
roomList.iterator();iter.hasNext();) {
+ Rooms rooms = iter.next();
+
+ if(!rooms.getAppointment()){
+
rooms.setCurrentusers(this.getRoomClientsListByRoomId(rooms.getRooms_id()));
+ filtered.add(rooms);
+ }
+ }
+
+
+ return filtered;
+ } catch (Exception err) {
+ log.error("[getRoomsPublicWithoutType]",err);
+ }
+ return null;
+ }
+
/**
* retrieving ServerTime
@@ -218,6 +277,37 @@
//--------------------------------------------------------------------------------------------
+ public List<Rooms> getAppointedMeetingRoomsWithoutType(String SID) {
+ log.debug("ConferenceService.getAppointedMeetings");
+ try {
+ Long users_id =
Sessionmanagement.getInstance().checkSession(SID);
+ Long user_level =
Usermanagement.getInstance().getUserLevelByID(users_id);
+
+ if
(AuthLevelmanagement.getInstance().checkModLevel(user_level)) {
+ List<Appointment> appointments =
AppointmentLogic.getInstance().getTodaysAppointmentsForUser(users_id);
+ List<Rooms> result = new ArrayList<Rooms>();
+
+ if (appointments != null) {
+ for (int i = 0; i <
appointments.size(); i++) {
+ Appointment ment =
appointments.get(i);
+
+ Long rooms_id =
ment.getRoom().getRooms_id();
+ Rooms rooom =
Roommanagement.getInstance().getRoomById(rooms_id);
+
+
rooom.setCurrentusers(this.getRoomClientsListByRoomId(rooom.getRooms_id()));
+ result.add(rooom);
+ }
+ }
+
+ log.debug("Found " + result.size() + " rooms");
+ return result;
+ }
+ } catch (Exception err) {
+ log.error("[getAppointedMeetingRoomsWithoutType]", err);
+ }
+ return null;
+ }
+
/**
*
* @param SID
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"OpenMeetings developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/openmeetings-dev?hl=en
-~----------~----~----~----~------~----~------~--~---