Skip to content

Commit

Permalink
Most important: updated JiBX version which it was preventing from bui…
Browse files Browse the repository at this point in the history
…lding mvn project. Likewise, updated date in license header plus some other minor code style enhancements.
  • Loading branch information
Fernando Mendioroz committed Jan 24, 2018
1 parent 4cc3e09 commit c931dd1
Show file tree
Hide file tree
Showing 16 changed files with 107 additions and 115 deletions.
@@ -1,6 +1,6 @@
/*
* TeleStax, Open Source Cloud Communications
* Copyright 2011-2013, Telestax Inc and individual contributors
* Copyright 2011-2018, Telestax Inc and individual contributors
* by the @authors tag.
*
* This is free software; you can redistribute it and/or modify it
Expand Down
@@ -1,6 +1,6 @@
/*
* TeleStax, Open Source Cloud Communications
* Copyright 2011-2013, Telestax Inc and individual contributors
* Copyright 2011-2018, Telestax Inc and individual contributors
* by the @authors tag.
*
* This is free software; you can redistribute it and/or modify it
Expand Down
@@ -1,6 +1,6 @@
/*
* TeleStax, Open Source Cloud Communications
* Copyright 2011-2013, Telestax Inc and individual contributors
* Copyright 2011-2018, Telestax Inc and individual contributors
* by the @authors tag.
*
* This is free software; you can redistribute it and/or modify it
Expand Down
@@ -1,6 +1,6 @@
/*
* TeleStax, Open Source Cloud Communications
* Copyright 2011-2013, Telestax Inc and individual contributors
* Copyright 2011-2018, Telestax Inc and individual contributors
* by the @authors tag.
*
* This is free software; you can redistribute it and/or modify it
Expand Down
@@ -1,6 +1,6 @@
/*
* TeleStax, Open Source Cloud Communications
* Copyright 2011-2013, Telestax Inc and individual contributors
* Copyright 2011-2018, Telestax Inc and individual contributors
* by the @authors tag.
*
* This is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -57,8 +57,7 @@ public void setGmlcManagement(GmlcManagement gmlcManagement) {
* (non-Javadoc)
*
* @see
* org.mobicents.ss7.management.console.ShellExecutor#execute(java.lang.
* String[])
* org.mobicents.ss7.management.console.ShellExecutor#execute(java.lang.String[])
*/
@Override
public String execute(String[] commands) {
Expand All @@ -85,8 +84,7 @@ public String execute(String[] commands) {
* (non-Javadoc)
*
* @see
* org.mobicents.ss7.management.console.ShellExecutor#handles(java.lang.
* String)
* org.mobicents.ss7.management.console.ShellExecutor#handles(java.lang.String)
*/
@Override
public boolean handles(String command) {
Expand Down
@@ -1,8 +1,7 @@
/*
* TeleStax, Open Source Cloud Communications Copyright 2012.
* and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
* TeleStax, Open Source Cloud Communications
* Copyright 2011-2018, 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
Expand Down
@@ -1,8 +1,7 @@
/**
* TeleStax, Open Source Cloud Communications Copyright 2012.
* and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
/*
* TeleStax, Open Source Cloud Communications
* Copyright 2011-2018, 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
Expand All @@ -19,6 +18,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/

package org.mobicents.gmlc.management.console.impl;

import org.mobicents.ss7.management.console.CommandContext;
Expand All @@ -27,65 +27,67 @@
import org.mobicents.ss7.management.console.Tree.Node;

/**
* @author amit bhayani
*
*
* @author <a href="mailto:abhayani@gmail.com"> Amit Bhayani </a>
*
*/
public class GmlcCommandHandler extends CommandHandlerWithHelp {

static final Tree commandTree = new Tree("gmlc");
static {
Node parent = commandTree.getTopNode();
static final Tree commandTree = new Tree("gmlc");

static {
Node parent = commandTree.getTopNode();

Node set = parent.addChild("set");
set.addChild("gmlcgt");
set.addChild("gmlcssn");
set.addChild("hlrssn");
set.addChild("mscssn");

Node get = parent.addChild("get");
get.addChild("gmlcgt");
get.addChild("gmlcssn");
set.addChild("hlrssn");
set.addChild("mscssn");

}

Node set = parent.addChild("set");
set.addChild("gmlcgt");
set.addChild("gmlcssn");
set.addChild("hlrssn");
set.addChild("mscssn");

Node get = parent.addChild("get");
get.addChild("gmlcgt");
get.addChild("gmlcssn");
set.addChild("hlrssn");
set.addChild("mscssn");
;

};
public GmlcCommandHandler() {
super(commandTree, CONNECT_MANDATORY_FLAG);
}

public GmlcCommandHandler() {
super(commandTree, CONNECT_MANDATORY_FLAG);
}
/*
* (non-Javadoc)
*
* @see
* org.mobicents.ss7.management.console.CommandHandler#isValid(java.lang.String)
*/
@Override
public void handle(CommandContext ctx, String commandLine) {
// TODO Validate command
if (commandLine.contains("--help")) {
this.printHelp(commandLine, ctx);
return;
}

/*
* (non-Javadoc)
*
* @see
* org.mobicents.ss7.management.console.CommandHandler#isValid(java.lang
* .String)
*/
@Override
public void handle(CommandContext ctx, String commandLine) {
// TODO Validate command
if (commandLine.contains("--help")) {
this.printHelp(commandLine, ctx);
return;
}

ctx.sendMessage(commandLine);
}
ctx.sendMessage(commandLine);
}

/*
* (non-Javadoc)
*
* @see
* org.mobicents.ss7.management.console.CommandHandler#isAvailable(org.mobicents
* .ss7.management.console.CommandContext)
*/
@Override
public boolean isAvailable(CommandContext ctx) {
if (!ctx.isControllerConnected()) {
ctx.printLine("The command is not available in the current context. Please connnect first");
return false;
}
return true;
}
/*
* (non-Javadoc)
*
* @see
* org.mobicents.ss7.management.console.CommandHandler#isAvailable(org.mobicents.ss7.management.console.CommandContext)
*/
@Override
public boolean isAvailable(CommandContext ctx) {
if (!ctx.isControllerConnected()) {
ctx.printLine("The command is not available in the current context. Please connect first");
return false;
}
return true;
}

}
@@ -1,6 +1,6 @@
/*
* TeleStax, Open Source Cloud Communications
* Copyright 2011-2013, Telestax Inc and individual contributors
* Copyright 2011-2018, Telestax Inc and individual contributors
* by the @authors tag.
*
* This is free software; you can redistribute it and/or modify it
Expand Down
@@ -1,6 +1,6 @@
/*
* TeleStax, Open Source Cloud Communications
* Copyright 2011-2013, Telestax Inc and individual contributors
* Copyright 2011-2018, Telestax Inc and individual contributors
* by the @authors tag.
*
* This is free software; you can redistribute it and/or modify it
Expand Down
@@ -1,6 +1,6 @@
/*
* TeleStax, Open Source Cloud Communications
* Copyright 2011-2013, Telestax Inc and individual contributors
* Copyright 2011-2018, Telestax Inc and individual contributors
* by the @authors tag.
*
* This is free software; you can redistribute it and/or modify it
Expand Down
@@ -1,6 +1,6 @@
/*
* TeleStax, Open Source Cloud Communications
* Copyright 2011-2013, Telestax Inc and individual contributors
* Copyright 2011-2018, Telestax Inc and individual contributors
* by the @authors tag.
*
* This is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -303,11 +303,11 @@ public String getSystemErrorResponseXML(MLPResultType mlpClientErrorType, String
/**
* Internal XML generation support function for above getSystemErrorResponseXML()
*
* @param mlpClientErrorType Error type to return to client
* @param mlpClientErrorMessage Error message to send to client
* @return String XML result to return to client
* @throws org.jibx.runtime.JiBXException JiBX had an internal failure of some kind while marshalling the XML
* @throws IOException IO error occurred while generating the XML result
* @param mlpClientErrorType Error type to return to client
* @param mlpClientErrorMessage Error message to send to client
* @return String XML result to return to client
* @throws org.jibx.runtime.JiBXException JiBX had an internal failure of some kind while marshalling the XML
* @throws IOException IO error occurred while generating the XML result
*/
private String generateSystemErrorXML(MLPResultType mlpClientErrorType, String mlpClientErrorMessage)
throws org.jibx.runtime.JiBXException, IOException {
Expand Down Expand Up @@ -404,9 +404,9 @@ public String getPositionErrorResponseXML(String msid, MLPResultType mlpClientEr
* @param msid Device MSISDN
* @param mlpClientErrorType Error type to return to client
* @param mlpClientErrorMessage Error message to send to client
* @return String XML result to return to client
* @return String XML result to return to client
* @throws org.jibx.runtime.JiBXException JiBX had an internal failure of some kind while marshalling the XML
* @throws IOException IO error occurred while generating the XML result
* @throws IOException IO error occurred while generating the XML result
*/
private String generatePositionErrorXML(String utcOffSet, String time, String msid, MLPResultType mlpClientErrorType, String mlpClientErrorMessage)
throws org.jibx.runtime.JiBXException, IOException {
Expand Down Expand Up @@ -456,10 +456,10 @@ private String generatePositionErrorXML(String utcOffSet, String time, String ms
/**
* Create the svc_result XML result for any type of result (error or success)
*
* @param mlpSvcResult Fully filled in SvcResult object to marshal (convert to XML)
* @return String of XML result to send to client
* @param mlpSvcResult Fully filled in SvcResult object to marshal (convert to XML)
* @return String of XML result to send to client
* @throws org.jibx.runtime.JiBXException JiBX had an internal failure of some kind while marshalling the XML
* @throws IOException IO error occurred while generating the XML result
* @throws IOException IO error occurred while generating the XML result
*/
private String marshalMlpResult(org.oma.protocols.mlp.svc_result.SvcResult mlpSvcResult)
throws org.jibx.runtime.JiBXException, IOException {
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -42,7 +42,7 @@
<concurrent.version>1.3.4</concurrent.version>
<project.build.sourceEncoding>ISO-8859-1</project.build.sourceEncoding>
<restcomm.resources.http.servlet.version>2.8.5</restcomm.resources.http.servlet.version>
<jixb.version>1.2.6</jixb.version>
<jixb.version>1.3.1</jixb.version>
</properties>

<modules>
Expand Down

0 comments on commit c931dd1

Please sign in to comment.