GlobalAdministratorPanel.java revision e7cac727a9231ff3602e61a4ea678e0463eb0e39
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
* 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 legal-notices/CDDLv1_0.txt.
* 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
*
*
* Copyright 2008 Sun Microsystems, Inc.
* Portions Copyright 2013-2015 ForgeRock AS.
*/
/**
* This class is used to set the global administrator parameters.
*/
public class GlobalAdministratorPanel extends QuickSetupStepPanel
{
private static final long serialVersionUID = 4266485298770553875L;
private UserData defaultUserData;
private Component lastFocusComponent;
/**
* Constructor of the panel.
* @param application Application represented by this panel and used to
* initialize the fields of the panel.
*/
{
super(application);
}
/** {@inheritDoc} */
{
{
}
return value;
}
/** {@inheritDoc} */
{
{
if (invalid)
{
} else
{
}
}
}
/** {@inheritDoc} */
protected Component createInputPanel()
{
// Add the server location widgets
{
};
{
if (i != 0)
{
}
else
{
}
}
return panel;
}
/** {@inheritDoc} */
protected LocalizableMessage getInstructions()
{
}
/** {@inheritDoc} */
protected LocalizableMessage getTitle()
{
return INFO_GLOBAL_ADMINISTRATOR_PANEL_TITLE.get();
}
/** {@inheritDoc} */
public void endDisplay()
{
if (lastFocusComponent != null)
{
}
}
/**
* Returns the default value for the provided field Name.
* @param fieldName the field name for which we want to get the default
* value.
* @return the default value for the provided field Name.
*/
{
switch (fieldName)
{
case GLOBAL_ADMINISTRATOR_UID:
break;
case GLOBAL_ADMINISTRATOR_PWD:
break;
break;
default:
throw new IllegalArgumentException("Unknown field name: " +
}
return value;
}
/**
* Creates the components and populates the Maps with them.
*/
private void populateLabelAndFieldMaps()
{
new LabelFieldDescriptor(
{
}
}
/**
* Returns the label associated with the given field name.
* @param fieldName the field name for which we want to retrieve the JLabel.
* @return the label associated with the given field name.
*/
{
}
/**
* Returns the JTextComponent associated with the given field name.
* @param fieldName the field name for which we want to retrieve the
* JTextComponent.
* @return the JTextComponent associated with the given field name.
*/
{
}
/**
* Adds the required focus listeners to the fields.
*/
private void addFocusListeners()
{
final FocusListener l = new FocusListener()
{
public void focusGained(FocusEvent e)
{
lastFocusComponent = e.getComponent();
}
public void focusLost(FocusEvent e)
{
}
};
{
tf.addFocusListener(l);
}
}
}