/** * Add a AuthMechanism object to the set return value : * false = found * true = not found */ public boolean addAuthMechanism(AuthMechanism mech) { boolean flag=false; for (Iterator itr = authMechanisms.iterator(); itr.hasNext();){ AuthMechanism next = (AuthMechanism) itr.next(); if (next.getAuthMechVal()==mech.getAuthMechVal()) { return(flag); } } flag=this.authMechanisms.add(mech); return(flag); }
/** * Add a AuthMechanism object to the set return value : * false = found * true = not found */ public boolean addAuthMechanism(AuthMechanism mech) { boolean flag=false; for (Iterator itr = authMechanisms.iterator(); itr.hasNext();){ AuthMechanism next = (AuthMechanism) itr.next(); if (next.getAuthMechVal()==mech.getAuthMechVal()) { return(flag); } } flag=this.authMechanisms.add(mech); return(flag); }
/** * Remove a AuthMechanism object with given auth mech value from the set * return value : false = found * true = not found */ public boolean removeAuthMechanism(int mech) { boolean flag = false; for (Iterator itr = authMechanisms.iterator(); itr.hasNext();){ AuthMechanism next = (AuthMechanism) itr.next(); if (next.getAuthMechVal()==mech) { flag = this.authMechanisms.remove(next); return(flag); } } return(flag); }
/** * Remove a AuthMechanism object with given auth mech value from the set * return value : false = found * true = not found */ public boolean removeAuthMechanism(int mech) { boolean flag = false; for (Iterator itr = authMechanisms.iterator(); itr.hasNext();){ AuthMechanism next = (AuthMechanism) itr.next(); if (next.getAuthMechVal()==mech) { flag = this.authMechanisms.remove(next); return(flag); } } return(flag); }
/** * Add a AuthMechanism object with given auth mech value to the set * return value : false = found * true = not found */ public boolean addAuthMechanism(int mech) { boolean flag = false; for (Iterator itr = authMechanisms.iterator(); itr.hasNext();){ AuthMechanism next = (AuthMechanism) itr.next(); if (next.getAuthMechVal() == mech) return(flag); } String credInf = null; if (mech == PoolManagerConstants.BASIC_PASSWORD) { credInf = PoolManagerConstants.PASSWORD_CREDENTIAL; } else { credInf = PoolManagerConstants.GENERIC_CREDENTIAL; } AuthMechanism auth = new AuthMechanism("",mech, credInf); flag = this.authMechanisms.add(auth); return(flag); }
/** * Add a AuthMechanism object with given auth mech value to the set * return value : false = found * true = not found */ public boolean addAuthMechanism(int mech) { boolean flag = false; for (Iterator itr = authMechanisms.iterator(); itr.hasNext();){ AuthMechanism next = (AuthMechanism) itr.next(); if (next.getAuthMechVal() == mech) return(flag); } String credInf = null; if (mech == PoolManagerConstants.BASIC_PASSWORD) { credInf = PoolManagerConstants.PASSWORD_CREDENTIAL; } else { credInf = PoolManagerConstants.GENERIC_CREDENTIAL; } AuthMechanism auth = new AuthMechanism("",mech, credInf); flag = this.authMechanisms.add(auth); return(flag); }