*
* @return collection of protocols eligible to choose
*/
public ArrayList<SelectItem> getProtocols() {
ArrayList<SelectItem> protocols = new ArrayList<SelectItem>();
MessageBroker msgBroker = getContextBroker().extractMessageBroker();
ApplicationContext appCtx = ApplicationContext.getInstance();
ApplicationConfiguration appCfg = appCtx.getConfiguration();
ProtocolFactories protocolFactories = appCfg.getProtocolFactories();
for (String key : protocolFactories.getKeys()) {
ProtocolFactory pf = protocolFactories.get(key);
if (pf instanceof AgpProtocolFactory && !AGSProcessorConfig.isAvailable()) {
continue;
}
String resourceKey = protocolFactories.getResourceKey(key);
SelectItem item = new SelectItem(key.toLowerCase(), msgBroker.retrieveMessage(resourceKey));
protocols.add(item);
}
return protocols;
}