當前位置: 首頁>>代碼示例>>Python>>正文


Python SOAPObjectFactory.createFilter方法代碼示例

本文整理匯總了Python中MaKaC.plugins.Collaboration.Vidyo.api.factory.SOAPObjectFactory.createFilter方法的典型用法代碼示例。如果您正苦於以下問題:Python SOAPObjectFactory.createFilter方法的具體用法?Python SOAPObjectFactory.createFilter怎麽用?Python SOAPObjectFactory.createFilter使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在MaKaC.plugins.Collaboration.Vidyo.api.factory.SOAPObjectFactory的用法示例。


在下文中一共展示了SOAPObjectFactory.createFilter方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: roomWithSameOwner

# 需要導入模塊: from MaKaC.plugins.Collaboration.Vidyo.api.factory import SOAPObjectFactory [as 別名]
# 或者: from MaKaC.plugins.Collaboration.Vidyo.api.factory.SOAPObjectFactory import createFilter [as 別名]
    def roomWithSameOwner(cls, owner, roomName):
        # we retrieve the just created room; we need to do this because Vidyo will have
        # added extra data like the room id, the url
        searchFilter = SOAPObjectFactory.createFilter('admin', roomName)
        answer = AdminApi.getRooms(searchFilter)
        createdRooms = answer.room

        for room in createdRooms:
            if str(room.name) == roomName and str(room.ownerName) == owner:
                return room
        return None
開發者ID:pferreir,項目名稱:indico-backup,代碼行數:13,代碼來源:operations.py

示例2: searchRooms

# 需要導入模塊: from MaKaC.plugins.Collaboration.Vidyo.api.factory import SOAPObjectFactory [as 別名]
# 或者: from MaKaC.plugins.Collaboration.Vidyo.api.factory.SOAPObjectFactory import createFilter [as 別名]
    def searchRooms(cls, query):
        try:
            searchFilter = SOAPObjectFactory.createFilter('admin', "%%%s%%" % VidyoTools.replaceSpacesInName(query))
            rooms = AdminApi.getRooms(searchFilter)
            if rooms.total:
                return rooms.room
            return []

        except WebFault, e:
            Logger.get('Vidyo').exception("""Admin API's searchRooms operation got WebFault: %s"""
                                          % e.fault.faultstring)
            raise
開發者ID:Json-Andriopoulos,項目名稱:indico,代碼行數:14,代碼來源:operations.py

示例3: attachRoom

# 需要導入模塊: from MaKaC.plugins.Collaboration.Vidyo.api.factory import SOAPObjectFactory [as 別名]
# 或者: from MaKaC.plugins.Collaboration.Vidyo.api.factory.SOAPObjectFactory import createFilter [as 別名]
    def attachRoom(cls, booking):
        owner = booking.getOwnerObject()
        possibleLogins = VidyoTools.getAvatarLoginList(owner)
        if not possibleLogins:
            return VidyoError("userHasNoAccounts", "attach")
        roomName = booking.getBookingParamByName("roomName")
        searchFilter = SOAPObjectFactory.createFilter('admin', roomName)
        answer = AdminApi.getRooms(searchFilter, booking.getConference().getId(), booking.getId())
        createdRooms = answer.room

        for room in createdRooms:
            for login in possibleLogins:
                if str(room.name) == roomName and str(room.ownerName) == login:
                    return room
        else:
            return  VidyoError("notValidRoom", "attach")
開發者ID:ferhatelmas,項目名稱:indico,代碼行數:18,代碼來源:operations.py

示例4: attachRoom

# 需要導入模塊: from MaKaC.plugins.Collaboration.Vidyo.api.factory import SOAPObjectFactory [as 別名]
# 或者: from MaKaC.plugins.Collaboration.Vidyo.api.factory.SOAPObjectFactory import createFilter [as 別名]
    def attachRoom(cls, booking):
        owner = booking.getOwnerObject()
        possibleLogins = VidyoTools.getAvatarLoginList(owner)
        if not possibleLogins:
            return VidyoError("userHasNoAccounts", "attach")
        roomName = booking.getBookingParamByName("roomName")
        searchFilter = SOAPObjectFactory.createFilter('admin', roomName)

        # TODO: Do several calls if needed
        # Vidyo should have an exact match feature too
        searchFilter.limit = 100

        answer = AdminApi.getRooms(searchFilter)
        createdRooms = answer.room

        for room in createdRooms:
            for login in possibleLogins:
                if str(room.name) == roomName and str(room.ownerName) == login:
                    return room
        else:
            return VidyoError("notValidRoom", "attach")
開發者ID:pferreir,項目名稱:indico-backup,代碼行數:23,代碼來源:operations.py

示例5: connectRoom

# 需要導入模塊: from MaKaC.plugins.Collaboration.Vidyo.api.factory import SOAPObjectFactory [as 別名]
# 或者: from MaKaC.plugins.Collaboration.Vidyo.api.factory.SOAPObjectFactory import createFilter [as 別名]
 def connectRoom(cls, booking, roomId, extension):
     confId = booking.getConference().getId()
     bookingId = booking.getId()
     try:
         searchFilter = SOAPObjectFactory.createFilter('user', extension)
         userApiAnswer = UserApi.search(searchFilter, confId, bookingId)
         if userApiAnswer.total == 0:
             return VidyoError("noExistsRoom", "connect", _("The conference room is not registered in the vidyo service. ") + VidyoTools.getContactSupportText())
         legacyMember = userApiAnswer.Entity[0].entityID
         AdminApi.connectRoom(roomId, confId, bookingId, legacyMember)
     except WebFault, e:
         faultString = e.fault.faultstring
         if faultString.startswith('ConferenceID is invalid'):
             return VidyoError("unknownRoom", "connect")
         if faultString.startswith('Failed to Invite to Conference'):
             message = _("The connection has failed. ") + VidyoTools.getContactSupportText()
             return VidyoError("connectFailed", "connect", message)
         else:
             Logger.get('Vidyo').exception("""Evt:%s, booking:%s, Admin API's connectRoom operation got WebFault: %s""" %
                     (confId, bookingId, e.fault.faultstring))
             raise
開發者ID:vstitches,項目名稱:indico,代碼行數:23,代碼來源:operations.py

示例6: connectRoom

# 需要導入模塊: from MaKaC.plugins.Collaboration.Vidyo.api.factory import SOAPObjectFactory [as 別名]
# 或者: from MaKaC.plugins.Collaboration.Vidyo.api.factory.SOAPObjectFactory import createFilter [as 別名]
 def connectRoom(cls, booking, roomId, extension):
     confId = booking.getConference().getId()
     bookingId = booking.getId()
     try:
         searchFilter = SOAPObjectFactory.createFilter('user', extension)
         userApiAnswer = UserApi.search(searchFilter, confId, bookingId)
         legacyMember = userApiAnswer.Entity[0].entityID
         AdminApi.connectRoom(roomId, confId, bookingId, legacyMember)
     except WebFault, e:
         faultString = e.fault.faultstring
         if faultString.startswith('ConferenceID is invalid'):
             return VidyoError("unknownRoom", "connect")
         if faultString.startswith('Failed to Invite to Conference'):
             message = _("The connection has failed.")
             if getVidyoOptionValue("contactSupport"):
                 message += _("""\nPlease try again or contact %s for help.""")%getVidyoOptionValue("contactSupport")
             return VidyoError("connectFailed", "connect", message)
         else:
             Logger.get('Vidyo').exception("""Evt:%s, booking:%s, Admin API's connectRoom operation got WebFault: %s""" %
                     (confId, bookingId, e.fault.faultstring))
             raise
開發者ID:bubbas,項目名稱:indico,代碼行數:23,代碼來源:operations.py

示例7: VidyoError

# 需要導入模塊: from MaKaC.plugins.Collaboration.Vidyo.api.factory import SOAPObjectFactory [as 別名]
# 或者: from MaKaC.plugins.Collaboration.Vidyo.api.factory.SOAPObjectFactory import createFilter [as 別名]
        roomId = booking.getRoomId()

        try:
            adminApiRoom = AdminApi.getRoom(roomId, confId, bookingId)
        except WebFault, e:
            faultString = e.fault.faultstring
            if faultString.startswith('Room not found for roomID'):
                return VidyoError("unknownRoom", "checkStatus")
            else:
                Logger.get('Vidyo').exception("""Evt:%s, booking:%s, Admin API's getRoom operation got WebFault: %s""" %
                            (confId, bookingId, e.fault.faultstring))
                raise

        extension = str(adminApiRoom.extension)

        searchFilter = SOAPObjectFactory.createFilter('user', extension)
        userApiAnswer = UserApi.search(searchFilter, confId, bookingId)
        foundEntities = userApiAnswer.Entity

        userApiRoom = None
        for entity in foundEntities:
            if str(entity.extension) == extension and str(entity.entityID) == roomId:
                userApiRoom = entity

        return (adminApiRoom, userApiRoom)

    @classmethod
    def deleteRoom(cls, booking, roomId):
        confId = booking.getConference().getId()
        bookingId = booking.getId()
開發者ID:vstitches,項目名稱:indico,代碼行數:32,代碼來源:operations.py


注:本文中的MaKaC.plugins.Collaboration.Vidyo.api.factory.SOAPObjectFactory.createFilter方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。