KdcGui.java revision a0e56b0eb1fdc159ff8348ca0e77d884bb7d126b
/*
* 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 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/**
* GUI interface for Kerberos KDC
*/
// Java Workshop stuff
// Regular JDK stuff
// Stuff to support I18N
// Basics
private KdcGuiRoot gui;
// by ContextHelp class
// Privileges stuff: corresponds to ADMCIL set in kdc.conf
public int privs = 0;
public boolean noLists = false;
// For modal warning dialog and context-sensitive help dialog
// it is dismissed
// For showDataFormatError() to determine what kind of error to show
public static final int DURATION_DATA = 1;
public static final int DATE_DATA = 2;
public static final int NUMBER_DATA = 3;
// For date & time helper dialogs
// For the encryption list helper dialog
// Important defaults and current settings
private int CurPort;
private String CurPrincipal;
private int curPrListPos = 0;
private int curPoListPos = 0;
// General state variables
private boolean prSelValid = false;
private boolean prNeedSave = false;
private boolean poSelValid = false;
private boolean poNeedSave = false;
private boolean glNeedSave = false;
private boolean firsttime = true;
private boolean prnameEditable = false;
private boolean ponameEditable = false;
// Support for context-sensitive help
private static final int BUTTON_ACTION = 1;
private static final int BUTTON_MOUSE = 2;
private static final int TEXTFIELD_ACTION = 3;
private static final int TEXTFIELD_MOUSE = 4;
private static final int TEXTFIELD_KEY = 5;
private static final int CHOICE_ITEM = 6;
private static final int CHOICE_MOUSE = 7;
private static final int CHECKBOX_ITEM = 8;
private static final int CHECKBOX_MOUSE = 9;
private static final int LABEL_MOUSE = 10;
private static final int WINDOW_LISTENER = 11;
private boolean loginListeners = false;
public boolean loginHelpMode = false;
public boolean mainHelpMode = false;
public boolean defaultsHelpMode = false;
// For Principal and Policy Keystroke listeners
private static final int PRINCIPAL_EDITING = 1;
private static final int POLICY_EDITING = 2;
private static final int DEFAULTS_EDITING = 3;
private static final int PRINCIPAL_LIST = 4;
private static final int POLICY_LIST = 5;
// For status line
// For I18N
private static ResourceBundle rb;
private static ResourceBundle hrb;
private static DateFormat df;
private static NumberFormat nf;
private static String neverString;
// For general pupose help
// For performance monitoring
boolean perfmon = false;
if (!perfmon)
return;
}
public void reportStartTimes() {
if (!perfmon)
return;
}
/**
* Sample method call ordering during a group's lifetime:
*
* Constructor
* initRoot
* initGroup
* (setOnGroup and getOnGroup may be called at any time in any
* order after initGroup has been called)
* createGroup
* destroyGroup
*/
/**
* The constructor sets up defaults for login screen
*
*/
public KdcGui() {
/*
*/
pdateFirst = new Date();
"/admin" /* NOI18N */;
pdateAfterKrb5Conf = new Date();
/*
* Take care of Java Workshop attribute plumbing
*/
}
/**
* Inherited from the Java Workshop skeleton
*
*/
/*
* Initialize the gui components
*/
gui = new KdcGuiRoot(this);
pdateEndGuiRoot = new Date();
/*
* Take care of Java Workshop attribute plumbing.
*/
pdateStringsDone = new Date();
return gui;
}
/**
* Set up the login screen properly.
*
*/
protected void startGroup() {
pdateBeginStartGroup = new Date();
pdateLoginReady = new Date();
}
/**
* All cleanup done here.
*/
protected void stopGroup() {
}
/**
* Callbacks from Java workshop to decide whether to take the action
* or show appropriate help for it.
*
* 1. Actions that are triggered from all three - mainframe,
* loginframe, and defaultsEditingFrame - are: context sensitive help.
* 2. Actions that are triggered only from mainframe are: printing,
* logging out, edit preferences.
* 3. Actions that are triggered from mainframe and loginframe are:
* exit, general help, context sensitive help, about.
*/
// All three frames
showHelp("ContextSensitiveHelp");
else
}
// Mainframe only
public void checkPrintCurPr() {
if (mainHelpMode)
showHelp("PrintCurrentPrincipal");
else
printCurPr();
}
public void checkPrintCurPol() {
if (mainHelpMode)
showHelp("PrintCurrentPolicy");
else
printCurPol();
}
public void checkPrintPrList() {
if (mainHelpMode)
showHelp("PrintPrincipalList");
else
printPrList();
}
public void checkPrintPoList() {
if (mainHelpMode)
showHelp("PrintPolicyList");
else
printPoList();
}
public void checkLogout() {
if (mainHelpMode)
showHelp("Logout");
else if (okayToLeave(realMainFrame))
logout();
}
public void checkEditPreferences() {
if (mainHelpMode)
showHelp("EditPreferences");
else
}
public void checkRefreshPrincipals() {
if (mainHelpMode)
showHelp("RefreshPrincipals");
else {
}
}
public void checkRefreshPolicies() {
if (mainHelpMode)
showHelp("RefreshPolicies");
else {
policyList = null;
}
}
// Mainframe and loginframe
showHelp("Exit");
else if (okayToLeave(frame))
exit();
}
showHelp("HelpBrowser");
else
}
showHelp("About");
else
}
getString("Click Save to commit changes, "
+"Discard to discard changes, "
+"or Cancel to continue editing.")};
return false;
if (prNeedSave)
if (!prDoSave())
return false; // found an error so cannot leave
if (poNeedSave)
if (!poDoSave())
return false; // found an error so cannot leave
if (glNeedSave)
glDoSave(true);
} else
}
return true;
}
/**
* We use the JDK 1.1 event model for most of our events, but
* we do still need to handle old-style events because the
* tabbed folder and the card panel(supplied by Java Workshop)
* are not compatible with the new event model. We use the
* callouts from Java Workshop to deal with the card panel,
* but we need to have some code here to do the right thing
* when the user selects a new tab in the tabbed folder.
*
* It is important that not too many conditions are tested here,
* because all events flow through this code path.
*
*/
/*
* Look for events from the principal and policy list.
*/
if (mainHelpMode) {
}
} // end of help mode
prModify();
lookAtPrList();
return true;
} // end of Prlist
if (mainHelpMode) {
}
} // end of help mode
poSelected();
lookAtPoList();
return true;
} // end of Pollist
/*
* Look for a unique event from the tabbed folder component;
* if I see it, I know I have a chance to disallow a switch.
* This makes sure data is saved before leaving a tab.
*/
// System.out.println("Got confirm for "+evt.arg);
// System.out.println("Denying switch");
}
/*
* Okay with switch; make sure the data is up to date
*/
if (mainHelpMode) {
showHelp("PrincipalTab");
} else {
}
if (mainHelpMode) {
showHelp("PolicyTab");
} else {
}
}
}
}
/*
* New methods for the admin gui login screen.
*/
/**
* Set strings on login screen to their I18N'd values
*
*/
public void initLoginStrings() {
getString("Context-Sensitive Help"));
getString("Principal Name:"));
}
/**
* Set strings on main screen to their I18N'd values
*
*/
public void initMainStrings() {
getString("SEAM Administration Tool"));
getString("Properties..."));
getString("Principal List"));
getString("Context-Sensitive Help"));
getString("Principal Basics"));
getString("Generate Random Password"));
getString("Encryption Key Types:"));
getString("Admin History"));
getString("Last Principal Change:"));
getString("Last Changed By:"));
getString("Account Expires:"));
getString("Principal Details"));
getString("Last Success:"));
getString("Last Failure:"));
getString("Failure Count:"));
getString("Last Password Change:"));
getString("Password Expires:"));
getString("Ticket Lifetimes"));
getString("Maximum Lifetime (seconds):"));
getString("Maximum Renewal (seconds):"));
getString("Miscellaneous"));
getString("Filter Pattern:"));
getString("Minimum Password Length:"));
getString("Minimum Password Classes:"));
getString("Saved Password History:"));
getString("Minimum Password Lifetime (seconds):"));
getString("Maximum Password Lifetime (seconds):"));
getString("Principals Using This Policy:"));
}
/**
* Allow user to see a fatal error before exiting
*/
cd.getSelection();
exit();
}
/**
* Set the defaults for the login screen. Called on startup,
* when "Start Over" is pressed, or when "Log Out" is chosen
* from the main screen's menu.
*
*/
public void setLoginDefaults() {
CurPass = "";
else {
CurRealm = "";
if (firsttime) {
firsttime = false;
}
}
else
CurServer = "";
CurPort = 0;
try {
} catch (NumberFormatException e) {}
+" file not configured; exiting");
}
if (!loginListeners)
loginListeners = true;
name.requestFocus();
}
/**
* React after new realm entered
*
*/
public void newRealm() {
if (s != null) {
CurServer = s;
} else {
CurServer = "";
}
}
/**
* React after new server entered
*
*/
public void newServer() {
}
/**
* React after username is complete
*
*/
public void nameComplete() {
}
/**
* React after password is complete or "OK" button is pressed.
* We insist that the realm and server are set here separately
* does not exist.
*
*/
public void passwordComplete() {
return;
}
return;
}
}
/**
* Check to see if we're happy with the login information.
* We may want to go to the main screen, principal list tab.
*
*/
public void loginComplete() {
pdateLoginDone = new Date();
return;
}
return;
}
return;
}
boolean b;
try {
CurPort);
} catch (Exception e) {
b = false;
showLoginError(e.getMessage());
return;
}
if (b == false) {
return;
}
pdateSessionUp = new Date();
// Instantiate defaults for this user
+ "/.gkadmin" /* NOI18N */,
else
// Figure out what privileges we have
try {
} catch (Exception e) {
showLoginError(e.getMessage());
}
// Check privileges; if bad enough, we'll just give up.
if (checkPrivs() == false) {
try {
} catch (Exception e) {}
return;
}
reactToPrivs();
prSetEditable(false);
prSetCanSave(false);
poSetEditable(false);
poSetCanSave(false);
prSelValid(false);
poSelValid(false);
// Disable login frame
setListeners(LoginNormal, false);
loginListeners = false;
pdatePreMainShow = new Date();
pdatePostMainShow = new Date();
pdateMainActive = new Date();
showPolicyList("");
showPrincipalList("");
/* XXX - disabled multiple selection until double-click works */
new Boolean(false));
new Boolean(false));
getString("Unable to access lists; please use the Name field."));
}
}
/**
* React to main screen's "Log Out" choice by going back to login screen.
*
*/
public void logout() {
setListeners(MainNormal, false);
setListeners(defaultsNormal, false);
try {
} catch (Exception e) {
showError(e.getMessage());
return;
}
policyList = null;
curPrListPos = 0;
curPrPattern = "";
curPoListPos = 0;
curPoPattern = "";
// Forget this user's print preferences
}
public void exit() {
try {
} catch (Exception e) {}
super.exit();
}
/*
* Methods for the principal list panel
*/
/**
* Update all principal text fields from gui.
* Check to see if anyone of them had a parse error.
* @param nullPasswdOK true if the password can be null. This is
* allowed only when the operation is a modify on an existing
* principal or if it is an attempt to print a new principal still
* in creation.
* @returns true if all is ok, false if an error occurs
*/
// Quits as soon as the first error is detected. The method that
// detects the error also shows a dialog box with a message.
public boolean prUpdateFromGui(boolean nullPasswdOK) {
}
/**
* Is the principal name field editable?
*
*/
public void prSetEditable(boolean editable) {
}
/**
* React to a change in the principal search pattern
*
*/
public void prPatternComplete() {
curPrListPos = 0;
if (!noLists)
else
}
/**
* Clear principal search pattern
*
*/
public void prPatternClear() {
if (noLists) {
} else {
fillPrincipalList("");
}
}
/**
* Show the principal list after applying the filter passed in.
*/
ModeString = "";
OpString = "";
updateStatus();
if (noLists)
}
/**
* Generate the principal list for the first time or after a pattern
* has been chosen.
*
*/
if (noLists) {
return;
}
pdateStartPlist = new Date();
// Do we still want to cache the principal list?
long cachetime = A_LONG_TIME;
if (!defaults.getStaticLists())
if (principalList != null
<= cachetime) {
// Has the pattern changed?
return;
}
getString("Loading principal list"));
try {
principalListDate = new Date();
} catch (Exception e) {
showError(e.getMessage());
updateStatus();
return;
}
updateStatus();
pdateHavePlist = new Date();
pdateDonePlist = new Date();
if (perfmon)
}
}
private void refreshPrincipalList() {
if (noLists)
return;
}
private void selectPrincipal(int pos) {
setCurPrincipal("");
return;
}
if (pos < 0)
pos = 0;
}
}
return ret;
}
/**
* Find index where "name" might go in a sorted string array;
* returns either the element which matches "name" exactly
* or the element just lexographically greater than "name".
*/
int lo = 0;
if (cmp > 0)
break;
}
if (cmp == 0)
break;
if (cmp < 0)
else if (cmp > 0)
}
return mid;
}
return null;
if (index > 0)
if (rem > 0)
return newlist;
}
return null;
if (index > 0)
if (rem > 1)
return newlist;
}
/**
* Collect the policy choice entries
*
*/
public void setPolicyChoice() {
if (!noLists) {
try {
pols = p.getPolicyList();
} catch (Exception e) {
showError(e.getMessage());
return;
}
}
c.removeAll();
}
/**
* Look at the principal list to see what's selected
*
*/
public void lookAtPrList() {
if (noLists)
return;
} else {
setCurPrincipal("");
}
}
private void restorePrListSelection() {
if (noLists)
return;
}
/**
* When the principal name choice changes, we want to reflect
* the name in the other principal tabs. We can also use this
*
*/
CurPrincipal = name;
prSelValid(false);
return;
}
prSelValid(true);
}
/**
* Make Modify, Delete and Duplicate buttons react to what is selected.
* Privileges:
* If we have neither modify or inquire, we keep Modify disabled;
* if we have no modify privileges, we permit Modify to see info,
* but the principal panel components are disabled in reactToPrivs().
* If we have add and inquire privileges, we can permit Duplicate;
* no add also means Create New is permanently disabled in reactToPrivs().
* If we have no delete privileges, we keep Delete disabled.
*/
public void prSelValid(boolean selected) {
}
/**
* Make the Save button do the right thing.
*
*/
public void prSetCanSave(boolean ok) {
}
/**
* Update status line with current information.
*
*/
public void updateStatus() {
}
/**
* This is a way for the data modification actions to note that
* the principal has edits outstanding.
*
*/
public void prSetNeedSave() {
prNeedSave = true;
prSetCanSave(true);
updateStatus();
}
public boolean prDoSave() {
// before attempting to save make sure all text fields are in order
return false;
boolean b = true;
try {
b = prin.savePrincipal();
} catch (Exception e) {
b = false;
showError(e.getMessage());
}
if (!b)
return false;
}
prSetEditable(false);
prSetCanSave(false);
prNeedSave = false;
SaveString = "";
updateStatus();
return true;
}
/**
* React to a choice from the principal list via double-click or
* single-click+Modify; we want to go to the next tab in each case.
* If we don't have modify privileges, we need to simply show values.
*/
public void prModify() {
if (!prNeedSave) {
prSetEditable(false);
prSetCanSave(false);
}
if (noLists)
try {
} catch (Exception e) {
showError(e.getMessage());
return;
}
policy = "";
else
updateStatus();
}
/**
* React to add principal button
* If we got here, we need to enable attributes since we have privs.
*/
public void prAdd() {
setCurPrincipal("");
prSelValid = true;
prSetEditable(true);
try {
} catch (Exception e) {
showError(e.getMessage());
return;
}
updateStatus();
}
/**
* React to duplicate principal button
*
*/
public void prDuplicate() {
if (noLists)
try {
} catch (Exception e) {
showError(e.getMessage());
return;
}
setCurPrincipal("");
prSelValid = true;
prSetEditable(true);
try {
} catch (Exception e) {
showError(e.getMessage());
return;
}
updateStatus();
}
/**
* React to delete principal button
*/
public void prDelete() {
getString("Click OK to proceed or"
+" Cancel to continue editing.")};
return;
if (noLists)
boolean b = false;
try {
} catch (Exception e) {
showError(e.getMessage());
return;
}
if (!b)
return;
setCurPrincipal("");
prSelValid = true;
prSetEditable(true);
curPrListPos--;
}
/**
* React to Previous button on basic screen
*
*/
public void prBasicPrevious() {
prCancel();
}
/**
* React to Next button on basic screen. If some changes were made
* then check to see if they contain a parse error. If so, do
* nothing. The method that checks for error messages also displays
* the error message.
*
*/
public void prBasicNext() {
if (prNeedSave)
return;
updateStatus();
}
/**
* React to Previous button on detail screen. If some changes were made
* then check to see if they contain a parse error. If so, do
* nothing. The method that checks for error messages also displays
* the error message.
*/
public void prDetailPrevious() {
if (prNeedSave)
return;
updateStatus();
}
/**
* React to Next button on detail screen. If some changes were made
* then check to see if they contain a parse error. If so, do
* nothing. The method that checks for error messages also displays
* the error message.
*
*/
public void prDetailNext() {
if (prNeedSave)
return;
updateStatus();
}
/**
* React to Previous button on flags screen
*
*/
public void prFlagsPrevious() {
updateStatus();
}
/**
* React to Done button on flags screen. If any changes were made to
* the principal, then try to save them. If the save fails for any
* reason, do not return to the principal list.
*
*/
public void prFlagsDone() {
if (prNeedSave && prDoSave() == false)
return;
}
/**
* React to save principal button
*
*/
public void prSave() {
prDoSave();
}
/**
* React to cancel principal button
*
*/
public void prCancel() {
if (prNeedSave) {
getString("Click Save to commit changes, "
+"Discard to discard changes, "
+"or Cancel to continue editing.")};
return;
if (!prDoSave())
return;
}
prSetEditable(false);
prSetCanSave(false);
prNeedSave = false;
lookAtPrList();
SaveString = "";
}
/*
* Methods for the principal attribute panels
*/
public boolean setPrName1() {
if (!prnameEditable)
return true;
return false;
}
// visually delete any white space that was at the start or end
// by resetting the field to the trimmmed String.
setCurPrincipal(p);
return true;
}
public boolean setPrComments() {
return true;
}
public boolean setEncType() {
// visually delete any extraneous data that was ignored in the
// parsing by resetting the gui data
return true;
} else
return false;
}
public boolean setPrExpiry() {
// visually delete any extraneous data that was ignored in the
// parsing by resetting the gui data
return true;
} else {
return false;
}
}
public boolean setPrPassword(boolean nullOK) {
if (!nullOK) {
return false;
} else return true;
}
prin.setPassword(p);
return true;
}
public void genRandomPassword() {
int n, count = 0;
byte[] buf = new byte[20];
byte b;
/* NOI18N */;
while (count < 10) {
n = r.nextInt() & 0x7F;
b = (byte)n;
continue;
}
}
public void setPrPolicy() {
return;
policy = "";
try {
} catch (Exception e) {};
}
public boolean setPrMaxlife() {
/* NOI18N */))) {
// visually delete any extraneous data that was ignored in the
// parsing by resetting the gui data
return true;
} else {
return false;
}
}
public boolean setPrMaxrenew() {
"text" /* NOI18N */))) {
// visually delete any extraneous data that was ignored in the
// parsing by resetting the gui data
return true;
} else {
return false;
}
}
public boolean setPrKvno() {
// visually delete any extraneous data that was ignored in the
// parsing by resetting the gui data
return true;
} else {
return false;
}
}
public boolean setPrPwExpiry() {
// visually delete any extraneous data that was ignored in the
// parsing by resetting the gui data
return true;
} else {
return false;
}
}
}
/**
* Update components to reflect data in this principal
*
*/
public void showPrincipal(Principal p) {
}
/**
* Format a time duration for printing, using I18N formats
*
*/
}
/*
* Methods for the policy list panel
*/
/**
* Update all policy text fields from gui.
* Check to see if anyone of them had a parse error.
* @returns true if all is ok, false if an error occurs
*/
// Quits as soon as the first error is detected. The method that
// detects the error also shows a dialog box with a message.
public boolean poUpdateFromGui() {
}
/**
* If we have edited a principal, select their policy by default
*
*/
fillPolicyList("");
int itemcount = l.countItems();
for (int i = 0; i < itemcount; i++)
curPoListPos = i;
break;
}
}
/**
* Is the policy name field editable?
*
*/
public void poSetEditable(boolean editable) {
}
/**
* React to a change in the policy list pattern
*
*/
public void poPatternComplete() {
curPoListPos = 0;
if (!noLists)
else
}
/**
* Clear policy list pattern
*
*/
public void poPatternClear() {
if (noLists) {
} else {
fillPolicyList("");
}
}
/**
* Show the policy list after applying the filter passed in.
*/
ModeString = "";
OpString = "";
updateStatus();
if (noLists)
}
/**
* Generate the policy list for the first time or after a pattern
* has been chosen.
*
*/
if (noLists) {
return;
}
long cachetime = A_LONG_TIME;
if (!defaults.getStaticLists())
if (policyList != null
<= cachetime) {
return;
}
getString("Loading policy list"));
try {
policyList = p.getPolicyList();
policyListDate = new Date();
} catch (Exception e) {
showError(e.getMessage());
updateStatus();
return;
}
updateStatus();
}
}
private void refreshPolicyList() {
if (noLists)
return;
}
private void selectPolicy(int pos) {
setCurPolicy("");
return;
}
if (pos < 0)
pos = 0;
}
}
/**
* When the policy name choice changes, we want to reflect
* the name in the policy detail tab.
*
*/
poSelValid(false);
return;
}
poSelValid(true);
}
/**
* Look at the policy list to see what's selected
*
*/
public void lookAtPoList() {
if (noLists)
return;
} else {
setCurPolicy("");
}
}
private void restorePoListSelection() {
if (noLists)
return;
}
/**
* Make Modify, Delete and Duplicate buttons react to what is selected.
*
*/
public void poSelValid(boolean selected) {
}
/**
* Make the Save button do the right thing.
*
*/
public void poSetCanSave(boolean ok) {
}
/**
* This is a way for the data modification actions to note that
* the principal has edits outstanding.
*
*/
public void poSetNeedSave() {
poNeedSave = true;
poSetCanSave(true);
updateStatus();
}
public boolean poDoSave() {
// before attempting to save make sure all text fields are in order
if (poUpdateFromGui() == false)
return false;
boolean b = true;
try {
b = pol.savePolicy();
} catch (Exception e) {
b = false;
showError(e.getMessage());
}
if (!b)
return false;
}
poSetEditable(false);
poSetCanSave(false);
poNeedSave = false;
SaveString = "";
updateStatus();
return true;
}
/**
* React to a choice from the policy list via double-click or
* single-click+Modify; we want to go to the next tab in each case.
* If we don't have modify privileges, we need to simply show values.
*/
public void poSelected() {
lookAtPoList();
if (!poNeedSave) {
poSetEditable(false);
poSetCanSave(false);
}
if (noLists)
try {
} catch (Exception e) {
showError(e.getMessage());
return;
}
updateStatus();
}
/**
* React to add policy button
* If we got here, we need to enable attributes since we have privs.
*/
public void poAdd() {
setCurPolicy("");
poSelValid = true;
poSetEditable(true);
enablePoAttributes(new Boolean(true));
try {
} catch (Exception e) {
showError(e.getMessage());
return;
}
updateStatus();
}
/**
* React to duplicate policy button
*
*/
public void poDuplicate() {
if (noLists)
try {
} catch (Exception e) {
showError(e.getMessage());
return;
}
setCurPolicy("");
poSelValid = true;
poSetEditable(true);
try {
} catch (Exception e) {
showError(e.getMessage());
return;
}
updateStatus();
}
/**
* React to delete policy button
*/
public void poDelete() {
getString("Click OK to proceed or"
+" Cancel to continue editing.")};
return;
boolean b;
if (noLists)
try {
} catch (Exception e) {
showError(e.getMessage());
return;
}
if (!b)
return;
setCurPolicy("");
poSelValid = true;
poSetEditable(true);
curPoListPos--;
}
/**
* React to save policy button
*
*/
public void poSave() {
poDoSave();
}
/**
* React to cancel policy button
*
*/
public void poCancel() {
if (poNeedSave) {
getString("Click Save to commit changes, "
+"Discard to discard changes, "
+"or Cancel to continue editing.")};
return;
if (!poDoSave())
return;
}
poSetEditable(false);
poSetCanSave(false);
poNeedSave = false;
lookAtPoList();
SaveString = "";
}
/**
* React to previous button on policy detail screen
*
*/
public void polPrevious() {
poCancel();
}
/**
* React to done button on policy detail screen
*
*/
public void polDone() {
if (poNeedSave && poDoSave() == false)
return;
}
/*
* Methods for the policy details panel
*/
public boolean setPolName() {
if (!ponameEditable)
return true;
+"a different policy name or cancel"));
return false;
}
return false;
}
setCurPolicy(p);
return true;
}
public void setPolPwLength() {
return;
try {
/* NOI18N */));
} catch (Exception e) {};
}
public void setPolPwClasses() {
return;
try {
/* NOI18N */));
} catch (Exception e) {};
}
public void setPolPwHistory() {
return;
try {
/* NOI18N */));
} catch (Exception e) {};
}
public boolean setPolMinlife() {
/* NOI18N */))) {
// visually delete any extraneous data that was ignored in the
// parsing by resetting the gui data
return true;
} else {
return false;
}
}
public boolean setPolMaxlife() {
"text" /* NOI18N */))) {
// visually delete any extraneous data that was ignored in the
// parsing by resetting the gui data
return true;
} else {
return false;
}
}
/**
* Update components to reflect data in this policy
*
*/
public void showPolicy(Policy p) {
showDuration(p.PwMinLife));
showDuration(p.PwMaxLife));
}
/*
* Methods for defaults tab
*/
/**
* React to save button
*
*/
public void glSave() {
if (defaults.updateFromGui()) {
glDoSave(true);
glUpdate();
}
}
/**
* React to apply button
*
*/
public void glApply() {
if (defaults.updateFromGui()) {
glDoSave(false);
glUpdate();
}
}
/**
* React to cancel button
*
*/
public void glCancel() {
if (glNeedSave) {
getString("Click Save to commit changes, "
+"Discard to discard changes, "
+"or Cancel to continue editing.")};
return;
glDoSave(true);
glUpdate();
return;
}
}
glDoSave(false);
}
glSetCanSave(false);
glNeedSave = false;
SaveString = "";
updateStatus();
}
public void glUpdate() {
fixHelpTags();
// Load principal list if we are in the principal tab and are not
// editing a principal
// Load policy list if we are in the policy tab and are not
// editing a policy
}
/**
* This is a way for the data modification actions to note that
* the principal has edits outstanding.
*
*/
public void glSetNeedSave() {
glNeedSave = true;
glSetCanSave(true);
}
/**
* Make the Save button do the right thing.
*
*/
public void glSetCanSave(boolean ok) {
}
public boolean setGlobalMaxrenew() {
return done;
}
public boolean setGlobalMaxlife() {
return done;
}
public boolean setGlobalExpiry() {
return done;
}
public boolean setServerSide() {
return done;
}
public boolean setShowLists() {
return done;
}
public boolean setStaticLists() {
return done;
}
public boolean setCacheTime() {
return done;
}
public void setGlobalFlag(int bitfield) {
}
/*
* Miscellany
*/
public void printPrList() {
+ curPrPattern + ")");
if (principalList == null)
}
public void printCurPr() {
// We are viewing the principal list. Instantiate a new
// principal using the current name.
} else {
// We are in the middle of editing a principal. Update the
// current principal object with the current contents of the
// gui. It's ok for the password to be null, we are not printing
// it anyway.
if (!prUpdateFromGui(true))
return;
}
}
public void printPoList() {
+ curPoPattern + ")");
if (policyList == null)
}
public void printCurPol() {
// We are viewing the policy list. Instantiate a new
// policy using the current name.
} else {
// We are in the middle of editing a policy. Update the current
// policy object with the current contents of the gui.
if (!poUpdateFromGui())
return;
}
}
}
}
try {
getString("Can't run /usr/dt/bin/sdtwebclient."));
return;
}
url = helpIndexFile;
try {
} catch (IOException e) {}
return;
}
if (browserProcess != null) {
// Will throw IllegalThreadStateException if thread not exited
// yet
int i = browserProcess.exitValue();
}
// Thread has exited or never existed
} catch (IOException e) {
} catch (IllegalThreadStateException e) {
// Ok. All this mean is that a previous instance of the browser
// exists
}
}
private void killHelpBrowser() {
if (browserProcess != null) {
}
}
private void setupDefaultsEditingFrame() {
glSetCanSave(false);
(new DefaultsContextSensitiveHelpListener());
}
public void editPreferences() {
defaultsEditingFrame.setVisible(true);
}
if (c instanceof Frame)
return frame;
}
/**
* General purpose dialog with title and a label settable
*/
}
}
}
}
}
switch (dataType) {
case DURATION_DATA:
break;
case DATE_DATA:
break;
case NUMBER_DATA:
break;
}
buttons, p.x, p.y);
tf.requestFocus();
}
/**
* Confirm a destructive user action
*/
:cd.getSelection());
}
/**
* Confirm a destructive user action, offering choice of saving
*/
: cd.getSelection());
}
/**
* Show version info
*/
+" Mechanism Administration Tool");
+"All rights reserved.");
}
tf.getForeground());
try {
/*
* In case an exception occurs, let the dialog box be
* initialized to its default date (viz current time).
*/
} catch (ParseException e) {
} catch (NullPointerException e) {
// gets thrown when parse string begins with text
// probable JDK bug
}
catch (StringIndexOutOfBoundsException e) {
// gets thrown when parse string contains only one number
// probable JDK bug
}
}
dateTimeDialog.setVisible(true);
// Modal dialog box so this is after dialog box disappers
if (dateTimeDialog.isSaved()) {
"setFromDateTimeDialog" /* NOI18N */));
}
}
tf.getForeground());
durationHelper.setVisible(true);
// Modal dialog box so this is after dialog box disappers
if (durationHelper.isSaved()) {
"setFromDurationHelper" /* NOI18N */));
}
}
encListDialog.setVisible(true);
// Modal dialog box so this is after dialog box disappers
if (encListDialog.isSaved()) {
// In order to change the key encryption type(s) the admin
// will have to supply a password.
"If changing the key encryption types then specify a" +
" new password for the principal whose keys are" +
" being changed"));
}
}
"setFromEncListDialog" /* NOI18N */));
}
}
/**
* By going into context-sensitive help mode, normal listeners will
* be removed and replaced with help listeners, so that help will
* be shown for the object.
*
*/
cHelp.setVisible(true);
}
if (frame == realLoginFrame)
else if (frame == realMainFrame)
else if (frame == defaultsEditingFrame)
}
/**
* Enables the print menu for printing principal related info.
*/
private void enablePrincipalPrinting() {
}
/**
* Enables the print menu for printing policy related info.
*/
private void enablePolicyPrinting() {
}
/**
* Disables the print menu for printing principal related info.
*/
private void disablePrincipalPrinting() {
}
/**
* Disables the print menu for printing policy related info.
*/
private void disablePolicyPrinting() {
}
/**
* Set up the listeners for the objects on the login screen in normal mode
*
*/
public void setupLoginNormalListeners() {
if (LoginNormal == null) {
Association a;
Object o;
al = new LoginNameAction();
al = new LoginPassAction();
al = new LoginRealmAction();
al = new LoginServerAction();
al = new LoginOKAction();
al = new LoginStartOverAction();
}
setListeners(LoginHelp, false);
setListeners(LoginFixers, false);
setListeners(LoginNormal, true);
loginHelpMode = false;
}
/**
* Set up the listeners for the objects on the login screen in help mode
*
*/
public void setupLoginHelpListeners() {
Association a;
Object o;
LoginHelp.addElement(a);
LoginHelp.addElement(a);
LoginHelp.addElement(a);
LoginHelp.addElement(a);
LoginHelp.addElement(a);
LoginHelp.addElement(a);
LoginHelp.addElement(a);
LoginHelp.addElement(a);
LoginHelp.addElement(a);
LoginHelp.addElement(a);
}
setListeners(LoginNormal, false);
setListeners(LoginHelp, true);
loginHelpMode = true;
}
public void setupLoginHelpFixers() {
Object o;
Association a;
setListeners(LoginFixers, true);
}
/**
* Set up the listeners for the objects on the main screen in normal mode
*
*/
public void setupMainNormalListeners() {
if (MainNormal == null) {
Association a;
Object o;
o = realMainFrame;
MainNormal.addElement(a);
al = new PrListPatternAction();
MainNormal.addElement(a);
MainNormal.addElement(a);
al = new PrListClearAction();
MainNormal.addElement(a);
al = new PrListModifyAction();
MainNormal.addElement(a);
al = new PrListAddAction();
MainNormal.addElement(a);
al = new PrListDeleteAction();
MainNormal.addElement(a);
al = new PrListDuplicateAction();
MainNormal.addElement(a);
al = new PrSaveAction();
MainNormal.addElement(a);
MainNormal.addElement(a);
MainNormal.addElement(a);
al = new PrCancelAction();
MainNormal.addElement(a);
MainNormal.addElement(a);
MainNormal.addElement(a);
al = new PrCommentsAction();
MainNormal.addElement(a);
MainNormal.addElement(a);
il = new PrPolicyAction();
MainNormal.addElement(a);
al = new PrPasswordAction();
MainNormal.addElement(a);
MainNormal.addElement(a);
al = new PrRandomPwAction();
MainNormal.addElement(a);
al = new EncListAction();
MainNormal.addElement(a);
MainNormal.addElement(a);
MainNormal.addElement(a);
al = new PrExpiryAction();
MainNormal.addElement(a);
MainNormal.addElement(a);
MainNormal.addElement(a);
al = new PrBasicPreviousAction();
MainNormal.addElement(a);
al = new PrBasicNextAction();
MainNormal.addElement(a);
al = new PrPwExpiryAction();
MainNormal.addElement(a);
MainNormal.addElement(a);
MainNormal.addElement(a);
al = new PrKvnoAction();
MainNormal.addElement(a);
MainNormal.addElement(a);
al = new PrMaxLifetimeAction();
MainNormal.addElement(a);
MainNormal.addElement(a);
fr);
MainNormal.addElement(a);
al = new PrMaxRenewalAction();
MainNormal.addElement(a);
MainNormal.addElement(a);
fr);
MainNormal.addElement(a);
al = new PrDetailPreviousAction();
MainNormal.addElement(a);
al = new PrDetailNextAction();
MainNormal.addElement(a);
al = new PrFlagsPreviousAction();
MainNormal.addElement(a);
al = new PrFlagsNextAction();
MainNormal.addElement(a);
il = new PrLockAcctAction();
MainNormal.addElement(a);
il = new PrForcePwChangeAction();
MainNormal.addElement(a);
il = new PrAllowPostdatedAction();
MainNormal.addElement(a);
il = new PrAllowForwardableAction();
MainNormal.addElement(a);
il = new PrAllowRenewableAction();
MainNormal.addElement(a);
il = new PrAllowProxiableAction();
MainNormal.addElement(a);
il = new PrAllowSvrAction();
MainNormal.addElement(a);
il = new PrAllowTGTAction();
MainNormal.addElement(a);
il = new PrAllowDupAuthAction();
MainNormal.addElement(a);
il = new PrRequirePreAuthAction();
MainNormal.addElement(a);
il = new PrRequireHwPreAuthAction();
MainNormal.addElement(a);
al = new PoListPatternAction();
MainNormal.addElement(a);
MainNormal.addElement(a);
al = new PoListClearAction();
MainNormal.addElement(a);
al = new PoListModifyAction();
MainNormal.addElement(a);
al = new PoListAddAction();
MainNormal.addElement(a);
al = new PoListDeleteAction();
MainNormal.addElement(a);
al = new PoListDuplicateAction();
MainNormal.addElement(a);
il = new PoMinPwLengthAction();
MainNormal.addElement(a);
il = new PoMinPwClassAction();
MainNormal.addElement(a);
il = new PoSavedPasswordsAction();
MainNormal.addElement(a);
al = new PoMinTicketLifetimeAction();
MainNormal.addElement(a);
MainNormal.addElement(a);
dl = new DurationListener(
MainNormal.addElement(a);
al = new PoMaxTicketLifetimeAction();
MainNormal.addElement(a);
MainNormal.addElement(a);
dl = new DurationListener(
MainNormal.addElement(a);
al = new PoSaveAction();
MainNormal.addElement(a);
al = new PoCancelAction();
MainNormal.addElement(a);
al = new PoPreviousAction();
MainNormal.addElement(a);
al = new PoDoneAction();
MainNormal.addElement(a);
}
setListeners(MainHelp, false);
setListeners(MainFixers, false);
setListeners(MainNormal, true);
mainHelpMode = false;
}
/**
* Set up the listeners for the objects on the main screen in help mode
*
*/
public void setupMainHelpListeners() {
Association a;
Object o;
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
}
fixHelpTags();
setListeners(MainNormal, false);
setListeners(MainHelp, true);
mainHelpMode = true;
}
public void fixHelpTags() {
if (noLists) {
/* NOI18N */);
/* NOI18N */);
/* NOI18N */);
/* NOI18N */);
} else {
/* NOI18N */);
/* NOI18N */);
/* NOI18N */);
/* NOI18N */);
}
}
/**
* Helper method to setupMainHelpListeners. Should be called from
* only from there.
*/
private void setupMainHelpFlagTogglers() {
return;
Object o;
Association a;
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
MainHelp.addElement(a);
}
public void setupMainHelpFixers() {
Object o;
Association a;
MainFixers.addElement(a);
MainFixers.addElement(a);
MainFixers.addElement(a);
MainFixers.addElement(a);
MainFixers.addElement(a);
MainFixers.addElement(a);
MainFixers.addElement(a);
MainFixers.addElement(a);
MainFixers.addElement(a);
MainFixers.addElement(a);
MainFixers.addElement(a);
MainFixers.addElement(a);
MainFixers.addElement(a);
MainFixers.addElement(a);
MainFixers.addElement(a);
MainFixers.addElement(a);
MainFixers.addElement(a);
MainFixers.addElement(a);
setListeners(MainFixers, true);
}
public void setupDefaultsNormalListeners() {
if (defaultsNormal == null) {
Association a;
Object o;
// Action listeners for Defaults
il = new GlobalLockAcctAction();
o = defaults.disableAccount;
il = new GlobalForcePwChangeAction();
il = new GlobalAllowPostdatedAction();
il = new GlobalAllowForwardableAction();
il = new GlobalAllowRenewableAction();
il = new GlobalAllowProxiableAction();
il = new GlobalAllowSvrAction();
o = defaults.allowServiceTix;
il = new GlobalAllowTGTAction();
o = defaults.allowTGTAuth;
il = new GlobalAllowDupAuthAction();
o = defaults.allowDupAuth;
il = new GlobalRequirePreAuthAction();
o = defaults.requirePreauth;
il = new GlobalRequireHwPreAuthAction();
o = defaults.requireHWAuth;
il = new GlobalDefaultServerSideAction();
o = defaults.serverSide;
al = new GlobalDefaultRenewableLifeAction();
al = new GlobalDefaultLifeAction();
o = defaults.maxTicketLife;
al = new GlobalDefaultExpiryAction();
il = new GlobalDefaultShowListsAction();
il = new GlobalDefaultStaticListsAction();
o = defaults.staticLists;
al = new GlobalDefaultCacheTimeAction();
al = new GlobalSaveAction();
o = defaults.saveButton;
al = new GlobalApplyAction();
o = defaults.applyButton;
al = new GlobalCancelAction();
o = defaults.cancelButton;
o = defaults.dateMoreButton;
o = defaults.lifeMoreButton;
o = defaults.cacheMoreButton;
}
setListeners(defaultsHelp, false);
setListeners(defaultsFixers, false);
setListeners(defaultsNormal, true);
defaultsHelpMode = false;
}
public void setupDefaultsHelpListeners() {
if (defaultsHelp == null) {
Association a;
Object o;
o = defaults.disableAccount;
/* NOI18N */);
/* NOI18N */);
/* NOI18N */);
/* NOI18N */);
/* NOI18N */);
o = defaults.allowServiceTix;
o = defaults.allowTGTAuth;
o = defaults.allowDupAuth;
o = defaults.requirePreauth;
/* NOI18N */);
o = defaults.requireHWAuth;
/* NOI18N */);
o = defaults.serverSide;
/* NOI18N */);
/* NOI18N */);
o = defaults.maxTicketLife;
o = defaults.staticLists;
o = defaults.cacheTimeLabel;
o = defaults.saveButton;
o = defaults.applyButton;
o = defaults.cancelButton;
o = defaults.dateMoreButton;
o = defaults.lifeMoreButton;
/* NOI18N */);
/* NOI18N */);
o = defaults.cacheMoreButton;
/* NOI18N */);
}
setListeners(defaultsNormal, false);
setListeners(defaultsHelp, true);
defaultsHelpMode = true;
}
/**
* Helper method to setupDefaultsHelpListeners. Should be called from
* only from there.
*/
private void setupDefaultsHelpFlagTogglers() {
if (defaultsHelp == null)
return;
Object o;
Association a;
o = defaults.disableAccount;
o = defaults.allowServiceTix;
o = defaults.allowTGTAuth;
o = defaults.allowDupAuth;
o = defaults.requirePreauth;
o = defaults.requireHWAuth;
o = defaults.serverSide;
o = defaults.staticLists;
}
public void setupDefaultsHelpFixers() {
Association a;
Object o;
o = defaults.maxTicketLife;
setListeners(defaultsFixers, true);
}
/**
* Set up listeners from a vector of Associations objects
*
*/
}
{
Association a;
Button b;
TextField t;
Choice c;
Checkbox x;
Label z;
Window w;
if (associations != null) {
if (loud) {
}
switch (type) {
case BUTTON_ACTION:
if (install)
else
break;
case BUTTON_MOUSE:
if (install)
else
break;
case TEXTFIELD_ACTION:
if (install)
else
break;
case TEXTFIELD_MOUSE:
if (install)
else
break;
case TEXTFIELD_KEY:
if (install)
else
break;
case CHOICE_ITEM:
if (install)
else
break;
case CHOICE_MOUSE:
if (install)
else
break;
case CHECKBOX_ITEM:
if (install)
else
break;
case CHECKBOX_MOUSE:
if (install)
else
break;
case LABEL_MOUSE:
if (install)
else
break;
case WINDOW_LISTENER:
if (install)
else
break;
}
}
}
}
/*
* About a million actions here ...
*/
private class LoginOKAction implements ActionListener {
public void actionPerformed(ActionEvent e) {
}
}
private class LoginStartOverAction implements ActionListener {
public void actionPerformed(ActionEvent e) {
}
}
private class LoginNameAction implements ActionListener {
public void actionPerformed(ActionEvent e) {
nameComplete();
}
}
private class LoginPassAction implements ActionListener {
public void actionPerformed(ActionEvent e) {
}
}
private class LoginRealmAction implements ActionListener {
public void actionPerformed(ActionEvent e) {
newRealm();
}
}
private class LoginServerAction implements ActionListener {
public void actionPerformed(ActionEvent e) {
newServer();
}
}
private class MainWindowCloseAction extends WindowAdapter {
public void windowClosing(WindowEvent e) {
checkLogout();
}
};
private class PrListPatternAction implements ActionListener {
public void actionPerformed(ActionEvent e) {
}
}
private class PrListClearAction implements ActionListener {
public void actionPerformed(ActionEvent e) {
}
}
private class PrListModifyAction implements ActionListener {
public void actionPerformed(ActionEvent e) {
prModify();
}
}
private class PrListAddAction implements ActionListener {
public void actionPerformed(ActionEvent e) {
prAdd();
}
}
private class PrListDeleteAction implements ActionListener {
public void actionPerformed(ActionEvent e) {
prDelete();
}
}
private class PrListDuplicateAction implements ActionListener {
public void actionPerformed(ActionEvent e) {
prDuplicate();
}
}
private class PrCommentsAction implements ActionListener {
public void actionPerformed(ActionEvent e) {
}
}
private class PrPolicyAction implements ItemListener {
public void itemStateChanged(ItemEvent e) {
setPrPolicy();
}
}
private class PrPasswordAction implements ActionListener {
public void actionPerformed(ActionEvent e) {
}
}
private class PrRandomPwAction implements ActionListener {
public void actionPerformed(ActionEvent e) {
}
}
private class EncListAction implements ActionListener {
public void actionPerformed(ActionEvent e) {
setEncType();
}
}
private class PrExpiryAction implements ActionListener {
public void actionPerformed(ActionEvent e) {
setPrExpiry();
}
}
private class PrSaveAction implements ActionListener {
public void actionPerformed(ActionEvent e) {
prSave();
}
}
private class PrCancelAction implements ActionListener {
public void actionPerformed(ActionEvent e) {
prCancel();
}
}
private class PrBasicPreviousAction implements ActionListener {
public void actionPerformed(ActionEvent e) {
}
}
private class PrBasicNextAction implements ActionListener {
public void actionPerformed(ActionEvent e) {
prBasicNext();
}
}
private class PrPwExpiryAction implements ActionListener {
public void actionPerformed(ActionEvent e) {
}
}
private class PrKvnoAction implements ActionListener {
public void actionPerformed(ActionEvent e) {
setPrKvno();
}
}
private class PrMaxLifetimeAction implements ActionListener {
public void actionPerformed(ActionEvent e) {
setPrMaxlife();
}
}
private class PrMaxRenewalAction implements ActionListener {
public void actionPerformed(ActionEvent e) {
}
}
private class PrDetailPreviousAction implements ActionListener {
public void actionPerformed(ActionEvent e) {
}
}
private class PrDetailNextAction implements ActionListener {
public void actionPerformed(ActionEvent e) {
prDetailNext();
}
}
private class PrFlagsPreviousAction implements ActionListener {
public void actionPerformed(ActionEvent e) {
}
}
private class PrLockAcctAction implements ItemListener {
public void itemStateChanged(ItemEvent e) {
}
}
private class PrForcePwChangeAction implements ItemListener {
public void itemStateChanged(ItemEvent e) {
}
}
private class PrAllowPostdatedAction implements ItemListener {
public void itemStateChanged(ItemEvent e) {
}
}
private class PrAllowForwardableAction implements ItemListener {
public void itemStateChanged(ItemEvent e) {
}
}
private class PrAllowRenewableAction implements ItemListener {
public void itemStateChanged(ItemEvent e) {
}
}
private class PrAllowProxiableAction implements ItemListener {
public void itemStateChanged(ItemEvent e) {
}
}
private class PrAllowSvrAction implements ItemListener {
public void itemStateChanged(ItemEvent e) {
}
}
private class PrAllowTGTAction implements ItemListener {
public void itemStateChanged(ItemEvent e) {
}
}
private class PrAllowDupAuthAction implements ItemListener {
public void itemStateChanged(ItemEvent e) {
}
}
private class PrRequirePreAuthAction implements ItemListener {
public void itemStateChanged(ItemEvent e) {
}
}
private class PrRequireHwPreAuthAction implements ItemListener {
public void itemStateChanged(ItemEvent e) {
}
}
private class PrFlagsNextAction implements ActionListener {
public void actionPerformed(ActionEvent e) {
prFlagsDone();
}
}
private class PoListPatternAction implements ActionListener {
public void actionPerformed(ActionEvent e) {
}
}
private class PoListClearAction implements ActionListener {
public void actionPerformed(ActionEvent e) {
}
}
private class PoListModifyAction implements ActionListener {
public void actionPerformed(ActionEvent e) {
poSelected();
}
}
private class PoListAddAction implements ActionListener {
public void actionPerformed(ActionEvent e) {
poAdd();
}
}
private class PoListDeleteAction implements ActionListener {
public void actionPerformed(ActionEvent e) {
poDelete();
}
}
private class PoListDuplicateAction implements ActionListener {
public void actionPerformed(ActionEvent e) {
poDuplicate();
}
}
private class PoMinPwLengthAction implements ItemListener {
public void itemStateChanged(ItemEvent e) {
}
}
private class PoMinPwClassAction implements ItemListener {
public void itemStateChanged(ItemEvent e) {
}
}
private class PoSavedPasswordsAction implements ItemListener {
public void itemStateChanged(ItemEvent e) {
}
}
private class PoMinTicketLifetimeAction implements ActionListener {
public void actionPerformed(ActionEvent e) {
}
}
private class PoMaxTicketLifetimeAction implements ActionListener {
public void actionPerformed(ActionEvent e) {
}
}
private class PoSaveAction implements ActionListener {
public void actionPerformed(ActionEvent e) {
poSave();
}
}
private class PoCancelAction implements ActionListener {
public void actionPerformed(ActionEvent e) {
poCancel();
}
}
private class PoPreviousAction implements ActionListener {
public void actionPerformed(ActionEvent e) {
polPrevious();
}
}
private class PoDoneAction implements ActionListener {
public void actionPerformed(ActionEvent e) {
polDone();
}
}
private class GlobalLockAcctAction implements ItemListener {
public void itemStateChanged(ItemEvent e) {
}
}
private class GlobalForcePwChangeAction implements ItemListener {
public void itemStateChanged(ItemEvent e) {
}
}
private class GlobalAllowPostdatedAction implements ItemListener {
public void itemStateChanged(ItemEvent e) {
}
}
private class GlobalAllowForwardableAction implements ItemListener {
public void itemStateChanged(ItemEvent e) {
}
}
private class GlobalAllowRenewableAction implements ItemListener {
public void itemStateChanged(ItemEvent e) {
}
}
private class GlobalAllowProxiableAction implements ItemListener {
public void itemStateChanged(ItemEvent e) {
}
}
private class GlobalAllowSvrAction implements ItemListener {
public void itemStateChanged(ItemEvent e) {
}
}
private class GlobalAllowTGTAction implements ItemListener {
public void itemStateChanged(ItemEvent e) {
}
}
private class GlobalAllowDupAuthAction implements ItemListener {
public void itemStateChanged(ItemEvent e) {
}
}
private class GlobalRequirePreAuthAction implements ItemListener {
public void itemStateChanged(ItemEvent e) {
}
}
private class GlobalRequireHwPreAuthAction implements ItemListener {
public void itemStateChanged(ItemEvent e) {
}
}
private class GlobalDefaultServerSideAction implements ItemListener {
public void itemStateChanged(ItemEvent e) {
}
}
private class GlobalDefaultRenewableLifeAction implements ActionListener {
public void actionPerformed(ActionEvent e) {
if (!setGlobalMaxrenew()) {
}
}
}
private class GlobalDefaultLifeAction implements ActionListener {
public void actionPerformed(ActionEvent e) {
if (!setGlobalMaxlife()) {
}
}
}
private class GlobalDefaultExpiryAction implements ActionListener {
public void actionPerformed(ActionEvent e) {
if (!setGlobalExpiry())
}
}
private class GlobalDefaultShowListsAction implements ItemListener {
public void itemStateChanged(ItemEvent e) {
setShowLists();
}
}
private class GlobalDefaultStaticListsAction implements ItemListener {
public void itemStateChanged(ItemEvent e) {
}
}
private class GlobalDefaultCacheTimeAction implements ActionListener {
public void actionPerformed(ActionEvent e) {
setCacheTime();
}
}
private class GlobalSaveAction implements ActionListener {
public void actionPerformed(ActionEvent e) {
glSave();
}
}
private class GlobalApplyAction implements ActionListener {
public void actionPerformed(ActionEvent e) {
glApply();
}
}
private class GlobalCancelAction implements ActionListener {
public void actionPerformed(ActionEvent e) {
glCancel();
}
}
private class HelpListener extends MouseAdapter {
public void mouseClicked(MouseEvent e) {
}
}
private class CheckboxToggler extends MouseAdapter {
public void mouseClicked(MouseEvent e) {
if (e.getComponent() instanceof Checkbox) {
}
}
}
private class ChoiceFixer implements ItemListener {
private Choice c;
private String s;
ChoiceFixer(Choice c) {
this.c = c;
s = c.getSelectedItem();
// System.out.println("CF: Saving string "+s);
}
public void itemStateChanged(ItemEvent e) {
c.select(s);
// System.out.println("CF: Restoring string "+s);
}
}
private class TextFixer extends KeyAdapter {
private TextField t;
private String s;
this.t = t;
s = t.getText();
// System.out.println("TF: Saving string "+s);
}
if (e.getSource() == t)
t.setText(s);
// System.out.println("TF: Restoring string "+s);
}
}
/*
* End of the million listeners
*/
/**
* Call rb.getString(), but catch exception and returns English
* key so that small spelling errors don't cripple the GUI
*
*/
try {
return res;
} catch (MissingResourceException e) {
return key;
}
}
try {
} catch (MissingResourceException e) {
}
return res;
}
/**
* Check the privileges this principal has to see what we should not try.
*/
private boolean checkPrivs() {
boolean okay = true;
// System.out.println("Privileges are "+lpriv+" "
// +(new Integer(privs).toString()));
/**
* Having modify is not useful if we can't either add or see
* old values
*/
okay = false;
/* Having changepw without inquire is not useful */
if (privs == PRIV_CHANGEPW)
okay = false;
if (!okay) {
+getString(" Please try using another principal."));
return false;
}
return true;
}
/*
* Try to cope with the privileges we have.
*/
private void reactToPrivs() {
/*
* If we don't have the Add privilege, we turn off "Create New"
* and "Duplicate". "Duplicate" is also handled in prSelValid/
* poSelValid because it's sensitive to selection from the lists.
*/
// System.out.println("Disabling Create New buttons");
}
/*
* If we don't have the Delete privilege, we turn off "Delete".
* This is also done in prSelValid/poSelValid because it is
* thought about when a list item is selected.
*/
// System.out.println("Disabling Delete buttons");
}
/*
* If we don't have changepw, disable textfield and random button.
* Add needs to turn this on again for an add operation only.
*/
// System.out.println("Disabling password components");
}
/*
* If we don't have inquire, we can't get an existing principal
* to duplicate, and permitting modification seems a bad idea.
* We can still use the panels if we can add. These will also
* get dealt with in prSelValid/poSelValid.
*/
// System.out.println("Disabling Modify buttons");
}
/*
* If we don't have Modify or Add but do have Inquire, we want to
* turn off save and cancel buttons, as well as all principal and
* policy components to prevent any changes.
*/
// System.out.println("Disabling attribute components");
}
/*
* We may have no list privs, or we may have turned off lists.
* Set things up accordingly.
*/
}
private void fixListPanels() {
/*
* If we can't use lists, we won't fetch lists, which means the
* only way to get a principal is to type something into the
* list pattern field. Relabel those so they work better.
*/
String s;
if (noLists) {
// System.out.println("Hijacking list pattern stuff");
s = getString("Principal Name:");
s = getString("Policy Name:");
s = getString("Clear Name");
} else {
s = getString("Filter Pattern:");
s = getString("Clear Filter");
}
}
// Basics
// Details
// Flags
}
// Policy
}
/**
* Show context-sensitive help from HelpData class
*
*/
// System.out.println("Help on "+what);
// System.out.println("showHelp called without context.");
return;
}
cHelp.setVisible(true);
}
/**
* Holds an association between an object and a listener, keeping
* track of the types so that they can be assigned en masse later
*
*/
private class Association extends Object {
int Type;
}
}
/**
* Action listeners for the defaults editing frame.
*/
private class DefaultsContextSensitiveHelpListener
implements ActionListener {
public void actionPerformed(ActionEvent e) {
if (defaultsHelpMode)
showHelp("ContextSensitiveHelp");
else
}
}
/**
* This class launches the dateTimeDialog box when the user presses
* the "..." button. An instance of this is shared by all the
* buttons that are meant to do this.
*/
private class DateTimeListener implements ActionListener {
}
public void actionPerformed(ActionEvent e) {
showHelp("DateTime...");
else
showHelp("DateTime...");
else
} // actionPerformed
} // class DateTimeListener
/**
* This class launches the EncListDialog box when the user presses
* the "..." button. An instance of this is shared by all the
* buttons that are meant to do this.
*/
private class EncListListener implements ActionListener {
}
public void actionPerformed(ActionEvent e) {
showHelp("EncList...");
else
showHelp("EncList...");
else
} // actionPerformed
} // class EncListListener
/**
* This class launches the durrationHelper dialog box when the user presses
* the "..." button. An instance of this is shared by all the
* buttons that are meant to do this.
*/
private class DurationListener implements ActionListener {
}
public void actionPerformed(ActionEvent e) {
showHelp("Duration...");
else
showHelp("Duration...");
else
}
}
private class KeystrokeDetector extends KeyAdapter {
private int changeType; // principal or policy change
public KeystrokeDetector(int type) {
changeType = type;
}
}
}
private void reactToKey(int changeType) {
switch (changeType) {
case PRINCIPAL_EDITING:
break;
case POLICY_EDITING:
break;
case DEFAULTS_EDITING:
break;
case PRINCIPAL_LIST:
if (noLists)
prSelValid(true);
break;
case POLICY_LIST:
if (noLists)
poSelValid(true);
break;
}
}
}
private static String constructDurationExample() {
}
private static String constructDateExample() {
}
private static String constructNumberExample() {
}
static {
}
}