| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui; |
| | |
| | | createLayout(); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_EXPORT_LDIF_TITLE.get(); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public Component getPreferredFocusComponent() |
| | | { |
| | | return file; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void toBeDisplayed(boolean visible) |
| | | { |
| | | if (visible) |
| | |
| | | file = Utilities.createTextField(); |
| | | documentListener = new DocumentListener() |
| | | { |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void changedUpdate(DocumentEvent ev) |
| | | { |
| | | String text = file.getText().trim(); |
| | | setEnabledOK((text != null) && (text.length() > 0) && |
| | | !errorPane.isVisible()); |
| | | } |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void removeUpdate(DocumentEvent ev) |
| | | { |
| | | changedUpdate(ev); |
| | | } |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void insertUpdate(DocumentEvent ev) |
| | | { |
| | | changedUpdate(ev); |
| | |
| | | |
| | | encryptData.addChangeListener(new ChangeListener() |
| | | { |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void stateChanged(ChangeEvent ev) |
| | | { |
| | | generateSignedHash.setEnabled(encryptData.isSelected()); |
| | |
| | | |
| | | wrapText.addChangeListener(new ChangeListener() |
| | | { |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void stateChanged(ChangeEvent ev) |
| | | { |
| | | wrapColumn.setEnabled(wrapText.isSelected()); |
| | |
| | | addBottomGlue(gbc); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void configurationChanged(ConfigurationChangeEvent ev) |
| | | { |
| | | ServerDescriptor desc = ev.getNewDescriptor(); |
| | |
| | | }); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | protected void checkOKButtonEnable() |
| | | { |
| | | documentListener.changedUpdate(null); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void okClicked() |
| | | { |
| | | setPrimaryValid(lBackend); |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void cancelClicked() |
| | | { |
| | | setPrimaryValid(lBackend); |
| | |
| | | fileName = file.getText(); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public Type getType() |
| | | { |
| | | return Type.EXPORT_LDIF; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public LocalizableMessage getTaskDescription() |
| | | { |
| | | return INFO_CTRL_PANEL_EXPORT_TASK_DESCRIPTION.get( |
| | | backendSet.iterator().next(), fileName); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean canLaunch(Task taskToBeLaunched, |
| | | Collection<LocalizableMessage> incompatibilityReasons) |
| | | { |
| | |
| | | return canLaunch; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void runTask() |
| | | { |
| | | state = State.RUNNING; |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public Set<String> getBackends() |
| | | { |
| | | return backendSet; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | protected ArrayList<String> getCommandLineArguments() |
| | | { |
| | | ArrayList<String> args = new ArrayList<String>(); |
| | |
| | | return args; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | protected String getCommandLinePath() |
| | | { |
| | | return getCommandLinePath("export-ldif"); |