| | |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions copyright 2011-2016 ForgeRock AS. |
| | | * Portions copyright 2011 Nemanja Lukić |
| | | * Portions Copyright 2026 3A Systems, LLC. |
| | | */ |
| | | package com.forgerock.opendj.cli; |
| | | |
| | |
| | | println(); |
| | | } |
| | | |
| | | if ("".equals(response)) { |
| | | if (response.isEmpty()) { |
| | | if (defaultValue != null) { |
| | | return defaultValue; |
| | | } |
| | |
| | | * information: "Portions Copyright [year] [name of copyright owner]". |
| | | * |
| | | * Copyright 2025 3A Systems, LLC |
| | | * Portions Copyright 2026 3A Systems, LLC. |
| | | */ |
| | | package com.forgerock.opendj.ldap.extensions; |
| | | |
| | |
| | | import org.forgerock.util.Reject; |
| | | |
| | | import java.io.IOException; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | import static com.forgerock.opendj.ldap.CoreMessages.ERR_EXTOP_PASSMOD_CANNOT_DECODE_REQUEST; |
| | | import static com.forgerock.opendj.util.StaticUtils.getExceptionMessage; |
| | |
| | | reader.readStartSequence(); |
| | | while (reader.hasNextElement() && reader.peekType() == ASN1.UNIVERSAL_SEQUENCE_TYPE) { |
| | | reader.readStartSequence(); |
| | | final long messageId = reader.readInteger(); |
| | | final List<Control> controls = new ArrayList<>(); |
| | | /* |
| | | * TODO: report these updatesControls through |
| | | * EndTransactionExtendedResult.success(messageID, responses). Rebuilding a Control |
| | | * from the wire is not possible yet: getValue() writes each control as its value |
| | | * alone, without its OID and criticality, so both sides have to be completed |
| | | * together. Until then the entries are read to consume them and dropped. |
| | | */ |
| | | reader.readInteger(); |
| | | reader.readStartSequence(); |
| | | while (reader.hasNextElement() && reader.peekType() == ASN1.UNIVERSAL_OCTET_STRING_TYPE) { |
| | | final ByteString controlEncoded = reader.readOctetString(); |
| | | //TODO decode Control |
| | | reader.readOctetString(); |
| | | } |
| | | reader.readEndSequence(); |
| | | //newResult.success(messageId, controls.toArray(new Control[]{})); |
| | | reader.readEndSequence(); |
| | | } |
| | | reader.readEndSequence(); |
| | |
| | | * Portions copyright 2011-2016 ForgeRock AS. |
| | | * Portions copyright 2016 Matthew Stevenson |
| | | * Portions Copyrighted 2026 3A Systems, LLC. |
| | | * Portions Copyright 2026 3A Systems, LLC. |
| | | */ |
| | | package org.forgerock.opendj.ldif; |
| | | |
| | |
| | | // Parse the newsuperior if present. |
| | | if (record.iterator.hasNext()) { |
| | | ldifLine = readLDIFRecordKeyValuePair(record, pair, true); |
| | | if (pair.key == null || !"newsuperior".equals(toLowerCase(pair.key)) || "".equals(pair.value)) { |
| | | if (pair.key == null || !"newsuperior".equals(toLowerCase(pair.key)) || pair.value.isEmpty()) { |
| | | throw DecodeException.error( |
| | | ERR_LDIF_MALFORMED_NEW_SUPERIOR.get(record.lineNumber, entryDN, ldifLine)); |
| | | } |
| | |
| | | * Returns the path of the command line to be used to delete the specified |
| | | * index. |
| | | * |
| | | * @param index |
| | | * the index to be deleted. |
| | | * @return the path of the command line to be used to delete the specified |
| | | * index. |
| | | */ |
| | |
| | | List<AttributeType> attrs = schemaElementsToAttributeTypes(get(mapAttrs, fileName)); |
| | | List<ObjectClass> ocs = schemaElementsToObjectClasses(get(mapClasses, fileName)); |
| | | |
| | | if ("".equals(fileName)) |
| | | if (fileName.isEmpty()) |
| | | { |
| | | fileName = null; |
| | | } |
| | |
| | | } |
| | | ErrorLogPublisher startupErrorLogPublisher = TextErrorLogPublisher.getServerStartupTextErrorPublisher(writer); |
| | | ErrorLogger.getInstance().addLogPublisher(startupErrorLogPublisher); |
| | | DebugLogPublisher startupDebugLogPublisher = DebugLogger.getInstance().addPublisherIfRequired(writer); |
| | | DebugLogger.getInstance().addPublisherIfRequired(writer); |
| | | |
| | | localizedLogger.info(LocalizableMessage.raw("QuickSetup application launched " + DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG).format(new Date()), null)); |
| | | } |
| | |
| | | if (errorMsgs.isEmpty()) |
| | | { |
| | | AuthenticationData auth = new AuthenticationData(); |
| | | auth.setHostPort(new HostPort("".equals(host) ? null : host, port != null ? port : 0)); |
| | | auth.setHostPort(new HostPort(host.isEmpty() ? null : host, port != null ? port : 0)); |
| | | auth.setDn(dn); |
| | | auth.setPwd(pwd); |
| | | auth.setUseSecureConnection(true); |
| | |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014-2016 ForgeRock AS. |
| | | * Portions Copyright 2026 3A Systems, LLC. |
| | | */ |
| | | package org.opends.quicksetup.installer.ui; |
| | | |
| | |
| | | { |
| | | for (Map.Entry<String, JLabel> entry : hmLabels.entrySet()) |
| | | { |
| | | String id = entry.getKey(); |
| | | UIFactory.setTextStyle(entry.getValue(), |
| | | UIFactory.TextStyle.SECONDARY_FIELD_VALID); |
| | | } |
| | |
| | | * Portions Copyright 2014 The Apache Software Foundation |
| | | * Copyright 2015-2016 ForgeRock AS. |
| | | * Portions Copyright 2023-2026 3A Systems, LLC |
| | | * Portions Copyright 2026 3A Systems, LLC. |
| | | */ |
| | | package org.opends.server.backends.pluggable; |
| | | |
| | |
| | | { |
| | | for (int i = 0; i < nbBuffer; i++) |
| | | { |
| | | pool.offer(new MemoryBuffer(allocateDirect |
| | | // The queue is created with room for exactly nbBuffer elements, so add() cannot refuse. |
| | | pool.add(new MemoryBuffer(allocateDirect |
| | | ? ByteBuffer.allocateDirect(bufferSize) |
| | | : ByteBuffer.allocate(bufferSize))); |
| | | } |
| | |
| | | s = ""; |
| | | logger.warn(LocalizableMessage.raw("Error reading input: "+ce, ce)); |
| | | } |
| | | if ("".equals(s)) |
| | | if (s.isEmpty()) |
| | | { |
| | | if (defaultValue == null) |
| | | { |
| | |
| | | * @return The build number for the Directory Server. |
| | | */ |
| | | public int versionBuildNumber() { |
| | | return Integer.valueOf(properties.getProperty("version.build")); |
| | | return intProperty("version.build"); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return The major version number for the Directory Server. |
| | | */ |
| | | public int versionMajorNumber() { |
| | | return Integer.valueOf(properties.getProperty("version.major")); |
| | | return intProperty("version.major"); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return The minor version number for the Directory Server. |
| | | */ |
| | | public int versionMinorNumber() { |
| | | return Integer.valueOf(properties.getProperty("version.minor")); |
| | | return intProperty("version.minor"); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return The point version number for the Directory Server. |
| | | */ |
| | | public int versionPointNumber() { |
| | | return Integer.valueOf(properties.getProperty("version.point")); |
| | | return intProperty("version.point"); |
| | | } |
| | | |
| | | /** |
| | |
| | | public String versionRevision() { |
| | | return properties.getProperty("scm.revision"); |
| | | } |
| | | |
| | | /** |
| | | * Returns the value of a numeric property of the product information. |
| | | * |
| | | * @param key |
| | | * The name of the property to read. |
| | | * @return The value of the property. |
| | | * @throws MissingResourceException |
| | | * If the property is absent or is not a number, which means the bundled product |
| | | * information is not the one this class was built against. |
| | | */ |
| | | private int intProperty(final String key) { |
| | | final String value = properties.getProperty(key); |
| | | try { |
| | | return Integer.parseInt(value); |
| | | } catch (final NumberFormatException e) { |
| | | throw new MissingResourceException("Product information holds '" + value + "' for " + key |
| | | + ", which is not a number", ProductInformation.class.getName(), key); |
| | | } |
| | | } |
| | | } |