package motoSample;

import java.io.Serializable;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ApplicationScoped;
import javax.faces.bean.ManagedProperty;
import javax.faces.context.FacesContext;

import java.util.logging.Logger;
import javax.inject.Inject;

import java.util.Vector;

@ManagedBean
@ApplicationScoped
public class LoginMemberBean extends Vector<String> implements Serializable {

    @Inject
    private Logger log;


    @Inject
    private FacesContext context;


    public boolean isLogin(String uid) {
        return this.contains(uid);
    }

    public void login(String uid, boolean isLogin) {
        if (isLogin)
            this.add(uid);
        else
            this.remove(uid);
    }
}
