/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
*
* ident "%Z%%M% %I% %E% SMI"
*
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*
* Resource loading and utility classes
*/
/*
* Utility class to provide common functions to the printing
* manager classes
*/
public class pmUtility {
/*
* Gets the localized string from the named bundle
*/
try {
"com.sun.admin.pm.client.pmCopyright");
} catch (MissingResourceException e) {
}
try {
} catch (MissingResourceException e) {
}
return keyvalue;
}
try {
"com.sun.admin.pm.client.pmResources");
} catch (MissingResourceException e) {
}
try {
} catch (MissingResourceException e) {
}
return keyvalue;
}
int keyvalue = 0;
try {
"com.sun.admin.pm.client.pmResources");
} catch (MissingResourceException e) {
}
try {
} catch (MissingResourceException e) {
}
if (s != null) {
try {
} catch (Exception x) {
}
}
return keyvalue;
}
public static void doLogin(
pmLogin l;
l = new pmLogin(
"NISAuthentication");
} else { // LDAP
l = new pmLogin(
"LDAPAuthentication");
}
l.setVisible(true);
pmMessageDialog m = new pmMessageDialog(
"Request.cannot.be.completed."));
m.setVisible(true);
throw new pmGuiException
("pmAccess: Cannot create Login screen");
}
throw new pmUserCancelledException("User.Cancelled.Login");
} else {
// Pass data to backend
// getPassword sends back untrimmed string that is invalid
// as a password as it's too long
// setUser for binddn
// setNameServiceHost overloaded for LDAP server name
}
try {
} catch (Exception e) {
throw new pmGuiException("Login.Authorization.Failed");
}
}
// User has not put in printer or server
} else {
pmMessageDialog m =
new pmMessageDialog(
mytop, "LoginFailed");
m.setVisible(true);
throw new pmGuiException("pmAccess: Cannot create Login screen");
}
}
}