Updates alias list to provide a list of aliases for an identifier so that (#474)

we can account for multi-alias identifiers like patch groups and ensure
that patch group alias intentions are carried throughout the system for
recording, streaming, etc.

Updates all consumers of alias list data to ensure it can operate with
a list of aliases versus an assumed single alias.

Refactors APCO25 unit/user status identifiers from a base status class
so that alias list can support status identifiers.
This commit is contained in:
Denny Sheirer
2018-12-31 07:24:25 -05:00
committed by GitHub
parent 08ea5ab7cb
commit 3a39ae76ba
23 changed files with 484 additions and 189 deletions

View File

@@ -1,6 +1,7 @@
/*******************************************************************************
/*
* ******************************************************************************
* sdrtrunk
* Copyright (C) 2014-2017 Dennis Sheirer
* Copyright (C) 2014-2018 Dennis Sheirer
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -14,8 +15,8 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
******************************************************************************/
* *****************************************************************************
*/
package io.github.dsheirer.alias.action;
import io.github.dsheirer.alias.Alias;
@@ -56,13 +57,16 @@ public class AliasActionManager extends Module implements IMessageListener, List
for(Identifier identifier: identifiers)
{
Alias alias = mAliasList.getAlias(identifier);
List<Alias> aliases = mAliasList.getAliases(identifier);
if(alias != null && alias.hasActions())
for(Alias alias: aliases)
{
for(AliasAction action: alias.getAction())
if(alias != null && alias.hasActions())
{
action.execute(alias, message);
for(AliasAction action: alias.getAction())
{
action.execute(alias, message);
}
}
}
}