public void update() throws Exception
{
if (newpassword == null || newpassword.equals("") || newpassword2 == null || newpassword2.equals("") || !newpassword.equals(newpassword2))
{
throw new Exception("something wrong with new Password maybe not
same!");
}
AuthorizationIF auth=AuthorizationFactory.getInstance();
auth.updatePassword(userid,newpassword);
}
/** 获得忘记的密码
* @param email
* @return String password
*/
public String getMypassword(String which) throws Exception{
AuthorizationIF auth=AuthorizationFactory.getInstance();
return auth.getPassword(email);
}
其中的AuthoriztionIF只是一个接口,他能实现updatePassword和getPassword的功能。这一点我在jive中也看到了,不知如何?