AutoRefactor'ed Use Diamond Operator
| | |
| | | comboBoxes[i].setRenderer(renderer); |
| | | } |
| | | |
| | | DefaultComboBoxModel<AttributeUsage> model = new DefaultComboBoxModel<AttributeUsage>(); |
| | | DefaultComboBoxModel<AttributeUsage> model = new DefaultComboBoxModel<>(); |
| | | for (AttributeUsage us : AttributeUsage.values()) |
| | | { |
| | | model.addElement(us); |
| | |
| | | */ |
| | | public class ApplicationPrintStream extends PrintStream |
| | | { |
| | | private ArrayList<PrintStreamListener> listeners = |
| | | new ArrayList<PrintStreamListener>(); |
| | | private ArrayList<PrintStreamListener> listeners = new ArrayList<>(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | private boolean notifyListeners = true; |
| | | |
| | | /** |
| | | * Default constructor. |
| | | * |
| | | */ |
| | | /** Default constructor. */ |
| | | public ApplicationPrintStream() |
| | | { |
| | | super(new ByteArrayOutputStream(), true); |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2015 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.util; |
| | |
| | | public final void startBackgroundTask() |
| | | { |
| | | interrupted = false; |
| | | taskThread = new BackgroundTaskThread<T>(this); |
| | | taskThread = new BackgroundTaskThread<>(this); |
| | | taskThread.start(); |
| | | } |
| | | |
| | | /** |
| | | * Interrupts the thread that is running background. |
| | | * |
| | | */ |
| | | /** Interrupts the thread that is running background. */ |
| | | public final void interrupt() |
| | | { |
| | | interrupted = true; |
| | |
| | | |
| | | private boolean isLocal = true; |
| | | |
| | | private final Map<String, CustomSearchResult> hmConnectionHandlersMonitor = |
| | | new HashMap<String, CustomSearchResult>(); |
| | | private final Map<String, CustomSearchResult> hmConnectionHandlersMonitor = new HashMap<>(); |
| | | |
| | | /** The monitor root entry DN. */ |
| | | protected DN monitorDN = DN.rootDN(); |
| | | |
| | | /** The JVM memory usage monitoring entry DN. */ |
| | | protected DN jvmMemoryUsageDN = DN.rootDN(); |
| | | /** The system information monitoring entry DN. */ |
| | | protected DN systemInformationDN = DN.rootDN(); |
| | | |
| | | /**The entry cache monitoring entry DN. */ |
| | | protected DN entryCachesDN = DN.rootDN(); |
| | | |
| | | /** The work queue monitoring entry DN. */ |
| | | protected DN workQueueDN = DN.rootDN(); |
| | | |
| | | /** The version monitoring entry DN. */ |
| | | protected DN versionDN = DN.rootDN(); |
| | | |
| | |
| | | */ |
| | | public void readConfiguration(final InitialLdapContext context) |
| | | { |
| | | final List<OpenDsException> errors = new ArrayList<OpenDsException>(); |
| | | final Set<ConnectionHandlerDescriptor> connectionHandlers = new HashSet<ConnectionHandlerDescriptor>(); |
| | | final Set<BackendDescriptor> backendDescriptors = new HashSet<BackendDescriptor>(); |
| | | final Set<DN> as = new HashSet<DN>(); |
| | | final Set<TaskEntry> tasks = new HashSet<TaskEntry>(); |
| | | final List<OpenDsException> errors = new ArrayList<>(); |
| | | final Set<ConnectionHandlerDescriptor> connectionHandlers = new HashSet<>(); |
| | | final Set<BackendDescriptor> backendDescriptors = new HashSet<>(); |
| | | final Set<DN> as = new HashSet<>(); |
| | | final Set<TaskEntry> tasks = new HashSet<>(); |
| | | |
| | | rootMonitor = null; |
| | | jvmMemoryUsage = null; |
| | |
| | | try |
| | | { |
| | | BackendCfgClient backend = root.getBackend(backendName); |
| | | Set<BaseDNDescriptor> baseDNs = new HashSet<BaseDNDescriptor>(); |
| | | Set<BaseDNDescriptor> baseDNs = new HashSet<>(); |
| | | for (DN dn : backend.getBaseDN()) |
| | | { |
| | | BaseDNDescriptor baseDN = new BaseDNDescriptor(BaseDNDescriptor.Type.NOT_REPLICATED, dn, null, -1, -1, -1); |
| | | baseDNs.add(baseDN); |
| | | } |
| | | Set<IndexDescriptor> indexes = new HashSet<IndexDescriptor>(); |
| | | Set<VLVIndexDescriptor> vlvIndexes = new HashSet<VLVIndexDescriptor>(); |
| | | Set<IndexDescriptor> indexes = new HashSet<>(); |
| | | Set<VLVIndexDescriptor> vlvIndexes = new HashSet<>(); |
| | | BackendDescriptor.Type type; |
| | | if (backend instanceof LocalDBBackendCfgClient) |
| | | { |
| | |
| | | private ConnectionHandlerDescriptor getConnectionHandler(ConnectionHandlerCfgClient connHandler, String name) |
| | | throws OpenDsException |
| | | { |
| | | SortedSet<InetAddress> addresses = new TreeSet<InetAddress>(getInetAddressComparator()); |
| | | int port; |
| | | |
| | | ConnectionHandlerDescriptor.Protocol protocol; |
| | | |
| | | SortedSet<InetAddress> addresses = new TreeSet<>(getInetAddressComparator()); |
| | | ConnectionHandlerDescriptor.State state = connHandler.isEnabled() ? ConnectionHandlerDescriptor.State.ENABLED |
| | | : ConnectionHandlerDescriptor.State.DISABLED; |
| | | |
| | | ConnectionHandlerDescriptor.Protocol protocol; |
| | | int port; |
| | | if (connHandler instanceof LDAPConnectionHandlerCfgClient) |
| | | { |
| | | LDAPConnectionHandlerCfgClient ldap = (LDAPConnectionHandlerCfgClient)connHandler; |
| | |
| | | private ConnectionHandlerDescriptor getConnectionHandler(AdministrationConnectorCfgClient adminConnector) |
| | | throws OpenDsException |
| | | { |
| | | SortedSet<InetAddress> addresses = new TreeSet<InetAddress>(getInetAddressComparator()); |
| | | SortedSet<InetAddress> addresses = new TreeSet<>(getInetAddressComparator()); |
| | | |
| | | ConnectionHandlerDescriptor.Protocol protocol = ConnectionHandlerDescriptor.Protocol.ADMINISTRATION_CONNECTOR; |
| | | ConnectionHandlerDescriptor.State state = ConnectionHandlerDescriptor.State.ENABLED; |
| | |
| | | |
| | | private Set<CustomSearchResult>getMonitoringEntries(ConnectionHandlerDescriptor ch) |
| | | { |
| | | Set<CustomSearchResult> monitorEntries = new HashSet<CustomSearchResult>(); |
| | | Set<CustomSearchResult> monitorEntries = new HashSet<>(); |
| | | if (ch.getState() == ConnectionHandlerDescriptor.State.ENABLED) |
| | | { |
| | | for (String key : hmConnectionHandlersMonitor.keySet()) |
| | |
| | | */ |
| | | public void readConfiguration() |
| | | { |
| | | final List<OpenDsException> errors = new ArrayList<OpenDsException>(); |
| | | final Set<ConnectionHandlerDescriptor> connectionHandlers = new HashSet<ConnectionHandlerDescriptor>(); |
| | | final Set<BackendDescriptor> backendDescriptors = new HashSet<BackendDescriptor>(); |
| | | final Set<DN> alternateBindDNs = new HashSet<DN>(); |
| | | final List<OpenDsException> errors = new ArrayList<>(); |
| | | final Set<ConnectionHandlerDescriptor> connectionHandlers = new HashSet<>(); |
| | | final Set<BackendDescriptor> backendDescriptors = new HashSet<>(); |
| | | final Set<DN> alternateBindDNs = new HashSet<>(); |
| | | try |
| | | { |
| | | DirectoryServer.getInstance().initializeConfiguration(); |
| | |
| | | try |
| | | { |
| | | final BackendCfg backend = root.getBackend(backendName); |
| | | final Set<BaseDNDescriptor> baseDNs = new HashSet<BaseDNDescriptor>(); |
| | | final Set<BaseDNDescriptor> baseDNs = new HashSet<>(); |
| | | for (final DN dn : backend.getBaseDN()) |
| | | { |
| | | final BaseDNDescriptor baseDN = |
| | | new BaseDNDescriptor(BaseDNDescriptor.Type.NOT_REPLICATED, dn, null, -1, -1, -1); |
| | | baseDNs.add(baseDN); |
| | | } |
| | | final Set<IndexDescriptor> indexes = new HashSet<IndexDescriptor>(); |
| | | final Set<VLVIndexDescriptor> vlvIndexes = new HashSet<VLVIndexDescriptor>(); |
| | | final Set<IndexDescriptor> indexes = new HashSet<>(); |
| | | final Set<VLVIndexDescriptor> vlvIndexes = new HashSet<>(); |
| | | BackendDescriptor.Type type; |
| | | if (backend instanceof LocalDBBackendCfg) |
| | | { |
| | |
| | | private ConnectionHandlerDescriptor getConnectionHandler(final ConnectionHandlerCfg connHandler, final String name) |
| | | throws OpenDsException |
| | | { |
| | | final SortedSet<InetAddress> addresses = new TreeSet<InetAddress>(getInetAddressComparator()); |
| | | int port; |
| | | |
| | | ConnectionHandlerDescriptor.Protocol protocol; |
| | | final SortedSet<InetAddress> addresses = new TreeSet<>(getInetAddressComparator()); |
| | | |
| | | final ConnectionHandlerDescriptor.State state = |
| | | connHandler.isEnabled() ? ConnectionHandlerDescriptor.State.ENABLED |
| | | : ConnectionHandlerDescriptor.State.DISABLED; |
| | | |
| | | ConnectionHandlerDescriptor.Protocol protocol; |
| | | int port; |
| | | if (connHandler instanceof LDAPConnectionHandlerCfg) |
| | | { |
| | | final LDAPConnectionHandlerCfg ldap = (LDAPConnectionHandlerCfg) connHandler; |
| | |
| | | private ConnectionHandlerDescriptor getConnectionHandler(final AdministrationConnectorCfg adminConnector) |
| | | throws OpenDsException |
| | | { |
| | | final SortedSet<InetAddress> addresses = new TreeSet<InetAddress>(getInetAddressComparator()); |
| | | final SortedSet<InetAddress> addresses = new TreeSet<>(getInetAddressComparator()); |
| | | |
| | | final ConnectionHandlerDescriptor.Protocol protocol = ConnectionHandlerDescriptor.Protocol.ADMINISTRATION_CONNECTOR; |
| | | |
| | | final ConnectionHandlerDescriptor.State state = ConnectionHandlerDescriptor.State.ENABLED; |
| | | |
| | | addAll(addresses, adminConnector.getListenAddress()); |
| | |
| | | */ |
| | | protected List<VLVSortOrder> getVLVSortOrder(String s) |
| | | { |
| | | ArrayList<VLVSortOrder> sortOrder = new ArrayList<VLVSortOrder>(); |
| | | ArrayList<VLVSortOrder> sortOrder = new ArrayList<>(); |
| | | if (s != null) |
| | | { |
| | | String[] attrNames = s.split(" "); |
| | |
| | | { |
| | | private final String dn; |
| | | private final InitialLdapContext ctx; |
| | | private final Set<EntryReadListener> listeners = |
| | | new HashSet<EntryReadListener>(); |
| | | private final Set<EntryReadListener> listeners = new HashSet<>(); |
| | | private boolean isOver; |
| | | private boolean notifyListeners; |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.util; |
| | |
| | | import org.opends.server.types.LDAPURL; |
| | | import org.opends.server.types.OpenDsException; |
| | | |
| | | /** |
| | | * Class used to handle the case where numsubordinates does not work between |
| | | * databases. |
| | | * |
| | | */ |
| | | /** Class used to handle the case where numsubordinates does not work between databases. */ |
| | | public class NumSubordinateHacker { |
| | | String serverHost; |
| | | int serverPort; |
| | | ArrayList<DN> unreliableEntryList; |
| | | String serverHost = "not-initialized"; |
| | | int serverPort = -1; |
| | | final ArrayList<DN> unreliableEntryList = new ArrayList<>(); |
| | | boolean isUnreliableEntryListEmpty; |
| | | |
| | | /** |
| | | * Default constructor. |
| | | * |
| | | */ |
| | | public NumSubordinateHacker() { |
| | | serverHost = "not-initialized"; |
| | | serverPort = -1; |
| | | unreliableEntryList = new ArrayList<DN>(); |
| | | } |
| | | |
| | | /** |
| | | * Tells whether the list of unreliable contains children of |
| | | * the entry with LDAPUrl parentUrl. |
| | | * @param parentUrl the LDAPURL of the parent. |
| | |
| | | * children of the parentUrl. Returns <CODE>false</CODE> otherwise. |
| | | */ |
| | | public boolean containsChildrenOf(LDAPURL parentUrl) { |
| | | boolean containsChildren = false; |
| | | |
| | | if (!isUnreliableEntryListEmpty) { |
| | | boolean isInServer = serverHost.equalsIgnoreCase( |
| | | String.valueOf(parentUrl.getHost())) && |
| | | (serverPort == parentUrl.getPort()); |
| | | boolean isInServer = serverHost.equalsIgnoreCase(String.valueOf(parentUrl.getHost())) |
| | | && serverPort == parentUrl.getPort(); |
| | | if (isInServer) { |
| | | for (DN dn : unreliableEntryList) |
| | | try |
| | | { |
| | | try |
| | | for (DN dn : unreliableEntryList) |
| | | { |
| | | if (dn.equals(DN.valueOf(parentUrl.getRawBaseDN()))) |
| | | { |
| | | containsChildren = true; |
| | | break; |
| | | return true; |
| | | } |
| | | } |
| | | catch (OpenDsException oe) |
| | | { |
| | | throw new RuntimeException("Error decoding DN of url: "+ |
| | | parentUrl); |
| | | } |
| | | } |
| | | catch (OpenDsException oe) |
| | | { |
| | | throw new RuntimeException("Error decoding DN of url: "+ parentUrl); |
| | | } |
| | | } |
| | | } |
| | | return containsChildren; |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | |
| | | * The mapping that holds all of the configuration entries that have been read |
| | | * from the LDIF file. |
| | | */ |
| | | private HashMap<DN,ConfigEntry> configEntries = new HashMap<DN,ConfigEntry>(); |
| | | private HashMap<DN,ConfigEntry> configEntries = new HashMap<>(); |
| | | |
| | | /** The reference to the configuration root entry. */ |
| | | private ConfigEntry configRootEntry; |
| | |
| | | Utilities.centerGoldenMean(dlg, Utilities.getParentDialog(this)); |
| | | dlg.setVisible(true); |
| | | */ |
| | | ArrayList<String> stringErrors = new ArrayList<String>(); |
| | | ArrayList<String> stringErrors = new ArrayList<>(); |
| | | for (LocalizableMessage err : errors) |
| | | { |
| | | stringErrors.add(err.toString()); |
| | |
| | | if (confEntry != null) |
| | | { |
| | | // Copy the values to avoid problems with this recursive method. |
| | | ArrayList<DN> childDNs = new ArrayList<DN>(confEntry.getChildren().keySet()); |
| | | ArrayList<DN> childDNs = new ArrayList<>(confEntry.getChildren().keySet()); |
| | | for (DN childDN : childDNs) |
| | | { |
| | | deleteConfigSubtree(confHandler, childDN); |
| | |
| | | * |
| | | * |
| | | * Copyright 2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2015 ForgeRock AS. |
| | | */ |
| | | package org.opends.guitools.controlpanel.util; |
| | | |
| | |
| | | */ |
| | | public class ViewPositions |
| | | { |
| | | private ArrayList<JScrollPane> scrolls = new ArrayList<JScrollPane>(); |
| | | private ArrayList<Point> points = new ArrayList<Point>(); |
| | | private ArrayList<JScrollPane> scrolls = new ArrayList<>(); |
| | | private ArrayList<Point> points = new ArrayList<>(); |
| | | |
| | | /** |
| | | * Returns the size of the lists. |
| | |
| | | INFO_CLI_UNINSTALL_SPECIFY_WHAT_REMOVE.get() |
| | | }; |
| | | |
| | | MenuBuilder<Integer> builder = new MenuBuilder<Integer>(this); |
| | | MenuBuilder<Integer> builder = new MenuBuilder<>(this); |
| | | builder.setPrompt(INFO_CLI_UNINSTALL_WHAT_TO_DELETE.get()); |
| | | |
| | | for (int i=0; i<indexes.length; i++) |
| | |
| | | |
| | | logger.info(LocalizableMessage.raw("Handle topology cache.")); |
| | | |
| | | Set<TopologyCacheException> exceptions = |
| | | new HashSet<TopologyCacheException>(); |
| | | Set<TopologyCacheException> exceptions = new HashSet<>(); |
| | | /* Analyze if we had any exception while loading servers. For the moment |
| | | * only throw the exception found if the user did not provide the |
| | | * Administrator DN and this caused a problem authenticating in one server |
| | |
| | | exceptions.add(e); |
| | | } |
| | | } |
| | | Set<LocalizableMessage> exceptionMsgs = new LinkedHashSet<LocalizableMessage>(); |
| | | Set<LocalizableMessage> exceptionMsgs = new LinkedHashSet<>(); |
| | | /* Check the exceptions and see if we throw them or not. */ |
| | | for (TopologyCacheException e : exceptions) |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2015 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.opends.guitools.uninstaller; |
| | |
| | | */ |
| | | public class UninstallUserData extends UserData { |
| | | |
| | | private Set<String> externalDbsToRemove = new HashSet<String>(); |
| | | private Set<String> externalLogsToRemove = new HashSet<String>(); |
| | | private Set<String> externalDbsToRemove = new HashSet<>(); |
| | | private Set<String> externalLogsToRemove = new HashSet<>(); |
| | | private boolean removeDatabases; |
| | | private boolean removeLogs; |
| | | private boolean removeLibrariesAndTools; |
| | |
| | | private boolean removeLDIFs; |
| | | private boolean removeConfigurationAndSchema; |
| | | private boolean updateRemoteReplication; |
| | | private ApplicationTrustManager trustManager = |
| | | new ApplicationTrustManager(null); |
| | | private ApplicationTrustManager trustManager = new ApplicationTrustManager(null); |
| | | private String adminUID; |
| | | private String adminPwd; |
| | | private String localServerUrl; |
| | | private HashSet<ServerDescriptor> remoteServers = |
| | | new HashSet<ServerDescriptor>(); |
| | | private HashSet<ServerDescriptor> remoteServers = new HashSet<>(); |
| | | private String replicationServer; |
| | | private String referencedHostName; |
| | | |
| | |
| | | */ |
| | | public Set<String> getExternalDbsToRemove() |
| | | { |
| | | return new HashSet<String>(externalDbsToRemove); |
| | | return new HashSet<>(externalDbsToRemove); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | public Set<String> getExternalLogsToRemove() |
| | | { |
| | | return new HashSet<String>(externalLogsToRemove); |
| | | return new HashSet<>(externalLogsToRemove); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | public Set<ServerDescriptor> getRemoteServers() |
| | | { |
| | | return new HashSet<ServerDescriptor>(remoteServers); |
| | | return new HashSet<>(remoteServers); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | public class Uninstaller extends GuiApplication implements CliApplication { |
| | | |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | private ProgressStep status = UninstallProgressStep.NOT_STARTED; |
| | | private boolean runStarted; |
| | | private boolean errorOnRemoteOccurred; |
| | |
| | | |
| | | private UninstallerArgumentParser parser; |
| | | |
| | | private HashMap<ProgressStep, Integer> hmRatio = |
| | | new HashMap<ProgressStep, Integer>(); |
| | | |
| | | private HashMap<ProgressStep, LocalizableMessage> hmSummary = |
| | | new HashMap<ProgressStep, LocalizableMessage>(); |
| | | private Map<ProgressStep, Integer> hmRatio = new HashMap<>(); |
| | | private Map<ProgressStep, LocalizableMessage> hmSummary = new HashMap<>(); |
| | | |
| | | private ApplicationException ue; |
| | | |
| | | private Boolean isWindowsServiceEnabled; |
| | | |
| | | private UninstallCliHelper cliHelper = new UninstallCliHelper(); |
| | | |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | private LoginDialog loginDialog; |
| | | private ProgressDialog startProgressDlg; |
| | | private LocalizableMessageBuilder startProgressDetails = new LocalizableMessageBuilder(); |
| | | private UninstallData conf; |
| | | /** |
| | | * Default constructor. |
| | | */ |
| | | |
| | | /** Default constructor. */ |
| | | public Uninstaller() |
| | | { |
| | | super(); |
| | |
| | | // This is updated on the method handleTopologyCache |
| | | uud.setUpdateRemoteReplication(false); |
| | | |
| | | Set<String> dbs = new HashSet<String>(); |
| | | Set<String> dbs = new HashSet<>(); |
| | | Set<?> s = (Set<?>) qs.getFieldValue(FieldName.EXTERNAL_DB_DIRECTORIES); |
| | | for (Object v : s) { |
| | | dbs.add((String) v); |
| | | } |
| | | |
| | | Set<String> logs = new HashSet<String>(); |
| | | Set<String> logs = new HashSet<>(); |
| | | s = (Set<?>) qs.getFieldValue(FieldName.EXTERNAL_LOG_FILES); |
| | | for (Object v : s) { |
| | | logs.add((String) v); |
| | |
| | | Utils.directoryExistsAndIsNotEmpty(resourcesPath); |
| | | boolean classesDefined = |
| | | Utils.directoryExistsAndIsNotEmpty(classesPath); |
| | | ArrayList<String> paths = new ArrayList<String>(); |
| | | ArrayList<String> paths = new ArrayList<>(); |
| | | paths.add(libPath); |
| | | if (resourcesDefined) |
| | | { |
| | |
| | | * deleting files, the value for downloading will be the double of the |
| | | * value for extracting. |
| | | */ |
| | | HashMap<UninstallProgressStep, Integer> hmTime = |
| | | new HashMap<UninstallProgressStep, Integer>(); |
| | | Map<UninstallProgressStep, Integer> hmTime = new HashMap<>(); |
| | | hmTime.put(UninstallProgressStep.UNCONFIGURING_REPLICATION, 5); |
| | | hmTime.put(UninstallProgressStep.STOPPING_SERVER, 15); |
| | | hmTime.put(UninstallProgressStep.DISABLING_WINDOWS_SERVICE, 5); |
| | |
| | | hmTime.put(UninstallProgressStep.DELETING_INSTALLATION_FILES, 10); |
| | | |
| | | int totalTime = 0; |
| | | ArrayList<UninstallProgressStep> steps = |
| | | new ArrayList<UninstallProgressStep>(); |
| | | List<UninstallProgressStep> steps = new ArrayList<>(); |
| | | if (getUninstallUserData().getUpdateRemoteReplication()) { |
| | | totalTime += hmTime.get(UninstallProgressStep.UNCONFIGURING_REPLICATION); |
| | | steps.add(UninstallProgressStep.UNCONFIGURING_REPLICATION); |
| | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public Set<? extends WizardStep> getWizardSteps() { |
| | | Set<WizardStep> setSteps = new HashSet<WizardStep>(); |
| | | Set<WizardStep> setSteps = new HashSet<>(); |
| | | setSteps.add(Step.CONFIRM_UNINSTALL); |
| | | setSteps.add(Step.PROGRESS); |
| | | setSteps.add(Step.FINISHED); |
| | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public QuickSetupStepPanel createWizardStepPanel(WizardStep step) { |
| | | QuickSetupStepPanel p = null; |
| | | if (step == Step.CONFIRM_UNINSTALL) { |
| | | p = new ConfirmUninstallPanel(this, installStatus); |
| | | return new ConfirmUninstallPanel(this, installStatus); |
| | | } else if (step == Step.PROGRESS) { |
| | | p = new ProgressPanel(this); |
| | | return new ProgressPanel(this); |
| | | } else if (step == Step.FINISHED) { |
| | | p = new FinishedPanel(this); |
| | | return new FinishedPanel(this); |
| | | } |
| | | return p; |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | |
| | | * the installation files. |
| | | */ |
| | | int totalRatio = 0; |
| | | ArrayList<Integer> cumulatedRatio = new ArrayList<Integer>(); |
| | | ArrayList<Integer> cumulatedRatio = new ArrayList<>(); |
| | | for (File f : rootFiles) { |
| | | if (filter.accept(f)) { |
| | | Installation installation = getInstallation(); |
| | |
| | | { |
| | | logger.info(LocalizableMessage.raw("Handling TopologyCache")); |
| | | boolean stopProcessing = false; |
| | | Set<TopologyCacheException> exceptions = |
| | | new HashSet<TopologyCacheException>(); |
| | | Set<TopologyCacheException> exceptions = new HashSet<>(); |
| | | /* Analyze if we had any exception while loading servers. For the moment |
| | | * only throw the exception found if the user did not provide the |
| | | * Administrator DN and this caused a problem authenticating in one server |
| | | * or if there is a certificate problem. |
| | | */ |
| | | Set<ServerDescriptor> servers = cache.getServers(); |
| | | for (ServerDescriptor server : servers) |
| | | for (ServerDescriptor server : cache.getServers()) |
| | | { |
| | | TopologyCacheException e = server.getLastException(); |
| | | if (e != null) |
| | |
| | | exceptions.add(e); |
| | | } |
| | | } |
| | | Set<LocalizableMessage> exceptionMsgs = new LinkedHashSet<LocalizableMessage>(); |
| | | Set<LocalizableMessage> exceptionMsgs = new LinkedHashSet<>(); |
| | | /* Check the exceptions and see if we throw them or not. */ |
| | | for (TopologyCacheException e : exceptions) |
| | | { |
| | |
| | | case GENERIC_CREATING_CONNECTION: |
| | | if (isCertificateException(e.getCause())) |
| | | { |
| | | UserDataCertificateException.Type excType; |
| | | ApplicationTrustManager.Cause cause = null; |
| | | if (e.getTrustManager() != null) |
| | | { |
| | | cause = e.getTrustManager().getLastRefusedCause(); |
| | | } |
| | | logger.info(LocalizableMessage.raw("Certificate exception cause: "+cause)); |
| | | if (cause == ApplicationTrustManager.Cause.NOT_TRUSTED) |
| | | { |
| | | excType = UserDataCertificateException.Type.NOT_TRUSTED; |
| | | } |
| | | else if (cause == ApplicationTrustManager.Cause.HOST_NAME_MISMATCH) |
| | | { |
| | | excType = UserDataCertificateException.Type.HOST_NAME_MISMATCH; |
| | | } |
| | | else |
| | | { |
| | | excType = null; |
| | | } |
| | | UserDataCertificateException.Type excType = getCertificateExceptionType(cause); |
| | | if (excType != null) |
| | | { |
| | | String h; |
| | |
| | | } |
| | | } |
| | | |
| | | private UserDataCertificateException.Type getCertificateExceptionType(ApplicationTrustManager.Cause cause) |
| | | { |
| | | if (cause == ApplicationTrustManager.Cause.NOT_TRUSTED) |
| | | { |
| | | return UserDataCertificateException.Type.NOT_TRUSTED; |
| | | } |
| | | else if (cause == ApplicationTrustManager.Cause.HOST_NAME_MISMATCH) |
| | | { |
| | | return UserDataCertificateException.Type.HOST_NAME_MISMATCH; |
| | | } |
| | | else |
| | | { |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * Displays a dialog asking the user to accept a certificate if the user |
| | | * accepts it, we update the trust manager and call again to the method that |
| | |
| | | public void initializeGlobalArguments(OutputStream outStream) |
| | | throws ArgumentException |
| | | { |
| | | LinkedHashSet<Argument> args = new LinkedHashSet<Argument>(); |
| | | LinkedHashSet<Argument> args = new LinkedHashSet<>(); |
| | | cliArg = CommonArguments.getCLI(); |
| | | args.add(cliArg); |
| | | |
| | |
| | | arg.setPropertyName(arg.getLongIdentifier()); |
| | | } |
| | | |
| | | ArrayList<Argument> defaultArgs = |
| | | new ArrayList<Argument>(createGlobalArguments(outStream, alwaysSSL)); |
| | | ArrayList<Argument> defaultArgs = new ArrayList<>(createGlobalArguments(outStream, alwaysSSL)); |
| | | int index = defaultArgs.indexOf(secureArgsList.bindDnArg); |
| | | if (index != -1) |
| | | { |
| | |
| | | private Set<String> outsideDbs; |
| | | private Set<String> outsideLogs; |
| | | |
| | | private HashMap<FieldName, JCheckBox> hmCbs = |
| | | new HashMap<FieldName, JCheckBox>(); |
| | | private HashMap<FieldName, JCheckBox> hmCbs = new HashMap<>(); |
| | | |
| | | /** |
| | | * The constructor of this class. |
| | |
| | | switch (fieldName) |
| | | { |
| | | case EXTERNAL_DB_DIRECTORIES: |
| | | Set<String> s1 = new HashSet<String>(); |
| | | Set<String> s1 = new HashSet<>(); |
| | | if (outsideDbs.size() > 0 |
| | | && getCheckBox(FieldName.EXTERNAL_DB_DIRECTORIES).isSelected()) |
| | | { |
| | |
| | | return s1; |
| | | |
| | | case EXTERNAL_LOG_FILES: |
| | | Set<String> s2 = new HashSet<String>(); |
| | | Set<String> s2 = new HashSet<>(); |
| | | if (outsideLogs.size() > 0 |
| | | && getCheckBox(FieldName.EXTERNAL_LOG_FILES).isSelected()) |
| | | { |
| | |
| | | boolean pwdInvalid = false; |
| | | |
| | | String uid = tfUid.getText(); |
| | | ArrayList<LocalizableMessage> possibleCauses = new ArrayList<LocalizableMessage>(); |
| | | ArrayList<LocalizableMessage> possibleCauses = new ArrayList<>(); |
| | | if ("".equals(uid.trim())) |
| | | { |
| | | uidInvalid = true; |
| | |
| | | public static BuildInformation create(Installation installation) |
| | | throws ApplicationException { |
| | | BuildInformation bi = new BuildInformation(); |
| | | List<String> args = new ArrayList<String>(); |
| | | List<String> args = new ArrayList<>(); |
| | | args.add(Utils.getScriptPath( |
| | | Utils.getPath(installation.getServerStartCommandFile()))); |
| | | args.add("-F"); // full verbose |
| | |
| | | return bi; |
| | | } |
| | | |
| | | private Map<String, String> values = new HashMap<String, String>(); |
| | | private Map<String, String> values = new HashMap<>(); |
| | | |
| | | /** |
| | | * Gets the name of this build. This is the first line of the output |
| | |
| | | public Object confirm(LocalizableMessage summary, LocalizableMessage details, LocalizableMessage fineDetails, |
| | | LocalizableMessage title, MessageType type, LocalizableMessage[] options, |
| | | LocalizableMessage def, LocalizableMessage viewDetailsOption) { |
| | | MenuBuilder<Integer> builder = new MenuBuilder<Integer>(this); |
| | | MenuBuilder<Integer> builder = new MenuBuilder<>(this); |
| | | |
| | | LocalizableMessageBuilder b = new LocalizableMessageBuilder(); |
| | | b.append(summary); |
| | |
| | | } |
| | | |
| | | private Set<String> getOutsidePaths(Set<String> paths) { |
| | | Set<String> outsidePaths = new HashSet<String>(); |
| | | Set<String> outsidePaths = new HashSet<>(); |
| | | for (String path : paths) { |
| | | File fullDbPath; |
| | | File pathFile = new File(path); |
| | |
| | | private Set<String> getConfigurationValues(String attrName) |
| | | throws IOException |
| | | { |
| | | Set<String> set = new HashSet<String>(); |
| | | Set<String> set = new HashSet<>(); |
| | | attrName += ":"; |
| | | String lowerCaseContents = getLowerCaseContents(); |
| | | String contents = getContents(); |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2012-2014 ForgeRock AS. |
| | | * Portions Copyright 2012-2015 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.opends.quicksetup; |
| | |
| | | } else |
| | | { |
| | | Installation installation = Installation.getLocal(); |
| | | ArrayList<LocalizableMessage> msgs = new ArrayList<LocalizableMessage>(); |
| | | ArrayList<LocalizableMessage> msgs = new ArrayList<>(); |
| | | |
| | | if (installation.getStatus().isServerRunning()) |
| | | { |
| | |
| | | } |
| | | else |
| | | { |
| | | ArrayList<LocalizableMessage> lines = new ArrayList<LocalizableMessage>(); |
| | | ArrayList<LocalizableMessage> lines = new ArrayList<>(); |
| | | if (javaArguments.getInitialMemory() != -1) |
| | | { |
| | | lines.add(INFO_INITIAL_MEMORY.get(javaArguments.getInitialMemory())); |
| | |
| | | */ |
| | | public String getStringArguments() |
| | | { |
| | | ArrayList<String> l = new ArrayList<String>(); |
| | | ArrayList<String> l = new ArrayList<>(); |
| | | if (initialMemory != -1) |
| | | { |
| | | l.add(Utils.escapeCommandLineValue( |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.quicksetup; |
| | |
| | | */ |
| | | public class ProgressUpdateListenerDelegate { |
| | | |
| | | private HashSet<ProgressUpdateListener> listeners = |
| | | new HashSet<ProgressUpdateListener>(); |
| | | private HashSet<ProgressUpdateListener> listeners = new HashSet<>(); |
| | | |
| | | /** |
| | | * Creates a parameterized instance. |
| | |
| | | forceOnError = true; |
| | | verbose = false; |
| | | |
| | | LinkedList<String> baseDn = new LinkedList<String>(); |
| | | LinkedList<String> baseDn = new LinkedList<>(); |
| | | baseDn.add("dc=example,dc=com"); |
| | | NewSuffixOptions defaultNewSuffixOptions = NewSuffixOptions.createEmpty(baseDn); |
| | | setNewSuffixOptions(defaultNewSuffixOptions); |
| | |
| | | sec.setSslPort(getDefaultSslPort(defaultLdapPort)); |
| | | setSecurityOptions(sec); |
| | | |
| | | remoteWithNoReplicationPort = |
| | | new HashMap<ServerDescriptor, AuthenticationData>(); |
| | | remoteWithNoReplicationPort = new HashMap<>(); |
| | | |
| | | createDefaultJavaArguments(); |
| | | } |
| | |
| | | { |
| | | try |
| | | { |
| | | SortedMap<String, String> hostNames = new TreeMap<String, String>(); |
| | | SortedMap<String, String> hostNames = new TreeMap<>(); |
| | | Enumeration<NetworkInterface> i = NetworkInterface |
| | | .getNetworkInterfaces(); |
| | | while (i.hasMoreElements()) |
| | |
| | | * AuthenticationData corresponding to the Replication Port chosen by the |
| | | * user. |
| | | */ |
| | | public Map<ServerDescriptor, AuthenticationData> |
| | | getRemoteWithNoReplicationPort() |
| | | public Map<ServerDescriptor, AuthenticationData> getRemoteWithNoReplicationPort() |
| | | { |
| | | Map<ServerDescriptor, AuthenticationData> copy = |
| | | new HashMap<ServerDescriptor, AuthenticationData>(); |
| | | copy.putAll(remoteWithNoReplicationPort); |
| | | return copy; |
| | | return new HashMap<>(remoteWithNoReplicationPort); |
| | | } |
| | | |
| | | /** |
| | |
| | | |
| | | private void createDefaultJavaArguments() |
| | | { |
| | | hmJavaArguments = new HashMap<String, JavaArguments>(); |
| | | hmJavaArguments = new HashMap<>(); |
| | | int maxMemoryMb = 256; |
| | | int minMemoryMb = 128; |
| | | final int maxMemoryBytes = maxMemoryMb * 1024 * 1024; |
| | |
| | | controlPanelJavaArgument.setAdditionalArguments(new String[] {"-client"}); |
| | | hmJavaArguments.put("control-panel", controlPanelJavaArgument); |
| | | |
| | | hmDefaultJavaArguments = |
| | | new HashMap<String, JavaArguments>(hmJavaArguments); |
| | | hmDefaultJavaArguments = new HashMap<>(hmJavaArguments); |
| | | } |
| | | |
| | | private String[] getClientScripts() |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2015 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.opends.quicksetup.installer; |
| | |
| | | { |
| | | this.domainName = domainName; |
| | | this.isCreated = isCreated; |
| | | this.addedReplicationServers = new HashSet<String>(); |
| | | this.addedReplicationServers = new HashSet<>(); |
| | | this.addedReplicationServers.addAll(addedReplicationServers); |
| | | } |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2015 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.opends.quicksetup.installer; |
| | |
| | | this.synchProviderEnabled = synchProviderEnabled; |
| | | this.replicationServerCreated = replicationServerCreated; |
| | | this.secureReplicationEnabled = secureReplicationEnabled; |
| | | this.newReplicationServers = new HashSet<String>(); |
| | | this.newReplicationServers = new HashSet<>(); |
| | | this.newReplicationServers.addAll(newReplicationServers); |
| | | this.domainsConf = new HashSet<ConfiguredDomain>(); |
| | | this.domainsConf = new HashSet<>(); |
| | | this.domainsConf.addAll(domainsConf); |
| | | } |
| | | |
| | |
| | | final File importLDIFPath = new File(binPath, isWindows() ? Installation.WINDOWS_IMPORT_LDIF |
| | | : Installation.UNIX_IMPORT_LDIF); |
| | | |
| | | final ArrayList<String> argList = new ArrayList<String>(); |
| | | final ArrayList<String> argList = new ArrayList<>(); |
| | | argList.add(Utils.getScriptPath(importLDIFPath.getAbsolutePath())); |
| | | argList.addAll(Arrays.asList(args)); |
| | | logger.info(LocalizableMessage.raw("import-ldif arg list: " + argList)); |
| | |
| | | RootCfgClient root = mCtx.getRootConfiguration(); |
| | | BackendCfgClient backend = root.createBackend(backendType, backendName, null); |
| | | backend.setEnabled(true); |
| | | Set<DN> setBaseDNs = new HashSet<DN>(); |
| | | for (String baseDN : baseDNs) |
| | | { |
| | | setBaseDNs.add(DN.valueOf(baseDN)); |
| | | } |
| | | backend.setBaseDN(setBaseDNs); |
| | | backend.setBaseDN(toByteStrings(baseDNs)); |
| | | backend.setBackendId(backendName); |
| | | backend.setWritabilityMode(BackendCfgDefn.WritabilityMode.ENABLED); |
| | | backend.commit(); |
| | |
| | | } |
| | | } |
| | | |
| | | private Set<DN> toByteStrings(Set<String> strings) throws DirectoryException |
| | | { |
| | | Set<DN> results = new HashSet<>(); |
| | | for (String s : strings) |
| | | { |
| | | results.add(DN.valueOf(s)); |
| | | } |
| | | return results; |
| | | } |
| | | |
| | | /** |
| | | * Sets the base DNs on a given backend. |
| | | * @param ctx the connection to the server. |
| | |
| | | JNDIDirContextAdaptor.adapt(ctx)); |
| | | RootCfgClient root = mCtx.getRootConfiguration(); |
| | | BackendCfgClient backend = root.getBackend(backendName); |
| | | Set<DN> setBaseDNs = new HashSet<DN>(); |
| | | for (String baseDN : baseDNs) |
| | | { |
| | | setBaseDNs.add(DN.valueOf(baseDN)); |
| | | } |
| | | backend.setBaseDN(setBaseDNs); |
| | | backend.setBaseDN(toByteStrings(baseDNs)); |
| | | backend.commit(); |
| | | } |
| | | catch (Throwable t) |
| | |
| | | Set<String> servers = replicationServer.getReplicationServer(); |
| | | if (servers == null) |
| | | { |
| | | servers = new HashSet<String>(); |
| | | servers = new HashSet<>(); |
| | | } |
| | | Set<String> oldServers = new HashSet<String>(servers); |
| | | Set<String> oldServers = new HashSet<>(servers); |
| | | for (Set<String> rs : replicationServers.values()) |
| | | { |
| | | servers.addAll(rs); |
| | |
| | | { |
| | | domainNames = new String[]{}; |
| | | } |
| | | Set<ConfiguredDomain> domainsConf = new HashSet<ConfiguredDomain>(); |
| | | Set<ConfiguredDomain> domainsConf = new HashSet<>(); |
| | | ReplicationDomainCfgClient[] domains = |
| | | new ReplicationDomainCfgClient[domainNames.length]; |
| | | for (int i=0; i<domains.length; i++) |
| | |
| | | oldServers = domain.getReplicationServer(); |
| | | if (oldServers == null) |
| | | { |
| | | oldServers = new TreeSet<String>(); |
| | | oldServers = new TreeSet<>(); |
| | | } |
| | | servers = replicationServers.get(dn); |
| | | domain.setReplicationServer(servers); |
| | |
| | | |
| | | private Set<String> intersect(Set<String> set1, Set<String> set2) |
| | | { |
| | | Set<String> result = new TreeSet<String>(set1); |
| | | Set<String> result = new TreeSet<>(set1); |
| | | result.removeAll(set2); |
| | | return result; |
| | | } |
| | |
| | | |
| | | // Try to transform things if necessary. The following map has as key |
| | | // the original JavaArgument object and as value the 'transformed' JavaArgument. |
| | | Map<JavaArguments, JavaArguments> hmJavaArguments = new HashMap<JavaArguments, JavaArguments>(); |
| | | Map<JavaArguments, JavaArguments> hmJavaArguments = new HashMap<>(); |
| | | for (String script : uData.getScriptNamesForJavaArguments()) |
| | | { |
| | | JavaArguments origJavaArguments = uData.getJavaArguments(script); |
| | |
| | | } |
| | | |
| | | Properties fileProperties = getJavaPropertiesFileContents(getPropertiesFileName(installPath)); |
| | | Map<String, JavaArguments> args = new HashMap<String, JavaArguments>(); |
| | | Map<String, String> otherProperties = new HashMap<String, String>(); |
| | | Map<String, JavaArguments> args = new HashMap<>(); |
| | | Map<String, String> otherProperties = new HashMap<>(); |
| | | |
| | | for (String script : uData.getScriptNamesForJavaArguments()) |
| | | { |
| | |
| | | |
| | | private List<String> getJavaPropertiesFileComments(String propertiesFile) throws IOException |
| | | { |
| | | ArrayList<String> commentLines = new ArrayList<String>(); |
| | | ArrayList<String> commentLines = new ArrayList<>(); |
| | | BufferedReader reader = new BufferedReader(new FileReader(propertiesFile)); |
| | | String line; |
| | | while ((line = reader.readLine()) != null) |
| | |
| | | |
| | | private Type type; |
| | | |
| | | private List<String> baseDns = new LinkedList<String>(); |
| | | private List<String> baseDns = new LinkedList<>(); |
| | | |
| | | private List<String> ldifPaths = new LinkedList<String>(); |
| | | private List<String> ldifPaths = new LinkedList<>(); |
| | | |
| | | private String rejectedFile; |
| | | private String skippedFile; |
| | |
| | | */ |
| | | public LinkedList<String> getLDIFPaths() |
| | | { |
| | | return new LinkedList<String>(ldifPaths); |
| | | return new LinkedList<>(ldifPaths); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | public LinkedList<String> getBaseDns() |
| | | { |
| | | return new LinkedList<String>(baseDns); |
| | | return new LinkedList<>(baseDns); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | public class OfflineInstaller extends Installer |
| | | { |
| | | /** This map contains the ratio associated with each step. */ |
| | | private final Map<ProgressStep, Integer> hmRatio = |
| | | new HashMap<ProgressStep, Integer>(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** This map contains the ratio associated with each step. */ |
| | | private final Map<ProgressStep, Integer> hmRatio = new HashMap<>(); |
| | | /** This map contains the summary associated with each step. */ |
| | | private final Map<ProgressStep, LocalizableMessage> hmSummary = |
| | | new HashMap<ProgressStep, LocalizableMessage>(); |
| | | private final Map<ProgressStep, LocalizableMessage> hmSummary = new HashMap<>(); |
| | | |
| | | private ApplicationException runError; |
| | | |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** |
| | | * Actually performs the install in this thread. The thread is blocked. |
| | | */ |
| | |
| | | * extracting, the value for downloading will be the double of the value for |
| | | * extracting. |
| | | */ |
| | | Map<ProgressStep, Integer> hmTime = |
| | | new HashMap<ProgressStep, Integer>(); |
| | | Map<ProgressStep, Integer> hmTime = new HashMap<>(); |
| | | hmTime.put(InstallProgressStep.CONFIGURING_SERVER, 5); |
| | | hmTime.put(InstallProgressStep.CREATING_BASE_ENTRY, 10); |
| | | hmTime.put(InstallProgressStep.IMPORTING_LDIF, 20); |
| | |
| | | hmTime.put(InstallProgressStep.INITIALIZE_REPLICATED_SUFFIXES, 25); |
| | | |
| | | int totalTime = 0; |
| | | List<InstallProgressStep> steps = |
| | | new ArrayList<InstallProgressStep>(); |
| | | List<InstallProgressStep> steps = new ArrayList<>(); |
| | | totalTime += hmTime.get(InstallProgressStep.CONFIGURING_SERVER); |
| | | steps.add(InstallProgressStep.CONFIGURING_SERVER); |
| | | if (createNotReplicatedSuffix()) |
| | |
| | | */ |
| | | public class DataOptionsPanel extends QuickSetupStepPanel |
| | | { |
| | | private Component lastFocusComponent; |
| | | |
| | | private static final long serialVersionUID = 1815782841921928118L; |
| | | |
| | | private Component lastFocusComponent; |
| | | private UserData defaultUserData; |
| | | |
| | | private HashMap<FieldName, JLabel> hmLabels = new HashMap<FieldName, JLabel>(); |
| | | |
| | | private HashMap<FieldName, JTextComponent> hmFields = new HashMap<FieldName, JTextComponent>(); |
| | | |
| | | private HashMap<NewSuffixOptions.Type, JRadioButton> hmRadioButtons = |
| | | new HashMap<NewSuffixOptions.Type, JRadioButton>(); |
| | | private HashMap<FieldName, JLabel> hmLabels = new HashMap<>(); |
| | | private HashMap<FieldName, JTextComponent> hmFields = new HashMap<>(); |
| | | private HashMap<NewSuffixOptions.Type, JRadioButton> hmRadioButtons = new HashMap<>(); |
| | | |
| | | private JButton ldifBrowseButton; |
| | | |
| | | private JComboBox<BackendTypeUIAdapter> backendTypeComboBox; |
| | | |
| | | /** |
| | |
| | | /** Creates the components and populates the Maps with them. */ |
| | | private void populateComponentMaps() |
| | | { |
| | | final HashMap<FieldName, LabelFieldDescriptor> hm = new HashMap<FieldName, LabelFieldDescriptor>(); |
| | | final HashMap<FieldName, LabelFieldDescriptor> hm = new HashMap<>(); |
| | | |
| | | final LabelFieldDescriptor baseDNLabelDescriptor = new LabelFieldDescriptor( |
| | | INFO_BASE_DN_LABEL.get(), INFO_BASE_DN_TOOLTIP.get(), LabelFieldDescriptor.FieldType.TEXTFIELD, |
| | |
| | | private JRadioButton rbReplicated; |
| | | private JCheckBox cbSecureReplication; |
| | | private JCheckBox cbTopologyExists; |
| | | private HashMap<FieldName, JLabel> hmLabels = |
| | | new HashMap<FieldName, JLabel>(); |
| | | private HashMap<FieldName, JTextComponent> hmFields = |
| | | new HashMap<FieldName, JTextComponent>(); |
| | | private HashMap<FieldName, JLabel> hmLabels = new HashMap<>(); |
| | | private HashMap<FieldName, JTextComponent> hmFields = new HashMap<>(); |
| | | |
| | | /** |
| | | * Constructor of the panel. |
| | |
| | | */ |
| | | private void populateComponentMaps() |
| | | { |
| | | HashMap<FieldName, LabelFieldDescriptor> hm = |
| | | new HashMap<FieldName, LabelFieldDescriptor>(); |
| | | HashMap<FieldName, LabelFieldDescriptor> hm = new HashMap<>(); |
| | | |
| | | hm.put(FieldName.REPLICATION_PORT, new LabelFieldDescriptor( |
| | | INFO_REPLICATION_PORT_LABEL.get(), |
| | |
| | | |
| | | private Component lastFocusComponent; |
| | | |
| | | private HashMap<FieldName, JLabel> hmLabels = |
| | | new HashMap<FieldName, JLabel>(); |
| | | |
| | | private HashMap<FieldName, JTextComponent> hmFields = |
| | | new HashMap<FieldName, JTextComponent>(); |
| | | private HashMap<FieldName, JLabel> hmLabels = new HashMap<>(); |
| | | private HashMap<FieldName, JTextComponent> hmFields = new HashMap<>(); |
| | | |
| | | /** |
| | | * Constructor of the panel. |
| | |
| | | */ |
| | | private void populateLabelAndFieldMaps() |
| | | { |
| | | HashMap<FieldName, LabelFieldDescriptor> hm = |
| | | new HashMap<FieldName, LabelFieldDescriptor>(); |
| | | HashMap<FieldName, LabelFieldDescriptor> hm = new HashMap<>(); |
| | | |
| | | hm.put(FieldName.GLOBAL_ADMINISTRATOR_UID, new LabelFieldDescriptor( |
| | | INFO_GLOBAL_ADMINISTRATOR_UID_LABEL.get(), |
| | |
| | | |
| | | private final boolean displayServerLocation; |
| | | |
| | | private final HashMap<FieldName, JLabel> hmLabels = new HashMap<FieldName, JLabel>(); |
| | | private final HashMap<FieldName, JTextComponent> hmFields = new HashMap<FieldName, JTextComponent>(); |
| | | private final HashMap<FieldName, JLabel> hmLabels = new HashMap<>(); |
| | | private final HashMap<FieldName, JTextComponent> hmFields = new HashMap<>(); |
| | | private JPanel bottomComponent; |
| | | private JCheckBox startCheckBox; |
| | | private JCheckBox enableWindowsServiceCheckBox; |
| | |
| | | /** Create the components and populate the Maps. */ |
| | | private void populateLabelAndFieldsMap() |
| | | { |
| | | final HashMap<FieldName, LabelFieldDescriptor> hm = new HashMap<FieldName, LabelFieldDescriptor>(); |
| | | final HashMap<FieldName, LabelFieldDescriptor> hm = new HashMap<>(); |
| | | |
| | | if (displayServerLocation) |
| | | { |
| | |
| | | } |
| | | buf.append(s); |
| | | |
| | | final TreeSet<LocalizableMessage> remoteServerLines = new TreeSet<LocalizableMessage>(); |
| | | final TreeSet<LocalizableMessage> remoteServerLines = new TreeSet<>(); |
| | | for (final ServerDescriptor server : remotePorts.keySet()) |
| | | { |
| | | String serverDisplay; |
| | |
| | | panel.setOpaque(false); |
| | | final GridBagConstraints gbc = new GridBagConstraints(); |
| | | |
| | | final List<FieldName> fieldNames = new LinkedList<FieldName>(); |
| | | final List<FieldName> fieldNames = new LinkedList<>(); |
| | | if (displayServerLocation) |
| | | { |
| | | fieldNames.add(FieldName.SERVER_LOCATION); |
| | |
| | | final StringBuilder sb = new StringBuilder(); |
| | | final JavaArguments serverArguments = userData.getJavaArguments(UserData.SERVER_SCRIPT_NAME); |
| | | final JavaArguments importArguments = userData.getJavaArguments(UserData.IMPORT_SCRIPT_NAME); |
| | | final List<String> linesToAdd = new ArrayList<String>(); |
| | | final List<String> linesToAdd = new ArrayList<>(); |
| | | |
| | | final boolean defaultServer = |
| | | userData.getDefaultJavaArguments(UserData.SERVER_SCRIPT_NAME).equals(serverArguments); |
| | |
| | | private String[] getOtherArguments() |
| | | { |
| | | String sArgs = this.tfOtherArguments.getText().trim(); |
| | | if (sArgs.length() > 0) |
| | | { |
| | | String[] args = sArgs.split(" "); |
| | | ArrayList<String> array = new ArrayList<String>(); |
| | | for (String arg : args) |
| | | { |
| | | if (arg.length() > 0) |
| | | { |
| | | array.add(arg); |
| | | } |
| | | } |
| | | String[] fArgs = new String[array.size()]; |
| | | array.toArray(fArgs); |
| | | return fArgs; |
| | | } |
| | | else |
| | | if (sArgs.length() <= 0) |
| | | { |
| | | return new String[]{}; |
| | | } |
| | | |
| | | String[] args = sArgs.split(" "); |
| | | ArrayList<String> array = new ArrayList<>(); |
| | | for (String arg : args) |
| | | { |
| | | if (arg.length() > 0) |
| | | { |
| | | array.add(arg); |
| | | } |
| | | } |
| | | return array.toArray(new String[array.size()]); |
| | | } |
| | | |
| | | /** |
| | |
| | | setValidLater(lOtherArguments, true); |
| | | int initialMemory = -1; |
| | | int maxMemory = -1; |
| | | ArrayList<LocalizableMessage> errorMsgs = new ArrayList<LocalizableMessage>(); |
| | | ArrayList<LocalizableMessage> errorMsgs = new ArrayList<>(); |
| | | try |
| | | { |
| | | String sInitialMemory = tfInitialMemory.getText().trim(); |
| | |
| | | if (errorMsgs.isEmpty()) |
| | | { |
| | | // Try the options together, often there are interdependencies. |
| | | ArrayList<LocalizableMessage> allErrors = new ArrayList<LocalizableMessage>(); |
| | | ArrayList<LocalizableMessage> allErrors = new ArrayList<>(); |
| | | checkAllArgumentsTogether(initialMemory, maxMemory, allErrors); |
| | | |
| | | if (!allErrors.isEmpty()) |
| | | { |
| | | ArrayList<LocalizableMessage> memoryErrors = new ArrayList<LocalizableMessage>(); |
| | | ArrayList<LocalizableMessage> memoryErrors = new ArrayList<>(); |
| | | checkMemoryArguments(initialMemory, maxMemory, memoryErrors); |
| | | ArrayList<LocalizableMessage> otherErrors = new ArrayList<LocalizableMessage>(); |
| | | ArrayList<LocalizableMessage> otherErrors = new ArrayList<>(); |
| | | checkOtherArguments(otherErrors); |
| | | |
| | | if (!memoryErrors.isEmpty()) |
| | |
| | | setValidLater(lInitialMemory, true); |
| | | setValidLater(lMaxMemory, true); |
| | | setValidLater(lOtherArguments, true); |
| | | ArrayList<JLabel> ls = new ArrayList<JLabel>(); |
| | | ArrayList<JLabel> ls = new ArrayList<>(); |
| | | StringBuilder sb = new StringBuilder(); |
| | | |
| | | if (initialMemory != -1) |
| | |
| | | private void checkOtherArguments(Collection<LocalizableMessage> errorMsgs) |
| | | { |
| | | setValidLater(lOtherArguments, true); |
| | | ArrayList<JLabel> ls = new ArrayList<JLabel>(); |
| | | ArrayList<JLabel> ls = new ArrayList<>(); |
| | | StringBuilder sb = new StringBuilder(); |
| | | |
| | | String[] otherArgs = getOtherArguments(); |
| | |
| | | { |
| | | private static final long serialVersionUID = -3742350600617826375L; |
| | | private Component lastFocusComponent; |
| | | private HashMap<String, JLabel> hmLabels = |
| | | new HashMap<String, JLabel>(); |
| | | private HashMap<String, JTextComponent> hmFields = |
| | | new HashMap<String, JTextComponent>(); |
| | | private HashMap<String, JCheckBox> hmCbs = |
| | | new HashMap<String, JCheckBox>(); |
| | | private HashMap<String, JLabel> hmLabels = new HashMap<>(); |
| | | private HashMap<String, JTextComponent> hmFields = new HashMap<>(); |
| | | private HashMap<String, JCheckBox> hmCbs = new HashMap<>(); |
| | | private JScrollPane scroll; |
| | | private JPanel fieldsPanel; |
| | | private TreeSet<ServerDescriptor> orderedServers = |
| | | new TreeSet<ServerDescriptor>(this); |
| | | /** |
| | | *The display of the server the user provided in the replication options |
| | | * panel. |
| | | */ |
| | | private TreeSet<ServerDescriptor> orderedServers = new TreeSet<>(this); |
| | | /** The display of the server the user provided in the replication options panel. */ |
| | | private String serverToConnectDisplay; |
| | | |
| | | /** |
| | |
| | | |
| | | if (fieldName == FieldName.REMOTE_REPLICATION_PORT) |
| | | { |
| | | Map<String, String> hm = new HashMap<String, String>(); |
| | | Map<String, String> hm = new HashMap<>(); |
| | | for (String id : hmFields.keySet()) |
| | | { |
| | | hm.put(id, hmFields.get(id).getText()); |
| | |
| | | } |
| | | else if (fieldName == FieldName.REMOTE_REPLICATION_SECURE) |
| | | { |
| | | Map<String, Boolean> hm = new HashMap<String, Boolean>(); |
| | | Map<String, Boolean> hm = new HashMap<>(); |
| | | for (String id : hmCbs.keySet()) |
| | | { |
| | | hm.put(id, hmCbs.get(id).isSelected()); |
| | |
| | | } |
| | | }; |
| | | lastFocusComponent = null; |
| | | HashMap<String, String> hmOldValues = new HashMap<String, String>(); |
| | | HashMap<String, String> hmOldValues = new HashMap<>(); |
| | | for (String id : hmFields.keySet()) |
| | | { |
| | | hmOldValues.put(id, hmFields.get(id).getText()); |
| | | } |
| | | HashMap<String, Boolean> hmOldSecureValues = |
| | | new HashMap<String, Boolean>(); |
| | | HashMap<String, Boolean> hmOldSecureValues = new HashMap<>(); |
| | | for (String id : hmCbs.keySet()) |
| | | { |
| | | hmOldSecureValues.put(id, hmCbs.get(id).isSelected()); |
| | |
| | | addVerticalGlue(fieldsPanel); |
| | | } |
| | | |
| | | private TreeSet<ServerDescriptor> orderServers( |
| | | Set<ServerDescriptor> servers) |
| | | private TreeSet<ServerDescriptor> orderServers(Set<ServerDescriptor> servers) |
| | | { |
| | | TreeSet<ServerDescriptor> ordered = new TreeSet<ServerDescriptor>(this); |
| | | TreeSet<ServerDescriptor> ordered = new TreeSet<>(this); |
| | | ordered.addAll(servers); |
| | | |
| | | return ordered; |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013-2014 ForgeRock AS |
| | | * Portions Copyright 2013-2015 ForgeRock AS |
| | | |
| | | */ |
| | | |
| | |
| | | @Override |
| | | public ArrayList<LocalizableMessage> processBackgroundTask() |
| | | { |
| | | ArrayList<LocalizableMessage> errorMsgs = new ArrayList<LocalizableMessage>(); |
| | | ArrayList<LocalizableMessage> errorMsgs = new ArrayList<>(); |
| | | errorMsgs.addAll(checkPort()); |
| | | errorMsgs.addAll(checkKeystore()); |
| | | return errorMsgs; |
| | |
| | | */ |
| | | private ArrayList<LocalizableMessage> checkPort() |
| | | { |
| | | ArrayList<LocalizableMessage> errorMsgs = new ArrayList<LocalizableMessage>(); |
| | | ArrayList<LocalizableMessage> errorMsgs = new ArrayList<>(); |
| | | |
| | | if (cbEnableSSL.isSelected()) |
| | | { |
| | |
| | | */ |
| | | private ArrayList<LocalizableMessage> checkKeystore() |
| | | { |
| | | ArrayList<LocalizableMessage> errorMsgs = new ArrayList<LocalizableMessage>(); |
| | | ArrayList<LocalizableMessage> errorMsgs = new ArrayList<>(); |
| | | |
| | | boolean pathValid = true; |
| | | boolean pwdValid = true; |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013-2014 ForgeRock AS. |
| | | * Portions Copyright 2013-2015 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.opends.quicksetup.installer.ui; |
| | |
| | | "The provided aliases are null or empty."); |
| | | } |
| | | isCanceled = true; |
| | | TreeSet<String> s = new TreeSet<String>(); |
| | | TreeSet<String> s = new TreeSet<>(); |
| | | Collections.addAll(s, aliases); |
| | | String[] orderedAliases = new String[s.size()]; |
| | | s.toArray(orderedAliases); |
| | |
| | | private UserData defaultUserData; |
| | | |
| | | private Component lastFocusComponent; |
| | | |
| | | private JLabel lSecurity; |
| | | |
| | | private JButton secureAccessButton; |
| | | |
| | | private JButton browseButton; |
| | | |
| | | private boolean displayServerLocation; |
| | | |
| | | private boolean canUpdateSecurity; |
| | | |
| | | private SecurityOptions securityOptions; |
| | | |
| | | private HashMap<FieldName, JLabel> hmLabels = |
| | | new HashMap<FieldName, JLabel>(); |
| | | |
| | | private HashMap<FieldName, JTextComponent> hmFields = |
| | | new HashMap<FieldName, JTextComponent>(); |
| | | private HashMap<FieldName, JLabel> hmLabels = new HashMap<>(); |
| | | private HashMap<FieldName, JTextComponent> hmFields = new HashMap<>(); |
| | | |
| | | private JTextComponent tfServerLocationParent; |
| | | |
| | | private JTextComponent tfServerLocationRelativePath; |
| | | |
| | | private JLabel lServerLocation; |
| | |
| | | */ |
| | | private void populateLabelAndFieldMaps() |
| | | { |
| | | HashMap<FieldName, LabelFieldDescriptor> hm = |
| | | new HashMap<FieldName, LabelFieldDescriptor>(); |
| | | HashMap<FieldName, LabelFieldDescriptor> hm = new HashMap<>(); |
| | | |
| | | hm.put(FieldName.HOST_NAME, new LabelFieldDescriptor( |
| | | INFO_HOST_NAME_LABEL.get(), |
| | |
| | | * will send a ProgressUpdateEvent. |
| | | * |
| | | * This class is supposed to be fully independent of the graphical layout. |
| | | * |
| | | */ |
| | | public class WebStartInstaller extends Installer { |
| | | private final Map<ProgressStep, Integer> hmRatio = |
| | | new HashMap<ProgressStep, Integer>(); |
| | | |
| | | private final Map<ProgressStep, LocalizableMessage> hmSummary = |
| | | new HashMap<ProgressStep, LocalizableMessage>(); |
| | | private final Map<ProgressStep, Integer> hmRatio = new HashMap<>(); |
| | | private final Map<ProgressStep, LocalizableMessage> hmSummary = new HashMap<>(); |
| | | |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | |
| | | setCurrentProgressStep(InstallProgressStep.NOT_STARTED); |
| | | } |
| | | |
| | | /** |
| | | * Actually performs the install in this thread. The thread is blocked. |
| | | * |
| | | */ |
| | | /** Actually performs the install in this thread. The thread is blocked. */ |
| | | @Override |
| | | public void run() |
| | | { |
| | |
| | | * extracting, the value for downloading will be the double of the value for |
| | | * extracting. |
| | | */ |
| | | Map<ProgressStep, Integer> hmTime = |
| | | new HashMap<ProgressStep, Integer>(); |
| | | Map<ProgressStep, Integer> hmTime = new HashMap<>(); |
| | | hmTime.put(InstallProgressStep.DOWNLOADING, 30); |
| | | hmTime.put(InstallProgressStep.EXTRACTING, 15); |
| | | hmTime.put(InstallProgressStep.CONFIGURING_SERVER, 5); |
| | |
| | | hmTime.put(InstallProgressStep.INITIALIZE_REPLICATED_SUFFIXES, 25); |
| | | |
| | | int totalTime = 0; |
| | | List<InstallProgressStep> steps = |
| | | new ArrayList<InstallProgressStep>(); |
| | | List<InstallProgressStep> steps = new ArrayList<>(); |
| | | totalTime += hmTime.get(InstallProgressStep.DOWNLOADING); |
| | | steps.add(InstallProgressStep.DOWNLOADING); |
| | | totalTime += hmTime.get(InstallProgressStep.EXTRACTING); |
| | |
| | | { |
| | | private static final long serialVersionUID = -8460400337486357976L; |
| | | |
| | | private HashSet<ButtonActionListener> buttonListeners = |
| | | new HashSet<ButtonActionListener>(); |
| | | private HashSet<ButtonActionListener> buttonListeners = new HashSet<>(); |
| | | |
| | | private JButton nextButton; |
| | | |
| | | private JButton previousButton; |
| | | |
| | | private JButton quitButton; |
| | | |
| | | private JButton closeButton; |
| | | |
| | | private JButton finishButton; |
| | | |
| | | /** |
| | | * Default constructor. |
| | | * @param application Application running in QuickSetup |
| | | * |
| | | */ |
| | | public ButtonsPanel(GuiApplication application) |
| | | { |
| | |
| | | INFO_CERTIFICATE_CHAIN_COMBO_TOOLTIP.get().toString()); |
| | | final CardLayout cl = new CardLayout(); |
| | | final JPanel cardPanel = new JPanel(cl); |
| | | final Map<String, JPanel> hmPanels = new HashMap<String, JPanel>(); |
| | | final Map<String, JPanel> hmPanels = new HashMap<>(); |
| | | |
| | | LocalizableMessage[] labels = |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013 ForgeRock AS. |
| | | * Portions Copyright 2013-2015 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.opends.quicksetup.ui; |
| | |
| | | |
| | | private static final String LOADING_PANEL = "loading"; |
| | | |
| | | private Map<WizardStep, QuickSetupStepPanel> hmPanels = |
| | | new HashMap<WizardStep, QuickSetupStepPanel>(); |
| | | private Map<WizardStep, QuickSetupStepPanel> hmPanels = new HashMap<>(); |
| | | |
| | | /** |
| | | * The constructor of this class. |
| | |
| | | */ |
| | | public class CustomHTMLEditorKit extends HTMLEditorKit |
| | | { |
| | | private HashSet<ActionListener> listeners = new HashSet<ActionListener>(); |
| | | private HashSet<ActionListener> listeners = new HashSet<>(); |
| | | private static final long serialVersionUID = 298103926252426388L; |
| | | |
| | | /** |
| | |
| | | */ |
| | | public LinkedHashSet<WizardStep> getOrderedSteps() |
| | | { |
| | | LinkedHashSet<WizardStep> orderedSteps = new LinkedHashSet<WizardStep>(); |
| | | LinkedHashSet<WizardStep> orderedSteps = new LinkedHashSet<>(); |
| | | WizardStep step = getFirstWizardStep(); |
| | | orderedSteps.add(step); |
| | | while (null != (step = getNextWizardStep(step))) { |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013-2014 ForgeRock AS. |
| | | * Portions Copyright 2013-2015 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.opends.quicksetup.ui; |
| | |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | private JFrame frame; |
| | | |
| | | private QuickSetupErrorPanel installedPanel; |
| | | |
| | | private JPanel framePanel; |
| | | |
| | | private StepsPanel stepsPanel; |
| | | |
| | | private CurrentStepPanel currentStepPanel; |
| | | |
| | | private ButtonsPanel buttonsPanel; |
| | | |
| | | private WizardStep displayedStep; |
| | | |
| | | private CurrentInstallStatus installStatus; |
| | | |
| | | private HashSet<ButtonActionListener> buttonListeners = |
| | | new HashSet<ButtonActionListener>(); |
| | | private HashSet<ButtonActionListener> buttonListeners = new HashSet<>(); |
| | | |
| | | private GuiApplication application; |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.quicksetup.ui; |
| | |
| | | { |
| | | private static final long serialVersionUID = 1765037717593522233L; |
| | | |
| | | private HashSet<ButtonActionListener> buttonListeners = |
| | | new HashSet<ButtonActionListener>(); |
| | | private HashSet<ButtonActionListener> buttonListeners = new HashSet<>(); |
| | | |
| | | private JButton quitButton; |
| | | private JButton continueButton; |
| | |
| | | private JPanel inputContainer; |
| | | private Component inputPanel; |
| | | |
| | | private HashSet<ButtonActionListener> buttonListeners = |
| | | new HashSet<ButtonActionListener>(); |
| | | private HashSet<ButtonActionListener> buttonListeners = new HashSet<>(); |
| | | |
| | | private ProgressMessageFormatter formatter; |
| | | |
| | |
| | | * We can use a HashMap (not multi-thread safe) because all |
| | | * the calls to this object are done in the event-thread. |
| | | */ |
| | | private HashMap<String, URLWorker> hmURLWorkers = |
| | | new HashMap<String, URLWorker>(); |
| | | private HashMap<String, URLWorker> hmURLWorkers = new HashMap<>(); |
| | | |
| | | /** |
| | | * Creates a default instance. |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.quicksetup.ui; |
| | |
| | | { |
| | | private static final long serialVersionUID = -2003945907121690657L; |
| | | |
| | | HashMap<WizardStep, JLabel> hmLabels = new HashMap<WizardStep, JLabel>(); |
| | | |
| | | HashMap<WizardStep, JLabel> hmIcons = new HashMap<WizardStep, JLabel>(); |
| | | |
| | | HashMap<WizardStep, JPanel> hmSubPanels = new HashMap<WizardStep, JPanel>(); |
| | | HashMap<WizardStep, JLabel> hmLabels = new HashMap<>(); |
| | | HashMap<WizardStep, JLabel> hmIcons = new HashMap<>(); |
| | | HashMap<WizardStep, JPanel> hmSubPanels = new HashMap<>(); |
| | | |
| | | /** |
| | | * Creates a StepsPanel. |
| | |
| | | gbc.fill = GridBagConstraints.HORIZONTAL; |
| | | gbc.anchor = GridBagConstraints.WEST; |
| | | |
| | | HashMap<WizardStep, LocalizableMessage> hmText = new HashMap<WizardStep, LocalizableMessage>(); |
| | | HashMap<WizardStep, LocalizableMessage> hmText = new HashMap<>(); |
| | | LinkedHashSet<WizardStep> orderedSteps = app.getOrderedSteps(); |
| | | boolean first = true; |
| | | for (WizardStep s : orderedSteps) |
| | |
| | | */ |
| | | public static <T> JList<T> makeJList(TextStyle textStyle) |
| | | { |
| | | final JList<T> list = new JList<T>(); |
| | | final JList<T> list = new JList<>(); |
| | | list.setCellRenderer(makeCellRenderer(textStyle)); |
| | | return list; |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2015 ForgeRock AS. |
| | | */ |
| | | package org.opends.quicksetup.util; |
| | | |
| | |
| | | */ |
| | | public final void startBackgroundTask() |
| | | { |
| | | BackgroundTaskThread<T> taskThread = new BackgroundTaskThread<T>(this); |
| | | BackgroundTaskThread<T> taskThread = new BackgroundTaskThread<>(this); |
| | | taskThread.start(); |
| | | } |
| | | |
| | |
| | | } |
| | | logger.info(LocalizableMessage.raw("stopping server")); |
| | | |
| | | ArrayList<String> argList = new ArrayList<String>(); |
| | | ArrayList<String> argList = new ArrayList<>(); |
| | | argList.add(Utils.getScriptPath( |
| | | Utils.getPath(installation.getServerStopCommandFile()))); |
| | | int size = argList.size(); |
| | |
| | | } |
| | | logger.info(LocalizableMessage.raw("starting server")); |
| | | |
| | | ArrayList<String> argList = new ArrayList<String>(); |
| | | ArrayList<String> argList = new ArrayList<>(); |
| | | argList.add(Utils.getScriptPath( |
| | | Utils.getPath(installation.getServerStartCommandFile()))); |
| | | argList.add("--timeout"); |