class ManagerUtil {
/**
* Strips the internal action id from the given action id.
*
* @param actionId the action id prefixed by the internal action
* id as received from Asterisk.
* @return the original action id, that is the action id as it was before
* the internal action id was added.
* @see #addInternalActionId(String, String)
*/
public static String stripInternalActionId(String actionId)
{
int delimiterIndex;
delimiterIndex = actionId.indexOf(INTERNAL_ACTION_ID_DELIMITER);
if (delimiterIndex > 0)
{
if (actionId.length() > delimiterIndex + 1)
{
return actionId.substring(delimiterIndex + 1);
}
else
{
return null;
}
}
else
{
return null;
}
}
}