LDAPCompare.java revision 27d398c0bcca6adaf643fa3f6fd02ed67ff4adf1
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * CDDL HEADER START
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * The contents of this file are subject to the terms of the
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Common Development and Distribution License, Version 1.0 only
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * (the "License"). You may not use this file except in compliance
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * with the License.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * or http://forgerock.org/license/CDDLv1.0.html.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * See the License for the specific language governing permissions
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * and limitations under the License.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * When distributing Covered Code, include this CDDL HEADER in each
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * file and include the License file at legal-notices/CDDLv1_0.txt.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * If applicable, add the following below this CDDL HEADER, with the
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * fields enclosed by brackets "[]" replaced with your own identifying
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * information:
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Portions Copyright [yyyy] [name of copyright owner]
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * CDDL HEADER END
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Copyright 2006-2010 Sun Microsystems, Inc.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Portions Copyright 2012-2015 ForgeRock AS.
ccf9d4a5c6453fa9f8b839baeee25147865fbb7dJames Phillpottsimport static com.forgerock.opendj.cli.ArgumentConstants.*;
ccf9d4a5c6453fa9f8b839baeee25147865fbb7dJames Phillpottsimport static org.opends.messages.ToolMessages.*;
ccf9d4a5c6453fa9f8b839baeee25147865fbb7dJames Phillpottsimport static org.opends.server.protocols.ldap.LDAPResultCode.*;
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterimport static org.opends.server.util.args.LDAPConnectionArgumentParser.*;
f3a3209406fe426c0c2db3af38ac588f856b52d0Andrew Forrestimport java.util.concurrent.atomic.AtomicInteger;
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterimport org.forgerock.opendj.ldap.DecodeException;
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterimport org.opends.server.controls.LDAPAssertionRequestControl;
1f9880666ba8cc0f7ee5dcb20652e33e8ba942c1Mark de Reeperimport org.opends.server.core.DirectoryServer.DirectoryServerVersionHandler;
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterimport org.opends.server.protocols.ldap.CompareRequestProtocolOp;
1f9880666ba8cc0f7ee5dcb20652e33e8ba942c1Mark de Reeperimport org.opends.server.protocols.ldap.CompareResponseProtocolOp;
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterimport org.opends.server.protocols.ldap.LDAPFilter;
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterimport org.opends.server.protocols.ldap.LDAPMessage;
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterimport org.opends.server.protocols.ldap.ProtocolOp;
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterimport org.opends.server.types.NullOutputStream;
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterimport com.forgerock.opendj.cli.ArgumentException;
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterimport com.forgerock.opendj.cli.BooleanArgument;
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterimport com.forgerock.opendj.cli.ClientException;
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterimport com.forgerock.opendj.cli.CommonArguments;
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterimport com.forgerock.opendj.cli.FileBasedArgument;
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterimport com.forgerock.opendj.cli.IntegerArgument;
1f9880666ba8cc0f7ee5dcb20652e33e8ba942c1Mark de Reeperimport com.forgerock.opendj.cli.StringArgument;
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * This class provides a tool that can be used to issue compare requests to the
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Directory Server.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster /** The fully-qualified name of this class. */
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster "org.opends.server.tools.LDAPCompare";
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster /** The message ID counter to use for requests. */
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster /** The print stream to use for standard error. */
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster /** The print stream to use for standard output. */
f3a3209406fe426c0c2db3af38ac588f856b52d0Andrew Forrest /** Tells whether the command-line is being executed in script friendly mode or not. */
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster private boolean isScriptFriendly;
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Constructor for the LDAPCompare object.
f3a3209406fe426c0c2db3af38ac588f856b52d0Andrew Forrest * @param nextMessageID The message ID counter to use for requests.
f3a3209406fe426c0c2db3af38ac588f856b52d0Andrew Forrest * @param out The print stream to use for standard output.
f3a3209406fe426c0c2db3af38ac588f856b52d0Andrew Forrest * @param err The print stream to use for standard error.
f3a3209406fe426c0c2db3af38ac588f856b52d0Andrew Forrest public LDAPCompare(AtomicInteger nextMessageID, PrintStream out,
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Execute the compare request in the specified list of DNs.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @param connection The connection to execute the request on.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @param attributeType The attribute type to compare.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @param attributeVal The attribute value to compare.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @param lines The list of DNs to compare the attribute in.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @param compareOptions The constraints for the compare request.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @return the LDAP result code for the operation
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @throws IOException If a problem occurs while communicating with the
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Directory Server.
fdd3077db2228482076ca7f288c80761f311ea0eMark de Reeper * @throws LDAPException If the server returns an error response.
fdd3077db2228482076ca7f288c80761f311ea0eMark de Reeper public int readAndExecute(LDAPConnection connection, String attributeType,
fdd3077db2228482076ca7f288c80761f311ea0eMark de Reeper byte[] attributeVal, ArrayList<String> lines,
f3a3209406fe426c0c2db3af38ac588f856b52d0Andrew Forrest executeCompare(connection, attributeType, attributeVal, line,
f3a3209406fe426c0c2db3af38ac588f856b52d0Andrew Forrest aggResultCode = aggregateResultCode(aggResultCode, resultCode);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Read the specified DNs from the given reader
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * (file or stdin) and execute the given compare request.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @param connection The connection to execute the request on.
ccf9d4a5c6453fa9f8b839baeee25147865fbb7dJames Phillpotts * @param attributeType The attribute type to compare.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @param attributeVal The attribute value to compare.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @param reader The reader to read the list of DNs from.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @param compareOptions The constraints for the compare request.
f3a3209406fe426c0c2db3af38ac588f856b52d0Andrew Forrest * @return the LDAP result code for the operation
ccf9d4a5c6453fa9f8b839baeee25147865fbb7dJames Phillpotts * @throws IOException If a problem occurs while communicating with the
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Directory Server.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @throws LDAPException If the server returns an error response.
f3a3209406fe426c0c2db3af38ac588f856b52d0Andrew Forrest public int readAndExecute(LDAPConnection connection, String attributeType,
f3a3209406fe426c0c2db3af38ac588f856b52d0Andrew Forrest BufferedReader in = new BufferedReader(reader);
f3a3209406fe426c0c2db3af38ac588f856b52d0Andrew Forrest executeCompare(connection, attributeType, attributeVal, line,
f3a3209406fe426c0c2db3af38ac588f856b52d0Andrew Forrest aggResultCode = aggregateResultCode(aggResultCode, resultCode);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Aggregates a new result code to the existing aggregated result codes. This
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * method always overwrites the {@link LDAPResultCode#SUCCESS} and
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * {@link LDAPResultCode#COMPARE_TRUE} result codes with the new result code.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @param aggResultCodes
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * the aggregated result codes (a.k.a "accumulator")
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @param newResultCode
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * the new result code to aggregate
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @return the new aggregated result code
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster int aggregateResultCode(int aggResultCodes, int newResultCode)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster if (aggResultCodes == SUCCESS || aggResultCodes == COMPARE_TRUE)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster else if (aggResultCodes == COMPARE_FALSE && newResultCode != COMPARE_TRUE)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Execute the compare request for the specified DN entry.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @param connection The connection to execute the request on.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @param attributeType The attribute type to compare.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @param attributeVal The attribute value to compare.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @param line The DN to compare attribute in.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @param compareOptions The constraints for the compare request.
fdd3077db2228482076ca7f288c80761f311ea0eMark de Reeper * @return the LDAP result code for the operation
fdd3077db2228482076ca7f288c80761f311ea0eMark de Reeper * @throws IOException If a problem occurs while communicating with the
fdd3077db2228482076ca7f288c80761f311ea0eMark de Reeper * Directory Server.
fdd3077db2228482076ca7f288c80761f311ea0eMark de Reeper * @throws LDAPException If the server returns an error response.
f3a3209406fe426c0c2db3af38ac588f856b52d0Andrew Forrest private int executeCompare(LDAPConnection connection, String attributeType,
fdd3077db2228482076ca7f288c80761f311ea0eMark de Reeper ArrayList<Control> controls = compareOptions.getControls();
fdd3077db2228482076ca7f288c80761f311ea0eMark de Reeper ByteString dnOctetStr = ByteString.valueOf(line);
fdd3077db2228482076ca7f288c80761f311ea0eMark de Reeper ByteString attrValOctetStr = ByteString.wrap(attributeVal);
fdd3077db2228482076ca7f288c80761f311ea0eMark de Reeper ProtocolOp protocolOp = new CompareRequestProtocolOp(dnOctetStr,
fdd3077db2228482076ca7f288c80761f311ea0eMark de Reeper out.println(INFO_PROCESSING_COMPARE_OPERATION.get(
fdd3077db2228482076ca7f288c80761f311ea0eMark de Reeper attributeType, attrValOctetStr, dnOctetStr));
eb5a3a5e8c9a94221c5b0e54b511b29c2e9aa2ecKajetan Hemzaczek LDAPMessage message = new LDAPMessage(nextMessageID.getAndIncrement(),
eb5a3a5e8c9a94221c5b0e54b511b29c2e9aa2ecKajetan Hemzaczek connection.getLDAPWriter().writeMessage(message);
eb5a3a5e8c9a94221c5b0e54b511b29c2e9aa2ecKajetan Hemzaczek responseMessage = connection.getLDAPReader().readMessage();
eb5a3a5e8c9a94221c5b0e54b511b29c2e9aa2ecKajetan Hemzaczek String message = LDAPToolUtils.getMessageForConnectionException(ae);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster LocalizableMessage msg = INFO_OPERATION_FAILED.get("COMPARE");
fdd3077db2228482076ca7f288c80761f311ea0eMark de Reeper err.println(wrapText(ae.getMessage(), MAX_LINE_WIDTH));
f3a3209406fe426c0c2db3af38ac588f856b52d0Andrew Forrest responseMessage.getCompareResponseProtocolOp();
f3a3209406fe426c0c2db3af38ac588f856b52d0Andrew Forrest LocalizableMessage errorMessage = op.getErrorMessage();
f3a3209406fe426c0c2db3af38ac588f856b52d0Andrew Forrest if(resultCode != COMPARE_TRUE && resultCode != COMPARE_FALSE
f3a3209406fe426c0c2db3af38ac588f856b52d0Andrew Forrest LocalizableMessage msg = INFO_OPERATION_FAILED.get("COMPARE");
f3a3209406fe426c0c2db3af38ac588f856b52d0Andrew Forrest throw new LDAPException(resultCode, errorMessage, msg,
f3a3209406fe426c0c2db3af38ac588f856b52d0Andrew Forrest out.println(INFO_COMPARE_OPERATION_RESULT_FALSE.get(line));
f3a3209406fe426c0c2db3af38ac588f856b52d0Andrew Forrest out.println(INFO_COMPARE_OPERATION_RESULT_TRUE.get(line));
f3a3209406fe426c0c2db3af38ac588f856b52d0Andrew Forrest LocalizableMessage msg = INFO_OPERATION_FAILED.get("COMPARE");
f3a3209406fe426c0c2db3af38ac588f856b52d0Andrew Forrest LDAPToolUtils.printErrorMessage(err, msg, resultCode, errorMessage,
1f9880666ba8cc0f7ee5dcb20652e33e8ba942c1Mark de Reeper * The main method for LDAPCompare tool.
1f9880666ba8cc0f7ee5dcb20652e33e8ba942c1Mark de Reeper * @param args The command-line arguments provided to this program.
1f9880666ba8cc0f7ee5dcb20652e33e8ba942c1Mark de Reeper int retCode = mainCompare(args, true, System.out, System.err);
1f9880666ba8cc0f7ee5dcb20652e33e8ba942c1Mark de Reeper * Parses the provided command-line arguments and uses that information to
1f9880666ba8cc0f7ee5dcb20652e33e8ba942c1Mark de Reeper * run the ldapcompare tool.
1f9880666ba8cc0f7ee5dcb20652e33e8ba942c1Mark de Reeper * @param args The command-line arguments provided to this program.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @return The error code.
f3a3209406fe426c0c2db3af38ac588f856b52d0Andrew Forrest return mainCompare(args, true, System.out, System.err);
f3a3209406fe426c0c2db3af38ac588f856b52d0Andrew Forrest * Parses the provided command-line arguments and uses that information to
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * run the ldapcompare tool.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @param args The command-line arguments provided to this
f3a3209406fe426c0c2db3af38ac588f856b52d0Andrew Forrest * @param initializeServer Indicates whether to initialize the server.
f3a3209406fe426c0c2db3af38ac588f856b52d0Andrew Forrest * @param outStream The output stream to use for standard output, or
f3a3209406fe426c0c2db3af38ac588f856b52d0Andrew Forrest * <CODE>null</CODE> if standard output is not
f3a3209406fe426c0c2db3af38ac588f856b52d0Andrew Forrest * @param errStream The output stream to use for standard error, or
f3a3209406fe426c0c2db3af38ac588f856b52d0Andrew Forrest * <CODE>null</CODE> if standard error is not
f3a3209406fe426c0c2db3af38ac588f856b52d0Andrew Forrest * @return The error code.
f3a3209406fe426c0c2db3af38ac588f856b52d0Andrew Forrest public static int mainCompare(String[] args, boolean initializeServer,
f3a3209406fe426c0c2db3af38ac588f856b52d0Andrew Forrest OutputStream outStream, OutputStream errStream)
f3a3209406fe426c0c2db3af38ac588f856b52d0Andrew Forrest PrintStream out = NullOutputStream.wrapOrNullStream(outStream);
f3a3209406fe426c0c2db3af38ac588f856b52d0Andrew Forrest PrintStream err = NullOutputStream.wrapOrNullStream(errStream);
f3a3209406fe426c0c2db3af38ac588f856b52d0Andrew Forrest LDAPConnectionOptions connectionOptions = new LDAPConnectionOptions();
f3a3209406fe426c0c2db3af38ac588f856b52d0Andrew Forrest LDAPCompareOptions compareOptions = new LDAPCompareOptions();
f3a3209406fe426c0c2db3af38ac588f856b52d0Andrew Forrest FileBasedArgument keyStorePasswordFile = null;
f3a3209406fe426c0c2db3af38ac588f856b52d0Andrew Forrest FileBasedArgument trustStorePasswordFile = null;
f3a3209406fe426c0c2db3af38ac588f856b52d0Andrew Forrest BooleanArgument scriptFriendlyArgument = null;
f3a3209406fe426c0c2db3af38ac588f856b52d0Andrew Forrest StringArgument propertiesFileArgument = null;
f3a3209406fe426c0c2db3af38ac588f856b52d0Andrew Forrest BooleanArgument noPropertiesFileArgument = null;
f3a3209406fe426c0c2db3af38ac588f856b52d0Andrew Forrest ArrayList<String> dnStrings = new ArrayList<String> ();
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster // Create the command-line argument parser for use with this program.
f3a3209406fe426c0c2db3af38ac588f856b52d0Andrew Forrest LocalizableMessage toolDescription = INFO_LDAPCOMPARE_TOOL_DESCRIPTION.get();
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster ArgumentParser argParser = new ArgumentParser(CLASS_NAME, toolDescription,
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster " \'attribute:value\' \"DN\" ...");
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster argParser.setShortToolDescription(REF_SHORT_DESC_LDAPCOMPARE.get());
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster argParser.setVersionHandler(new DirectoryServerVersionHandler());
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster "script-friendly",
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster "script-friendly",
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster propertiesFileArgument = new StringArgument("propertiesFilePath",
f3a3209406fe426c0c2db3af38ac588f856b52d0Andrew Forrest false, false, true, INFO_PROP_FILE_PATH_PLACEHOLDER.get(), null, null,
f3a3209406fe426c0c2db3af38ac588f856b52d0Andrew Forrest argParser.addArgument(propertiesFileArgument);
f3a3209406fe426c0c2db3af38ac588f856b52d0Andrew Forrest argParser.setFilePropertiesArgument(propertiesFileArgument);
f3a3209406fe426c0c2db3af38ac588f856b52d0Andrew Forrest noPropertiesFileArgument = new BooleanArgument(
f3a3209406fe426c0c2db3af38ac588f856b52d0Andrew Forrest "noPropertiesFileArgument", null, OPTION_LONG_NO_PROP_FILE,
f3a3209406fe426c0c2db3af38ac588f856b52d0Andrew Forrest argParser.addArgument(noPropertiesFileArgument);
f3a3209406fe426c0c2db3af38ac588f856b52d0Andrew Forrest argParser.setNoPropertiesFileArgument(noPropertiesFileArgument);
f3a3209406fe426c0c2db3af38ac588f856b52d0Andrew Forrest hostName = new StringArgument("host", OPTION_SHORT_HOST,
f3a3209406fe426c0c2db3af38ac588f856b52d0Andrew Forrest OPTION_LONG_HOST, false, false, true,
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster port = new IntegerArgument("port", OPTION_SHORT_PORT,
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster OPTION_LONG_PORT, false, false, true,
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster useSSL = new BooleanArgument("useSSL", OPTION_SHORT_USE_SSL,
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster startTLS = new BooleanArgument("startTLS", OPTION_SHORT_START_TLS,
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster startTLS.setPropertyName(OPTION_LONG_START_TLS);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster bindDN = new StringArgument("bindDN", OPTION_SHORT_BINDDN,
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster OPTION_LONG_BINDDN, false, false, true,
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster bindPassword = new StringArgument("bindPassword", OPTION_SHORT_BINDPWD,
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster false, false, true,
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster bindPassword.setPropertyName(OPTION_LONG_BINDPWD);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster false, false,
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster null, INFO_DESCRIPTION_BINDPASSWORDFILE.get());
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster bindPasswordFile.setPropertyName(OPTION_LONG_BINDPWD_FILE);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster filename = new StringArgument("filename", OPTION_SHORT_FILENAME,
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster filename.setPropertyName(OPTION_LONG_FILENAME);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster "useSASLExternal",
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster saslExternal.setPropertyName("useSASLExternal");
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster saslOptions = new StringArgument("saslOption", OPTION_SHORT_SASLOPTION,
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster saslOptions.setPropertyName(OPTION_LONG_SASLOPTION);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster keyStorePath = new StringArgument("keyStorePath",
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster false, false, true,
e4c435db2e64b396f97aabc84fa409decc921989Neil Madden keyStorePath.setPropertyName(OPTION_LONG_KEYSTOREPATH);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster keyStorePassword = new StringArgument("keyStorePassword",
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster keyStorePassword.setPropertyName(OPTION_LONG_KEYSTORE_PWD);
e4c435db2e64b396f97aabc84fa409decc921989Neil Madden false, false,
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster keyStorePasswordFile.setPropertyName(OPTION_LONG_KEYSTORE_PWD_FILE);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster new StringArgument("certnickname", 'N', "certNickname",
e4c435db2e64b396f97aabc84fa409decc921989Neil Madden false, false, true,
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster false, false, true,
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster trustStorePath.setPropertyName(OPTION_LONG_TRUSTSTOREPATH);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster false, false, true,
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster null, INFO_DESCRIPTION_TRUSTSTOREPASSWORD.get());
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster trustStorePassword.setPropertyName(OPTION_LONG_TRUSTSTORE_PWD);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster "trustStorePasswordFile",
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster INFO_TRUSTSTORE_PWD_FILE_PLACEHOLDER.get(), null,
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster INFO_DESCRIPTION_TRUSTSTOREPASSWORD_FILE.get());
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster trustStorePasswordFile.setPropertyName(OPTION_LONG_TRUSTSTORE_PWD_FILE);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster assertionFilter = new StringArgument("assertionfilter", null,
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster OPTION_LONG_ASSERTION_FILE, false, false, true,
null,
return CLIENT_SIDE_PARAM_ERROR;
return CLIENT_SIDE_PARAM_ERROR;
return SUCCESS;
return CLIENT_SIDE_PARAM_ERROR;
return CLIENT_SIDE_PARAM_ERROR;
return CLIENT_SIDE_PARAM_ERROR;
return CLIENT_SIDE_PARAM_ERROR;
return CLIENT_SIDE_PARAM_ERROR;
catch (ParseException e)
return CLIENT_SIDE_PARAM_ERROR;
catch (Exception e)
return CLIENT_SIDE_PARAM_ERROR;
return CLIENT_SIDE_PARAM_ERROR;
return CLIENT_SIDE_PARAM_ERROR;
return CLIENT_SIDE_PARAM_ERROR;
return CLIENT_SIDE_PARAM_ERROR;
return CLIENT_SIDE_PARAM_ERROR;
return CLIENT_SIDE_PARAM_ERROR;
boolean val;
if(!val)
return CLIENT_SIDE_PARAM_ERROR;
return CLIENT_SIDE_PARAM_ERROR;
return CLIENT_SIDE_PARAM_ERROR;
if (initializeServer)
timeout);
catch (Throwable t)
return CLIENT_SIDE_PARAM_ERROR;
int resultCode;
return resultCode;
return SUCCESS;
} catch(Exception e)
return OPERATIONS_ERROR;
private boolean isScriptFriendly()
return isScriptFriendly;