Skip to content

Commit eedb96a

Browse files
Ascii Doc
1 parent c8a5551 commit eedb96a

File tree

4 files changed

+133
-103
lines changed

4 files changed

+133
-103
lines changed

restcomm-connect.java.sdk/src/main/asciidoc/index.adoc

Lines changed: 33 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -15,86 +15,89 @@ This Documentation provides the basic information on the usage of this SDK in pe
1515

1616
Initializing the Restcomm Client with the Authentication and URL required
1717

18-
---------------------------------------------------------------------------------
1918
Restcomm.COMMON_URL = "http://localhost:8080/";
2019
Restcomm.init("username", "password");
21-
----------------------------------------------------------------------------------
20+
21+
2222
Incase you need to reset it,just use the '_invalidate()_' method available and initialize it again.
2323

24-
----------------------------------------------------------------------------------
2524
Restcomm.invalidate();
2625
Restcomm.COMMON_URL = "http://localhost:8080/";
2726
Restcomm.init("username", "password");
28-
----------------------------------------------------------------------------------
27+
28+
29+
2930

3031
===== Accounts
3132

3233
===== MainAccount
3334

35+
36+
37+
3438
Fetching the default Account with which we authenticated the Restcomm Client
3539

36-
---------------------------------------------------------------------------------
3740
Account mainAccount = Account.getAccount();
38-
----------------------------------------------------------------------------------
41+
3942
The fields of the Account object can be obtained by invoking the respective '_get()_' method of that field
40-
----------------------------------------------------------------------------------
43+
4144
String Sid,FriendlyName,EmailAddress;
4245
Sid = mainAccount.getSid();
4346
FriendlyName = mainAccount.getFriendly_name();
4447
EmailAddress = mainAccount.getEmail_address();
45-
----------------------------------------------------------------------------------
48+
4649
For Modifying any field(s) of the Account, use the '_modifyAccountDetails()_' method
47-
----------------------------------------------------------------------------------
50+
4851
mainAccount.modifyAccountDetails().newEmail("[email protected]").modify();
49-
----------------------------------------------------------------------------------
52+
5053
In a similar way you can even modify multiple fields as shown below
51-
----------------------------------------------------------------------------------
54+
5255
mainAccount.modifyAccountDetails().newEmail("[email protected]").newPassword("12345abcd").newStatus("suspended").modify();
53-
----------------------------------------------------------------------------------
56+
5457
===== *Note:*
5558
* After modifying an Account,if we require the Account Object for further operations, we need to update the Object representing that Account too,
5659

57-
-------------------------------------------------------------------------------------------------------------------------------------------
60+
5861
mainAccount = mainAccount.modifyAccountDetails().newEmail("[email protected]").newPassword("12345abcd").newStatus("suspended").modify();
59-
-------------------------------------------------------------------------------------------------------------------------------------------
62+
6063
Creating a SubAccount under our MainAccount
61-
----
64+
6265
Account.createSubAccount().FriendlyName("Paul").Password("restcomm1007").Role("Administrator").create();
63-
----
66+
6467
To Capture the SubAccount created,
65-
----
68+
6669
SubAccount SpareAccount = Account.createSubAccount().FriendlyName("Paul").Password("restcomm1007").Role("Administrator").create();
67-
----
70+
6871
Fetching the List of SubAccounts under our Main Account
69-
----
72+
7073
SubAccountList List = Account.getSubAccountList();
7174
SubAccount a = List.get(0);
7275
SubAccount b = List.get(1);
7376
......
7477
....
75-
----
76-
===== SubAccount
78+
79+
==== SubAccount
7780

7881

7982
Fetching a SubAccount with a given 'Sid', available under our MainAccount
80-
----
83+
8184
SubAccount spareAccount = SubAccount.getSubAccount(Sid); //Sid is the actual Sid of the SubAccount we wish to fetch
82-
----
85+
8386
The fields of the SubAccount object can be obtained by invoking the respective '_get()_' method of that field similar to that Of Accounts
84-
----------------------------------------------------------------------------------
87+
8588
String FriendlyName;
8689
FriendlyName = spareAccount.getFriendly_name();
87-
----------------------------------------------------------------------------------
90+
8891

8992
Modifying the SubAccount in a similar way as mentioned above
90-
----
93+
9194
spareAccount = spareAccount.modifySubAccount().........modify();
92-
(Or)
95+
(Or)
9396
spareAccount = SubAccount.modifySubAccount(Sid).........modify(); //Sid is the actual Sid of the SubAccount we wish to modify
94-
----
97+
9598
Deleting a SubAccount
96-
----
99+
97100
spareAccount.delete();
98101
(Or)
99102
SubAccount.deleteSubAccount(Sid); //Sid is the Sid of the SubAccoun to be deleted
100-
----
103+

restcomm-connect.java.sdk/target/classes/META-INF/maven/org.restcomm/restcomm-connect.java.sdk/pom.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#Generated by Maven Integration for Eclipse
2-
#Mon Jun 19 18:28:19 IST 2017
2+
#Mon Jun 19 18:37:14 IST 2017
33
version=0.0.1-SNAPSHOT
44
groupId=org.restcomm
55
m2e.projectName=restcomm-connect.java.sdk

restcomm-connect.java.sdk/target/generated-docs/GS.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ <h1>Restcomm Java Sdk</h1>
1717
</div>
1818
<div id="footer">
1919
<div id="footer-text">
20-
Last updated 2017-06-19 18:28:19 +05:30
20+
Last updated 2017-06-19 18:37:14 +05:30
2121
</div>
2222
</div>
2323
</body>

restcomm-connect.java.sdk/target/generated-docs/index.html

Lines changed: 98 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -40,36 +40,40 @@ <h5 id="_getting_started">Getting Started</h5>
4040
<div class="paragraph">
4141
<p>Initializing the Restcomm Client with the Authentication and URL required</p>
4242
</div>
43-
<div class="listingblock">
43+
<div class="literalblock">
4444
<div class="content">
45-
<pre> Restcomm.COMMON_URL = "http://localhost:8080/";
46-
Restcomm.init("username", "password");
47-
----------------------------------------------------------------------------------
48-
Incase you need to reset it,just use the '_invalidate()_' method available and initialize it again.
49-
50-
----------------------------------------------------------------------------------
51-
Restcomm.invalidate();
52-
Restcomm.COMMON_URL = "http://localhost:8080/";
53-
Restcomm.init("username", "password");
54-
----------------------------------------------------------------------------------
55-
56-
===== Accounts
57-
58-
===== MainAccount
59-
60-
Fetching the default Account with which we authenticated the Restcomm Client</pre>
45+
<pre>Restcomm.COMMON_URL = "http://localhost:8080/";
46+
Restcomm.init("username", "password");</pre>
6147
</div>
6248
</div>
49+
<div class="paragraph">
50+
<p>Incase you need to reset it,just use the '<em>invalidate()</em>' method available and initialize it again.</p>
51+
</div>
6352
<div class="literalblock">
6453
<div class="content">
65-
<pre>Account mainAccount = Account.getAccount();</pre>
54+
<pre>Restcomm.invalidate();
55+
Restcomm.COMMON_URL = "http://localhost:8080/";
56+
Restcomm.init("username", "password");</pre>
57+
</div>
6658
</div>
6759
</div>
68-
<div class="listingblock">
60+
<div class="sect4">
61+
<h5 id="_accounts">Accounts</h5>
62+
63+
</div>
64+
<div class="sect4">
65+
<h5 id="_mainaccount">MainAccount</h5>
66+
<div class="paragraph">
67+
<p>Fetching the default Account with which we authenticated the Restcomm Client</p>
68+
</div>
69+
<div class="literalblock">
6970
<div class="content">
70-
<pre>The fields of the Account object can be obtained by invoking the respective '_get()_' method of that field</pre>
71+
<pre>Account mainAccount = Account.getAccount();</pre>
7172
</div>
7273
</div>
74+
<div class="paragraph">
75+
<p>The fields of the Account object can be obtained by invoking the respective '<em>get()</em>' method of that field</p>
76+
</div>
7377
<div class="literalblock">
7478
<div class="content">
7579
<pre>String Sid,FriendlyName,EmailAddress;
@@ -78,88 +82,111 @@ <h5 id="_getting_started">Getting Started</h5>
7882
EmailAddress = mainAccount.getEmail_address();</pre>
7983
</div>
8084
</div>
81-
<div class="listingblock">
85+
<div class="paragraph">
86+
<p>For Modifying any field(s) of the Account, use the '<em>modifyAccountDetails()</em>' method</p>
87+
</div>
88+
<div class="literalblock">
8289
<div class="content">
83-
<pre>For Modifying any field(s) of the Account, use the '_modifyAccountDetails()_' method</pre>
90+
<pre>mainAccount.modifyAccountDetails().newEmail("[email protected]").modify();</pre>
8491
</div>
8592
</div>
93+
<div class="paragraph">
94+
<p>In a similar way you can even modify multiple fields as shown below</p>
95+
</div>
8696
<div class="literalblock">
8797
<div class="content">
88-
<pre>mainAccount.modifyAccountDetails().newEmail("[email protected]").modify();</pre>
98+
<pre>mainAccount.modifyAccountDetails().newEmail("[email protected]").newPassword("12345abcd").newStatus("suspended").modify();</pre>
99+
</div>
100+
</div>
101+
</div>
102+
<div class="sect4">
103+
<h5 id="__strong_note_strong"><strong>Note:</strong></h5>
104+
<div class="ulist">
105+
<ul>
106+
<li>
107+
<p>After modifying an Account,if we require the Account Object for further operations, we need to update the Object representing that Account too,</p>
108+
<div class="literalblock">
109+
<div class="content">
110+
<pre>mainAccount = mainAccount.modifyAccountDetails().newEmail("[email protected]").newPassword("12345abcd").newStatus("suspended").modify();</pre>
89111
</div>
90112
</div>
91-
<div class="listingblock">
113+
</li>
114+
</ul>
115+
</div>
116+
<div class="paragraph">
117+
<p>Creating a SubAccount under our MainAccount</p>
118+
</div>
119+
<div class="literalblock">
92120
<div class="content">
93-
<pre>In a similar way you can even modify multiple fields as shown below</pre>
121+
<pre>Account.createSubAccount().FriendlyName("Paul").Password("restcomm1007").Role("Administrator").create();</pre>
94122
</div>
95123
</div>
124+
<div class="paragraph">
125+
<p>To Capture the SubAccount created,</p>
126+
</div>
96127
<div class="literalblock">
97128
<div class="content">
98-
<pre>mainAccount.modifyAccountDetails().newEmail("[email protected]").newPassword("12345abcd").newStatus("suspended").modify();</pre>
129+
<pre>SubAccount SpareAccount = Account.createSubAccount().FriendlyName("Paul").Password("restcomm1007").Role("Administrator").create();</pre>
130+
</div>
99131
</div>
132+
<div class="paragraph">
133+
<p>Fetching the List of SubAccounts under our Main Account</p>
100134
</div>
101-
<div class="listingblock">
135+
<div class="literalblock">
102136
<div class="content">
103-
<pre>===== *Note:*
104-
* After modifying an Account,if we require the Account Object for further operations, we need to update the Object representing that Account too,
105-
106-
-------------------------------------------------------------------------------------------------------------------------------------------
107-
mainAccount = mainAccount.modifyAccountDetails().newEmail("[email protected]").newPassword("12345abcd").newStatus("suspended").modify();
108-
-------------------------------------------------------------------------------------------------------------------------------------------
109-
Creating a SubAccount under our MainAccount
110-
----
111-
Account.createSubAccount().FriendlyName("Paul").Password("restcomm1007").Role("Administrator").create();
112-
----
113-
To Capture the SubAccount created,
114-
----
115-
SubAccount SpareAccount = Account.createSubAccount().FriendlyName("Paul").Password("restcomm1007").Role("Administrator").create();
116-
----
117-
Fetching the List of SubAccounts under our Main Account
118-
----
119-
SubAccountList List = Account.getSubAccountList();
120-
SubAccount a = List.get(0);
121-
SubAccount b = List.get(1);
122-
......
123-
....
124-
----
125-
===== SubAccount
126-
127-
128-
Fetching a SubAccount with a given 'Sid', available under our MainAccount
129-
----
130-
SubAccount spareAccount = SubAccount.getSubAccount(Sid); //Sid is the actual Sid of the SubAccount we wish to fetch
131-
----
132-
The fields of the SubAccount object can be obtained by invoking the respective '_get()_' method of that field similar to that Of Accounts</pre>
137+
<pre>SubAccountList List = Account.getSubAccountList();
138+
SubAccount a = List.get(0);
139+
SubAccount b = List.get(1);
140+
......
141+
....</pre>
142+
</div>
143+
</div>
133144
</div>
134145
</div>
146+
<div class="sect3">
147+
<h4 id="_subaccount">SubAccount</h4>
148+
<div class="paragraph">
149+
<p>Fetching a SubAccount with a given 'Sid', available under our MainAccount</p>
150+
</div>
151+
<div class="literalblock">
152+
<div class="content">
153+
<pre>SubAccount spareAccount = SubAccount.getSubAccount(Sid); //Sid is the actual Sid of the SubAccount we wish to fetch</pre>
154+
</div>
155+
</div>
156+
<div class="paragraph">
157+
<p>The fields of the SubAccount object can be obtained by invoking the respective '<em>get()</em>' method of that field similar to that Of Accounts</p>
158+
</div>
135159
<div class="literalblock">
136160
<div class="content">
137161
<pre>String FriendlyName;
138162
FriendlyName = spareAccount.getFriendly_name();</pre>
139163
</div>
140164
</div>
141-
<div class="listingblock">
165+
<div class="paragraph">
166+
<p>Modifying the SubAccount in a similar way as mentioned above</p>
167+
</div>
168+
<div class="literalblock">
142169
<div class="content">
143-
<pre>Modifying the SubAccount in a similar way as mentioned above
144-
----
145-
spareAccount = spareAccount.modifySubAccount().........modify();
146-
(Or)
147-
spareAccount = SubAccount.modifySubAccount(Sid).........modify(); //Sid is the actual Sid of the SubAccount we wish to modify
148-
----
149-
Deleting a SubAccount
150-
----
151-
spareAccount.delete();
152-
(Or)
153-
SubAccount.deleteSubAccount(Sid); //Sid is the Sid of the SubAccoun to be deleted
154-
----</pre>
170+
<pre>spareAccount = spareAccount.modifySubAccount().........modify();
171+
(Or)
172+
spareAccount = SubAccount.modifySubAccount(Sid).........modify(); //Sid is the actual Sid of the SubAccount we wish to modify</pre>
173+
</div>
155174
</div>
175+
<div class="paragraph">
176+
<p>Deleting a SubAccount</p>
177+
</div>
178+
<div class="literalblock">
179+
<div class="content">
180+
<pre>spareAccount.delete();
181+
(Or)
182+
SubAccount.deleteSubAccount(Sid); //Sid is the Sid of the SubAccoun to be deleted</pre>
156183
</div>
157184
</div>
158185
</div>
159186
</div>
160187
<div id="footer">
161188
<div id="footer-text">
162-
Last updated 2017-06-19 18:28:19 +05:30
189+
Last updated 2017-06-19 18:38:41 +05:30
163190
</div>
164191
</div>
165192
</body>

0 commit comments

Comments
 (0)