test_class.declarator: router = null
test_class.modifier: private
test_class.original_string: private Router router = null;
test_class.type: Router
test_class.var_name: router
test_class.declarator: sccpResource = null
test_class.modifier: private
test_class.original_string: private SccpResource sccpResource = null;
test_class.type: SccpResource
test_class.var_name: sccpResource
test_class.declarator: sccpStack = null
test_class.modifier: private
test_class.original_string: private SccpStackImpl sccpStack = null;
test_class.type: SccpStackImpl
test_class.var_name: sccpStack
test_class.declarator: sccpExecutor = null
test_class.modifier: private
test_class.original_string: private SccpExecutor sccpExecutor = null;
test_class.type: SccpExecutor
test_class.var_name: sccpExecutor
test_class.file: sccp/sccp-impl/src/test/java/org/mobicents/protocols/ss7/sccp/impl/oam/SccpExecutorTest.java
test_class.identifier: SccpExecutorTest
test_case.body: @Test(groups = { "oam", "functional.mgmt" })
      public void testConcernedSpc() {
  
          String rspCmd = "sccp csp create 3 21";
          String res = this.sccpExecutor.execute(rspCmd.split(" "));
          assertEquals(this.sccpResource.getConcernedSpcs().size(), 1);
          ConcernedSignalingPointCode cspc = this.sccpResource.getConcernedSpc(3);
          assertEquals(cspc.getRemoteSpc(), 21);
  
          // Show test
          rspCmd = "sccp csp show";
          res = this.sccpExecutor.execute(rspCmd.split(" "));
          assertEquals(res, "key=3  rsp=21\n");
  
          rspCmd = "sccp csp create 3 22";
          res = this.sccpExecutor.execute(rspCmd.split(" "));
          assertTrue(res.equals(SccpOAMMessage.CS_ALREADY_EXIST),res);
          assertEquals(this.sccpResource.getConcernedSpcs().size(), 1);
          cspc = this.sccpResource.getConcernedSpc(3);
          assertEquals(cspc.getRemoteSpc(), 21);
  
          rspCmd = "sccp csp modify 3 23";
          res = this.sccpExecutor.execute(rspCmd.split(" "));
          assertEquals(this.sccpResource.getConcernedSpcs().size(), 1);
          cspc = this.sccpResource.getConcernedSpc(3);
          assertEquals(cspc.getRemoteSpc(), 23);
  
          rspCmd = "sccp csp modify 33 24";
          res = this.sccpExecutor.execute(rspCmd.split(" "));
          assertTrue(res.equals(String.format(SccpOAMMessage.CS_DOESNT_EXIST, this.sccpStack.getName())));
          assertEquals(this.sccpResource.getConcernedSpcs().size(), 1);
          cspc = this.sccpResource.getConcernedSpc(3);
          assertEquals(cspc.getRemoteSpc(), 23);
  
          rspCmd = "sccp csp show 3";
          res = this.sccpExecutor.execute(rspCmd.split(" "));
  
          rspCmd = "sccp csp show";
          res = this.sccpExecutor.execute(rspCmd.split(" "));
  
          rspCmd = "sccp csp delete 33";
          res = this.sccpExecutor.execute(rspCmd.split(" "));
          assertTrue(res.equals(String.format(SccpOAMMessage.CS_DOESNT_EXIST, this.sccpStack.getName())));
          assertEquals(this.sccpResource.getConcernedSpcs().size(), 1);
          cspc = this.sccpResource.getConcernedSpc(3);
          assertEquals(cspc.getRemoteSpc(), 23);
  
          rspCmd = "sccp csp delete 3";
          res = this.sccpExecutor.execute(rspCmd.split(" "));
          assertEquals(this.sccpResource.getConcernedSpcs().size(), 0);
      }
test_case.class_method_signature: SccpExecutorTest.testConcernedSpc()
test_case.full_signature: @Test(groups = { "oam", "functional.mgmt" }) public void testConcernedSpc()
test_case.identifier: testConcernedSpc
test_case.invocations: execute split assertEquals size getConcernedSpcs getConcernedSpc assertEquals getRemoteSpc execute split assertEquals execute split assertTrue equals assertEquals size getConcernedSpcs getConcernedSpc assertEquals getRemoteSpc execute split assertEquals size getConcernedSpcs getConcernedSpc assertEquals getRemoteSpc execute split assertTrue equals format getName assertEquals size getConcernedSpcs getConcernedSpc assertEquals getRemoteSpc execute split execute split execute split assertTrue equals format getName assertEquals size getConcernedSpcs getConcernedSpc assertEquals getRemoteSpc execute split assertEquals size getConcernedSpcs
test_case.modifiers: @Test(groups = { "oam", "functional.mgmt" }) public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testConcernedSpc()
focal_class.declarator: logger = Logger.getLogger(SccpExecutor.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger logger = Logger.getLogger(SccpExecutor.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: sccpStacks = new FastMap<String, SccpStackImpl>()
focal_class.modifier: private
focal_class.original_string: private FastMap<String, SccpStackImpl> sccpStacks = new FastMap<String, SccpStackImpl>();
focal_class.type: FastMap<String, SccpStackImpl>
focal_class.var_name: sccpStacks
focal_class.declarator: sccpStack = null
focal_class.modifier: private
focal_class.original_string: private SccpStackImpl sccpStack = null;
focal_class.type: SccpStackImpl
focal_class.var_name: sccpStack
focal_class.file: sccp/sccp-impl/src/main/java/org/mobicents/protocols/ss7/sccp/impl/oam/SccpExecutor.java
focal_class.identifier: SccpExecutor
focal_class.interfaces: implements ShellExecutor
focal_class.class_method_signature: SccpExecutor.SccpExecutor()
focal_class.full_signature: public  SccpExecutor()
focal_class.identifier: SccpExecutor
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  SccpExecutor()
focal_class.class_method_signature: SccpExecutor.setSccpStacks(Map<String, SccpStackImpl> sccpStacksTemp)
focal_class.full_signature: public void setSccpStacks(Map<String, SccpStackImpl> sccpStacksTemp)
focal_class.identifier: setSccpStacks
focal_class.modifiers: public
focal_class.parameters: (Map<String, SccpStackImpl> sccpStacksTemp)
focal_class.return: void
focal_class.signature: void setSccpStacks(Map<String, SccpStackImpl> sccpStacksTemp)
focal_class.class_method_signature: SccpExecutor.setDefaultValue()
focal_class.full_signature: private void setDefaultValue()
focal_class.identifier: setDefaultValue
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void setDefaultValue()
focal_class.class_method_signature: SccpExecutor.getSccpStacks()
focal_class.full_signature: public Map<String, SccpStackImpl> getSccpStacks()
focal_class.identifier: getSccpStacks
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Map<String, SccpStackImpl>
focal_class.signature: Map<String, SccpStackImpl> getSccpStacks()
focal_class.class_method_signature: SccpExecutor.execute(String[] options)
focal_class.full_signature: public String execute(String[] options)
focal_class.identifier: execute
focal_class.modifiers: public
focal_class.parameters: (String[] options)
focal_class.return: String
focal_class.signature: String execute(String[] options)
focal_class.class_method_signature: SccpExecutor.manageRss(String[] options)
focal_class.full_signature: private String manageRss(String[] options)
focal_class.identifier: manageRss
focal_class.modifiers: private
focal_class.parameters: (String[] options)
focal_class.return: String
focal_class.signature: String manageRss(String[] options)
focal_class.class_method_signature: SccpExecutor.manageRsp(String[] options)
focal_class.full_signature: private String manageRsp(String[] options)
focal_class.identifier: manageRsp
focal_class.modifiers: private
focal_class.parameters: (String[] options)
focal_class.return: String
focal_class.signature: String manageRsp(String[] options)
focal_class.class_method_signature: SccpExecutor.manageAddress(String[] options)
focal_class.full_signature: private String manageAddress(String[] options)
focal_class.identifier: manageAddress
focal_class.modifiers: private
focal_class.parameters: (String[] options)
focal_class.return: String
focal_class.signature: String manageAddress(String[] options)
focal_class.class_method_signature: SccpExecutor.manageRule(String[] options)
focal_class.full_signature: private String manageRule(String[] options)
focal_class.identifier: manageRule
focal_class.modifiers: private
focal_class.parameters: (String[] options)
focal_class.return: String
focal_class.signature: String manageRule(String[] options)
focal_class.class_method_signature: SccpExecutor.createRule(String[] options)
focal_class.full_signature: private String createRule(String[] options)
focal_class.identifier: createRule
focal_class.modifiers: private
focal_class.parameters: (String[] options)
focal_class.return: String
focal_class.signature: String createRule(String[] options)
focal_class.class_method_signature: SccpExecutor.modifyRule(String[] options)
focal_class.full_signature: private String modifyRule(String[] options)
focal_class.identifier: modifyRule
focal_class.modifiers: private
focal_class.parameters: (String[] options)
focal_class.return: String
focal_class.signature: String modifyRule(String[] options)
focal_class.class_method_signature: SccpExecutor.deleteRule(String[] options)
focal_class.full_signature: private String deleteRule(String[] options)
focal_class.identifier: deleteRule
focal_class.modifiers: private
focal_class.parameters: (String[] options)
focal_class.return: String
focal_class.signature: String deleteRule(String[] options)
focal_class.class_method_signature: SccpExecutor.showRule(String[] options)
focal_class.full_signature: private String showRule(String[] options)
focal_class.identifier: showRule
focal_class.modifiers: private
focal_class.parameters: (String[] options)
focal_class.return: String
focal_class.signature: String showRule(String[] options)
focal_class.class_method_signature: SccpExecutor.createAddress(String[] options, int index, boolean isRule)
focal_class.full_signature: private SccpAddress createAddress(String[] options, int index, boolean isRule)
focal_class.identifier: createAddress
focal_class.modifiers: private
focal_class.parameters: (String[] options, int index, boolean isRule)
focal_class.return: SccpAddress
focal_class.signature: SccpAddress createAddress(String[] options, int index, boolean isRule)
focal_class.class_method_signature: SccpExecutor.manageLmr(String[] options)
focal_class.full_signature: private String manageLmr(String[] options)
focal_class.identifier: manageLmr
focal_class.modifiers: private
focal_class.parameters: (String[] options)
focal_class.return: String
focal_class.signature: String manageLmr(String[] options)
focal_class.class_method_signature: SccpExecutor.manageSap(String[] options)
focal_class.full_signature: private String manageSap(String[] options)
focal_class.identifier: manageSap
focal_class.modifiers: private
focal_class.parameters: (String[] options)
focal_class.return: String
focal_class.signature: String manageSap(String[] options)
focal_class.class_method_signature: SccpExecutor.manageDest(String[] options)
focal_class.full_signature: private String manageDest(String[] options)
focal_class.identifier: manageDest
focal_class.modifiers: private
focal_class.parameters: (String[] options)
focal_class.return: String
focal_class.signature: String manageDest(String[] options)
focal_class.class_method_signature: SccpExecutor.manageConcernedSpc(String[] options)
focal_class.full_signature: private String manageConcernedSpc(String[] options)
focal_class.identifier: manageConcernedSpc
focal_class.modifiers: private
focal_class.parameters: (String[] options)
focal_class.return: String
focal_class.signature: String manageConcernedSpc(String[] options)
focal_class.class_method_signature: SccpExecutor.manageSet(String[] options)
focal_class.full_signature: private String manageSet(String[] options)
focal_class.identifier: manageSet
focal_class.modifiers: private
focal_class.parameters: (String[] options)
focal_class.return: String
focal_class.signature: String manageSet(String[] options)
focal_class.class_method_signature: SccpExecutor.manageGet(String[] options)
focal_class.full_signature: private String manageGet(String[] options)
focal_class.identifier: manageGet
focal_class.modifiers: private
focal_class.parameters: (String[] options)
focal_class.return: String
focal_class.signature: String manageGet(String[] options)
focal_class.class_method_signature: SccpExecutor.handles(String command)
focal_class.full_signature: @Override public boolean handles(String command)
focal_class.identifier: handles
focal_class.modifiers: @Override public
focal_class.parameters: (String command)
focal_class.return: boolean
focal_class.signature: boolean handles(String command)
focal_method.body: public String execute(String[] options) {
          if (this.sccpStacks.size() == 0) {
              logger.warn("SCCP stack not set. Command will not be executed ");
              return SccpOAMMessage.SERVER_ERROR;
          }
  
          // Atleast 1 option is passed?
          if (options == null || options.length < 2) {
              return SccpOAMMessage.INVALID_COMMAND;
          }
  
          String firstOption = options[1];
  
          if (firstOption == null) {
              return SccpOAMMessage.INVALID_COMMAND;
          }
  
          try {
              if (firstOption.equals("rule")) {
                  return this.manageRule(options);
              } else if (firstOption.equals("address")) {
                  return this.manageAddress(options);
              } else if (firstOption.equals("rsp")) {
                  return this.manageRsp(options);
              } else if (firstOption.equals("rss")) {
                  return this.manageRss(options);
              } else if (firstOption.equals("lmr")) {
                  return this.manageLmr(options);
              } else if (firstOption.equals("sap")) {
                  return this.manageSap(options);
              } else if (firstOption.equals("dest")) {
                  return this.manageDest(options);
              } else if (firstOption.equals("csp")) {
                  return this.manageConcernedSpc(options);
              } else if (firstOption.equals("set")) {
                  return this.manageSet(options);
              } else if (firstOption.equals("get")) {
                  return this.manageGet(options);
              }
              // } catch (Exception e) {
              // logger.error(String.format("Error while executing comand %s", Arrays.toString(options)), e);
              // return e.getMessage();
          } catch (Throwable t) {
              logger.error(String.format("Error while executing comand %s", Arrays.toString(options)), t);
              return t.getMessage();
          }
  
          return SccpOAMMessage.INVALID_COMMAND;
      }
focal_method.class_method_signature: SccpExecutor.execute(String[] options)
focal_method.full_signature: public String execute(String[] options)
focal_method.identifier: execute
focal_method.invocations: size warn equals manageRule equals manageAddress equals manageRsp equals manageRss equals manageLmr equals manageSap equals manageDest equals manageConcernedSpc equals manageSet equals manageGet error format toString getMessage
focal_method.modifiers: public
focal_method.parameters: (String[] options)
focal_method.return: String
focal_method.signature: String execute(String[] options)