Skip to content
Open
Show file tree
Hide file tree
Changes from 34 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
15d9676
Implementation of RCML Java Builder SDK.
Nov 10, 2017
1764a20
Ajustes no package
kleberdamasco Nov 10, 2017
cef09ff
Junit tests
kleberdamasco Nov 10, 2017
1a99084
Created a method to generate xml
kleberdamasco Nov 10, 2017
394789d
Xml builder
kleberdamasco Nov 10, 2017
64972aa
Copyright and Author
kleberdamasco Nov 13, 2017
4cc88d9
Adjust verb names.
Nov 13, 2017
f0e9834
Adjust verb names and attributes.
Nov 13, 2017
9e592a0
Adjust verb names and attributes.
Nov 14, 2017
fc883d9
Class adjusts
kleberdamasco Nov 14, 2017
1407911
Enums and verbs
kleberdamasco Nov 16, 2017
f9b5fdc
Class adjust
kleberdamasco Nov 16, 2017
2398c32
Class adjust
kleberdamasco Nov 16, 2017
ba69d9f
Adjust verb names and attributes.
Nov 16, 2017
0642cd3
Adjust verb names and attributes.
Nov 16, 2017
4a36265
Class adjusts
kleberdamasco Nov 16, 2017
6930562
New verbs
kleberdamasco Nov 16, 2017
bd1e055
Merge origin/master
Nov 16, 2017
5639ef8
Remove target folder.
Nov 16, 2017
0a5f3a5
Class adjusts and new Verbs/Nouns
kleberdamasco Nov 17, 2017
d42ec68
Class adjusts
kleberdamasco Nov 17, 2017
730010d
Implementation of unit tests.
Nov 17, 2017
8657cd9
Class adjusts
kleberdamasco Nov 17, 2017
899764a
Merge remote-tracking branch 'origin/master'
kleberdamasco Nov 17, 2017
ca94455
Class adjusts
kleberdamasco Nov 17, 2017
5015f62
Class adjusts
kleberdamasco Nov 17, 2017
9ea0312
Class adjusts
kleberdamasco Nov 17, 2017
79b864e
Class adjusts
kleberdamasco Nov 17, 2017
f64eb8e
Implementation of unit tests.
Nov 17, 2017
175abd5
Tests junit
kleberdamasco Nov 17, 2017
a1f0742
Merge remote-tracking branch 'origin/master'
kleberdamasco Nov 17, 2017
19d7eec
Tests Junit
kleberdamasco Nov 20, 2017
8bc1911
Class adjusts
kleberdamasco Nov 20, 2017
34c5113
Remote System.out.println...
Nov 20, 2017
ebf908b
Remove IDE config files.
Dec 13, 2017
4832944
Update README.md
rlimonta Dec 22, 2017
9e37952
Changed the visibility of one method and created another.
kleberdamasco Jan 4, 2018
026d4b7
Merge remote-tracking branch 'origin/master'
kleberdamasco Jan 4, 2018
08cdbae
Update README.md
rlimonta Jan 31, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions restcomm-connect.java.sdk/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
1 change: 1 addition & 0 deletions restcomm-connect.java.sdk/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/target/
6 changes: 6 additions & 0 deletions restcomm-connect.java.sdk/.project
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.worldline.asciidoctools.builder</name>
<arguments>
Expand All @@ -17,6 +22,7 @@
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
eclipse.preferences.version=1
encoding//src/main/java=UTF-8
encoding//src/test/java=UTF-8
encoding/<project>=UTF-8
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
org.eclipse.jdt.core.compiler.compliance=1.5
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.5
5 changes: 5 additions & 0 deletions restcomm-connect.java.sdk/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@
<artifactId>wiremock-body-transformer</artifactId>
<version>1.1.5</version>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.2</version>
</dependency>
</dependencies>
<build>
<plugins>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
/*
* TeleStax, Open Source Cloud Communications
* Copyright 2011-2016, Telestax Inc and individual contributors
* by the @authors tag.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.restcomm.connect.java.sdk.rcml;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlValue;

/**
* @author Kleber Damasco [email protected]
*/
@XmlAccessorType(XmlAccessType.FIELD)
public class Client implements GenericBuilder<Client>{

@XmlAttribute
private String name;

@XmlAttribute
private String url;

@XmlAttribute
private String method;

@XmlAttribute
private String statusCallbackEvent;

@XmlAttribute
private String statusCallback;

@XmlAttribute
private String statusCallbackMethod;

@XmlValue
private String value;

public Client name(String name) {
this.name = name;
return this;
}
public Client url(String url) {
this.url = url;
return this;
}
public Client method(MethodType method) {
this.method = method.name();
return this;
}
public Client statusCallbackEvent(StatusCallbackType statusCallbackEvent) {
this.statusCallbackEvent = statusCallbackEvent.getName();
return this;
}
public Client statusCallback(String statusCallback) {
this.statusCallback = statusCallback;
return this;
}
public Client statusCallbackMethod(MethodType method) {
this.statusCallbackMethod = method.name();
return this;
}
public Client value(String value) {
this.value = value;
return this;
}

@Override
public String toString() {
return "Client [name=" + name + ", url=" + url + ", method=" + method + ", statusCallbackEvent="
+ statusCallbackEvent + ", statusCallback=" + statusCallback + ", statusCallbackMethod="
+ statusCallbackMethod + ", value=" + value + "]";
}
public Client build() {
return this;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
/*
* TeleStax, Open Source Cloud Communications
* Copyright 2011-2016, Telestax Inc and individual contributors
* by the @authors tag.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.restcomm.connect.java.sdk.rcml;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlValue;

/**
* @author Kleber Damasco [email protected]
*/
@XmlAccessorType(XmlAccessType.FIELD)
public class Conference implements GenericBuilder<Conference>{

@XmlAttribute
private String name;

@XmlAttribute
private Boolean muted;

@XmlAttribute
private Boolean beep;

@XmlAttribute
private Boolean startConferenceOnEnter;

@XmlAttribute
private Boolean endConferenceOnExit;

@XmlAttribute
private String waitUrl;

@XmlAttribute
private String waitMethod;

@XmlAttribute
private Integer maxParticipants;

@XmlValue
private String value;

public Conference maxParticipants(Integer maxParticipants) {
this.maxParticipants = maxParticipants;
return this;
}
public Conference waitMethod(MethodType waitMethod) {
this.waitMethod = waitMethod.name();
return this;
}
public Conference value(String value) {
this.value = value;
return this;
}
public Conference name(String name) {
this.name = name;
return this;
}
public Conference muted(Boolean muted) {
this.muted = muted;
return this;
}
public Conference beep(Boolean beep) {
this.beep = beep;
return this;
}
public Conference startConferenceOnEnter(Boolean startConferenceOnEnter) {
this.startConferenceOnEnter = startConferenceOnEnter;
return this;
}
public Conference endConferenceOnExit(Boolean endConferenceOnExit) {
this.endConferenceOnExit = endConferenceOnExit;
return this;
}

public Conference build() {
return this;
}
@Override
public String toString() {
return "Conference [name=" + name + ", muted=" + muted + ", beep=" + beep + ", startConferenceOnEnter="
+ startConferenceOnEnter + ", endConferenceOnExit=" + endConferenceOnExit + ", waitUrl=" + waitUrl
+ ", waitMethod=" + waitMethod + ", maxParticipants=" + maxParticipants + ", value=" + value + "]";
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
/*
* TeleStax, Open Source Cloud Communications
* Copyright 2011-2016, Telestax Inc and individual contributors
* by the @authors tag.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.restcomm.connect.java.sdk.rcml;

import java.util.ArrayList;
import java.util.List;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;

/**
* @author Kleber Damasco [email protected]
*/
@XmlAccessorType(XmlAccessType.FIELD)
public class Dial implements GenericBuilder<Dial>{

@XmlAttribute
private String action;

@XmlAttribute
private String method;

@XmlAttribute
private Integer timeout;

@XmlAttribute
private Integer timeLimit;

@XmlAttribute
private String callerId;

@XmlAttribute
private Boolean record;

@XmlElement
private Conference conference;

@XmlElement(name = "Sip")
private Sip sip;

@XmlElement(name = "Client")
private List<Client> clients;

@XmlElement(name = "Number")
private List<Number> numbers;

public Dial() {
clients = new ArrayList<Client>(0);
numbers = new ArrayList<Number>(0);
}

public Dial action(String action) {
this.action = action;
return this;
}
public Dial method(MethodType method) {
this.method = method.name();
return this;
}
public Dial timeout(Integer timeout) {
this.timeout = timeout;
return this;
}
public Dial timeLimit(Integer timeLimit) {
this.timeLimit = timeLimit;
return this;
}
public Dial callerId(String callerId) {
this.callerId = callerId;
return this;
}
public Dial record(Boolean record) {
this.record = record;
return this;
}
public Dial number(Number number) {
this.numbers.add(number);
return this;
}
public Dial client(Client client) {
this.clients.add(client);
return this;
}
public Dial conference(Conference conference) {
this.conference = conference;
return this;
}
public Dial sip(Sip sip) {
this.sip = sip;
return this;
}
public Dial build() {
return this;
}

}
Loading