01: package com.calipso.reportgenerator.userinterface;
02:
03: import com.calipso.reportgenerator.common.IReportManager;
04: import com.calipso.reportgenerator.common.VersionProperties;
05: import com.calipso.reportgenerator.common.InfoException;
06:
07: /**
08: *
09: * User: jbassino
10: * Date: 20/09/2004
11: * Time: 18:08:15
12: *
13: */
14: public class LoginValidation {
15: private static boolean calledFromProgram = false;
16: private static String defaultUserId = "";
17:
18: public static boolean validate(String defaultUser, String title,
19: IReportManager service, String callingProgramId)
20: throws InfoException {
21: return UserLoginFrame.login(defaultUser, title, service);
22: }
23:
24: public static String getUserName() {
25: if (calledFromProgram) {
26: return defaultUserId;
27: } else {
28: return UserLoginFrame.getUserName();
29: }
30: }
31:
32: }
|