openmeetings-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexei Fedotov <alexei.fedo...@gmail.com>
Subject Re: svn commit: r1304560 - in /incubator/openmeetings/trunk/singlewebapp: WebContent/WEB-INF/ src/META-INF/ src/app/ src/org/openmeetings/axis/services/
Date Sat, 07 Apr 2012 10:03:04 GMT
The guys should share the hash to enter the room.

--
With best regards / с наилучшими пожеланиями,
Alexei Fedotov / Алексей Федотов,
http://dataved.ru/
+7 916 562 8095



2012/4/7 seba.wagner@gmail.com <seba.wagner@gmail.com>:
> Thanks Alexei!
>
> I don't think that it is a good idea to provide a public SOAP/REST API that
> requires zero authentification to perform certain actions.
> There should be at least a user validation of the SID in the methods
> implemented. Otherwise you can quite easily penetrate our service.
>
> I think instead of adding a new service the new methods could be also added
> to the existing services:
> CalendarService, UserService, RoomService
> No need to create an extra WebService. Or is there some other reason for
> having a separated WebService that I cannot see (yet) ? :)
>
> Sebastian
>
>
> 2012/4/7 Alexei Fedotov <alexei.fedotov@gmail.com>
>>
>> That's a good practice for the guy who commits the patch to explain
>> why it is being committed. :-)
>>
>> The actual service purpose is only motivated by jabber. The service
>> offers a possibility to schedule 1:1 conferences in existing private
>> rooms without admin permissions. The latter may not be the case for
>> implementation, I just wanted that to work this way. Thus better to
>> call this "OneToOneService", not "JabberService".
>>
>> Jabber is most popular use case. I send an invitation to my friend via
>> jabber and enter the room using the same URL. Why openmeetings
>> invitations are not sufficient? I see who is online via jabber, and
>> then immediately attack them with meeting joining requests.
>>
>> Elena implemented the auto-invite button for jitsi. This would be
>> hopefully integrated into jitsi, and we get more people at our demo
>> server.
>>
>> --
>> With best regards / с наилучшими пожеланиями,
>> Alexei Fedotov / Алексей Федотов,
>> http://dataved.ru/
>> +7 916 562 8095
>>
>>
>>
>> On Sat, Apr 7, 2012 at 1:15 PM, seba.wagner@gmail.com
>> <seba.wagner@gmail.com> wrote:
>> > Hi Alexei,
>> >
>> > I would like to know what is the meaning of the JabberService? I can't
>> > find
>> > out how those SOAP/REST methods should help to integrate / connect to a
>> > JabberService from OpenMeetings or vice versa.
>> >
>> > Can you please help?
>> >
>> > Sebastian
>> >
>> >
>> > 2012/3/23 Maxim Solodovnik <solomax666@gmail.com>
>> >>
>> >> I think Alexey can answer your question.
>> >> On Mar 24, 2012 2:22 AM, "seba.wagner@gmail.com"
>> >> <seba.wagner@gmail.com>
>> >> wrote:
>> >>
>> >> > How do you connect to jabber service using openmeetings?
>> >> > Am 23.03.2012 20:06 schrieb "Maxim Solodovnik"
>> >> > <solomax666@gmail.com>:
>> >> >
>> >> > > What do you mean by "need no jars" ?
>> >> > > after sources structure was changed, build.xml should  not be
>> >> > > changed
>> >> > > on
>> >> > > new services add ...
>> >> > >
>> >> > > On Sat, Mar 24, 2012 at 02:03, seba.wagner@gmail.com
>> >> > > <seba.wagner@gmail.com>wrote:
>> >> > >
>> >> > > > Does the Jabber Service need no JARs? How is it intend to
work?
>> >> > > >
>> >> > > > Thanks!
>> >> > > > Sebastian
>> >> > > >
>> >> > > > 2012/3/23  <solomax@apache.org>:
>> >> > > > > Author: solomax
>> >> > > > > Date: Fri Mar 23 18:55:15 2012
>> >> > > > > New Revision: 1304560
>> >> > > > >
>> >> > > > > URL: http://svn.apache.org/viewvc?rev=1304560&view=rev
>> >> > > > > Log:
>> >> > > > > OPENMEETINGS-100 is fixed
>> >> > > > >
>> >> > > > > Added:
>> >> > > > >
>> >> > > >
>> >> > >
>> >> >
>> >> >
>> >> >  incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/axis/services/JabberWebService.java
>> >> > > > >
>> >> > > >
>> >> > >
>> >> >
>> >> >
>> >> >  incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/axis/services/JabberWebServiceFacade.java
>> >> > > > > Removed:
>> >> > > > >    incubator/openmeetings/trunk/singlewebapp/src/app/
>> >> > > > > Modified:
>> >> > > > >
>> >> > > >
>> >> > >
>> >> >
>> >> >
>> >> >  incubator/openmeetings/trunk/singlewebapp/WebContent/WEB-INF/openmeetings-applicationContext.xml
>> >> > > > >
>> >> >  incubator/openmeetings/trunk/singlewebapp/src/META-INF/services.xml
>> >> > > > >
>> >> > > > > Modified:
>> >> > > >
>> >> > >
>> >> >
>> >> >
>> >> > incubator/openmeetings/trunk/singlewebapp/WebContent/WEB-INF/openmeetings-applicationContext.xml
>> >> > > > > URL:
>> >> > > >
>> >> > >
>> >> >
>> >> >
>> >> > http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/WEB-INF/openmeetings-applicationContext.xml?rev=1304560&r1=1304559&r2=1304560&view=diff
>> >> > > > >
>> >> > > >
>> >> > >
>> >> >
>> >> >
>> >> > ==============================================================================
>> >> > > > > ---
>> >> > > >
>> >> > >
>> >> >
>> >> >
>> >> > incubator/openmeetings/trunk/singlewebapp/WebContent/WEB-INF/openmeetings-applicationContext.xml
>> >> > > > (original)
>> >> > > > > +++
>> >> > > >
>> >> > >
>> >> >
>> >> >
>> >> > incubator/openmeetings/trunk/singlewebapp/WebContent/WEB-INF/openmeetings-applicationContext.xml
>> >> > > > Fri Mar 23 18:55:15 2012
>> >> > > > > @@ -254,6 +254,7 @@
>> >> > > > >        <bean id="roomWebService"
>> >> > > > class="org.openmeetings.axis.services.RoomWebService" />
>> >> > > > >        <bean id="fileWebService"
>> >> > > > class="org.openmeetings.axis.services.FileWebService" />
>> >> > > > >        <bean id="calendarWebService"
>> >> > > > class="org.openmeetings.axis.services.CalendarWebService"
/>
>> >> > > > > +       <bean id="jabberWebService"
>> >> > > > class="org.openmeetings.axis.services.JabberWebService" />
>> >> > > > >
>> >> > > > >        <!-- Servlet Facade Beans -->
>> >> > > > >        <bean id="backupExport"
>> >> > > > class="org.openmeetings.servlet.outputhandler.BackupExport"
/>
>> >> > > > >
>> >> > > > > Modified:
>> >> > > >
>> >> > > > incubator/openmeetings/trunk/singlewebapp/src/META-INF/services.xml
>> >> > > > > URL:
>> >> > > >
>> >> > >
>> >> >
>> >> >
>> >> > http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/META-INF/services.xml?rev=1304560&r1=1304559&r2=1304560&view=diff
>> >> > > > >
>> >> > > >
>> >> > >
>> >> >
>> >> >
>> >> > ==============================================================================
>> >> > > > > ---
>> >> > incubator/openmeetings/trunk/singlewebapp/src/META-INF/services.xml
>> >> > > > (original)
>> >> > > > > +++
>> >> > incubator/openmeetings/trunk/singlewebapp/src/META-INF/services.xml
>> >> > > > Fri Mar 23 18:55:15 2012
>> >> > > > > @@ -47,4 +47,16 @@
>> >> > > > >     </messageReceivers>
>> >> > > > >     <parameter name="ServiceClass"
>> >> > > >
>> >> > >
>> >> >
>> >> >
>> >> > locked="xsd:false">org.openmeetings.axis.services.CalendarWebServiceFacade</parameter>
>> >> > > > >   </service>
>> >> > > > > +  <service name="JabberService">
>> >> > > > > +       <description>Jabber Service</description>
>> >> > > > > +       <messageReceivers>
>> >> > > > > +        <messageReceiver
>> >> > > > > +            mep="http://www.w3.org/2004/08/wsdl/in-only"
>> >> > > > > +
>> >> > > > class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver"/>
>> >> > > > > +        <messageReceiver
>> >> > > > > +            mep="http://www.w3.org/2004/08/wsdl/in-out"
>> >> > > > > +
>> >> > > > class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
>> >> > > > > +    </messageReceivers>
>> >> > > > > +    <parameter name="ServiceClass"
>> >> > > >
>> >> > >
>> >> >
>> >> >
>> >> > locked="xsd:false">org.openmeetings.axis.services.JabberWebServiceFacade</parameter>
>> >> > > > > +  </service>
>> >> > > > >  </serviceGroup>
>> >> > > > >
>> >> > > > > Added:
>> >> > > >
>> >> > >
>> >> >
>> >> >
>> >> > incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/axis/services/JabberWebService.java
>> >> > > > > URL:
>> >> > > >
>> >> > >
>> >> >
>> >> >
>> >> > http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/axis/services/JabberWebService.java?rev=1304560&view=auto
>> >> > > > >
>> >> > > >
>> >> > >
>> >> >
>> >> >
>> >> > ==============================================================================
>> >> > > > > ---
>> >> > > >
>> >> > >
>> >> >
>> >> >
>> >> > incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/axis/services/JabberWebService.java
>> >> > > > (added)
>> >> > > > > +++
>> >> > > >
>> >> > >
>> >> >
>> >> >
>> >> > incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/axis/services/JabberWebService.java
>> >> > > > Fri Mar 23 18:55:15 2012
>> >> > > > > @@ -0,0 +1,86 @@
>> >> > > > > +package org.openmeetings.axis.services;
>> >> > > > > +
>> >> > > > > +import java.util.List;
>> >> > > > > +
>> >> > > > > +import org.openmeetings.app.OpenmeetingsVariables;
>> >> > > > > +import org.openmeetings.app.data.basic.AuthLevelmanagement;
>> >> > > > > +import org.openmeetings.app.data.basic.Sessionmanagement;
>> >> > > > > +import
>> >> > > > > org.openmeetings.app.data.conference.Invitationmanagement;
>> >> > > > > +import org.openmeetings.app.data.user.Usermanagement;
>> >> > > > > +import
>> >> > > org.openmeetings.app.persistence.beans.domain.Organisation_Users;
>> >> > > > > +import
>> >> > org.openmeetings.app.persistence.beans.invitation.Invitations;
>> >> > > > > +import org.openmeetings.app.persistence.beans.rooms.Rooms;
>> >> > > > > +import
>> >> > > org.openmeetings.app.persistence.beans.rooms.Rooms_Organisation;
>> >> > > > > +import org.openmeetings.app.persistence.beans.user.Users;
>> >> > > > > +import org.openmeetings.app.remote.ConferenceService;
>> >> > > > > +import org.red5.logging.Red5LoggerFactory;
>> >> > > > > +import org.slf4j.Logger;
>> >> > > > > +import org.springframework.beans.factory.annotation.Autowired;
>> >> > > > > +
>> >> > > > > +public class JabberWebService {
>> >> > > > > +       private static final Logger log =
>> >> > Red5LoggerFactory.getLogger(
>> >> > > > > +                       JabberWebService.class,
>> >> > > > OpenmeetingsVariables.webAppRootKey);
>> >> > > > > +
>> >> > > > > +       @Autowired
>> >> > > > > +       private AuthLevelmanagement authLevelManagement;
>> >> > > > > +       @Autowired
>> >> > > > > +       private Usermanagement userManagement;
>> >> > > > > +       @Autowired
>> >> > > > > +       private Sessionmanagement sessionManagement;
>> >> > > > > +       @Autowired
>> >> > > > > +       private ConferenceService conferenceService;
>> >> > > > > +       @Autowired
>> >> > > > > +       private Invitationmanagement invitationManagement;
>> >> > > > > +
>> >> > > > > +       public List<Rooms> getAvailableRooms(String
SID) {
>> >> > > > > +               log.debug("getAvailableRooms
enter");
>> >> > > > > +
>> >> > > > > +               List<Rooms> result = this.conferenceService
>> >> > > > > +
>> >> > > > .getAppointedMeetingRoomsWithoutType(SID);
>> >> > > > > +
>> >> > > > > +               List<Rooms> pbl =
>> >> > > > this.conferenceService.getRoomsPublicWithoutType(SID);
>> >> > > > > +               if (pbl != null) {
>> >> > > > > +                       result.addAll(pbl);
>> >> > > > > +               }
>> >> > > > > +
>> >> > > > > +               Long users_id =
>> >> > > this.sessionManagement.checkSession(SID);
>> >> > > > > +               Users u =
>> >> > > > > this.userManagement.getUserById(users_id);
>> >> > > > > +               for (Organisation_Users ou :
>> >> > > u.getOrganisation_users()) {
>> >> > > > > +                       List<Rooms_Organisation>
rol =
>> >> > > > this.conferenceService
>> >> > > > > +
>> >> > > > .getRoomsByOrganisationWithoutType(SID, ou
>> >> > > > > +
>> >> > > > .getOrganisation().getOrganisation_id().longValue());
>> >> > > > > +                       if (rol != null)
{
>> >> > > > > +                               for (Rooms_Organisation
ro :
>> >> > > > > rol)
>> >> > > > > {
>> >> > > > > +
>> >> > > > > result.add(ro.getRoom());
>> >> > > > > +                               }
>> >> > > > > +                       }
>> >> > > > > +               }
>> >> > > > > +               for (Rooms r : result) {
>> >> > > > > +                       r.setCurrentusers(null);
>> >> > > > > +               }
>> >> > > > > +               return result;
>> >> > > > > +       }
>> >> > > > > +
>> >> > > > > +       public int getUserCount(String SID, Long
roomId) {
>> >> > > > > +               Long users_id =
>> >> > > this.sessionManagement.checkSession(SID);
>> >> > > > > +               Long user_level =
>> >> > > > this.userManagement.getUserLevelByID(users_id);
>> >> > > > > +
>> >> > > > > +               if
>> >> > > (this.authLevelManagement.checkUserLevel(user_level))
>> >> > > > {
>> >> > > > > +                       return
>> >> > > > this.conferenceService.getRoomClientsMapByRoomId(roomId)
>> >> > > > > +                                  
    .size();
>> >> > > > > +               }
>> >> > > > > +               return -1;
>> >> > > > > +       }
>> >> > > > > +
>> >> > > > > +       public String getInvitationHash(String SID,
String
>> >> > > > > username,
>> >> > > > Long room_id) {
>> >> > > > > +               Long users_id =
>> >> > > this.sessionManagement.checkSession(SID);
>> >> > > > > +               Long user_level =
>> >> > > > this.userManagement.getUserLevelByID(users_id);
>> >> > > > > +               Invitations invitation =
>> >> > > > this.invitationManagement.addInvitationLink(
>> >> > > > > +                               user_level,
username, username,
>> >> > > > username, username, username,
>> >> > > > > +                               room_id,
"",
>> >> > > > > Boolean.valueOf(false),
>> >> > > > null, Integer.valueOf(3),
>> >> > > > > +                               null,
null, users_id, "",
>> >> > > > Long.valueOf(1L),
>> >> > > > > +                               Boolean.valueOf(false),
null,
>> >> > > > > null,
>> >> > > > null);
>> >> > > > > +
>> >> > > > > +               return ((invitation == null)
? null :
>> >> > > > invitation.getHash());
>> >> > > > > +       }
>> >> > > > > +}
>> >> > > > >
>> >> > > > > Added:
>> >> > > >
>> >> > >
>> >> >
>> >> >
>> >> > incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/axis/services/JabberWebServiceFacade.java
>> >> > > > > URL:
>> >> > > >
>> >> > >
>> >> >
>> >> >
>> >> > http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/axis/services/JabberWebServiceFacade.java?rev=1304560&view=auto
>> >> > > > >
>> >> > > >
>> >> > >
>> >> >
>> >> >
>> >> > ==============================================================================
>> >> > > > > ---
>> >> > > >
>> >> > >
>> >> >
>> >> >
>> >> > incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/axis/services/JabberWebServiceFacade.java
>> >> > > > (added)
>> >> > > > > +++
>> >> > > >
>> >> > >
>> >> >
>> >> >
>> >> > incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/axis/services/JabberWebServiceFacade.java
>> >> > > > Fri Mar 23 18:55:15 2012
>> >> > > > > @@ -0,0 +1,51 @@
>> >> > > > > +package org.openmeetings.axis.services;
>> >> > > > > +
>> >> > > > > +import javax.servlet.ServletContext;
>> >> > > > > +
>> >> > > > > +import org.apache.axis2.context.MessageContext;
>> >> > > > > +import org.apache.axis2.transport.http.HTTPConstants;
>> >> > > > > +import org.openmeetings.app.OpenmeetingsVariables;
>> >> > > > > +import org.openmeetings.app.persistence.beans.rooms.Rooms;
>> >> > > > > +import org.red5.logging.Red5LoggerFactory;
>> >> > > > > +import org.slf4j.Logger;
>> >> > > > > +import org.springframework.context.ApplicationContext;
>> >> > > > > +import
>> >> > > >
>> >> > > > org.springframework.web.context.support.WebApplicationContextUtils;
>> >> > > > > +
>> >> > > > > +public class JabberWebServiceFacade {
>> >> > > > > +       private static final Logger log = Red5LoggerFactory
>> >> > > > > +
>> >> > > > > .getLogger(JabberWebServiceFacade.class,
>> >> > > > > +
>> >> > > > OpenmeetingsVariables.webAppRootKey);
>> >> > > > > +
>> >> > > > > +       private ServletContext getServletContext()
throws
>> >> > > > > Exception {
>> >> > > > > +               MessageContext mc =
>> >> > > > MessageContext.getCurrentMessageContext();
>> >> > > > > +               return ((ServletContext) mc
>> >> > > > > +
>> >> > > > .getProperty(HTTPConstants.MC_HTTP_SERVLETCONTEXT));
>> >> > > > > +       }
>> >> > > > > +
>> >> > > > > +       private JabberWebService getJabberServiceProxy()
{
>> >> > > > > +               try {
>> >> > > > > +                       ApplicationContext
context =
>> >> > > > WebApplicationContextUtils
>> >> > > > > +
>> >> > > > .getWebApplicationContext(getServletContext());
>> >> > > > > +
>> >> > > > > +                       return ((JabberWebService)
>> >> > > > context.getBean("jabberWebService"));
>> >> > > > > +               } catch (Exception err) {
>> >> > > > > +                       log.error("[getJabberServiceProxy]",
>> >> > > > > err);
>> >> > > > > +               }
>> >> > > > > +               return null;
>> >> > > > > +       }
>> >> > > > > +
>> >> > > > > +       @SuppressWarnings("cast")
>> >> > > > > +       public Rooms[] getAvailableRooms(String SID)
{
>> >> > > > > +               return ((Rooms[])
>> >> > > > getJabberServiceProxy().getAvailableRooms(SID)
>> >> > > > > +                               .toArray(new
Rooms[0]));
>> >> > > > > +       }
>> >> > > > > +
>> >> > > > > +       public int getUserCount(String SID, Long
roomId) {
>> >> > > > > +               return
>> >> > > > > getJabberServiceProxy().getUserCount(SID,
>> >> > > roomId);
>> >> > > > > +       }
>> >> > > > > +
>> >> > > > > +       public String getInvitationHash(String SID,
String
>> >> > > > > username,
>> >> > > > Long room_id) {
>> >> > > > > +               return getJabberServiceProxy()
>> >> > > > > +                               .getInvitationHash(SID,
>> >> > > > > username,
>> >> > > > room_id);
>> >> > > > > +       }
>> >> > > > > +}
>> >> > > > > \ No newline at end of file
>> >> > > > >
>> >> > > > >
>> >> > > >
>> >> > > >
>> >> > > >
>> >> > > > --
>> >> > > > Sebastian Wagner
>> >> > > > http://www.openmeetings.de
>> >> > > > http://incubator.apache.org/openmeetings/
>> >> > > > http://www.webbase-design.de
>> >> > > > http://www.wagner-sebastian.com
>> >> > > > seba.wagner@gmail.com
>> >> > > >
>> >> > >
>> >> > >
>> >> > >
>> >> > > --
>> >> > > WBR
>> >> > > Maxim aka solomax
>> >> > >
>> >> >
>> >
>> >
>> >
>> >
>> > --
>> > Sebastian Wagner
>> > http://www.openmeetings.de
>> > http://incubator.apache.org/openmeetings/
>> > http://www.webbase-design.de
>> > http://www.wagner-sebastian.com
>> > seba.wagner@gmail.com
>
>
>
>
> --
> Sebastian Wagner
> https://twitter.com/#!/dead_lock
> http://www.openmeetings.de
>
> http://www.webbase-design.de
> http://www.wagner-sebastian.com
> seba.wagner@gmail.com

Mime
View raw message