Expand my Community achievements bar.

SOLVED

How To Get List Of The Rooms

Avatar

Former Community Member

Hi

how to get the list of the rooms associated to an ALCCS(Adobe LiveCycle Collaboration Service) account.I tried to use the AccountManager Class and the requestRoomList() method but i am not getting that.Can anyone guide me......

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

you need a little lucky.

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:rtc="AfcsNameSpace">
    <mx:Script>
        <![CDATA[
            import mx.automation.AutomationManager;
            import com.adobe.rtc.events.AccountManagerEvent;
            import com.adobe.rtc.authentication.AbstractAuthenticator;
            import com.adobe.rtc.util.AccountManager;
           
            private var acmanger:AccountManager;

            private function onRoomListReceiveHandler(event:AccountManagerEvent):void
            {

            }

            private function onLoginSuccessHandler(event:AccountManagerEvent):void
            {
                acmanger.requestRoomList();
            }

            private function onLoginFaultHandler(event:AccountManagerEvent):void
            {

                    var roomList:Array = event.list as Array;

            }

            private function onSync(event:Event):void
            {

            }
            private function createRoom():void{
                acmanger=new AccountManager();
                acmanger.accountURL="https://connectnow.acrobat.com/youraccount";
                acmanger.isAuthenticated=false;
                acmanger.authenticator = myAccount;
                acmanger.login();
                acmanger.addEventListener(AccountManagerEvent.ROOM_LIST_RECEIVE,onRoomListReceiveHandler);
                acmanger.addEventListener(AccountManagerEvent.LOGIN_SUCCESS,onLoginSuccessHandler);
                acmanger.addEventListener(AccountManagerEvent.ACCESS_ERROR,onAccessErrorHandler);
            }
            private function onAccessErrorHandler(event:Event):void{
               
            }
            private function onCreateRoomHandler(event:AccountManagerEvent):void{
               
            }
        ]]>
    </mx:Script>
    <rtc:ConnectSessionContainer id="cSession" width="100%" height="100%" synchronizationChange="onSync(event)" autoLogin="false" backgroundColor="#ffffff">
        <rtc:authenticator>
            <rtc:AdobeHSAuthenticator id="myAccount" userName="yourname" password="yourpassword"/>
        </rtc:authenticator>
    </rtc:ConnectSessionContainer>
    <mx:Button label="initApp" y="50" click="{createRoom()}" />
    <mx:Button label="createRomm" y="100" click="{acmanger.createRoom('testRoom',null);}" />
</mx:Application>

View solution in original post

5 Replies

Avatar

Employee

Can you explain what you are trying to do ? Are you calling this using the server-side scripts (and if you are, which language) or ActionScript ?

If you are trying to do it from ActionScript you shoul know that only the account owner can get the list of rooms, so if you are trying to get the list as a guest or some other user you may be getting a permission error.

Avatar

Former Community Member

Hi Raff

        Thank You for replaying.My requirement is as  I am the account owner if anyone comes to my website i want to display all my rooms ,so the user can choose which room he want to enter..So i am trying this by using Action Script i am providing the username , password and accountUrl..etc eventhough i am not able to get the list .my code is here...IS i am missing anything?

protected function init():void
            {
                 acmanger=new AccountManager();
                 acmanger.accountURL="https://connectnow.acrobat.com/sudhakarreddyn";
                 acmanger.isAuthenticated=true;
                var aut:AbstractAuthenticator = new AbstractAuthenticator();
                aut.authenticationURL="https://connectnow.acrobat.com/sudhakarreddyn";
                aut.userName="myusername";
                aut.password="pwd";
                acmanger.authenticator = aut;
                acmanger.login();
                acmanger.addEventListener(AccountManagerEvent.ROOM_LIST_RECEIVE,rec);
                acmanger.addEventListener(AccountManagerEvent.LOGIN_SUCCESS,login);
                acmanger.addEventListener(AccountManagerEvent.LOGIN_FAILURE,fail);
                acmanger.requestRoomList();
            
            }

Avatar

Correct answer by
Former Community Member

you need a little lucky.

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:rtc="AfcsNameSpace">
    <mx:Script>
        <![CDATA[
            import mx.automation.AutomationManager;
            import com.adobe.rtc.events.AccountManagerEvent;
            import com.adobe.rtc.authentication.AbstractAuthenticator;
            import com.adobe.rtc.util.AccountManager;
           
            private var acmanger:AccountManager;

            private function onRoomListReceiveHandler(event:AccountManagerEvent):void
            {

            }

            private function onLoginSuccessHandler(event:AccountManagerEvent):void
            {
                acmanger.requestRoomList();
            }

            private function onLoginFaultHandler(event:AccountManagerEvent):void
            {

                    var roomList:Array = event.list as Array;

            }

            private function onSync(event:Event):void
            {

            }
            private function createRoom():void{
                acmanger=new AccountManager();
                acmanger.accountURL="https://connectnow.acrobat.com/youraccount";
                acmanger.isAuthenticated=false;
                acmanger.authenticator = myAccount;
                acmanger.login();
                acmanger.addEventListener(AccountManagerEvent.ROOM_LIST_RECEIVE,onRoomListReceiveHandler);
                acmanger.addEventListener(AccountManagerEvent.LOGIN_SUCCESS,onLoginSuccessHandler);
                acmanger.addEventListener(AccountManagerEvent.ACCESS_ERROR,onAccessErrorHandler);
            }
            private function onAccessErrorHandler(event:Event):void{
               
            }
            private function onCreateRoomHandler(event:AccountManagerEvent):void{
               
            }
        ]]>
    </mx:Script>
    <rtc:ConnectSessionContainer id="cSession" width="100%" height="100%" synchronizationChange="onSync(event)" autoLogin="false" backgroundColor="#ffffff">
        <rtc:authenticator>
            <rtc:AdobeHSAuthenticator id="myAccount" userName="yourname" password="yourpassword"/>
        </rtc:authenticator>
    </rtc:ConnectSessionContainer>
    <mx:Button label="initApp" y="50" click="{createRoom()}" />
    <mx:Button label="createRomm" y="100" click="{acmanger.createRoom('testRoom',null);}" />
</mx:Application>

Avatar

Former Community Member
Hi
It is working....previously  whenever  i want creation of room (or) rooms list i used to send a request to my java program from there i will connect to AFCS ..now there is no that round trip.....directly i can connect to AFCS through action script..
Thank you 巴巴鲁...

Avatar

Former Community Member

Yes.When the function can works,it's easy to create and delete ....AFCS is powerful.

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----