package rogue.app.framework.view.faces.bean;

import rogue.app.framework.view.faces.CommandInvocation;

import javax.enterprise.context.SessionScoped;
import javax.enterprise.inject.Instance;
import javax.inject.Inject;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * Command invocation that can be associated with a login action.
 */
@SessionScoped
public class LoginAction extends CommandInvocation<String>
{
    @Inject
    private Instance<AuthenticationManager> authenticationManager;

    private List<Map.Entry<String, String>> loginLinks;

    public LoginAction()
    {
    }

    /**
     * Get a list of configured authentication providers.
     *
     * @return a list of configured authentication providers.
     */
    public Set<String> getProviders()
    {
        return authenticationManager.get().getProviders();
    }

    /**
     * Get the entry set of login links.
     *
     * @return the map of login links.
     */
    public List<Map.Entry<String, String>> getLoginLinks()
    {
        // Because ui:repeat does not support the collection interface.
        if (loginLinks == null)
        {
            loginLinks = new ArrayList<>();
            loginLinks.addAll(authenticationManager.get().getLoginLinks().entrySet());
        }
        return loginLinks;
    }
}

@@ -234,84 +234,9 @@
 til.
-ArrayList;%0Aimport java.util.List;%0Aimport java.util.Map;%0Aimport java.util.Set
+*
 ;%0A%0A/
@@ -1154,26 +1154,47 @@
     
-loginLinks.addAll(
+for (Map.Entry%3CString, String%3E entry : 
 auth
@@ -1244,17 +1244,141 @@
 rySet())
-;
+%0A            %7B%0A                loginLinks.add(new AbstractMap.SimpleEntry%3C%3E(entry.getKey(), entry.getValue()));%0A            %7D
 %0A       

Use AbstractMap.SimpleEntry since HashMap.Entry is not serializable.