/*
* 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-2009 Sun Microsystems, Inc.
* Portions Copyright 2013-2015 ForgeRock AS.
*/
/**
* This class is used to display the replication options for the server
* that is being installed.
*/
{
/**
* Constructor of the panel.
* @param application Application represented by this panel and used to
* initialize the fields of the panel.
*/
{
super(application);
}
/** {@inheritDoc} */
{
{
if (rbStandalone.isSelected())
{
}
else if (cbTopologyExists.isSelected())
{
value =
}
else
{
}
}
{
}
else
{
{
}
}
return value;
}
/** {@inheritDoc} */
{
{
if (invalid)
{
} else
{
}
}
}
/** {@inheritDoc} */
{
// Add the server location widgets
{
};
{
if (i != 0)
{
}
else
{
}
{
}
else
{
}
}
return panel;
}
/** {@inheritDoc} */
{
}
/** {@inheritDoc} */
{
return INFO_DATA_REPLICATION_OPTIONS_PANEL_TITLE.get();
}
/** {@inheritDoc} */
public void endDisplay()
{
if (lastFocusComponent != null)
{
}
}
/** {@inheritDoc} */
{
{
return INFO_CONTACTING_SERVER_LABEL.get();
}
else
{
return super.getTextForIcon(iconType);
}
}
/**
* 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 REPLICATION_PORT:
case REMOTE_SERVER_DN:
case REMOTE_SERVER_PWD:
case REMOTE_SERVER_HOST:
return auth.getHostName();
case REMOTE_SERVER_PORT:
case REPLICATION_OPTIONS:
default:
}
}
/**
* Returns the default string value for the provided field Name.
* @param fieldName the field name for which we want to get the default
* string value.
* @return the default value for the provided field Name.
*/
{
if (v != null)
{
}
return null;
}
/**
* Creates the components and populates the Maps with them.
*/
private void populateComponentMaps()
{
{
l.setLabelFor(field);
}
rbStandalone.setOpaque(false);
rbReplicated.setOpaque(false);
cbTopologyExists.setOpaque(false);
}
/**
* Adds all the required document listeners to the fields.
*/
private void addDocumentListeners()
{
};
if (!rbReplicated.isSelected()) {
rbReplicated.setSelected(true);
}
if (!cbTopologyExists.isSelected()) {
cbTopologyExists.setSelected(true);
}
}
}
}
});
}
}
/**
* Adds the required focus listeners to the fields.
*/
private void addFocusListeners()
{
final FocusListener l = new FocusListener()
{
public void focusGained(FocusEvent e)
{
lastFocusComponent = e.getComponent();
if (lastFocusComponent instanceof JTextComponent)
{
rbReplicated.setSelected(true);
{
cbTopologyExists.setSelected(true);
}
}
}
public void focusLost(FocusEvent e)
{
}
};
{
tf.addFocusListener(l);
}
}
/**
* Adds the required focus listeners to the fields.
*/
private void addActionListeners()
{
final ActionListener l = new ActionListener()
{
{
}
};
{
{
if (cbTopologyExists.isSelected())
{
rbReplicated.setSelected(true);
}
}
});
}
/**
*/
private void checkEnablingState()
{
{
}
{
}
}
/**
* 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.
*/
{
}
}