01: package test;
02:
03: import org.makumba.AttributeNotFoundException;
04: import org.makumba.Attributes;
05: import org.makumba.Database;
06: import org.makumba.LogicException;
07: import org.makumba.UnauthenticatedException;
08: import org.makumba.UnauthorizedException;
09:
10: public class LoginTestLogic {
11:
12: public void checkAttributes(Attributes a, Database db)
13: throws LogicException {
14: a.getAttribute("testAttribute");
15:
16: }
17:
18: public Object findTestAttribute(Attributes a, Database db)
19: throws LogicException {
20: try {
21: a.getAttribute("username");
22: a.getAttribute("password");
23:
24: } catch (AttributeNotFoundException anfe) {
25: throw new UnauthorizedException();
26: }
27:
28: return new Boolean(true);
29: }
30:
31: }
|