opendj-config/src/main/java/org/forgerock/opendj/config/client/AdminClientException.java
@@ -28,7 +28,7 @@ * Client exceptions represent communications problems, security problems, and * service related problems. */ public abstract class AdminClientException extends AdminException { abstract class AdminClientException extends AdminException { /** Serialization ID. */ private static final long serialVersionUID = 4044747533980824456L; opendj-config/src/main/java/org/forgerock/opendj/config/client/AdminSecurityException.java
@@ -24,7 +24,7 @@ * interacting with the Directory Server. These fall broadly into two * categories: authentication problems and authorization problems. */ public abstract class AdminSecurityException extends AdminClientException { abstract class AdminSecurityException extends AdminClientException { /** Fake serialization ID. */ private static final long serialVersionUID = 1L; opendj-config/src/main/java/org/forgerock/opendj/config/client/AuthenticationNotSupportedException.java
File was deleted opendj-config/src/main/java/org/forgerock/opendj/config/conditions/ANDCondition.java
@@ -31,7 +31,7 @@ * A condition which evaluates to <code>true</code> if and only if all of its * sub-conditions are <code>true</code>. */ public final class ANDCondition implements Condition { final class ANDCondition implements Condition { /** The list of sub-conditions. */ private final List<Condition> conditions; @@ -73,5 +73,4 @@ condition.initialize(d); } } } opendj-config/src/main/java/org/forgerock/opendj/config/dsconfig/BuildVersion.java
@@ -33,10 +33,11 @@ import org.forgerock.util.Utils; /** * Represents a particular version of OpenDJ useful for making comparisons between versions. FIXME TODO Move this file * in ? package. * Represents a particular version of OpenDJ useful for making comparisons between versions. * <p> * FIXME TODO Move this file in ? package. */ public class BuildVersion implements Comparable<BuildVersion> { class BuildVersion implements Comparable<BuildVersion> { private final int major; private final int minor; opendj-config/src/main/java/org/forgerock/opendj/config/dsconfig/HelpSubCommandHandler.java
@@ -554,21 +554,17 @@ return b.toString(); } /** The sub-command associated with this handler. */ private final SubCommand subCommand; /** The argument which should be used to specify the category of managed object to be retrieved. */ private final StringArgument categoryArgument; /** A table listing all the available types of managed object indexed on their parent type. */ private final Map<String, Map<String, AbstractManagedObjectDefinition<?, ?>>> categoryMap = new TreeMap<>(); /** The argument which should be used to display inherited properties. */ private BooleanArgument inheritedModeArgument; /** The sub-command associated with this handler. */ private final SubCommand subCommand; private final BooleanArgument inheritedModeArgument; /** A table listing all the available types of managed object indexed on their tag(s). */ private final Map<Tag, Map<String, AbstractManagedObjectDefinition<?, ?>>> tagMap = new HashMap<>(); /** The argument which should be used to specify the sub-type of managed object to be retrieved. */ private final StringArgument typeArgument; opendj-config/src/main/java/org/forgerock/opendj/config/dsconfig/LDAPManagementContextFactory.java
@@ -43,11 +43,9 @@ private ManagementContext context; /** The connection parameters command builder. */ private CommandBuilder contextCommandBuilder; private final CommandBuilder contextCommandBuilder; /** The connection factory provider. */ private final ConnectionFactoryProvider provider; /** The connection factory. */ private final ConnectionFactory factory; @@ -62,6 +60,7 @@ public LDAPManagementContextFactory(ConnectionFactoryProvider cfp) throws ArgumentException { this.provider = cfp; factory = cfp.getAuthenticatedConnectionFactory(); contextCommandBuilder = null; } /** Closes this management context. */ opendj-config/src/main/java/org/forgerock/opendj/config/dsconfig/PropertyEditorModification.java
@@ -43,8 +43,8 @@ REMOVE } private PropertyDefinition<T> propertyDefinition; private Type type; private final PropertyDefinition<T> propertyDefinition; private final Type type; private final SortedSet<T> values; private final SortedSet<T> originalValues; opendj-config/src/main/java/org/forgerock/opendj/config/dsconfig/SubCommandHandlerFactory.java
@@ -136,7 +136,7 @@ /** The set of get-xxx-prop available sub-commands. */ private final SortedSet<GetPropSubCommandHandler> getPropHandlers = new TreeSet<>(); /** The help sub-command handler. */ private HelpSubCommandHandler helpHandler; private final HelpSubCommandHandler helpHandler; /** The set of list-xxx available sub-commands. */ private final SortedSet<ListSubCommandHandler> listHandlers = new TreeSet<>(); /** The set of set-xxx-prop available sub-commands. */ opendj-config/src/main/java/org/forgerock/opendj/config/server/ConstraintViolationException.java
@@ -18,21 +18,20 @@ import static com.forgerock.opendj.ldap.config.ConfigMessages.*; import org.forgerock.opendj.config.DecodingException; import org.forgerock.util.Reject; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import org.forgerock.i18n.LocalizableMessage; import org.forgerock.i18n.LocalizableMessageBuilder; import org.forgerock.opendj.config.DecodingException; import org.forgerock.util.Reject; /** * This exception is thrown when the server refuses to use or delete a managed * object due to one or more constraints that cannot be satisfied. */ public class ConstraintViolationException extends DecodingException { class ConstraintViolationException extends DecodingException { /** Serialization ID. */ private static final long serialVersionUID = -4902443848460011875L; opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/ByteStringUtility.java
@@ -27,7 +27,7 @@ * A utility class to assist in converting DsmlValues (in Objects) into * the required ByteStrings, and back again. */ public class ByteStringUtility class ByteStringUtility { /** * Returns a ByteString from a DsmlValue Object. opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/DSMLAbandonOperation.java
@@ -12,7 +12,7 @@ * information: "Portions Copyright [year] [name of copyright owner]". * * Copyright 2006-2008 Sun Microsystems, Inc. * Portions Copyright 2012-2014 ForgeRock AS. * Portions Copyright 2012-2016 ForgeRock AS. */ package org.opends.dsml.protocol; @@ -20,7 +20,6 @@ import java.util.List; import org.forgerock.i18n.LocalizableMessage; import org.opends.server.protocols.ldap.AbandonRequestProtocolOp; import org.opends.server.protocols.ldap.LDAPMessage; import org.opends.server.protocols.ldap.LDAPResultCode; @@ -34,9 +33,9 @@ * This class provides the functionality for the performing an * LDAP ABANDON operation based on the specified DSML request. */ public class DSMLAbandonOperation class DSMLAbandonOperation { private LDAPConnection connection; private final LDAPConnection connection; /** * Create an instance with the specified LDAP connection. opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/DSMLAddOperation.java
@@ -12,7 +12,7 @@ * information: "Portions Copyright [year] [name of copyright owner]". * * Copyright 2006-2008 Sun Microsystems, Inc. * Portions Copyright 2012-2015 ForgeRock AS. * Portions Copyright 2012-2016 ForgeRock AS. */ package org.opends.dsml.protocol; @@ -23,6 +23,7 @@ import java.util.List; import org.forgerock.i18n.LocalizableMessage; import org.forgerock.opendj.ldap.ByteString; import org.forgerock.opendj.ldap.DecodeException; import org.opends.server.protocols.ldap.AddRequestProtocolOp; import org.opends.server.protocols.ldap.AddResponseProtocolOp; @@ -30,7 +31,6 @@ import org.opends.server.protocols.ldap.LDAPMessage; import org.opends.server.protocols.ldap.ProtocolOp; import org.opends.server.tools.LDAPConnection; import org.forgerock.opendj.ldap.ByteString; import org.opends.server.types.LDAPException; import org.opends.server.types.RawAttribute; @@ -40,10 +40,10 @@ * This class provides the functionality for the performing an * LDAP ADD operation based on the specified DSML request. */ public class DSMLAddOperation class DSMLAddOperation { private LDAPConnection connection; private final LDAPConnection connection; /** * Create the instance with the specified LDAP connection. opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/DSMLCompareOperation.java
@@ -12,7 +12,7 @@ * information: "Portions Copyright [year] [name of copyright owner]". * * Copyright 2006-2008 Sun Microsystems, Inc. * Portions Copyright 2012-2015 ForgeRock AS. * Portions Copyright 2012-2016 ForgeRock AS. */ package org.opends.dsml.protocol; @@ -22,13 +22,13 @@ import java.util.List; import org.forgerock.i18n.LocalizableMessage; import org.forgerock.opendj.ldap.ByteString; import org.forgerock.opendj.ldap.DecodeException; import org.opends.server.protocols.ldap.CompareRequestProtocolOp; import org.opends.server.protocols.ldap.CompareResponseProtocolOp; import org.opends.server.protocols.ldap.LDAPMessage; import org.opends.server.protocols.ldap.ProtocolOp; import org.opends.server.tools.LDAPConnection; import org.forgerock.opendj.ldap.ByteString; import org.opends.server.types.LDAPException; @@ -37,9 +37,9 @@ * This class provides the functionality for the performing an * LDAP COMPARE operation based on the specified DSML request. */ public class DSMLCompareOperation class DSMLCompareOperation { private LDAPConnection connection; private final LDAPConnection connection; /** * Create an instance with the specified LDAP connection. opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/DSMLDeleteOperation.java
@@ -20,14 +20,14 @@ import java.util.List; import org.forgerock.i18n.LocalizableMessage; import org.forgerock.opendj.ldap.ByteString; import org.forgerock.opendj.ldap.DN; import org.forgerock.opendj.ldap.DecodeException; import org.opends.server.protocols.ldap.DeleteRequestProtocolOp; import org.opends.server.protocols.ldap.DeleteResponseProtocolOp; import org.opends.server.protocols.ldap.LDAPMessage; import org.opends.server.protocols.ldap.ProtocolOp; import org.opends.server.tools.LDAPConnection; import org.forgerock.opendj.ldap.ByteString; import org.forgerock.opendj.ldap.DN; import org.opends.server.types.LDAPException; /** @@ -36,9 +36,9 @@ * * @author Vivek Nagar */ public class DSMLDeleteOperation class DSMLDeleteOperation { private LDAPConnection connection; private final LDAPConnection connection; /** * Create an instance with the specified LDAP connection. opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/DSMLExtendedOperation.java
@@ -12,7 +12,7 @@ * information: "Portions Copyright [year] [name of copyright owner]". * * Copyright 2006-2008 Sun Microsystems, Inc. * Portions Copyright 2012-2014 ForgeRock AS. * Portions Copyright 2012-2016 ForgeRock AS. */ package org.opends.dsml.protocol; @@ -23,13 +23,13 @@ import java.util.Set; import org.forgerock.i18n.LocalizableMessage; import org.forgerock.opendj.ldap.ByteString; import org.forgerock.opendj.ldap.DecodeException; import org.opends.server.protocols.ldap.ExtendedRequestProtocolOp; import org.opends.server.protocols.ldap.ExtendedResponseProtocolOp; import org.opends.server.protocols.ldap.LDAPMessage; import org.opends.server.protocols.ldap.ProtocolOp; import org.opends.server.tools.LDAPConnection; import org.forgerock.opendj.ldap.ByteString; import org.opends.server.types.LDAPException; @@ -37,10 +37,10 @@ * This class provides the functionality for the performing an * LDAP EXTENDED operation based on the specified DSML request. */ public class DSMLExtendedOperation class DSMLExtendedOperation { private LDAPConnection connection; private Set<String> stringResponses; private final LDAPConnection connection; private final Set<String> stringResponses; /** * Create an instance with the specified LDAP connection. opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/DSMLModifyDNOperation.java
@@ -12,7 +12,7 @@ * information: "Portions Copyright [year] [name of copyright owner]". * * Copyright 2006-2008 Sun Microsystems, Inc. * Portions Copyright 2012-2015 ForgeRock AS. * Portions Copyright 2012-2016 ForgeRock AS. */ package org.opends.dsml.protocol; @@ -22,13 +22,13 @@ import java.util.List; import org.forgerock.i18n.LocalizableMessage; import org.opends.server.tools.LDAPConnection; import org.forgerock.opendj.ldap.ByteString; import org.forgerock.opendj.ldap.DecodeException; import org.opends.server.protocols.ldap.LDAPMessage; import org.opends.server.protocols.ldap.ModifyDNRequestProtocolOp; import org.opends.server.protocols.ldap.ModifyDNResponseProtocolOp; import org.opends.server.protocols.ldap.ProtocolOp; import org.forgerock.opendj.ldap.ByteString; import org.opends.server.tools.LDAPConnection; import org.opends.server.types.LDAPException; @@ -37,10 +37,10 @@ * This class provides the functionality for the performing an * LDAP MODIFY_DN operation based on the specified DSML request. */ public class DSMLModifyDNOperation class DSMLModifyDNOperation { private LDAPConnection connection; private final LDAPConnection connection; /** * Create the instance with the specified connection. opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/DSMLModifyOperation.java
@@ -12,7 +12,7 @@ * information: "Portions Copyright [year] [name of copyright owner]". * * Copyright 2006-2008 Sun Microsystems, Inc. * Portions Copyright 2012-2015 ForgeRock AS. * Portions Copyright 2012-2016 ForgeRock AS. */ package org.opends.dsml.protocol; @@ -23,7 +23,9 @@ import java.util.List; import org.forgerock.i18n.LocalizableMessage; import org.forgerock.opendj.ldap.ByteString; import org.forgerock.opendj.ldap.DecodeException; import org.forgerock.opendj.ldap.ModificationType; import org.opends.server.protocols.ldap.LDAPAttribute; import org.opends.server.protocols.ldap.LDAPMessage; import org.opends.server.protocols.ldap.LDAPModification; @@ -31,9 +33,7 @@ import org.opends.server.protocols.ldap.ModifyResponseProtocolOp; import org.opends.server.protocols.ldap.ProtocolOp; import org.opends.server.tools.LDAPConnection; import org.forgerock.opendj.ldap.ByteString; import org.opends.server.types.LDAPException; import org.forgerock.opendj.ldap.ModificationType; import org.opends.server.types.RawModification; @@ -42,9 +42,9 @@ * This class provides the functionality for the performing an * LDAP MODIFY operation based on the specified DSML request. */ public class DSMLModifyOperation class DSMLModifyOperation { private LDAPConnection connection; private final LDAPConnection connection; /** * Create the instance with the specified LDAP connection. opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/DSMLSearchOperation.java
@@ -16,6 +16,8 @@ */ package org.opends.dsml.protocol; import static org.opends.messages.ProtocolMessages.*; import java.io.IOException; import java.util.ArrayList; import java.util.LinkedHashSet; @@ -25,7 +27,10 @@ import javax.xml.bind.JAXBElement; import org.forgerock.i18n.LocalizableMessage; import org.forgerock.opendj.ldap.ByteString; import org.forgerock.opendj.ldap.DecodeException; import org.forgerock.opendj.ldap.DereferenceAliasesPolicy; import org.forgerock.opendj.ldap.SearchScope; import org.opends.server.protocols.ldap.LDAPAttribute; import org.opends.server.protocols.ldap.LDAPConstants; import org.opends.server.protocols.ldap.LDAPFilter; @@ -35,21 +40,17 @@ import org.opends.server.protocols.ldap.SearchResultDoneProtocolOp; import org.opends.server.protocols.ldap.SearchResultEntryProtocolOp; import org.opends.server.tools.LDAPConnection; import org.forgerock.opendj.ldap.ByteString; import org.forgerock.opendj.ldap.DereferenceAliasesPolicy; import org.opends.server.types.LDAPException; import org.opends.server.types.RawFilter; import org.forgerock.opendj.ldap.SearchScope; import static org.opends.messages.ProtocolMessages.*; /** * This class provides the functionality for the performing an LDAP * SEARCH operation based on the specified DSML request. */ public class DSMLSearchOperation class DSMLSearchOperation { private LDAPConnection connection; private final LDAPConnection connection; opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/DSMLServlet.java
@@ -12,7 +12,7 @@ * information: "Portions Copyright [year] [name of copyright owner]". * * Copyright 2006-2010 Sun Microsystems, Inc. * Portions Copyright 2011-2015 ForgeRock AS. * Portions Copyright 2011-2016 ForgeRock AS. */ package org.opends.dsml.protocol; @@ -38,6 +38,7 @@ import java.util.Iterator; import java.util.LinkedHashSet; import java.util.List; import java.util.Set; import java.util.StringTokenizer; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; @@ -59,8 +60,14 @@ import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import javax.xml.parsers.SAXParserFactory; import javax.xml.soap.*; import javax.xml.soap.MessageFactory; import javax.xml.soap.MimeHeaders; import javax.xml.soap.SOAPBody; import javax.xml.soap.SOAPConstants; import javax.xml.soap.SOAPElement; import javax.xml.soap.SOAPException; import javax.xml.soap.SOAPHeader; import javax.xml.soap.SOAPMessage; import javax.xml.validation.Schema; import javax.xml.validation.SchemaFactory; @@ -83,7 +90,6 @@ import org.opends.server.tools.SSLConnectionFactory; import org.opends.server.types.LDAPException; import org.opends.server.util.Base64; import org.w3c.dom.Document; import org.xml.sax.Attributes; import org.xml.sax.EntityResolver; @@ -131,7 +137,7 @@ private static Schema schema; /** Prevent multiple logging when trying to set unavailable/unsupported parser features */ private static AtomicBoolean logFeatureWarnings = new AtomicBoolean(false); private static final AtomicBoolean logFeatureWarnings = new AtomicBoolean(false); private String hostName; private Integer port; @@ -143,7 +149,7 @@ private String trustStorePasswordValue; private Boolean trustAll; private Boolean useHTTPAuthzID; private HashSet<String> exopStrings = new HashSet<>(); private final Set<String> exopStrings = new HashSet<>(); /** * This method will be called by the Servlet Container when @@ -155,33 +161,17 @@ */ @Override public void init(ServletConfig config) throws ServletException { try { hostName = config.getServletContext().getInitParameter(HOST); port = Integer.valueOf(config.getServletContext().getInitParameter(PORT)); userDN = config.getServletContext().getInitParameter(USERDN); userPassword = config.getServletContext().getInitParameter(USERPWD); useSSL = Boolean.valueOf( config.getServletContext().getInitParameter(USESSL)); useStartTLS = Boolean.valueOf( config.getServletContext().getInitParameter(USESTARTTLS)); trustStorePathValue = config.getServletContext().getInitParameter(TRUSTSTOREPATH); trustStorePasswordValue = config.getServletContext().getInitParameter(TRUSTSTOREPASSWORD); trustAll = Boolean.valueOf( config.getServletContext().getInitParameter(TRUSTALLCERTS)); useHTTPAuthzID = Boolean.valueOf( config.getServletContext().getInitParameter(USEHTTPAUTHZID)); hostName = stringValue(config, HOST); port = Integer.valueOf(stringValue(config, PORT)); userDN = stringValue(config, USERDN); userPassword = stringValue(config, USERPWD); useSSL = booleanValue(config, USESSL); useStartTLS = booleanValue(config, USESTARTTLS); trustStorePathValue = stringValue(config, TRUSTSTOREPATH); trustStorePasswordValue = stringValue(config, TRUSTSTOREPASSWORD); trustAll = booleanValue(config, TRUSTALLCERTS); useHTTPAuthzID = booleanValue(config, USEHTTPAUTHZID); /* * Find all the param-names matching the pattern: @@ -224,7 +214,15 @@ } } private boolean booleanValue(ServletConfig config, String paramName) { return Boolean.valueOf(stringValue(config, paramName)); } private String stringValue(ServletConfig config, String paramName) { return config.getServletContext().getInitParameter(paramName); } /** * Check if using the proxy authz control will work, by using it to read opendj-dsml-servlet/src/main/java/org/opends/dsml/protocol/ResultCodeFactory.java
@@ -11,7 +11,7 @@ * Header, with the fields enclosed by brackets [] replaced by your own identifying * information: "Portions Copyright [year] [name of copyright owner]". * * Copyright 2012-2015 ForgeRock AS. * Copyright 2012-2016 ForgeRock AS. */ package org.opends.dsml.protocol; @@ -23,7 +23,7 @@ */ public class ResultCodeFactory { static HashMap<Integer,LDAPResultCode> codeToDescr = new HashMap<>(); static final HashMap<Integer, LDAPResultCode> codeToDescr = new HashMap<>(); static { codeToDescr.put(0, LDAPResultCode.SUCCESS); opendj-server-legacy/src/main/java/org/opends/admin/ads/ReplicaDescriptor.java
@@ -12,25 +12,21 @@ * information: "Portions Copyright [year] [name of copyright owner]". * * Copyright 2007-2009 Sun Microsystems, Inc. * Portions Copyright 2013-2015 ForgeRock AS. * Portions Copyright 2013-2016 ForgeRock AS. */ package org.opends.admin.ads; import java.util.HashSet; import java.util.Set; /** * The object of this class represent a Replica (i.e. a suffix in a given * server). */ /** The object of this class represent a Replica (i.e. a suffix in a given server). */ public class ReplicaDescriptor { private SuffixDescriptor suffix; private int entries = -1; private ServerDescriptor server; private Set<String> replicationServers = new HashSet<>(); private final Set<String> replicationServers = new HashSet<>(); private int replicationId = -1; private int missingChanges = -1; private long ageOfOldestMissingChange = -1; opendj-server-legacy/src/main/java/org/opends/admin/ads/ServerDescriptor.java
@@ -46,7 +46,6 @@ import org.opends.admin.ads.util.ConnectionUtils; import org.opends.quicksetup.Constants; import org.opends.server.config.ConfigConstants; import org.opends.server.schema.SchemaConstants; import org.opends.server.types.HostPort; /** The object of this class represent an OpenDS server. */ @@ -1281,48 +1280,6 @@ } /** * Cleans up the contents of the ads truststore. * * @param ctx the bound instance. * @throws NamingException in case an error occurs while updating the * instance's ads-truststore via LDAP. */ public static void cleanAdsTrustStore(InitialLdapContext ctx) throws NamingException { try { SearchControls sc = new SearchControls(); sc.setSearchScope(SearchControls.ONELEVEL_SCOPE); sc.setReturningAttributes(new String[] { SchemaConstants.NO_ATTRIBUTES }); NamingEnumeration<SearchResult> ne = ctx.search(TRUSTSTORE_DN, "(objectclass=ds-cfg-instance-key)", sc); ArrayList<String> dnsToDelete = new ArrayList<>(); try { while (ne.hasMore()) { SearchResult sr = ne.next(); dnsToDelete.add(sr.getName()+","+TRUSTSTORE_DN); } } finally { ne.close(); } for (String dn : dnsToDelete) { ctx.destroySubcontext(dn); } } catch (NameNotFoundException nnfe) { // Ignore logger.warn(LocalizableMessage.raw("Error cleaning truststore: "+nnfe, nnfe)); } } /** * Returns the values of the ds-base-dn-entry count attributes for the given * backend monitor entry using the provided InitialLdapContext. * @param ctx the InitialLdapContext to use to update the configuration. opendj-server-legacy/src/main/java/org/opends/admin/ads/SubtreeDeleteControl.java
@@ -12,16 +12,14 @@ * information: "Portions Copyright [year] [name of copyright owner]". * * Copyright 2008-2009 Sun Microsystems, Inc. * Portions Copyright 2016 ForgeRock AS. */ package org.opends.admin.ads; import javax.naming.ldap.BasicControl; /** * This class implements the LDAP subtree delete control for JNDI. */ public class SubtreeDeleteControl extends BasicControl /** This class implements the LDAP subtree delete control for JNDI. */ class SubtreeDeleteControl extends BasicControl { /** * The serial version identifier required to satisfy the compiler @@ -32,9 +30,7 @@ */ static final long serialVersionUID = 3941576361457157921L; /** * Default constructor. */ /** Default constructor. */ public SubtreeDeleteControl() { super("1.2.840.113556.1.4.805"); opendj-server-legacy/src/main/java/org/opends/admin/ads/TopologyCacheException.java
@@ -12,15 +12,14 @@ * information: "Portions Copyright [year] [name of copyright owner]". * * Copyright 2008 Sun Microsystems, Inc. * Portions Copyright 2013-2015 ForgeRock AS. * Portions Copyright 2013-2016 ForgeRock AS. */ package org.opends.admin.ads; import org.opends.server.types.OpenDsException; import javax.naming.NamingException; import org.opends.admin.ads.util.ApplicationTrustManager; import org.opends.server.types.OpenDsException; /** * This class represents the Exception that can occur while reading server @@ -29,43 +28,26 @@ public class TopologyCacheException extends OpenDsException { private static final long serialVersionUID = 1709535837273360382L; private Type type; private String ldapUrl; private ApplicationTrustManager trustManager; private final Type type; private final String ldapUrl; private final ApplicationTrustManager trustManager; /** * Error type. */ /** Error type. */ public enum Type { /** * Error reading the ADS. */ /** Error reading the ADS. */ GENERIC_READING_ADS, /** * Creating connection to a particular server. */ /** Creating connection to a particular server. */ GENERIC_CREATING_CONNECTION, /** * Error reading the configuration of a particular server. */ /** Error reading the configuration of a particular server. */ GENERIC_READING_SERVER, /** * The DN provided in the DirContext of ADS is not of a global * administrator. */ /** The DN provided in the DirContext of ADS is not of a global administrator. */ NOT_GLOBAL_ADMINISTRATOR, /** * Not enough permissions to read the server configuration. */ /** Not enough permissions to read the server configuration. */ NO_PERMISSIONS, /** * Timeout reading the configuration of a particular server. */ /** Timeout reading the configuration of a particular server. */ TIMEOUT, /** * Unexpected error. */ /** Unexpected error. */ BUG } @@ -74,10 +56,12 @@ * ADSContextException occurs. * @param ace the exception which is the cause of this exception. */ public TopologyCacheException(ADSContextException ace) TopologyCacheException(ADSContextException ace) { super(ace); type = Type.GENERIC_READING_ADS; ldapUrl = null; trustManager = null; } /** @@ -89,6 +73,8 @@ { super(t); this.type = type; this.ldapUrl = null; this.trustManager = null; } /** opendj-server-legacy/src/main/java/org/opends/admin/ads/TopologyCacheFilter.java
@@ -12,7 +12,7 @@ * information: "Portions Copyright [year] [name of copyright owner]". * * Copyright 2008 Sun Microsystems, Inc. * Portions Copyright 2015 ForgeRock AS. * Portions Copyright 2015-2016 ForgeRock AS. */ package org.opends.admin.ads; @@ -27,7 +27,7 @@ */ public class TopologyCacheFilter { private Set<String> baseDNs = new HashSet<>(); private final Set<String> baseDNs = new HashSet<>(); private boolean searchMonitoringInformation = true; private boolean searchBaseDNInformation = true; @@ -86,15 +86,6 @@ } /** * Removes a base DN fom the list of baseDNs to search. * @param dn the DN of the base DN to be removed. */ public void removeBaseDNToSearch(String dn) { baseDNs.remove(dn); } /** * Returns the list of base DNs that will be searched for. If the list is * empty we will search for all the base DNs. * @return the list of base DNs we will search for. opendj-server-legacy/src/main/java/org/opends/admin/ads/util/ApplicationTrustManager.java
@@ -24,6 +24,7 @@ import java.security.cert.CertificateException; import java.security.cert.X509Certificate; import java.util.ArrayList; import java.util.List; import javax.naming.ldap.LdapName; import javax.naming.ldap.Rdn; @@ -66,15 +67,15 @@ private String lastRefusedAuthType; private X509Certificate[] lastRefusedChain; private Cause lastRefusedCause; private KeyStore keystore; private final KeyStore keystore; /** * The following ArrayList contain information about the certificates * explicitly accepted by the user. */ private ArrayList<X509Certificate[]> acceptedChains = new ArrayList<>(); private ArrayList<String> acceptedAuthTypes = new ArrayList<>(); private ArrayList<String> acceptedHosts = new ArrayList<>(); private final List<X509Certificate[]> acceptedChains = new ArrayList<>(); private final List<String> acceptedAuthTypes = new ArrayList<>(); private final List<String> acceptedHosts = new ArrayList<>(); private String host; opendj-server-legacy/src/main/java/org/opends/admin/ads/util/OpendsCertificateException.java
@@ -12,7 +12,7 @@ * information: "Portions Copyright [year] [name of copyright owner]". * * Copyright 2008 Sun Microsystems, Inc. * Portions Copyright 2015 ForgeRock AS. * Portions Copyright 2015-2016 ForgeRock AS. */ package org.opends.admin.ads.util; @@ -32,7 +32,7 @@ private static final long serialVersionUID = 1151044344529478436L; /** Private certificate chain. */ private X509Certificate[] chain; private final X509Certificate[] chain; // ------------------ // Constructor opendj-server-legacy/src/main/java/org/opends/admin/ads/util/PreferredConnection.java
@@ -38,8 +38,8 @@ START_TLS } private String ldapUrl; private Type type; private final String ldapUrl; private final Type type; /** * The constructor of the PreferredConnection. opendj-server-legacy/src/main/java/org/opends/admin/ads/util/TrustedSocketFactory.java
@@ -31,24 +31,24 @@ import javax.net.ssl.TrustManager; /** An implementation of SSLSocketFactory. */ public class TrustedSocketFactory extends SSLSocketFactory class TrustedSocketFactory extends SSLSocketFactory { private static Map<Thread, TrustManager> hmTrustManager = new HashMap<>(); private static Map<Thread, KeyManager> hmKeyManager = new HashMap<>(); private static final Map<Thread, TrustManager> hmTrustManager = new HashMap<>(); private static final Map<Thread, KeyManager> hmKeyManager = new HashMap<>(); private static Map<TrustManager, SocketFactory> hmDefaultFactoryTm = new HashMap<>(); private static Map<KeyManager, SocketFactory> hmDefaultFactoryKm = new HashMap<>(); private static final Map<TrustManager, SocketFactory> hmDefaultFactoryTm = new HashMap<>(); private static final Map<KeyManager, SocketFactory> hmDefaultFactoryKm = new HashMap<>(); private SSLSocketFactory innerFactory; private TrustManager trustManager; private KeyManager keyManager; private final TrustManager trustManager; private final KeyManager keyManager; /** * Constructor of the TrustedSocketFactory. * @param trustManager the trust manager to use. * @param keyManager the key manager to use. */ public TrustedSocketFactory(TrustManager trustManager, KeyManager keyManager) TrustedSocketFactory(TrustManager trustManager, KeyManager keyManager) { this.trustManager = trustManager; this.keyManager = keyManager; @@ -63,8 +63,7 @@ * @param keyManager * the key manager to use. */ public static synchronized void setCurrentThreadTrustManager( TrustManager trustManager, KeyManager keyManager) static synchronized void setCurrentThreadTrustManager(TrustManager trustManager, KeyManager keyManager) { setThreadTrustManager(trustManager, Thread.currentThread()); setThreadKeyManager (keyManager, Thread.currentThread()); @@ -75,8 +74,7 @@ * @param trustManager the trust manager to use. * @param thread the thread where we want to use the provided trust manager. */ public static synchronized void setThreadTrustManager( TrustManager trustManager, Thread thread) static synchronized void setThreadTrustManager(TrustManager trustManager, Thread thread) { TrustManager currentTrustManager = hmTrustManager.get(thread); if (currentTrustManager != null) { @@ -93,8 +91,7 @@ * @param keyManager the key manager to use. * @param thread the thread where we want to use the provided key manager. */ public static synchronized void setThreadKeyManager( KeyManager keyManager, Thread thread) static synchronized void setThreadKeyManager(KeyManager keyManager, Thread thread) { KeyManager currentKeyManager = hmKeyManager.get(thread); if (currentKeyManager != null) { opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ControlPanelLauncher.java
@@ -247,7 +247,7 @@ /** This occurs for instance when the authentication provided by the user is not valid. */ ERROR_READING_CONFIGURATION_WITH_LDAP(4); private int returnCode; private final int returnCode; private ErrorReturnCode(int returnCode) { this.returnCode = returnCode; opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/browser/AbstractNodeTask.java
@@ -25,8 +25,8 @@ */ public abstract class AbstractNodeTask implements Runnable { BasicNode node; boolean cancelled; private final BasicNode node; private boolean cancelled; /** * The constructor of the node searcher. opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/browser/NodeRefresher.java
@@ -21,6 +21,7 @@ import static org.opends.messages.AdminToolMessages.*; import java.util.ArrayList; import java.util.List; import java.util.Set; import javax.naming.InterruptedNamingException; @@ -77,15 +78,15 @@ FAILED } BrowserController controller; State state; boolean recursive; private final BrowserController controller; private State state; private final boolean recursive; SearchResult localEntry; SearchResult remoteEntry; private SearchResult localEntry; private SearchResult remoteEntry; LDAPURL remoteUrl; boolean isLeafNode; final ArrayList<SearchResult> childEntries = new ArrayList<>(); private boolean isLeafNode; private final List<SearchResult> childEntries = new ArrayList<>(); final boolean differential; Exception exception; Object exceptionArg; @@ -146,7 +147,7 @@ * Returns the child entries of the node. * @return the child entries of the node. */ public ArrayList<SearchResult> getChildEntries() { public List<SearchResult> getChildEntries() { return childEntries; } @@ -579,11 +580,9 @@ i = i + 1; } if (entry == null) { throw new SearchAbandonException( State.FAILED, lastException, lastExceptionArg); throw new SearchAbandonException(State.FAILED, lastException, lastExceptionArg); } else { if (url.getScope() != SearchScope.BASE_OBJECT) { // The URL is to be transformed: the code assumes that the URL points @@ -596,7 +595,6 @@ remoteUrl = url; remoteEntry = entry; } } /** * Tells whether the provided node must be automatically expanded or not. @@ -770,15 +768,12 @@ while (entries.hasMore()) { SearchResult r = entries.next(); String name; if (r.getName().length() == 0) { continue; } else { name = unquoteRelativeName(r.getName())+","+parentDn; } String name = unquoteRelativeName(r.getName()) + "," + parentDn; boolean add = false; if (useCustomFilter()) { @@ -916,7 +911,6 @@ private SearchResult searchManuallyEntry(InitialLdapContext ctx, String dn) throws NamingException { SearchResult sr = null; // Send an LDAP search SearchControls ctls = controller.getBasicSearchControls(); ctls.setSearchScope(SearchControls.OBJECT_SCOPE); @@ -926,6 +920,7 @@ controller.getObjectSearchFilter(), ctls); SearchResult sr = null; try { while (entries.hasMore()) @@ -1035,21 +1030,19 @@ * and the attribute 'ref' is present and <CODE>false</CODE> otherwise. * @throws NamingException if an error occurs. */ static boolean isReferralEntry(SearchResult entry) throws NamingException { boolean result = false; private static boolean isReferralEntry(SearchResult entry) throws NamingException { Set<String> ocValues = ConnectionUtils.getValues(entry, "objectClass"); if (ocValues != null) { for (String value : ocValues) { boolean isReferral = "referral".equalsIgnoreCase(value); if (isReferral) { result = ConnectionUtils.getFirstValue(entry, "ref") != null; break; return ConnectionUtils.getFirstValue(entry, "ref") != null; } } } return result; return false; } /** opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/browser/NodeSearcherQueue.java
@@ -18,6 +18,8 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.opends.guitools.controlpanel.ui.nodes.BasicNode; @@ -32,11 +34,11 @@ */ class NodeSearcherQueue implements Runnable { private String name; private ArrayList<AbstractNodeTask> waitingQueue = new ArrayList<>(); private HashMap<BasicNode, AbstractNodeTask> workingList = new HashMap<>(); private HashMap<BasicNode, BasicNode> cancelList = new HashMap<>(); private ThreadGroup threadGroup; private final String name; private final List<AbstractNodeTask> waitingQueue = new ArrayList<>(); private final Map<BasicNode, AbstractNodeTask> workingList = new HashMap<>(); private final Map<BasicNode, BasicNode> cancelList = new HashMap<>(); private final ThreadGroup threadGroup; /** opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/browser/SearchAbandonException.java
@@ -12,21 +12,20 @@ * information: "Portions Copyright [year] [name of copyright owner]". * * Copyright 2008 Sun Microsystems, Inc. * Portions Copyright 2016 ForgeRock AS. */ package org.opends.guitools.controlpanel.browser; /** * The exception used by the NodeRefresher when the refresh process is * cancelled, interrupted or something failed. * */ class SearchAbandonException extends Exception { private static final long serialVersionUID = 7768798649278383859L; private NodeRefresher.State state; private Exception x; private Object arg; private final NodeRefresher.State state; private final Exception x; private final Object arg; /** * The constructor for the class. opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/datamodel/BasicMonitoringAttributes.java
@@ -175,9 +175,8 @@ } } private LocalizableMessage msg; private String attributeName; private boolean isAborted; private final LocalizableMessage msg; private final String attributeName; private boolean isNumeric; private boolean isGMTDate; private boolean isValueInBytes; @@ -203,12 +202,6 @@ } @Override public boolean isAborted() { return isAborted; } @Override public boolean isNumeric() { return isNumeric; @@ -246,8 +239,6 @@ private void calculateProperties() { isAborted = attributeName.indexOf("ds-mon-aborted-") == 0; canHaveAverage = attributeName.endsWith("total-count") || attributeName.endsWith("Requests") || attributeName.endsWith("Responses") || opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/datamodel/CustomSearchResult.java
@@ -54,7 +54,7 @@ */ public class CustomSearchResult implements Comparable<CustomSearchResult> { private String dn; private final String dn; private Map<String, List<Object>> attributes; private SortedSet<String> attrNames; private String toString; @@ -190,21 +190,6 @@ return toString().compareTo(o.toString()); } /** * Return a new object, copy of the current object. * * @return a new object, copy of the current object */ public CustomSearchResult duplicate() { CustomSearchResult sr = new CustomSearchResult(dn); sr.attributes = new HashMap<>(attributes); sr.attrNames = new TreeSet<>(attrNames); sr.toString = toString; sr.hashCode = hashCode; return sr; } @Override public boolean equals(Object o) { opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/datamodel/DatabaseMonitoringTableModel.java
@@ -21,6 +21,7 @@ import java.util.Comparator; import java.util.HashSet; import java.util.LinkedHashSet; import java.util.List; import java.util.Set; import java.util.TreeSet; @@ -34,15 +35,15 @@ public class DatabaseMonitoringTableModel extends SortableTableModel implements Comparator<BackendDescriptor> { private static final long serialVersionUID = 548035716525600536L; private Set<BackendDescriptor> data = new HashSet<>(); private ArrayList<String[]> dataArray = new ArrayList<>(); private final Set<BackendDescriptor> data = new HashSet<>(); private final List<String[]> dataArray = new ArrayList<>(); private String[] columnNames = {}; private LocalizableMessage NO_VALUE_SET = INFO_CTRL_PANEL_NO_MONITORING_VALUE.get(); private LocalizableMessage NOT_IMPLEMENTED = INFO_CTRL_PANEL_NOT_IMPLEMENTED.get(); private final LocalizableMessage NO_VALUE_SET = INFO_CTRL_PANEL_NO_MONITORING_VALUE.get(); private final LocalizableMessage NOT_IMPLEMENTED = INFO_CTRL_PANEL_NOT_IMPLEMENTED.get(); /** The fields to be displayed. */ private LinkedHashSet<String> attributes = new LinkedHashSet<>(); private final Set<String> attributes = new LinkedHashSet<>(); /** The sort column of the table. */ private int sortColumn; /** Whether the sorting is ascending or descending. */ @@ -195,7 +196,7 @@ * Sets the fields displayed by this table model. * @param fields the statistic fields displayed by this table model. */ public void setAttributes(LinkedHashSet<String> fields) public void setAttributes(Set<String> fields) { this.attributes.clear(); this.attributes.addAll(fields); @@ -274,7 +275,7 @@ * @param backend the backend. * @return the label to be used for the provided backend. */ protected String getName(BackendDescriptor backend) private String getName(BackendDescriptor backend) { return backend.getBackendID(); } @@ -285,7 +286,7 @@ * @return the monitoring entry associated with the provided backend. Returns * <CODE>null</CODE> if there is no monitoring entry associated. */ protected CustomSearchResult getMonitoringEntry(BackendDescriptor backend) private CustomSearchResult getMonitoringEntry(BackendDescriptor backend) { return backend.getMonitoringEntry(); } @@ -311,5 +312,4 @@ } return line; } } opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/datamodel/MonitoringAttributes.java
@@ -12,7 +12,7 @@ * information: "Portions Copyright [year] [name of copyright owner]". * * Copyright 2008-2009 Sun Microsystems, Inc. * Portions Copyright 2014-2015 ForgeRock AS. * Portions Copyright 2014-2016 ForgeRock AS. */ package org.opends.guitools.controlpanel.datamodel; @@ -39,13 +39,6 @@ String getAttributeName(); /** * Tells whether this is the number of aborted operations. * @return <CODE>true</CODE> if this corresponds to the number of aborted * operations and <CODE>false</CODE> otherwise. */ boolean isAborted(); /** * Return whether this attribute contains a numeric value or not. * @return <CODE>true</CODE> if the value is numeric and <CODE>false</CODE> * otherwise. opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/event/MoveEvent.java
File was deleted opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/event/MoveListener.java
File was deleted opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/task/StartStopTask.java
@@ -19,17 +19,18 @@ import java.util.ArrayList; import java.util.Collection; import java.util.HashSet; import java.util.List; import java.util.Set; import org.forgerock.i18n.LocalizableMessage; import org.opends.guitools.controlpanel.datamodel.BackendDescriptor; import org.opends.guitools.controlpanel.datamodel.ControlPanelInfo; import org.opends.guitools.controlpanel.ui.ProgressDialog; import org.forgerock.i18n.LocalizableMessage; /** An abstract class used to re-factor some code between the start, stop and restart tasks. */ public abstract class StartStopTask extends Task abstract class StartStopTask extends Task { Set<String> backendSet; private final Set<String> backendSet; /** * Constructor of the task. @@ -46,7 +47,6 @@ { backendSet.add(backend.getBackendID()); } } @Override @@ -80,11 +80,8 @@ getInfo().stopPooling(); getInfo().regenerateDescriptor(); ArrayList<String> arguments = getCommandLineArguments(); String[] args = new String[arguments.size()]; arguments.toArray(args); List<String> arguments = getCommandLineArguments(); String[] args = arguments.toArray(new String[arguments.size()]); returnCode = executeCommandLine(getCommandLinePath(), args); postCommandLine(); @@ -109,13 +106,6 @@ */ protected void postCommandLine() { if (returnCode != 0) { state = State.FINISHED_WITH_ERROR; } else { state = State.FINISHED_SUCCESSFULLY; } state = returnCode != 0 ? State.FINISHED_WITH_ERROR : State.FINISHED_SUCCESSFULLY; } } opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/task/Task.java
@@ -161,11 +161,11 @@ * a bug, because of the way the contents of logs is updated, using * StringBuffer instead of StringBuilder is required. */ protected StringBuffer logs = new StringBuffer(); private StringBuffer logs = new StringBuffer(); /** The error logs of the task. */ protected StringBuilder errorLogs = new StringBuilder(); private StringBuilder errorLogs = new StringBuilder(); /** The standard output logs of the task. */ protected StringBuilder outputLogs = new StringBuilder(); private StringBuilder outputLogs = new StringBuilder(); /** The print stream for the error logs. */ protected ApplicationPrintStream errorPrintStream = new ApplicationPrintStream(); @@ -178,7 +178,7 @@ * start server task, the process generated executing the start-ds * command-line. */ protected Process process; private Process process; private ControlPanelInfo info; private ServerDescriptor server; opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/AbstractBackendIndexesPanel.java
@@ -47,17 +47,17 @@ * 'Manage Indexes...' dialog when the user clicks on 'Indexes' or * 'VLV Indexes'. */ public abstract class AbstractBackendIndexesPanel extends StatusGenericPanel abstract class AbstractBackendIndexesPanel extends StatusGenericPanel { private static final long serialVersionUID = 2702054131388877743L; private String backendName; /** The table model. */ protected AbstractIndexTableModel tableModel; /** The table contained by this panel. */ protected JTable table; private JTable table; /** The scroll pane that contains the table. */ protected JScrollPane tableScroll; private Set<IndexSelectionListener> indexListeners = new HashSet<>(); private JScrollPane tableScroll; private final Set<IndexSelectionListener> indexListeners = new HashSet<>(); private int lastRowMouseOver = -1; /** Default constructor. */ @@ -83,7 +83,7 @@ * backend. * @param backendName the backend name. */ public void update(String backendName) void update(String backendName) { this.backendName = backendName; opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/AbstractIndexPanel.java
@@ -89,18 +89,13 @@ /** Name of the index label. */ final JLabel name = Utilities.createDefaultLabel(); /** Backends label. */ final JLabel lBackend = Utilities.createPrimaryLabel(INFO_CTRL_PANEL_BACKEND_LABEL.get()); private final JLabel lBackend = Utilities.createPrimaryLabel(INFO_CTRL_PANEL_BACKEND_LABEL.get()); /** Read-only backend name label. */ final JLabel backendName = Utilities.createDefaultLabel(); final JLabel lAttribute = Utilities.createPrimaryLabel(INFO_CTRL_PANEL_ATTRIBUTE_LABEL.get()); final JLabel lEntryLimit = Utilities.createPrimaryLabel(INFO_CTRL_PANEL_ENTRY_LIMIT_LABEL.get()); final JTextField entryLimit = Utilities.createShortTextField(); final JLabel lType = Utilities.createPrimaryLabel(INFO_CTRL_PANEL_INDEX_TYPE_LABEL.get()); /** Panel containing all the index types. */ final JPanel typesPanel = new JPanel(new GridBagLayout()); @@ -118,7 +113,7 @@ /** Array of checkboxes. */ final JCheckBox[] types = { approximate, equality, ordering, presence, substring }; /** Array of index types that matches the array of checkboxes (types). */ final IndexType[] configTypes = { APPROXIMATE, EQUALITY, ORDERING, PRESENCE, SUBSTRING }; private final IndexType[] configTypes = { APPROXIMATE, EQUALITY, ORDERING, PRESENCE, SUBSTRING }; final JButton deleteIndex = Utilities.createButton(INFO_CTRL_PANEL_DELETE_INDEX_LABEL.get()); final JButton saveChanges = Utilities.createButton(INFO_CTRL_PANEL_SAVE_CHANGES_LABEL.get()); opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/BrowseGeneralMonitoringPanel.java
@@ -26,6 +26,7 @@ import java.awt.Insets; import java.awt.Window; import java.util.HashMap; import java.util.Map; import java.util.Objects; import javax.swing.ImageIcon; @@ -41,6 +42,8 @@ import javax.swing.tree.DefaultTreeModel; import javax.swing.tree.TreePath; import org.forgerock.i18n.LocalizableMessage; import org.forgerock.i18n.LocalizableMessageBuilder; import org.opends.guitools.controlpanel.browser.IconPool; import org.opends.guitools.controlpanel.datamodel.ControlPanelInfo; import org.opends.guitools.controlpanel.datamodel.ServerDescriptor; @@ -50,11 +53,9 @@ import org.opends.guitools.controlpanel.ui.renderer.TreeCellRenderer; import org.opends.guitools.controlpanel.util.Utilities; import org.opends.guitools.controlpanel.util.ViewPositions; import org.forgerock.i18n.LocalizableMessage; import org.forgerock.i18n.LocalizableMessageBuilder; /** The pane that is displayed when the user clicks on 'General Monitoring'. */ public class BrowseGeneralMonitoringPanel extends StatusGenericPanel class BrowseGeneralMonitoringPanel extends StatusGenericPanel { private static final long serialVersionUID = 6462914563746678830L; @@ -69,9 +70,9 @@ private boolean ignoreSelectionEvents; private LocalizableMessage NO_ELEMENT_SELECTED = private final LocalizableMessage NO_ELEMENT_SELECTED = INFO_CTRL_PANEL_GENERAL_MONITORING_NO_ITEM_SELECTED.get(); private LocalizableMessage MULTIPLE_ITEMS_SELECTED = private final LocalizableMessage MULTIPLE_ITEMS_SELECTED = INFO_CTRL_PANEL_MULTIPLE_ITEMS_SELECTED_LABEL.get(); /** The enumeration used to define the different static nodes of the tree. */ @@ -94,7 +95,7 @@ } /** The panel displaying the informations about the selected node. */ protected GeneralMonitoringRightPanel entryPane; private GeneralMonitoringRightPanel entryPane; /** Default constructor. */ public BrowseGeneralMonitoringPanel() @@ -225,7 +226,7 @@ } }); JTree tree = treePane.getTree(); repopulateTree(tree, true); repopulateTree(tree); tree.setRootVisible(true); tree.setVisibleRowCount(20); tree.expandPath(new TreePath(getRoot(tree))); @@ -273,7 +274,7 @@ // Repopulate the tree to display a root node with server information if (!serverName.equals(lastServerName)) { repopulateTree(treePane.getTree(), false); repopulateTree(treePane.getTree()); lastServerName = serverName; } if (firstTimeCalled) @@ -353,9 +354,8 @@ * Populates the tree. Should be called only once since the tree in this * panel is static. * @param tree the tree to be repopulated. * @param forceScroll whether the scroll must be reset or not. */ private void repopulateTree(JTree tree, boolean forceScroll) private void repopulateTree(JTree tree) { ignoreSelectionEvents = true; @@ -445,33 +445,7 @@ { GeneralMonitoringTreeNode node = (GeneralMonitoringTreeNode)path.getLastPathComponent(); NodeType type = (NodeType)node.getIdentifier(); switch (type) { case ROOT: entryPane.updateRoot(); break; case SYSTEM_INFORMATION: entryPane.updateSystemInformation(); break; case WORK_QUEUE: entryPane.updateWorkQueue(); break; case ENTRY_CACHES: entryPane.updateEntryCaches(); break; case JE_DATABASES_INFORMATION: entryPane.updateJEDatabaseInformation(); break; case PDB_DATABASES_INFORMATION: entryPane.updatePDBDatbaseInformation(); break; case JAVA_INFORMATION: entryPane.updateJavaInformation(); break; default: throw new RuntimeException("Unknown node type: "+type); } entryPane.update((NodeType) node.getIdentifier()); } else if (paths != null && paths.length > 1) { @@ -506,7 +480,7 @@ && !Objects.equals(lastServer.getWorkQueueMonitor(), desc.getWorkQueueMonitor()); } private HashMap<Object, ImageIcon> hmImages = new HashMap<>(); private final Map<Object, ImageIcon> hmImages = new HashMap<>(); { NodeType[] identifiers = { NodeType.ROOT, @@ -547,7 +521,7 @@ } /** Specific class used to render the nodes in the tree. It uses specific icons for the nodes. */ protected class GeneralMonitoringTreeCellRenderer extends TreeCellRenderer private class GeneralMonitoringTreeCellRenderer extends TreeCellRenderer { private static final long serialVersionUID = -3390566664259441766L; opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/ColorAndFontConstants.java
@@ -14,10 +14,8 @@ * Copyright 2008-2010 Sun Microsystems, Inc. * Portions Copyright 2014-2016 ForgeRock AS. */ package org.opends.guitools.controlpanel.ui; import static com.forgerock.opendj.util.OperatingSystem.isWindows; import static com.forgerock.opendj.util.OperatingSystem.isMacOS; @@ -127,7 +125,7 @@ public static final Color mouseOverBackground = UIManager.getColor("TextField.selectionBackground"); /** Text color indicating that a field is valid. */ public static final Color validFontColor = foreground; static final Color validFontColor = foreground; /** * The color of the text when the mouse is over (this is used in some @@ -164,8 +162,7 @@ public static final Font headerFont = UIManager.getFont("TableHeader.font").deriveFont(Font.BOLD); /** The font to be used in the title of the error panes. */ public static final Font errorTitleFont = defaultFont.deriveFont(Font.BOLD).deriveFont(13f); static final Font errorTitleFont = defaultFont.deriveFont(Font.BOLD).deriveFont(13f); /** The font to be used in the CategoryButton component. */ public static final Font categoryFont = UIManager.getFont("Label.font").deriveFont(Font.BOLD); @@ -182,14 +179,12 @@ public static final Font titleFont = defaultFont.deriveFont(Font.BOLD).deriveFont(14f); /** Text color indicating that a field is not valid. */ public static final Color invalidFontColor = Color.red; static final Color invalidFontColor = Color.red; /** The font to be used when the field associated with a primary label is not valid. */ public static final Font primaryInvalidFont = static final Font primaryInvalidFont = primaryFont.deriveFont(Font.ITALIC); /** The font to be used when the field associated with a normal label is not valid. */ public static final Font invalidFont = defaultFont.deriveFont(Font.ITALIC); static final Font invalidFont = defaultFont.deriveFont(Font.ITALIC); /** The font to be used in the progress dialog's 'Details' section. */ public static final Font progressFont = UIManager.getFont("EditorPane.font"); /** Specifies the font for the command-line output in the detail panel. */ public static final Font outputFont = Font.decode("Monospaced-PLAIN-12"); } opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/ConfirmInitializeAndImportDialog.java
File was deleted opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/DatabaseMonitoringPanel.java
@@ -12,7 +12,7 @@ * information: "Portions Copyright [year] [name of copyright owner]". * * Copyright 2009-2010 Sun Microsystems, Inc. * Portions Copyright 2015 ForgeRock AS. * Portions Copyright 2015-2016 ForgeRock AS. */ package org.opends.guitools.controlpanel.ui; @@ -44,7 +44,7 @@ import org.opends.server.util.ServerConstants; /** The panel displaying the database monitoring filtered attributes. */ public class DatabaseMonitoringPanel extends GeneralMonitoringPanel class DatabaseMonitoringPanel extends GeneralMonitoringPanel { private static final long serialVersionUID = 9031734563723229830L; @@ -54,8 +54,8 @@ private JLabel noDBsFound; private JLabel noMonitoringFound; private JButton showFields; private LinkedHashSet<String> attributes = new LinkedHashSet<>(); private LinkedHashSet<String> allAttributes = new LinkedHashSet<>(); private Set<String> attributes = new LinkedHashSet<>(); private final LinkedHashSet<String> allAttributes = new LinkedHashSet<>(); private MonitoringAttributesViewPanel<String> fieldsViewPanel; private GenericDialog fieldsViewDlg; @@ -65,7 +65,7 @@ * Default constructor. * @param type the type of pluggable backend. */ public DatabaseMonitoringPanel(BackendDescriptor.PluggableType type) DatabaseMonitoringPanel(BackendDescriptor.PluggableType type) { pluggableType = type; createLayout(); @@ -137,7 +137,7 @@ setBorder(PANEL_BORDER); } /** Updates the contents of the panel. The code assumes that this is being called from the event thread. */ @Override public void updateContents() { boolean backendsFound = false; @@ -217,7 +217,7 @@ } } private void setFieldsToDisplay(LinkedHashSet<String> attributes) private void setFieldsToDisplay(Set<String> attributes) { this.attributes = attributes; tableModel.setAttributes(attributes); opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/DeleteBaseDNPanel.java
@@ -46,6 +46,7 @@ import org.forgerock.i18n.LocalizableMessage; import org.forgerock.i18n.LocalizableMessageBuilder; import org.forgerock.opendj.ldap.DN; import org.opends.guitools.controlpanel.datamodel.BackendDescriptor; import org.opends.guitools.controlpanel.datamodel.BaseDNDescriptor; import org.opends.guitools.controlpanel.datamodel.ServerDescriptor; @@ -54,22 +55,21 @@ import org.opends.guitools.controlpanel.task.Task; import org.opends.guitools.controlpanel.ui.renderer.CustomListCellRenderer; import org.opends.guitools.controlpanel.util.Utilities; import org.forgerock.opendj.ldap.DN; /** * The panel displayed when the user clicks on 'Delete Base DN...' in the * browse entries dialog. */ public class DeleteBaseDNPanel extends StatusGenericPanel class DeleteBaseDNPanel extends StatusGenericPanel { private static final long serialVersionUID = 2182662824496761087L; /** The list containing the base DNs. */ protected JList list; /** Label indicating that no element was found. */ protected JLabel lNoElementsFound; private JLabel lNoElementsFound; /** The main panel. */ protected JPanel mainPanel; private JPanel mainPanel; /** Default constructor. */ public DeleteBaseDNPanel() opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/EntryCachesMonitoringPanel.java
@@ -33,22 +33,23 @@ import static org.opends.guitools.controlpanel.datamodel.BasicMonitoringAttributes.*; import static org.opends.guitools.controlpanel.util.Utilities.*; import static org.opends.messages.AdminToolMessages.*; /** The panel displaying the entry caches monitor panel. */ public class EntryCachesMonitoringPanel extends GeneralMonitoringPanel class EntryCachesMonitoringPanel extends GeneralMonitoringPanel { private static final long serialVersionUID = 9031734563700069830L; private static List<MonitoringAttributes> ngOperations = CollectionUtils.<MonitoringAttributes> newArrayList( private static final List<MonitoringAttributes> ngOperations = CollectionUtils.<MonitoringAttributes> newArrayList( ENTRY_CACHE_TRIES, ENTRY_CACHE_HITS, ENTRY_CACHE_HIT_RATIO, CURRENT_ENTRY_CACHE_SIZE, MAX_ENTRY_CACHE_SIZE, CURRENT_ENTRY_CACHE_COUNT, MAX_ENTRY_CACHE_COUNT); private ArrayList<JLabel> monitoringLabels = new ArrayList<>(); private final List<JLabel> monitoringLabels = new ArrayList<>(); { for (int i=0; i<ngOperations.size(); i++) { monitoringLabels.add(Utilities.createDefaultLabel()); } } private ArrayList<JLabel> labels = new ArrayList<>(); private final List<JLabel> labels = new ArrayList<>(); { for (int i=0; i<ngOperations.size(); i++) { @@ -114,7 +115,7 @@ setBorder(PANEL_BORDER); } /** Updates the contents of the panel. */ @Override public void updateContents() { ServerDescriptor server = null; opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/ErrorPanel.java
File was deleted opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/GeneralMonitoringPanel.java
@@ -21,27 +21,28 @@ import javax.swing.border.Border; import javax.swing.border.EmptyBorder; import org.opends.guitools.controlpanel.event.ConfigurationChangeEvent; import org.forgerock.i18n.LocalizableMessage; import org.opends.guitools.controlpanel.event.ConfigurationChangeEvent; /** * Abstract class used to refactor some code among the panels that display the * contents of the global monitoring. */ public abstract class GeneralMonitoringPanel extends StatusGenericPanel abstract class GeneralMonitoringPanel extends StatusGenericPanel { private static final long serialVersionUID = 2840755228290832143L; /** The empty border shared by all the panels. */ protected Border PANEL_BORDER = new EmptyBorder(10, 10, 10, 10); protected final Border PANEL_BORDER = new EmptyBorder(10, 10, 10, 10); /** The message to express that the value was not found. */ protected static LocalizableMessage NO_VALUE_SET = protected final static LocalizableMessage NO_VALUE_SET = INFO_CTRL_PANEL_NO_MONITORING_VALUE.get(); @Override public void configurationChanged(ConfigurationChangeEvent ev) { // no-op } @Override @@ -53,5 +54,9 @@ @Override public void okClicked() { // no-op } /** Updates the contents of the panel. */ public abstract void updateContents(); } opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/GeneralMonitoringRightPanel.java
@@ -25,28 +25,31 @@ import javax.swing.JPanel; import org.forgerock.i18n.LocalizableMessage; import org.opends.guitools.controlpanel.datamodel.BackendDescriptor; import org.opends.guitools.controlpanel.datamodel.ControlPanelInfo; import org.opends.guitools.controlpanel.event.ConfigurationChangeEvent; import org.opends.guitools.controlpanel.ui.BrowseGeneralMonitoringPanel.NodeType; import org.opends.guitools.controlpanel.util.Utilities; import org.forgerock.i18n.LocalizableMessage; /** The panel on the right of the 'General Information' panel. */ public class GeneralMonitoringRightPanel extends StatusGenericPanel class GeneralMonitoringRightPanel extends StatusGenericPanel { private static final long serialVersionUID = -4197460101279681042L; /** The panel with a CardLayout that contains all the panels. */ protected JPanel mainPanel; private JPanel mainPanel; private RootMonitoringPanel rootPanel = new RootMonitoringPanel(); private WorkQueueMonitoringPanel workQueuePanel = new WorkQueueMonitoringPanel(); private EntryCachesMonitoringPanel entryCachesPanel = new EntryCachesMonitoringPanel(); private DatabaseMonitoringPanel jeMonitoringPanel = new DatabaseMonitoringPanel(BackendDescriptor.PluggableType.JE); private DatabaseMonitoringPanel pdbMonitoringPanel = new DatabaseMonitoringPanel(BackendDescriptor.PluggableType.PDB); private SystemInformationMonitoringPanel systemInformationPanel = new SystemInformationMonitoringPanel(); private JavaInformationMonitoringPanel javaInformationPanel = new JavaInformationMonitoringPanel(); private final RootMonitoringPanel rootPanel = new RootMonitoringPanel(); private final WorkQueueMonitoringPanel workQueuePanel = new WorkQueueMonitoringPanel(); private final EntryCachesMonitoringPanel entryCachesPanel = new EntryCachesMonitoringPanel(); private final DatabaseMonitoringPanel jeMonitoringPanel = new DatabaseMonitoringPanel( BackendDescriptor.PluggableType.JE); private final DatabaseMonitoringPanel pdbMonitoringPanel = new DatabaseMonitoringPanel( BackendDescriptor.PluggableType.PDB); private final SystemInformationMonitoringPanel systemInformationPanel = new SystemInformationMonitoringPanel(); private final JavaInformationMonitoringPanel javaInformationPanel = new JavaInformationMonitoringPanel(); private static final String rootPanelTitle = "RootMonitoringPanel"; private static final String workQueuePanelTitle = "WorkQueueMonitoringPanel"; @@ -57,7 +60,7 @@ private static final String javaInformationPanelTitle = "JavaInformationMonitoringPanel"; /** The panel used to update messages. */ protected NoItemSelectedPanel noEntryPanel = new NoItemSelectedPanel(); private final NoItemSelectedPanel noEntryPanel = new NoItemSelectedPanel(); private static final String noEntryPanelTitle = "JavaInformationMonitoringPanel"; private final StatusGenericPanel[] panels = @@ -100,7 +103,7 @@ } /** Creates the layout of the panel (but the contents are not populated here). */ protected void createLayout() private void createLayout() { GridBagConstraints gbc = new GridBagConstraints(); CardLayout cardLayout = new CardLayout(); @@ -156,55 +159,42 @@ @Override public void configurationChanged(ConfigurationChangeEvent ev) { // no-op } /** Updates the contents of the panel with the root monitoring information. */ public void updateRoot() void update(NodeType type) { rootPanel.updateContents(); ((CardLayout)mainPanel.getLayout()).show(mainPanel, rootPanelTitle); } /** Updates the contents of the panel with the system information monitoring. */ public void updateSystemInformation() switch (type) { systemInformationPanel.updateContents(); ((CardLayout)mainPanel.getLayout()).show(mainPanel, systemInformationPanelTitle); case ROOT: update(rootPanel, rootPanelTitle); break; case SYSTEM_INFORMATION: update(systemInformationPanel, systemInformationPanelTitle); break; case WORK_QUEUE: update(workQueuePanel, workQueuePanelTitle); break; case ENTRY_CACHES: update(entryCachesPanel, entryCachesPanelTitle); break; case JE_DATABASES_INFORMATION: update(jeMonitoringPanel, jeMonitoringPanelTitle); break; case PDB_DATABASES_INFORMATION: update(pdbMonitoringPanel, pdbMonitoringPanelTitle); break; case JAVA_INFORMATION: update(javaInformationPanel, javaInformationPanelTitle); break; default: throw new RuntimeException("Unknown node type: " + type); } } /** Updates the contents of the panel with the work queue monitoring information. */ public void updateWorkQueue() private void update(GeneralMonitoringPanel panel, String panelTitle) { workQueuePanel.updateContents(); ((CardLayout)mainPanel.getLayout()).show(mainPanel, workQueuePanelTitle); panel.updateContents(); ((CardLayout) mainPanel.getLayout()).show(mainPanel, panelTitle); } /** Updates the contents of the panel with the entry caches monitoring information. */ public void updateEntryCaches() { entryCachesPanel.updateContents(); ((CardLayout)mainPanel.getLayout()).show(mainPanel, entryCachesPanelTitle); } /** Updates the contents of the panel with the je database monitoring information. */ public void updateJEDatabaseInformation() { jeMonitoringPanel.updateContents(); ((CardLayout)mainPanel.getLayout()).show(mainPanel, jeMonitoringPanelTitle); } /** Updates the contents of the panel with the pdb database monitoring information. */ public void updatePDBDatbaseInformation() { pdbMonitoringPanel.updateContents(); ((CardLayout)mainPanel.getLayout()).show(mainPanel, pdbMonitoringPanelTitle); } /** Updates the contents of the panel with the JAVA information. */ public void updateJavaInformation() { javaInformationPanel.updateContents(); ((CardLayout)mainPanel.getLayout()).show(mainPanel, javaInformationPanelTitle); } } opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/JavaInformationMonitoringPanel.java
@@ -40,6 +40,7 @@ import org.opends.guitools.controlpanel.datamodel.ServerDescriptor; import org.opends.guitools.controlpanel.ui.components.BasicExpander; import org.opends.guitools.controlpanel.util.Utilities; import org.opends.server.util.CollectionUtils; import static org.opends.guitools.controlpanel.util.Utilities.*; import static org.opends.messages.AdminToolMessages.*; @@ -49,23 +50,20 @@ public class JavaInformationMonitoringPanel extends GeneralMonitoringPanel { private static final long serialVersionUID = 9031734563799969830L; private List<BasicMonitoringAttributes> generalAttributes = new ArrayList<>(); { generalAttributes.add(BasicMonitoringAttributes.JVM_VERSION); generalAttributes.add(BasicMonitoringAttributes.JVM_VENDOR); generalAttributes.add(BasicMonitoringAttributes.JVM_ARCHITECTURE); generalAttributes.add(BasicMonitoringAttributes.JVM_ARGUMENTS); generalAttributes.add(BasicMonitoringAttributes.CLASS_PATH); generalAttributes.add(BasicMonitoringAttributes.JAVA_VERSION); generalAttributes.add(BasicMonitoringAttributes.JAVA_VENDOR); } private List<BasicMonitoringAttributes> extraAttributes = new ArrayList<>(); { extraAttributes.add(BasicMonitoringAttributes.CLASS_PATH); extraAttributes.add(BasicMonitoringAttributes.JAVA_VERSION); extraAttributes.add(BasicMonitoringAttributes.JAVA_VENDOR); } private ArrayList<JComponent> generalMonitoringComps = new ArrayList<>(); private final List<BasicMonitoringAttributes> generalAttributes = CollectionUtils.newArrayList( BasicMonitoringAttributes.JVM_VERSION, BasicMonitoringAttributes.JVM_VENDOR, BasicMonitoringAttributes.JVM_ARCHITECTURE, BasicMonitoringAttributes.JVM_ARGUMENTS, BasicMonitoringAttributes.CLASS_PATH, BasicMonitoringAttributes.JAVA_VERSION, BasicMonitoringAttributes.JAVA_VENDOR); private final List<BasicMonitoringAttributes> extraAttributes = CollectionUtils.newArrayList( BasicMonitoringAttributes.CLASS_PATH, BasicMonitoringAttributes.JAVA_VERSION, BasicMonitoringAttributes.JAVA_VENDOR); private final List<JComponent> generalMonitoringComps = new ArrayList<>(); { for (int i=0; i<generalAttributes.size(); i++) { @@ -86,8 +84,8 @@ } } private List<String> memoryAttributes = new ArrayList<>(); private List<JLabel> memoryLabels = new ArrayList<>(); private final List<String> memoryAttributes = new ArrayList<>(); private final List<JLabel> memoryLabels = new ArrayList<>(); private JPanel memoryPanel; /** Default constructor. */ @@ -270,7 +268,7 @@ setBorder(PANEL_BORDER); } /** Updates the contents of the panel. */ @Override public void updateContents() { ServerDescriptor server = null; opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/RootMonitoringPanel.java
@@ -36,16 +36,16 @@ import static org.opends.messages.BackendMessages.*; /** The panel displaying the root monitor panel. */ public class RootMonitoringPanel extends GeneralMonitoringPanel class RootMonitoringPanel extends GeneralMonitoringPanel { private static final long serialVersionUID = 9031734563746269830L; private JLabel openConnections = Utilities.createDefaultLabel(); private JLabel maxConnections = Utilities.createDefaultLabel(); private JLabel totalConnections = Utilities.createDefaultLabel(); private JLabel startTime = Utilities.createDefaultLabel(); private JLabel upTime = Utilities.createDefaultLabel(); private JLabel version = Utilities.createDefaultLabel(); private final JLabel openConnections = Utilities.createDefaultLabel(); private final JLabel maxConnections = Utilities.createDefaultLabel(); private final JLabel totalConnections = Utilities.createDefaultLabel(); private final JLabel startTime = Utilities.createDefaultLabel(); private final JLabel upTime = Utilities.createDefaultLabel(); private final JLabel version = Utilities.createDefaultLabel(); /** Default constructor. */ public RootMonitoringPanel() @@ -119,7 +119,7 @@ setBorder(PANEL_BORDER); } /** Updates the contents of the panel. */ @Override public void updateContents() { ServerDescriptor server = null; opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/StatusGenericPanel.java
@@ -225,6 +225,7 @@ */ public void toBeDisplayed(final boolean visible) { // to be overridden } /** @@ -2110,7 +2111,7 @@ * @param monitoringEntry * the monitoring entry containing the information to be displayed. */ protected void updateMonitoringInfo(final List<MonitoringAttributes> monitoringAttrs, protected void updateMonitoringInfo(final List<? extends MonitoringAttributes> monitoringAttrs, final List<JLabel> monitoringLabels, final CustomSearchResult monitoringEntry) { for (int i = 0; i < monitoringAttrs.size(); i++) opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/SystemInformationMonitoringPanel.java
@@ -26,17 +26,17 @@ import javax.swing.Box; import javax.swing.JLabel; import org.opends.guitools.controlpanel.datamodel.CustomSearchResult; import org.opends.guitools.controlpanel.datamodel.BasicMonitoringAttributes; import org.opends.guitools.controlpanel.datamodel.CustomSearchResult; import org.opends.guitools.controlpanel.datamodel.MonitoringAttributes; import org.opends.guitools.controlpanel.datamodel.ServerDescriptor; import org.opends.guitools.controlpanel.util.Utilities; /** The panel displaying the system information monitoring panel. */ public class SystemInformationMonitoringPanel extends GeneralMonitoringPanel class SystemInformationMonitoringPanel extends GeneralMonitoringPanel { private static final long serialVersionUID = 9031734563298069830L; static List<MonitoringAttributes> operations = new ArrayList<>(); private static final List<MonitoringAttributes> operations = new ArrayList<>(); { operations.add(BasicMonitoringAttributes.SYSTEM_NAME); operations.add(BasicMonitoringAttributes.OPERATING_SYSTEM); @@ -45,7 +45,7 @@ operations.add(BasicMonitoringAttributes.FREE_USED_MEMORY); operations.add(BasicMonitoringAttributes.MAX_MEMORY); } private ArrayList<JLabel> monitoringLabels = new ArrayList<>(); private final List<JLabel> monitoringLabels = new ArrayList<>(); { for (int i=0; i<operations.size(); i++) { @@ -112,7 +112,7 @@ setBorder(PANEL_BORDER); } /** Updates the contents of the panel. */ @Override public void updateContents() { ServerDescriptor server = null; opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/TableViewEntryPanel.java
@@ -68,7 +68,7 @@ import org.opends.server.util.ServerConstants; /** The panel displaying a table view of an LDAP entry. */ public class TableViewEntryPanel extends ViewEntryPanel class TableViewEntryPanel extends ViewEntryPanel { private static final long serialVersionUID = 2135331526526472175L; private CustomSearchResult searchResult; @@ -382,13 +382,13 @@ } /** The table model used by the tree in the panel. */ protected class LDAPEntryTableModel extends SortableTableModel private class LDAPEntryTableModel extends SortableTableModel implements Comparator<AttributeValuePair> { private static final long serialVersionUID = -1240282431326505113L; private ArrayList<AttributeValuePair> dataArray = new ArrayList<>(); private SortedSet<AttributeValuePair> allSortedValues = new TreeSet<>(this); private Set<String> requiredAttrs = new HashSet<>(); private final List<AttributeValuePair> dataArray = new ArrayList<>(); private final SortedSet<AttributeValuePair> allSortedValues = new TreeSet<>(this); private final Set<String> requiredAttrs = new HashSet<>(); private final String[] COLUMN_NAMES = new String[] { getHeader(LocalizableMessage.raw("Attribute"), 40), getHeader(LocalizableMessage.raw("Value", 40))}; @@ -399,7 +399,7 @@ * Updates the contents of the table model with the * {@code TableViewEntryPanel.searchResult} object. */ public void displayEntry() private void displayEntry() { updateDataArray(); fireTableDataChanged(); @@ -809,18 +809,18 @@ * used by the table model to be able to retrieve more easily all the values * for a given attribute. */ static class AttributeValuePair private static class AttributeValuePair { /** The attribute name. */ String attrName; private final String attrName; /** The value. */ Object value; private Object value; /** * Constructor. * @param attrName the attribute name. * @param value the value. */ public AttributeValuePair(String attrName, Object value) private AttributeValuePair(String attrName, Object value) { this.attrName = attrName; this.value = value; opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/TaskToSchedulePanel.java
@@ -14,7 +14,6 @@ * Copyright 2009-2010 Sun Microsystems, Inc. * Portions Copyright 2014-2016 ForgeRock AS. */ package org.opends.guitools.controlpanel.ui; import static org.opends.messages.AdminToolMessages.*; @@ -42,16 +41,14 @@ import javax.swing.JTextField; import javax.swing.text.PlainDocument; import org.forgerock.i18n.LocalizableMessage; import org.opends.guitools.controlpanel.datamodel.CategorizedComboBoxElement; import org.opends.guitools.controlpanel.datamodel.ScheduleType; import org.opends.guitools.controlpanel.event.ConfigurationChangeEvent; import org.opends.guitools.controlpanel.ui.components. NumericLimitedSizeDocumentFilter; import org.opends.guitools.controlpanel.ui.components.NumericLimitedSizeDocumentFilter; import org.opends.guitools.controlpanel.ui.components.TimeDocumentFilter; import org.opends.guitools.controlpanel.ui.renderer. NoLeftInsetCategoryComboBoxRenderer; import org.opends.guitools.controlpanel.ui.renderer.NoLeftInsetCategoryComboBoxRenderer; import org.opends.guitools.controlpanel.util.Utilities; import org.forgerock.i18n.LocalizableMessage; import org.opends.server.backends.task.RecurringTask; /** The panel that allows the user to specify when a task will be launched. */ @@ -59,14 +56,14 @@ { private static final long serialVersionUID = 6855081932432566784L; private String taskName; private final String taskName; private JComboBox scheduleType; private JTextField time; private JTextField day; private JComboBox month; private JComboBox year; private JComboBox<String> month; private JComboBox<String> year; private JLabel lTime; private JLabel lDay; @@ -79,8 +76,7 @@ private JLabel lWeeklyTime; private JLabel lWeeklyDays; private JTextField weeklyTime; private JCheckBox sunday, monday, tuesday, wednesday, thursday, friday, saturday; private final JCheckBox sunday, monday, tuesday, wednesday, thursday, friday, saturday; { sunday = Utilities.createCheckBox(INFO_CTRL_PANEL_TASK_TO_SCHEDULE_SUNDAY.get()); @@ -99,7 +95,7 @@ Utilities.createCheckBox(INFO_CTRL_PANEL_TASK_TO_SCHEDULE_SATURDAY.get()); } JCheckBox[] weekDays = private final JCheckBox[] weekDays = { sunday, monday, tuesday, wednesday, thursday, friday, saturday }; @@ -107,7 +103,7 @@ private JLabel lMonthlyTime; private JLabel lMonthlyDays; private JTextField monthlyTime; private JCheckBox[] monthDays = new JCheckBox[31]; private final JCheckBox[] monthDays = new JCheckBox[31]; private JLabel lCronMinute; private JLabel lCronHour; @@ -127,13 +123,13 @@ private Component monthlyPanel; private Component cronPanel; private LocalizableMessage LAUNCH_NOW = INFO_CTRL_PANEL_LAUNCH_NOW.get(); private LocalizableMessage LAUNCH_LATER = INFO_CTRL_PANEL_LAUNCH_LATER.get(); private LocalizableMessage LAUNCH_DAILY = INFO_CTRL_PANEL_TASK_TO_SCHEDULE_DAILY.get(); private LocalizableMessage LAUNCH_WEEKLY = INFO_CTRL_PANEL_TASK_TO_SCHEDULE_WEEKLY.get(); private LocalizableMessage LAUNCH_MONTHLY = private final LocalizableMessage LAUNCH_NOW = INFO_CTRL_PANEL_LAUNCH_NOW.get(); private final LocalizableMessage LAUNCH_LATER = INFO_CTRL_PANEL_LAUNCH_LATER.get(); private final LocalizableMessage LAUNCH_DAILY = INFO_CTRL_PANEL_TASK_TO_SCHEDULE_DAILY.get(); private final LocalizableMessage LAUNCH_WEEKLY = INFO_CTRL_PANEL_TASK_TO_SCHEDULE_WEEKLY.get(); private final LocalizableMessage LAUNCH_MONTHLY = INFO_CTRL_PANEL_TASK_TO_SCHEDULE_MONTHLY.get(); private LocalizableMessage CRON = INFO_CTRL_PANEL_TASK_TO_SCHEDULE_CRON.get(); private final LocalizableMessage CRON = INFO_CTRL_PANEL_TASK_TO_SCHEDULE_CRON.get(); private ScheduleType schedule; @@ -714,6 +710,7 @@ @Override public void configurationChanged(ConfigurationChangeEvent ev) { // no-op } @Override @@ -770,10 +767,7 @@ {currentYear, currentYear + 5} }; JComboBox[] numericBoxes = { year }; JComboBox[] numericBoxes = { year }; int[] currentValues = { @@ -785,7 +779,7 @@ int min = maxMin[i][0]; int max = maxMin[i][1]; DefaultComboBoxModel model = new DefaultComboBoxModel(); DefaultComboBoxModel<String> model = new DefaultComboBoxModel<>(); int selectedIndex = 0; @@ -818,7 +812,7 @@ } } DefaultComboBoxModel model = new DefaultComboBoxModel(); DefaultComboBoxModel<String> model = new DefaultComboBoxModel<>(); month.setModel(model); LocalizableMessage[] monthMessages = opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/WorkQueueMonitoringPanel.java
@@ -26,25 +26,23 @@ import javax.swing.Box; import javax.swing.JLabel; import org.opends.guitools.controlpanel.datamodel.CustomSearchResult; import org.opends.guitools.controlpanel.datamodel.BasicMonitoringAttributes; import org.opends.guitools.controlpanel.datamodel.MonitoringAttributes; import org.opends.guitools.controlpanel.datamodel.CustomSearchResult; import org.opends.guitools.controlpanel.datamodel.ServerDescriptor; import org.opends.guitools.controlpanel.util.Utilities; import org.opends.server.util.CollectionUtils; /** The panel displaying the work queue monitor panel. */ public class WorkQueueMonitoringPanel extends GeneralMonitoringPanel class WorkQueueMonitoringPanel extends GeneralMonitoringPanel { private static final long serialVersionUID = 9031734563700069830L; static List<MonitoringAttributes> attributes = new ArrayList<>(); { attributes.add(BasicMonitoringAttributes.AVERAGE_REQUEST_BACKLOG); attributes.add(BasicMonitoringAttributes.MAX_REQUEST_BACKLOG); attributes.add(BasicMonitoringAttributes.CURRENT_REQUEST_BACKLOG); attributes.add(BasicMonitoringAttributes.REQUESTS_SUBMITTED); attributes.add(BasicMonitoringAttributes.REQUESTS_REJECTED); } private ArrayList<JLabel> monitoringLabels = new ArrayList<>(); static final List<BasicMonitoringAttributes> attributes = CollectionUtils.newArrayList( BasicMonitoringAttributes.AVERAGE_REQUEST_BACKLOG, BasicMonitoringAttributes.MAX_REQUEST_BACKLOG, BasicMonitoringAttributes.CURRENT_REQUEST_BACKLOG, BasicMonitoringAttributes.REQUESTS_SUBMITTED, BasicMonitoringAttributes.REQUESTS_REJECTED); private final List<JLabel> monitoringLabels = new ArrayList<>(); { for (int i=0; i<attributes.size(); i++) { @@ -112,6 +110,7 @@ } /** Updates the contents of the panel. */ @Override public void updateContents() { ServerDescriptor server = null; opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/components/BinaryCellPanel.java
@@ -25,9 +25,6 @@ import java.awt.event.KeyEvent; import java.text.ParseException; import org.forgerock.i18n.LocalizableMessage; import org.forgerock.i18n.slf4j.LocalizedLogger; import javax.swing.Box; import javax.swing.Icon; import javax.swing.ImageIcon; @@ -36,6 +33,8 @@ import javax.swing.JPanel; import javax.swing.KeyStroke; import org.forgerock.i18n.LocalizableMessage; import org.forgerock.i18n.slf4j.LocalizedLogger; import org.opends.guitools.controlpanel.browser.IconPool; import org.opends.guitools.controlpanel.datamodel.BinaryValue; import org.opends.guitools.controlpanel.ui.ColorAndFontConstants; @@ -48,22 +47,22 @@ */ public class BinaryCellPanel extends JPanel { private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); private static final long serialVersionUID = 6607973945986559802L; private JButton iconButton; private JLabel label; private CellEditorButton editButton; private CellEditorButton deleteButton; private boolean displayDelete; private JLabel lockLabel = Utilities.createDefaultLabel(); private static final int THUMBNAIL_HEIGHT = 50; private ImageIcon lockIcon = private final JButton iconButton; private final JLabel label; private final CellEditorButton editButton; private final CellEditorButton deleteButton; private boolean displayDelete; private final JLabel lockLabel = Utilities.createDefaultLabel(); private final ImageIcon lockIcon = Utilities.createImageIcon(IconPool.IMAGE_PATH+"/field-locked.png"); private Object value; private static final int THUMBNAIL_HEIGHT = 50; private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); /** Default constructor. */ public BinaryCellPanel() @@ -270,12 +269,6 @@ return value; } /** Explicitly request the focus for the edit button of this panel. */ public void requestFocusForButton() { editButton.requestFocusInWindow(); } /** * Adds an action listener to this panel. The action listener will be * invoked when the user clicks on the 'Edit' button or the icon. opendj-server-legacy/src/main/java/org/opends/quicksetup/CliUserInteraction.java
File was deleted opendj-server-legacy/src/main/java/org/opends/quicksetup/UserInteraction.java
File was deleted opendj-server-legacy/src/main/java/org/opends/quicksetup/ui/SortableTableModel.java
File was deleted opendj-server-legacy/src/main/java/org/opends/server/api/DITCacheMap.java
@@ -78,10 +78,7 @@ { /** Node DN. */ DN dn; /** * Storage object or null if this node exist * only to support the DIT like structuring. */ /** Storage object or null if this node exist only to support the DIT like structuring. */ T element; /** Parent. */ Node<T> parent; @@ -92,18 +89,10 @@ /** Previous sibling. */ Node<T> previous; /** {@inheritDoc} */ @Override public String toString() { if (element != null) { return "node(" + element + ")"; } else { return "glue"; } return element != null ? "node(" + element + ")" : "glue"; } } @@ -118,38 +107,24 @@ { } /** * Constructs a new DITCacheMap from a given Map. * @param m existing Map to construct new * DITCacheMap from. */ public DITCacheMap(Map<? extends DN, ? extends T> m) { this.putAll(m); } /** {@inheritDoc} */ @Override public int size() { return size; } /** {@inheritDoc} */ @Override public boolean isEmpty() { return ditCacheMap.isEmpty(); } /** {@inheritDoc} */ @Override public boolean containsKey(Object key) { return get(key) != null; } /** {@inheritDoc} */ @Override public boolean containsValue(Object value) { @@ -163,7 +138,6 @@ return false; } /** {@inheritDoc} */ @Override public T get(Object key) { @@ -181,7 +155,6 @@ return new DITSubtreeSet(key); } /** {@inheritDoc} */ @Override public T put(DN key, T value) { @@ -248,7 +221,6 @@ return null; } /** {@inheritDoc} */ @Override public T remove(Object key) { @@ -280,8 +252,6 @@ return returnValue; } /** * Remove references to a node after it has been removed. * @param node The node which has just been removed. @@ -344,8 +314,6 @@ } } /** * Returns {@code true} if there are stored objects subordinate to subtree DN. * @param key subtree DN. @@ -356,8 +324,6 @@ return ditCacheMap.containsKey(key); } /** * Removes a set of stored objects subordinate to subtree DN. * @param key subtree DN. @@ -380,8 +346,6 @@ return false; } /** * Iterate through detached subtree counting and collecting any elements. * @@ -422,9 +386,6 @@ ditCacheMap.remove(node.dn); } /** {@inheritDoc} */ @Override public void putAll(Map<? extends DN, ? extends T> m) { @@ -434,7 +395,6 @@ } } /** {@inheritDoc} */ @Override public void clear() { @@ -442,7 +402,6 @@ size = 0; } /** {@inheritDoc} */ @Override public Set<Entry<DN, T>> entrySet() { @@ -469,7 +428,6 @@ hasNext = false; } /** {@inheritDoc} */ @Override public boolean hasNext() { @@ -492,7 +450,6 @@ return false; } /** {@inheritDoc} */ @Override public Entry<DN, T> next() { @@ -518,7 +475,6 @@ throw new NoSuchElementException(); } /** {@inheritDoc} */ @Override public void remove() { @@ -557,14 +513,12 @@ } } /** {@inheritDoc} */ @Override public int size() { return DITCacheMap.this.size(); } /** {@inheritDoc} */ @Override public Iterator<Entry<DN, T>> iterator() { @@ -590,21 +544,18 @@ this.value = value; } /** {@inheritDoc} */ @Override public DN getKey() { return key; } /** {@inheritDoc} */ @Override public T getValue() { return value; } /** {@inheritDoc} */ @Override public T setValue(T value) { @@ -751,7 +702,7 @@ @Override public boolean isEmpty() { return !(new SubtreeSetIterator(this.key).hasNext()); return !new SubtreeSetIterator(this.key).hasNext(); } @Override opendj-server-legacy/src/main/java/org/opends/server/authorization/dseecompat/AciContainer.java
@@ -28,14 +28,18 @@ import org.forgerock.opendj.ldap.ByteString; import org.forgerock.opendj.ldap.DN; import org.forgerock.opendj.ldap.schema.AttributeType; import org.opends.server.api.ClientConnection; import org.opends.server.api.Group; import org.opends.server.controls.GetEffectiveRightsRequestControl; import org.opends.server.core.AddOperation; import org.opends.server.core.SearchOperation; import org.opends.server.protocols.ldap.LDAPClientConnection; import org.forgerock.opendj.ldap.schema.AttributeType; import org.opends.server.types.*; import org.opends.server.types.AuthenticationInfo; import org.opends.server.types.AuthenticationType; import org.opends.server.types.DirectoryException; import org.opends.server.types.Entry; import org.opends.server.types.Operation; /** * The AciContainer class contains all of the needed information to perform @@ -43,29 +47,15 @@ * of testing if an ACI is applicable to an operation, and evaluation is * the actual access evaluation of the ACI. */ public abstract class AciContainer implements AciTargetMatchContext, AciEvalContext { /** * The allow and deny lists. */ abstract class AciContainer implements AciTargetMatchContext, AciEvalContext { /** The allow and deny lists. */ private List<Aci> denyList, allowList; /** * The attribute type in the resource entry currently being evaluated. */ /** The attribute type in the resource entry currently being evaluated. */ private AttributeType attributeType; /** * The attribute type value in the resource entry currently being * evaluated. */ /** The attribute type value in the resource entry currently being evaluated. */ private ByteString attributeValue; /** * True if this is the first attribute type in the resource entry being * evaluated. */ /** True if this is the first attribute type in the resource entry being evaluated. */ private boolean isFirst; /** @@ -74,29 +64,18 @@ */ private boolean isEntryTestRule; /** * The right mask to use in the evaluation of the LDAP operation. */ /** The right mask to use in the evaluation of the LDAP operation. */ private int rightsMask; /** * The entry being evaluated (resource entry). */ private Entry resourceEntry; /** The entry being evaluated (resource entry). */ private final Entry resourceEntry; /** * The client connection information. */ /** The client connection information. */ private final ClientConnection clientConnection; /** * The operation being evaluated. */ /** The operation being evaluated. */ private final Operation operation; /** * True if a targattrfilters match was found. */ /** True if a targattrfilters match was found. */ private boolean targAttrFiltersMatch; /** @@ -107,12 +86,10 @@ * switched back for non-proxy access checking. If proxied authentication * is not being used then this entry never changes. */ private Entry authorizationEntry; private final Entry authorizationEntry; /** * True if proxied authorization is being used. */ private boolean proxiedAuthorization; /** True if proxied authorization is being used. */ private final boolean proxiedAuthorization; /** * Used by proxied authorization processing. True if the entry has already @@ -122,20 +99,12 @@ */ private boolean seenEntry; /** * True if geteffectiverights evaluation is in progress. */ /** True if geteffectiverights evaluation is in progress. */ private boolean isGetEffectiveRightsEval; /** * True if the operation has a geteffectiverights control. */ private boolean hasGetEffectiveRightsControl; /** * The geteffectiverights authzID in DN format. */ private DN authzid; /** True if the operation has a geteffectiverights control. */ private final boolean hasGetEffectiveRightsControl; /** The geteffectiverights authzID in DN format. */ private final DN authzid; /** * True if the authZid should be used as the client DN, only used in @@ -147,7 +116,7 @@ * The list of specific attributes to get rights for, in addition to * any attributes requested in the search. */ private List<AttributeType> specificAttrs; private final List<AttributeType> specificAttrs; /** * Table of ACIs that have targattrfilter keywords that matched. Used @@ -169,10 +138,7 @@ */ private int targAttrMatch; /** * The ACI that decided the last evaluation. Used in geteffectiverights * loginfo processing. */ /** The ACI that decided the last evaluation. Used in geteffectiverights loginfo processing. */ private Aci decidingAci; /** @@ -188,25 +154,16 @@ */ private String summaryString; /** * Flag used to determine if ACI all attributes target matched. */ /** Flag used to determine if ACI all attributes target matched. */ private int evalAllAttributes; /** * String used to hold a control OID string. */ /** String used to hold a control OID string. */ private String controlOID; /** * String used to hold an extended operation OID string. */ /** String used to hold an extended operation OID string. */ private String extOpOID; /** * AuthenticationInfo class to use. */ private AuthenticationInfo authInfo; /** AuthenticationInfo class to use. */ private final AuthenticationInfo authInfo; /** * This constructor is used by all currently supported LDAP operations @@ -248,12 +205,13 @@ && operation instanceof SearchOperation) { hasGetEffectiveRightsControl = true; if (getEffectiveRightsControl.getAuthzDN() == null) { this.authzid = getClientDN(); } else { this.authzid = getEffectiveRightsControl.getAuthzDN(); } DN authzDN = getEffectiveRightsControl.getAuthzDN(); this.authzid = authzDN != null ? authzDN : getClientDN(); this.specificAttrs = getEffectiveRightsControl.getAttributes(); } else { hasGetEffectiveRightsControl = false; authzid = null; specificAttrs = null; } //If an ACI evaluated because of an Targetattr="*", then the @@ -273,6 +231,10 @@ { evalAllAttributes |= ACI_OP_ATTR_PLUS_MATCHED; } } else { hasGetEffectiveRightsControl = false; authzid = null; specificAttrs = null; } //Reference the current authorization entry, so it can be put back @@ -297,7 +259,12 @@ this.authInfo = authInfo; this.authorizationEntry = authInfo.getAuthorizationEntry(); this.rightsMask = rights; proxiedAuthorization = false; hasGetEffectiveRightsControl = false; authzid = null; specificAttrs = null; } /** * Returns true if an entry has already been processed by an access proxy * check. @@ -310,8 +277,7 @@ } /** * Set to true if an entry has already been processed by an access proxy * check. * Set to true if an entry has already been processed by an access proxy check. * * @param val The value to set the seenEntry boolean to. */ @@ -319,13 +285,11 @@ this.seenEntry=val; } /** {@inheritDoc} */ @Override public boolean isProxiedAuthorization() { return this.proxiedAuthorization; } /** {@inheritDoc} */ @Override public boolean isGetEffectiveRightsEval() { return this.isGetEffectiveRightsEval; @@ -371,19 +335,16 @@ return this.specificAttrs; } /** {@inheritDoc} */ @Override public void addTargAttrFiltersMatchAci(Aci aci) { this.targAttrFilterAcis.put(aci, aci); } /** {@inheritDoc} */ @Override public boolean hasTargAttrFiltersMatchAci(Aci aci) { return this.targAttrFilterAcis.containsKey(aci); } /** {@inheritDoc} */ @Override public boolean isTargAttrFilterMatchAciEmpty() { return this.targAttrFilterAcis.isEmpty(); @@ -404,31 +365,26 @@ this.targAttrMatch=0; } /** {@inheritDoc} */ @Override public void setTargAttrFiltersAciName(String name) { this.targAttrFiltersAciName=name; } /** {@inheritDoc} */ @Override public String getTargAttrFiltersAciName() { return this.targAttrFiltersAciName; } /** {@inheritDoc} */ @Override public void setTargAttrFiltersMatchOp(int flag) { this.targAttrMatch |= flag; } /** {@inheritDoc} */ @Override public boolean hasTargAttrFiltersMatchOp(int flag) { return (this.targAttrMatch & flag) != 0; } /** {@inheritDoc} */ @Override public String getDecidingAciName() { if(this.decidingAci != null) { @@ -437,7 +393,6 @@ return null; } /** {@inheritDoc} */ @Override public void setEvaluationResult(EnumEvalReason reason, Aci decidingAci) { @@ -445,19 +400,16 @@ this.decidingAci = decidingAci; } /** {@inheritDoc} */ @Override public EnumEvalReason getEvalReason() { return this.evalReason; } /** {@inheritDoc} */ @Override public void setEvalSummary(String summary) { this.summaryString=summary; } /** {@inheritDoc} */ @Override public String getEvalSummary() { return this.summaryString; @@ -473,104 +425,87 @@ return this.authzid.equals(this.authorizationEntry.getName()); } /** {@inheritDoc} */ @Override public void setDenyList(List<Aci> denys) { denyList=denys; } /** {@inheritDoc} */ @Override public void setAllowList(List<Aci> allows) { allowList=allows; } /** {@inheritDoc} */ @Override public AttributeType getCurrentAttributeType() { return attributeType; } /** {@inheritDoc} */ @Override public ByteString getCurrentAttributeValue() { return attributeValue; } /** {@inheritDoc} */ @Override public void setCurrentAttributeType(AttributeType type) { attributeType=type; } /** {@inheritDoc} */ @Override public void setCurrentAttributeValue(ByteString value) { attributeValue=value; } /** {@inheritDoc} */ @Override public boolean isFirstAttribute() { return isFirst; } /** {@inheritDoc} */ @Override public void setIsFirstAttribute(boolean val) { isFirst=val; } /** {@inheritDoc} */ @Override public boolean hasEntryTestRule() { return isEntryTestRule; } /** {@inheritDoc} */ @Override public void setEntryTestRule(boolean val) { isEntryTestRule=val; } /** {@inheritDoc} */ @Override public Entry getResourceEntry() { return resourceEntry; } /** {@inheritDoc} */ @Override public Entry getClientEntry() { return this.authorizationEntry; } /** {@inheritDoc} */ @Override public List<Aci> getDenyList() { return denyList; } /** {@inheritDoc} */ @Override public List<Aci> getAllowList() { return allowList; } /** {@inheritDoc} */ @Override public boolean isDenyEval() { return EnumEvalReason.NO_ALLOW_ACIS.equals(evalReason) || EnumEvalReason.EVALUATED_DENY_ACI.equals(evalReason); } /** {@inheritDoc} */ @Override public boolean isAnonymousUser() { return !authInfo.isAuthenticated(); } /** {@inheritDoc} */ @Override public DN getClientDN() { if(this.useAuthzid) @@ -584,7 +519,6 @@ return DN.rootDN(); } /** {@inheritDoc} */ @Override public DN getResourceDN() { return resourceEntry.getName(); @@ -602,55 +536,46 @@ return (this.rightsMask & rights) != 0; } /** {@inheritDoc} */ @Override public int getRights() { return this.rightsMask; } /** {@inheritDoc} */ @Override public void setRights(int rights) { this.rightsMask=rights; } /** {@inheritDoc} */ @Override public String getHostName() { return clientConnection.getRemoteAddress().getCanonicalHostName(); } /** {@inheritDoc} */ @Override public InetAddress getRemoteAddress() { return clientConnection.getRemoteAddress(); } /** {@inheritDoc} */ @Override public boolean isAddOperation() { return operation instanceof AddOperation; } /** {@inheritDoc} */ @Override public void setTargAttrFiltersMatch(boolean v) { this.targAttrFiltersMatch=v; } /** {@inheritDoc} */ @Override public boolean getTargAttrFiltersMatch() { return targAttrFiltersMatch; } /** {@inheritDoc} */ @Override public String getControlOID() { return controlOID; } /** {@inheritDoc} */ @Override public String getExtOpOID() { return extOpOID; @@ -665,7 +590,6 @@ this.controlOID=oid; } /** * Set the extended operation OID value to the specified oid string. * @@ -675,7 +599,6 @@ this.extOpOID=oid; } /** {@inheritDoc} */ @Override public EnumEvalResult hasAuthenticationMethod(EnumAuthMethod authMethod, String saslMech) { @@ -724,7 +647,6 @@ return matched; } /** {@inheritDoc} */ @Override public boolean isMemberOf(Group<?> group) { try { @@ -794,7 +716,6 @@ return null; } /** {@inheritDoc} */ @Override public void setEvalUserAttributes(int v) { if(rightsMask == ACI_READ) { @@ -809,7 +730,6 @@ } } /** {@inheritDoc} */ @Override public void setEvalOpAttributes(int v) { if(rightsMask == ACI_READ) { @@ -824,13 +744,11 @@ } } /** {@inheritDoc} */ @Override public boolean hasEvalUserAttributes() { return hasAttribute(ACI_FOUND_USER_ATTR_RULE); } /** {@inheritDoc} */ @Override public boolean hasEvalOpAttributes() { return hasAttribute(ACI_FOUND_OP_ATTR_RULE); @@ -861,7 +779,6 @@ return (evalAllAttributes & aciAttribute) == aciAttribute; } /** {@inheritDoc} */ @Override public void clearEvalAttributes(int v) { if(v == 0) @@ -874,13 +791,11 @@ } } /** {@inheritDoc} */ @Override public int getCurrentSSF() { return clientConnection.getSSF(); } /** {@inheritDoc} */ @Override public String toString() { opendj-server-legacy/src/main/java/org/opends/server/backends/jeb/ConfigurableEnvironment.java
@@ -17,6 +17,7 @@ package org.opends.server.backends.jeb; import static com.sleepycat.je.EnvironmentConfig.*; import static org.opends.messages.BackendMessages.*; import static org.opends.messages.ConfigMessages.*; @@ -54,7 +55,7 @@ import com.sleepycat.je.dbi.MemoryBudget; /** This class maps JE properties to configuration attributes. */ public class ConfigurableEnvironment class ConfigurableEnvironment { private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); @@ -62,136 +63,107 @@ * The name of the attribute which configures the database cache size as a * percentage of Java VM heap size. */ public static final String ATTR_DATABASE_CACHE_PERCENT = private static final String ATTR_DATABASE_CACHE_PERCENT = ConfigConstants.NAME_PREFIX_CFG + "db-cache-percent"; /** * The name of the attribute which configures the database cache size as an * approximate number of bytes. */ public static final String ATTR_DATABASE_CACHE_SIZE = private static final String ATTR_DATABASE_CACHE_SIZE = ConfigConstants.NAME_PREFIX_CFG + "db-cache-size"; /** * The name of the attribute which configures whether data updated by a * database transaction is forced to disk. */ public static final String ATTR_DATABASE_TXN_NO_SYNC = ConfigConstants.NAME_PREFIX_CFG + "db-txn-no-sync"; /** * The name of the attribute which configures whether data updated by a * database transaction is written from the Java VM to the O/S. */ public static final String ATTR_DATABASE_TXN_WRITE_NO_SYNC = ConfigConstants.NAME_PREFIX_CFG + "db-txn-write-no-sync"; /** * The name of the attribute which configures whether the database background * cleaner thread runs. */ public static final String ATTR_DATABASE_RUN_CLEANER = private static final String ATTR_DATABASE_RUN_CLEANER = ConfigConstants.NAME_PREFIX_CFG + "db-run-cleaner"; /** * The name of the attribute which configures the minimum percentage of log * space that must be used in log files. */ public static final String ATTR_CLEANER_MIN_UTILIZATION = private static final String ATTR_CLEANER_MIN_UTILIZATION = ConfigConstants.NAME_PREFIX_CFG + "db-cleaner-min-utilization"; /** * The name of the attribute which configures the maximum size of each * individual JE log file, in bytes. */ public static final String ATTR_DATABASE_LOG_FILE_MAX = private static final String ATTR_DATABASE_LOG_FILE_MAX = ConfigConstants.NAME_PREFIX_CFG + "db-log-file-max"; /** The name of the attribute which configures the database cache eviction algorithm. */ public static final String ATTR_EVICTOR_LRU_ONLY = private static final String ATTR_EVICTOR_LRU_ONLY = ConfigConstants.NAME_PREFIX_CFG + "db-evictor-lru-only"; /** * The name of the attribute which configures the number of nodes in one scan * of the database cache evictor. */ public static final String ATTR_EVICTOR_NODES_PER_SCAN = private static final String ATTR_EVICTOR_NODES_PER_SCAN = ConfigConstants.NAME_PREFIX_CFG + "db-evictor-nodes-per-scan"; /** * The name of the attribute which configures the minimum number of threads * of the database cache evictor pool. */ public static final String ATTR_EVICTOR_CORE_THREADS = private static final String ATTR_EVICTOR_CORE_THREADS = ConfigConstants.NAME_PREFIX_CFG + "db-evictor-core-threads"; /** * The name of the attribute which configures the maximum number of threads * of the database cache evictor pool. */ public static final String ATTR_EVICTOR_MAX_THREADS = private static final String ATTR_EVICTOR_MAX_THREADS = ConfigConstants.NAME_PREFIX_CFG + "db-evictor-max-threads"; /** * The name of the attribute which configures the time excess threads * of the database cache evictor pool are kept alive. */ public static final String ATTR_EVICTOR_KEEP_ALIVE = private static final String ATTR_EVICTOR_KEEP_ALIVE = ConfigConstants.NAME_PREFIX_CFG + "db-evictor-keep-alive"; /** * The name of the attribute which configures whether the logging file * handler will be on or off. */ public static final String ATTR_LOGGING_FILE_HANDLER_ON = ConfigConstants.NAME_PREFIX_CFG + "db-logging-file-handler-on"; /** The name of the attribute which configures the trace logging message level. */ public static final String ATTR_LOGGING_LEVEL = ConfigConstants.NAME_PREFIX_CFG + "db-logging-level"; /** * The name of the attribute which configures how many bytes are written to * the log before the checkpointer runs. */ public static final String ATTR_CHECKPOINTER_BYTES_INTERVAL = private static final String ATTR_CHECKPOINTER_BYTES_INTERVAL = ConfigConstants.NAME_PREFIX_CFG + "db-checkpointer-bytes-interval"; /** * The name of the attribute which configures the amount of time between * runs of the checkpointer. */ public static final String ATTR_CHECKPOINTER_WAKEUP_INTERVAL = private static final String ATTR_CHECKPOINTER_WAKEUP_INTERVAL = ConfigConstants.NAME_PREFIX_CFG + "db-checkpointer-wakeup-interval"; /** The name of the attribute which configures the number of lock tables. */ public static final String ATTR_NUM_LOCK_TABLES = private static final String ATTR_NUM_LOCK_TABLES = ConfigConstants.NAME_PREFIX_CFG + "db-num-lock-tables"; /** * The name of the attribute which configures the number threads * allocated by the cleaner for log file processing. */ public static final String ATTR_NUM_CLEANER_THREADS = private static final String ATTR_NUM_CLEANER_THREADS = ConfigConstants.NAME_PREFIX_CFG + "db-num-cleaner-threads"; /** The name of the attribute which configures the size of the file handle cache. */ public static final String ATTR_LOG_FILECACHE_SIZE = private static final String ATTR_LOG_FILECACHE_SIZE = ConfigConstants.NAME_PREFIX_CFG + "db-log-filecache-size"; /** The name of the attribute which may specify any native JE properties. */ public static final String ATTR_JE_PROPERTY = ConfigConstants.NAME_PREFIX_CFG + "je-property"; /** A map of JE property names to the corresponding configuration attribute. */ private static HashMap<String, String> attrMap = new HashMap<>(); private static final Map<String, String> attrMap = new HashMap<>(); /** * A map of configuration attribute names to the corresponding configuration object getter method. */ private static Map<String, Method> jebMethodMap = new HashMap<>(); private static final Map<String, Method> jebMethodMap = new HashMap<>(); /** A map of configuration attribute names to the corresponding configuration PropertyDefinition. */ private static Map<String, PropertyDefinition<?>> jebDefnMap = new HashMap<>(); private static final Map<String, PropertyDefinition<?>> jebDefnMap = new HashMap<>(); /** Pulled from resource/admin/ABBREVIATIONS.xsl. db is mose common. */ private static final List<String> ABBREVIATIONS = Arrays.asList(new String[] @@ -252,16 +224,6 @@ } /** * Get the name of the configuration attribute associated with a JE property. * @param jeProperty The name of the JE property. * @return The name of the associated configuration attribute. */ public static String getAttributeForProperty(String jeProperty) { return attrMap.get(jeProperty); } /** * Get the value of a JE property that is mapped to a configuration attribute. * @param cfg The configuration containing the property values. * @param attrName The configuration attribute type name. @@ -358,7 +320,7 @@ * * @return A JE environment config containing default values. */ public static EnvironmentConfig defaultConfig() private static EnvironmentConfig defaultConfig() { EnvironmentConfig envConfig = new EnvironmentConfig(); @@ -408,7 +370,7 @@ * @throws ConfigException If there is an error in the provided configuration * entry. */ public static EnvironmentConfig parseConfigEntry(JEBackendCfg cfg) throws ConfigException static EnvironmentConfig parseConfigEntry(JEBackendCfg cfg) throws ConfigException { validateDbCacheSize(cfg.getDBCacheSize()); @@ -506,8 +468,8 @@ * @throws ConfigException If there is an error while parsing, * validating and setting any of the properties provided. */ public static EnvironmentConfig setJEProperties(EnvironmentConfig envConfig, SortedSet<String> jeProperties, HashMap<String, String> configAttrMap) private static EnvironmentConfig setJEProperties(EnvironmentConfig envConfig, SortedSet<String> jeProperties, Map<String, String> configAttrMap) throws ConfigException { if (jeProperties.isEmpty()) { opendj-server-legacy/src/main/java/org/opends/server/core/CoreConstants.java
File was deleted opendj-server-legacy/src/main/java/org/opends/server/loggers/ActionType.java
File was deleted opendj-server-legacy/src/main/java/org/opends/server/loggers/LogFileFilter.java
File was deleted opendj-server-legacy/src/main/java/org/opends/server/loggers/LoggerAlarmHandler.java
File was deleted opendj-server-legacy/src/main/java/org/opends/server/loggers/MultifileTextWriter.java
@@ -25,19 +25,18 @@ import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStreamWriter; import java.util.ArrayList; import java.util.Calendar; import java.util.List; import java.util.concurrent.CopyOnWriteArrayList; import org.forgerock.i18n.LocalizableMessage; import org.forgerock.i18n.slf4j.LocalizedLogger; import org.forgerock.opendj.config.server.ConfigChangeResult; import org.forgerock.opendj.config.server.ConfigurationChangeListener; import org.forgerock.opendj.server.config.server.SizeLimitLogRotationPolicyCfg; import org.opends.server.api.DirectoryThread; import org.opends.server.api.ServerShutdownListener; import org.opends.server.core.DirectoryServer; import org.forgerock.opendj.config.server.ConfigChangeResult; import org.opends.server.types.DirectoryException; import org.opends.server.types.FilePermission; import org.opends.server.util.TimeThread; @@ -60,17 +59,15 @@ private static final String UTF8_ENCODING= "UTF-8"; private CopyOnWriteArrayList<RotationPolicy> rotationPolicies = new CopyOnWriteArrayList<>(); private CopyOnWriteArrayList<RetentionPolicy> retentionPolicies = new CopyOnWriteArrayList<>(); private final CopyOnWriteArrayList<RotationPolicy<?>> rotationPolicies = new CopyOnWriteArrayList<>(); private final CopyOnWriteArrayList<RetentionPolicy<?>> retentionPolicies = new CopyOnWriteArrayList<>(); private FileNamingPolicy namingPolicy; private FilePermission filePermissions; private LogPublisherErrorHandler errorHandler; /** TODO: Implement actions. */ private ArrayList<ActionType> actions; private final LogPublisherErrorHandler errorHandler; private String name; private String encoding; private final String name; private final String encoding; private int bufferSize; private boolean autoFlush; private boolean append; @@ -78,7 +75,7 @@ private boolean stopRequested; private long sizeLimit; private Thread rotaterThread; private final Thread rotaterThread; private Calendar lastRotationTime = TimeThread.getCalendar(); private Calendar lastCleanTime = TimeThread.getCalendar(); @@ -202,7 +199,7 @@ * * @param policy The rotation policy to add. */ public void addRotationPolicy(RotationPolicy policy) public void addRotationPolicy(RotationPolicy<?> policy) { this.rotationPolicies.add(policy); @@ -224,7 +221,7 @@ * * @param policy The retention policy to add. */ public void addRetentionPolicy(RetentionPolicy policy) public void addRetentionPolicy(RetentionPolicy<?> policy) { this.retentionPolicies.add(policy); } @@ -232,7 +229,7 @@ /** Removes all the rotation policies currently enforced by this writer. */ public void removeAllRotationPolicies() { for(RotationPolicy policy : rotationPolicies) for (RotationPolicy<?> policy : rotationPolicies) { if(policy instanceof SizeBasedRotationPolicy) { @@ -345,7 +342,7 @@ long newSizeLimit = Integer.MAX_VALUE; // Go through all current size rotation policies and get the lowest size setting. for(RotationPolicy policy : rotationPolicies) for (RotationPolicy<?> policy : rotationPolicies) { if(policy instanceof SizeBasedRotationPolicy) { @@ -371,7 +368,7 @@ private class RotaterThread extends DirectoryThread { MultifileTextWriter writer; /** Create a new rotater thread. */ public RotaterThread(MultifileTextWriter writer) { super(name); @@ -400,7 +397,7 @@ logger.traceException(e); } for(RotationPolicy rotationPolicy : rotationPolicies) for (RotationPolicy<?> rotationPolicy : rotationPolicies) { if(rotationPolicy.rotateFile(writer)) { @@ -408,7 +405,7 @@ } } for(RetentionPolicy retentionPolicy : retentionPolicies) for (RetentionPolicy<?> retentionPolicy : retentionPolicies) { try { @@ -611,26 +608,11 @@ errorHandler.handleOpenError(currentFile, e); } //RotationActionThread rotThread = // new RotationActionThread(newFile, actions, configEntry); //rotThread.start(); logger.trace("Log file %s rotated and renamed to %s", currentFile, newFile); logger.trace("Log file %s rotated and renamed to %s", currentFile, newFile); totalFilesRotated++; lastRotationTime = TimeThread.getCalendar(); } /** * This method sets the actions that need to be executed after rotation. * * @param actions An array of actions that need to be executed on rotation. */ public void setPostRotationActions(ArrayList<ActionType> actions) { this.actions = actions; } @Override public long getBytesWritten() { opendj-server-legacy/src/main/java/org/opends/server/loggers/RotationActionThread.java
File was deleted opendj-server-legacy/src/main/java/org/opends/server/protocols/internal/NullLDAPMessage.java
File was deleted opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/FakeOperationComparator.java
File was deleted opendj-server-legacy/src/main/java/org/opends/server/tools/InstallDS.java
@@ -17,15 +17,15 @@ */ package org.opends.server.tools; import static com.forgerock.opendj.cli.Utils.*; import static com.forgerock.opendj.util.OperatingSystem.*; import static org.forgerock.util.Utils.*; import static org.opends.messages.AdminToolMessages.*; import static org.opends.messages.QuickSetupMessages.*; import static org.opends.messages.ToolMessages.*; import static org.opends.messages.UtilityMessages.*; import static com.forgerock.opendj.cli.Utils.*; import static com.forgerock.opendj.util.OperatingSystem.*; import java.io.BufferedReader; import java.io.File; import java.io.IOException; @@ -57,8 +57,8 @@ import org.opends.quicksetup.CurrentInstallStatus; import org.opends.quicksetup.Installation; import org.opends.quicksetup.LicenseFile; import org.opends.quicksetup.TempLogFile; import org.opends.quicksetup.SecurityOptions; import org.opends.quicksetup.TempLogFile; import org.opends.quicksetup.UserData; import org.opends.quicksetup.UserDataException; import org.opends.quicksetup.event.ProgressUpdateEvent; @@ -100,44 +100,26 @@ */ public class InstallDS extends ConsoleApplication { private final PlainTextProgressMessageFormatter formatter = new PlainTextProgressMessageFormatter(); /** Prefix for log files. */ public static final String TMP_FILE_PREFIX = "opendj-setup-"; /** Suffix for log files. */ public static final String LOG_FILE_SUFFIX = ".log"; /** * The enumeration containing the different return codes that the command-line * can have. */ /** The enumeration containing the different return codes that the command-line can have. */ private enum InstallReturnCode { SUCCESSFUL(0), /** We did no have an error but the setup was not executed (displayed version or usage). */ SUCCESSFUL_NOP(0), /** Unexpected error (potential bug). */ ERROR_UNEXPECTED(1), /** Cannot parse arguments or data provided by user is not valid. */ ERROR_USER_DATA(2), /** Error server already installed. */ ERROR_SERVER_ALREADY_INSTALLED(3), /** Error initializing server. */ ERROR_INITIALIZING_SERVER(4), /** The user failed providing password (for the keystore for instance). */ ERROR_PASSWORD_LIMIT(5), /** The user cancelled the setup. */ ERROR_USER_CANCELLED(6), /** The user doesn't accept the license. */ ERROR_LICENSE_NOT_ACCEPTED(7); @@ -192,7 +174,7 @@ * The maximum number of times that we should ask the user to provide the * password to access to a keystore. */ public static final int LIMIT_KEYSTORE_PASSWORD_PROMPT = 7; private static final int LIMIT_KEYSTORE_PASSWORD_PROMPT = 7; private final BackendTypeHelper backendTypeHelper = new BackendTypeHelper(); @@ -1816,7 +1798,7 @@ * the list that will be updated with the nicknames found in the key * store. */ public static void checkCertificateInKeystore(SecurityOptions.CertificateType type, String path, String pwd, private static void checkCertificateInKeystore(SecurityOptions.CertificateType type, String path, String pwd, Collection<String> certNicknames, Collection<LocalizableMessage> errorMessages, Collection<String> nicknameList) { boolean errorWithPath = false; @@ -1973,7 +1955,6 @@ private SecurityOptions createSecurityOptionsPrompting(SecurityOptions.CertificateType type, boolean enableSSL, boolean enableStartTLS, int ldapsPort) throws UserDataException, ClientException { SecurityOptions securityOptions; String path; Collection<String> certNicknames = argParser.certNicknameArg.getValues(); String pwd = argParser.getKeyStorePassword(); @@ -2128,7 +2109,7 @@ * to a problem with the key store path and <CODE>false</CODE> * otherwise. */ public static boolean containsKeyStorePathErrorMessage(Collection<LocalizableMessage> msgs) private static boolean containsKeyStorePathErrorMessage(Collection<LocalizableMessage> msgs) { for (final LocalizableMessage msg : msgs) { @@ -2159,7 +2140,7 @@ * to a problem with the key store password and <CODE>false</CODE> * otherwise. */ public static boolean containsKeyStorePasswordErrorMessage(Collection<LocalizableMessage> msgs) private static boolean containsKeyStorePasswordErrorMessage(Collection<LocalizableMessage> msgs) { for (final LocalizableMessage msg : msgs) { @@ -2189,20 +2170,17 @@ * to a problem with the certificate nickname and <CODE>false</CODE> * otherwise. */ public static boolean containsCertNicknameErrorMessage( Collection<LocalizableMessage> msgs) private static boolean containsCertNicknameErrorMessage(Collection<LocalizableMessage> msgs) { boolean found = false; for (final LocalizableMessage msg : msgs) { if (StaticUtils.hasDescriptor(msg, ERR_INSTALLDS_CERTNICKNAME_NOT_FOUND) || StaticUtils.hasDescriptor(msg, ERR_INSTALLDS_MUST_PROVIDE_CERTNICKNAME)) { found = true; break; return true; } } return found; return false; } /** opendj-server-legacy/src/main/java/org/opends/server/tools/upgrade/UpgradeTask.java
@@ -11,45 +11,15 @@ * Header, with the fields enclosed by brackets [] replaced by your own identifying * information: "Portions Copyright [year] [name of copyright owner]". * * Copyright 2013-2015 ForgeRock AS. * Copyright 2013-2016 ForgeRock AS. */ package org.opends.server.tools.upgrade; import com.forgerock.opendj.cli.ClientException; /** * An upgrade task. */ public interface UpgradeTask /** An upgrade task. */ interface UpgradeTask { /** * Defines the different types of upgrade tasks. */ public enum TaskType { /** * Defines a standard task. */ NORMAL, /** * Defines a task which require a standard user interaction. */ NEED_USER_INTERACTION, /** * Defines a critical task which require an imperative user interaction. */ MANDATORY_USER_INTERACTION, /** * Defines a task which take a long time to complete. */ TAKE_LONG_TIME_TO_COMPLETE, /** * Defines a task which cannot be reverted once started. */ CANNOT_BE_REVERTED } /** * Performs any preparation work required before performing the upgrade task, including * interacting with the user where needed (e.g. in order to ask for confirmation), and throw a opendj-server-legacy/src/main/java/org/opends/server/types/LockType.java
File was deleted opendj-server-legacy/src/main/java/org/opends/server/types/SmallMap.java
File was deleted opendj-server-legacy/src/main/java/org/opends/server/util/ModifyOnceNewConfigFrameworkIsUsed.java
File was deleted opendj-server-legacy/src/main/java/org/opends/server/util/ModifyOnceSDKSchemaIsUsed.java
File was deleted opendj-server-legacy/src/main/java/org/opends/server/util/SizeLimitInputStream.java
File was deleted opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/ModifyConflictTest.java
@@ -24,6 +24,7 @@ import org.forgerock.opendj.ldap.AttributeDescription; import org.forgerock.opendj.ldap.ByteString; import org.forgerock.opendj.ldap.DN; import org.forgerock.opendj.ldap.ModificationType; import org.forgerock.opendj.ldap.schema.AttributeType; import org.opends.server.core.DirectoryServer; @@ -36,7 +37,6 @@ import org.opends.server.types.Attribute; import org.opends.server.types.AttributeBuilder; import org.opends.server.types.Attributes; import org.forgerock.opendj.ldap.DN; import org.opends.server.types.DirectoryException; import org.opends.server.types.Entry; import org.opends.server.types.Modification; @@ -1093,8 +1093,7 @@ if (fks.iterator().hasNext()) { FakeOperation fk = fks.iterator().next(); assertEquals(new FakeOperationComparator().compare(fk, fk), 0); assertTrue(new FakeOperationComparator().compare(null, fk) < 0); assertEquals(fk.getCSN().compareTo(fk.getCSN()), 0); ReplicationMsg generatedMsg = fk.generateMessage(); if (generatedMsg instanceof LDAPUpdateMsg) { opendj-server-legacy/src/test/java/org/opends/server/types/SmallMapTest.java
File was deleted