| | |
| | | |
| | | import org.opends.guitools.controlpanel.datamodel.BackendDescriptor; |
| | | import org.opends.guitools.controlpanel.datamodel.ControlPanelInfo; |
| | | import org.opends.guitools.controlpanel.datamodel.ServerDescriptor; |
| | | import org.opends.guitools.controlpanel.datamodel.VLVIndexDescriptor; |
| | | import org.opends.guitools.controlpanel.datamodel.VLVSortOrder; |
| | | import org.opends.guitools.controlpanel.event.ConfigurationChangeEvent; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public Message getTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_NEW_VLV_INDEX_TITLE.get(); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public Component getPreferredFocusComponent() |
| | | { |
| | | return name; |
| | |
| | | */ |
| | | public void configurationChanged(ConfigurationChangeEvent ev) |
| | | { |
| | | if (updateLayout(ev.getNewDescriptor())) |
| | | ServerDescriptor desc = ev.getNewDescriptor(); |
| | | if (updateLayout(desc)) |
| | | { |
| | | updateErrorPaneAndOKButtonIfAuthRequired(ev.getNewDescriptor(), |
| | | INFO_CTRL_PANEL_AUTHENTICATION_REQUIRED_FOR_NEW_VLV.get()); |
| | | updateErrorPaneAndOKButtonIfAuthRequired(desc, |
| | | isLocal() ? INFO_CTRL_PANEL_AUTHENTICATION_REQUIRED_FOR_NEW_VLV.get() : |
| | | INFO_CTRL_PANEL_CANNOT_CONNECT_TO_REMOTE_DETAILS.get(desc.getHostname())); |
| | | } |
| | | } |
| | | |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public void okClicked() |
| | | { |
| | | List<Message> errors = checkErrors(true); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public Type getType() |
| | | { |
| | | return Type.NEW_INDEX; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public Set<String> getBackends() |
| | | { |
| | | return backendSet; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public Message getTaskDescription() |
| | | { |
| | | return INFO_CTRL_PANEL_NEW_VLV_INDEX_TASK_DESCRIPTION.get( |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public boolean canLaunch(Task taskToBeLaunched, |
| | | Collection<Message> incompatibilityReasons) |
| | | { |
| | | boolean canLaunch = true; |
| | | if (state == State.RUNNING) |
| | | if (state == State.RUNNING && runningOnSameServer(taskToBeLaunched)) |
| | | { |
| | | // All the operations are incompatible if they apply to this |
| | | // backend for safety. This is a short operation so the limitation |