Fix for issue 2130 (i18n CLI usage placeholders)
The fix consists on changing the placeHolderValue from a String to a Message so that it can be localized. The interfaces and constructors of the argument objects have been updated to reflect this change. The placeholders are defined in tool.properties.
| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2007 Sun Microsystems, Inc. |
| | | * Copyright 2007-2008 Sun Microsystems, Inc. |
| | | */ |
| | | |
| | | package org.opends.guitools.replicationcli; |
| | |
| | | int index = 0; |
| | | |
| | | baseDNsArg = new StringArgument("baseDNs", OPTION_SHORT_BASEDN, |
| | | OPTION_LONG_BASEDN, false, true, true, OPTION_VALUE_BASEDN, null, |
| | | OPTION_LONG_BASEDN, false, true, true, INFO_BASEDN_PLACEHOLDER.get(), |
| | | null, |
| | | null, INFO_DESCRIPTION_REPLICATION_BASEDNS.get()); |
| | | baseDNsArg.setPropertyName(OPTION_LONG_BASEDN); |
| | | defaultArgs.add(index++, baseDNsArg); |
| | | |
| | | secureArgsList.adminUidArg = new StringArgument("adminUID", 'I', |
| | | "adminUID", false, false, true, "adminUID", |
| | | "adminUID", false, false, true, INFO_ADMINUID_PLACEHOLDER.get(), |
| | | Constants.GLOBAL_ADMIN_UID, null, |
| | | INFO_DESCRIPTION_REPLICATION_ADMIN_UID.get( |
| | | ENABLE_REPLICATION_SUBCMD_NAME)); |
| | |
| | | |
| | | secureArgsList.bindPasswordArg = new StringArgument("adminPassword", |
| | | OPTION_SHORT_BINDPWD, "adminPassword", false, false, true, |
| | | OPTION_VALUE_BINDPWD, null, null, |
| | | INFO_BINDPWD_PLACEHOLDER.get(), null, null, |
| | | INFO_DESCRIPTION_REPLICATION_ADMIN_BINDPASSWORD.get()); |
| | | defaultArgs.add(index++, secureArgsList.bindPasswordArg); |
| | | |
| | | secureArgsList.bindPasswordFileArg = new FileBasedArgument( |
| | | "adminPasswordFile", |
| | | OPTION_SHORT_BINDPWD_FILE, "adminPasswordFile", false, false, |
| | | OPTION_VALUE_BINDPWD_FILE, null, null, |
| | | INFO_BINDPWD_FILE_PLACEHOLDER.get(), null, null, |
| | | INFO_DESCRIPTION_REPLICATION_ADMIN_BINDPASSWORDFILE.get()); |
| | | defaultArgs.add(index++, secureArgsList.bindPasswordFileArg); |
| | | |
| | |
| | | |
| | | StringArgument propertiesFileArgument = new StringArgument( |
| | | "propertiesFilePath", null, OPTION_LONG_PROP_FILE_PATH, false, false, |
| | | true, OPTION_VALUE_PROP_FILE_PATH, null, null, |
| | | true, INFO_PROP_FILE_PATH_PLACEHOLDER.get(), null, null, |
| | | INFO_DESCRIPTION_PROP_FILE_PATH.get()); |
| | | defaultArgs.add(propertiesFileArgument); |
| | | setFilePropertiesArgument(propertiesFileArgument); |
| | |
| | | { |
| | | |
| | | hostName1Arg = new StringArgument("host1", OPTION_SHORT_HOST, |
| | | "host1", false, false, true, OPTION_VALUE_HOST, getDefaultHostValue(), |
| | | "host1", false, false, true, INFO_HOST_PLACEHOLDER.get(), |
| | | getDefaultHostValue(), |
| | | null, INFO_DESCRIPTION_ENABLE_REPLICATION_HOST1.get()); |
| | | |
| | | port1Arg = new IntegerArgument("port1", OPTION_SHORT_PORT, "port1", |
| | | false, false, true, OPTION_VALUE_PORT, 389, null, |
| | | false, false, true, INFO_PORT_PLACEHOLDER.get(), 389, null, |
| | | INFO_DESCRIPTION_ENABLE_REPLICATION_SERVER_PORT1.get()); |
| | | |
| | | bindDn1Arg = new StringArgument("bindDN1", OPTION_SHORT_BINDDN, |
| | | "bindDN1", false, false, true, OPTION_VALUE_BINDDN, |
| | | "bindDN1", false, false, true, INFO_BINDDN_PLACEHOLDER.get(), |
| | | "cn=Directory Manager", null, |
| | | INFO_DESCRIPTION_ENABLE_REPLICATION_BINDDN1.get()); |
| | | |
| | | bindPassword1Arg = new StringArgument("bindPassword1", |
| | | null, "bindPassword1", false, false, true, |
| | | OPTION_VALUE_BINDPWD, null, null, |
| | | INFO_BINDPWD_PLACEHOLDER.get(), null, null, |
| | | INFO_DESCRIPTION_ENABLE_REPLICATION_BINDPASSWORD1.get()); |
| | | |
| | | bindPasswordFile1Arg = new FileBasedArgument("bindPasswordFile1", |
| | | null, "bindPasswordFile1", false, false, |
| | | OPTION_VALUE_BINDPWD_FILE, null, null, |
| | | INFO_BINDPWD_FILE_PLACEHOLDER.get(), null, null, |
| | | INFO_DESCRIPTION_ENABLE_REPLICATION_BINDPASSWORDFILE1.get()); |
| | | |
| | | useSSL1Arg = new BooleanArgument("useSSL1", OPTION_SHORT_USE_SSL, |
| | |
| | | INFO_DESCRIPTION_ENABLE_REPLICATION_STARTTLS1.get()); |
| | | |
| | | replicationPort1Arg = new IntegerArgument("replicationPort1", 'r', |
| | | "replicationPort1", false, false, true, OPTION_VALUE_PORT, 8989, null, |
| | | "replicationPort1", false, false, true, INFO_PORT_PLACEHOLDER.get(), |
| | | 8989, null, |
| | | INFO_DESCRIPTION_ENABLE_REPLICATION_PORT1.get()); |
| | | |
| | | secureReplication1Arg = new BooleanArgument("secureReplication1", null, |
| | |
| | | INFO_DESCRIPTION_ENABLE_SECURE_REPLICATION1.get()); |
| | | |
| | | hostName2Arg = new StringArgument("host2", 'O', |
| | | "host2", false, false, true, OPTION_VALUE_HOST, getDefaultHostValue(), |
| | | "host2", false, false, true, INFO_HOST_PLACEHOLDER.get(), |
| | | getDefaultHostValue(), |
| | | null, INFO_DESCRIPTION_ENABLE_REPLICATION_HOST2.get()); |
| | | |
| | | port2Arg = new IntegerArgument("port2", null, "port2", |
| | | false, false, true, OPTION_VALUE_PORT, 389, null, |
| | | false, false, true, INFO_PORT_PLACEHOLDER.get(), 389, null, |
| | | INFO_DESCRIPTION_ENABLE_REPLICATION_SERVER_PORT2.get()); |
| | | |
| | | bindDn2Arg = new StringArgument("bindDN2", null, |
| | | "bindDN2", false, false, true, OPTION_VALUE_BINDDN, |
| | | "bindDN2", false, false, true, INFO_BINDDN_PLACEHOLDER.get(), |
| | | "cn=Directory Manager", null, |
| | | INFO_DESCRIPTION_ENABLE_REPLICATION_BINDDN2.get()); |
| | | |
| | | bindPassword2Arg = new StringArgument("bindPassword2", |
| | | null, "bindPassword2", false, false, true, |
| | | OPTION_VALUE_BINDPWD, null, null, |
| | | INFO_BINDPWD_PLACEHOLDER.get(), null, null, |
| | | INFO_DESCRIPTION_ENABLE_REPLICATION_BINDPASSWORD2.get()); |
| | | |
| | | bindPasswordFile2Arg = new FileBasedArgument("bindPasswordFile2", |
| | | 'F', "bindPasswordFile2", false, false, |
| | | OPTION_VALUE_BINDPWD_FILE, null, null, |
| | | INFO_BINDPWD_FILE_PLACEHOLDER.get(), null, null, |
| | | INFO_DESCRIPTION_ENABLE_REPLICATION_BINDPASSWORDFILE2.get()); |
| | | |
| | | useSSL2Arg = new BooleanArgument("useSSL2", 'z', |
| | |
| | | INFO_DESCRIPTION_ENABLE_REPLICATION_STARTTLS2.get()); |
| | | |
| | | replicationPort2Arg = new IntegerArgument("replicationPort2", 'R', |
| | | "replicationPort2", false, false, true, OPTION_VALUE_PORT, 8989, null, |
| | | "replicationPort2", false, false, true, INFO_PORT_PLACEHOLDER.get(), |
| | | 8989, null, |
| | | INFO_DESCRIPTION_ENABLE_REPLICATION_PORT2.get()); |
| | | |
| | | secureReplication2Arg = new BooleanArgument("secureReplication2", null, |
| | |
| | | INFO_DESCRIPTION_SUBCMD_DISABLE_REPLICATION.get()); |
| | | secureArgsList.hostNameArg.setDefaultValue(getDefaultHostValue()); |
| | | secureArgsList.bindDnArg = new StringArgument("bindDN", OPTION_SHORT_BINDDN, |
| | | OPTION_LONG_BINDDN, false, false, true, OPTION_VALUE_BINDDN, |
| | | OPTION_LONG_BINDDN, false, false, true, INFO_BINDDN_PLACEHOLDER.get(), |
| | | "cn=Directory Manager", OPTION_LONG_BINDDN, |
| | | INFO_DESCRIPTION_DISABLE_REPLICATION_BINDDN.get()); |
| | | Argument[] argsToAdd = { secureArgsList.hostNameArg, |
| | |
| | | throws ArgumentException |
| | | { |
| | | hostNameSourceArg = new StringArgument("hostSource", OPTION_SHORT_HOST, |
| | | "hostSource", false, false, true, OPTION_VALUE_HOST, |
| | | "hostSource", false, false, true, INFO_HOST_PLACEHOLDER.get(), |
| | | getDefaultHostValue(), null, |
| | | INFO_DESCRIPTION_INITIALIZE_REPLICATION_HOST_SOURCE.get()); |
| | | |
| | | portSourceArg = new IntegerArgument("portSource", OPTION_SHORT_PORT, |
| | | "portSource", false, false, true, OPTION_VALUE_PORT, 389, null, |
| | | "portSource", false, false, true, INFO_PORT_PLACEHOLDER.get(), 389, |
| | | null, |
| | | INFO_DESCRIPTION_INITIALIZE_REPLICATION_SERVER_PORT_SOURCE.get()); |
| | | |
| | | useSSLSourceArg = new BooleanArgument("useSSLSource", OPTION_SHORT_USE_SSL, |
| | |
| | | INFO_DESCRIPTION_INITIALIZE_REPLICATION_STARTTLS_SOURCE.get()); |
| | | |
| | | hostNameDestinationArg = new StringArgument("hostDestination", 'O', |
| | | "hostDestination", false, false, true, OPTION_VALUE_HOST, |
| | | "hostDestination", false, false, true, INFO_HOST_PLACEHOLDER.get(), |
| | | getDefaultHostValue(), null, |
| | | INFO_DESCRIPTION_INITIALIZE_REPLICATION_HOST_DESTINATION.get()); |
| | | |
| | | portDestinationArg = new IntegerArgument("portDestination", null, |
| | | "portDestination", false, false, true, OPTION_VALUE_PORT, 389, null, |
| | | "portDestination", false, false, true, INFO_PORT_PLACEHOLDER.get(), 389, |
| | | null, |
| | | INFO_DESCRIPTION_INITIALIZE_REPLICATION_SERVER_PORT_DESTINATION.get()); |
| | | |
| | | useSSLDestinationArg = new BooleanArgument("useSSLDestination", 'z', |
| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2007-2008 Sun Microsystems, Inc. |
| | | * Copyright 2007-2008 Sun Microsystems, Inc. |
| | | */ |
| | | |
| | | package org.opends.guitools.replicationcli; |
| | |
| | | import org.opends.admin.ads.util.ServerLoader; |
| | | import org.opends.messages.Message; |
| | | import org.opends.messages.MessageBuilder; |
| | | import org.opends.messages.UtilityMessages; |
| | | import org.opends.quicksetup.ApplicationException; |
| | | import org.opends.quicksetup.Constants; |
| | | import org.opends.quicksetup.QuickSetupLog; |
| | |
| | | catch (ArgumentException ae) |
| | | { |
| | | Message message = |
| | | UtilityMessages.ERR_CANNOT_INITIALIZE_ARGS.get(ae.getMessage()); |
| | | ERR_CANNOT_INITIALIZE_ARGS.get(ae.getMessage()); |
| | | println(message); |
| | | LOG.log(Level.SEVERE, "Complete error stack:", ae); |
| | | returnValue = CANNOT_INITIALIZE_ARGS; |
| | |
| | | import static org.opends.messages.ToolMessages.*; |
| | | import static org.opends.server.tools.ToolConstants.OPTION_LONG_NO_PROP_FILE; |
| | | import static org.opends.server.tools.ToolConstants.OPTION_LONG_PROP_FILE_PATH; |
| | | import static org.opends.server.tools.ToolConstants.OPTION_VALUE_PROP_FILE_PATH; |
| | | |
| | | import java.io.OutputStream; |
| | | import java.util.ArrayList; |
| | |
| | | |
| | | StringArgument propertiesFileArgument = new StringArgument( |
| | | "propertiesFilePath", null, OPTION_LONG_PROP_FILE_PATH, false, false, |
| | | true, OPTION_VALUE_PROP_FILE_PATH, null, null, |
| | | true, INFO_PROP_FILE_PATH_PLACEHOLDER.get(), null, null, |
| | | INFO_DESCRIPTION_PROP_FILE_PATH.get()); |
| | | defaultArgs.add(propertiesFileArgument); |
| | | setFilePropertiesArgument(propertiesFileArgument); |
| | |
| | | referencedHostNameArg = new StringArgument("referencedHostName", |
| | | ToolConstants.OPTION_SHORT_HOST, |
| | | OPTION_LONG_REFERENCED_HOST_NAME, false, false, true, |
| | | ToolConstants.OPTION_VALUE_HOST, |
| | | INFO_HOST_PLACEHOLDER.get(), |
| | | uData.getHostName(), OPTION_LONG_REFERENCED_HOST_NAME, |
| | | INFO_DESCRIPTION_REFERENCED_HOST.get()); |
| | | defaultArgs.add(referencedHostNameArg); |
| | |
| | | specified several times |
| | | MILD_ERR_INSTALLDS_EMPTY_DN_RESPONSE_1498=ERROR: The empty LDAP DN is not \ |
| | | a valid value |
| | | |
| | | # Placeholders for values as they will be displayed in the usage |
| | | INFO_FILE_PLACEHOLDER_1499={file} |
| | | INFO_DIRECTORY_PLACEHOLDER_1500={directory} |
| | | INFO_CONFIGFILE_PLACEHOLDER_1501={configFile} |
| | | INFO_LDIFFILE_PLACEHOLDER_1502={ldifFile} |
| | | INFO_SEED_PLACEHOLDER_1503={seed} |
| | | INFO_KEYSTOREPATH_PLACEHOLDER_1504={keyStorePath} |
| | | INFO_TRUSTSTOREPATH_PLACEHOLDER_1505={trustStorePath} |
| | | INFO_BINDPWD_FILE_PLACEHOLDER_1506={bindPasswordFile} |
| | | INFO_CONFIGCLASS_PLACEHOLDER_1507={configClass} |
| | | INFO_HOST_PLACEHOLDER_1508={host} |
| | | INFO_PORT_PLACEHOLDER_1509={port} |
| | | INFO_BASEDN_PLACEHOLDER_1510={baseDN} |
| | | INFO_ROOT_USER_DN_PLACEHOLDER_1511={rootUserDN} |
| | | INFO_BINDDN_PLACEHOLDER_1512={bindDN} |
| | | INFO_BINDPWD_PLACEHOLDER_1513={bindPassword} |
| | | INFO_KEYSTORE_PWD_PLACEHOLDER_1514={keyStorePassword} |
| | | INFO_PATH_PLACEHOLDER_1515={path} |
| | | INFO_TRUSTSTORE_PWD_FILE_PLACEHOLDER_1516={path} |
| | | INFO_TRUSTSTORE_PWD_PLACEHOLDER_1517={trustStorePassword} |
| | | INFO_NICKNAME_PLACEHOLDER_1518={nickname} |
| | | INFO_ASSERTION_FILTER_PLACEHOLDER_1519={filter} |
| | | INFO_FILTER_PLACEHOLDER_1520={filter} |
| | | INFO_PROXYAUTHID_PLACEHOLDER_1521={authzID} |
| | | INFO_SASL_OPTION_PLACEHOLDER_1522={name=value} |
| | | INFO_PROTOCOL_VERSION_PLACEHOLDER_1523={version} |
| | | INFO_DESCRIPTION_PLACEHOLDER_1524={description} |
| | | INFO_GROUPNAME_PLACEHOLDER_1525={groupName} |
| | | INFO_MEMBERNAME_PLACEHOLDER_1526={memberName} |
| | | INFO_BACKENDNAME_PLACEHOLDER_1527={backendName} |
| | | INFO_SERVERID_PLACEHOLDER_1528={serverID} |
| | | INFO_USERID_PLACEHOLDER_1529={userID} |
| | | INFO_VALUE_SET_PLACEHOLDER_1530={PROP:VALUE} |
| | | INFO_START_DATETIME_PLACEHOLDER_1531={startTime} |
| | | INFO_PROP_FILE_PATH_PLACEHOLDER_1532={propertiesFilePath} |
| | | INFO_EMAIL_ADDRESS_PLACEHOLDER_1533={emailAddress} |
| | | INFO_TASK_ID_PLACEHOLDER_1534={taskID} |
| | | INFO_ACTION_PLACEHOLDER_1535={action} |
| | | INFO_TYPE_PLACEHOLDER_1536={type} |
| | | INFO_CATEGORY_PLACEHOLDER_1537={category} |
| | | INFO_PROPERTY_PLACEHOLDER_1538={property} |
| | | INFO_NAME_PLACEHOLDER_1539={name} |
| | | INFO_UNIT_PLACEHOLDER_1540={unit} |
| | | INFO_BACKUPID_PLACEHOLDER_1541={backupID} |
| | | INFO_BACKUPDIR_PLACEHOLDER_1542={backupDir} |
| | | INFO_LDAPPORT_PLACEHOLDER_1543={ldapPort} |
| | | INFO_JMXPORT_PLACEHOLDER_1544={jmxPort} |
| | | INFO_KEY_MANAGER_PROVIDER_DN_PLACEHOLDER_1545={keyManagerProviderDN} |
| | | INFO_TRUST_MANAGER_PROVIDER_DN_PLACEHOLDER_1546={trustManagerProviderDN} |
| | | INFO_KEY_MANAGER_PATH_PLACEHOLDER_1547={keyManagerPath} |
| | | INFO_ROOT_USER_PWD_PLACEHOLDER_1548={rootUserPassword} |
| | | INFO_SERVER_ROOT_DIR_PLACEHOLDER_1549={serverRootDir} |
| | | INFO_SERVICE_NAME_PLACEHOLDER_1550={serviceName} |
| | | INFO_USER_NAME_PLACEHOLDER_1551={userName} |
| | | INFO_ARGS_PLACEHOLDER_1552={args} |
| | | INFO_DATABASE_NAME_PLACEHOLDER_1553={databaseName} |
| | | INFO_MAX_KEY_VALUE_PLACEHOLDER_1554={maxKeyValue} |
| | | INFO_MIN_KEY_VALUE_PLACEHOLDER_1555={minKeyValue} |
| | | INFO_MAX_DATA_SIZE_PLACEHOLDER_1556={maxDataSize} |
| | | INFO_MIN_DATA_SIZE_PLACEHOLDER_1557={minDataSize} |
| | | INFO_CLEAR_PWD_1558={clearPW} |
| | | INFO_ENCODED_PWD_PLACEHOLDER_1559={encodedPW} |
| | | INFO_STORAGE_SCHEME_PLACEHOLDER_1560={scheme} |
| | | INFO_BRANCH_DN_PLACEHOLDER_1561={branchDN} |
| | | INFO_ATTRIBUTE_PLACEHOLDER_1562={attribute} |
| | | INFO_WRAP_COLUMN_PLACEHOLDER_1563={wrapColumn} |
| | | INFO_TEMPLATE_FILE_PLACEHOLDER_1564={templateFile} |
| | | INFO_REJECT_FILE_PLACEHOLDER_1565={rejectFile} |
| | | INFO_SKIP_FILE_PLACEHOLDER_1566={skipFile} |
| | | INFO_PROGRAM_NAME_PLACEHOLDER_1567={programName} |
| | | INFO_NUM_ENTRIES_PLACEHOLDER_1568={numEntries} |
| | | INFO_ROOT_USER_PWD_FILE_PLACEHOLDER_1569={rootUserPasswordFile} |
| | | INFO_LDAP_CONTROL_PLACEHOLDER_1570={controloid[:criticality[:value|::b64value|:<filePath]]} |
| | | INFO_ENCODING_PLACEHOLDER_1571={encoding} |
| | | INFO_ATTRIBUTE_LIST_PLACEHOLDER_1572={attrList} |
| | | INFO_NEW_PASSWORD_PLACEHOLDER_1573={newPassword} |
| | | INFO_CURRENT_PASSWORD_PLACEHOLDER_1574={currentPassword} |
| | | INFO_SEARCH_SCOPE_PLACEHOLDER_1575={searchScope} |
| | | INFO_SORT_ORDER_PLACEHOLDER_1576={sortOrder} |
| | | INFO_VLV_PLACEHOLDER_1577={before:after:index:count | before:after:value} |
| | | INFO_DEREFERENCE_POLICE_PLACEHOLDER_1578={dereferencePolicy} |
| | | INFO_SIZE_LIMIT_PLACEHOLDER_1579={sizeLimit} |
| | | INFO_TIME_LIMIT_PLACEHOLDER_1580={timeLimit} |
| | | INFO_SCOPE_PLACEHOLDER_1581={scope} |
| | | INFO_FILTER_FILE_PLACEHOLDER_1582={filterFile} |
| | | INFO_OUTPUT_FILE_PLACEHOLDER_1583={outputFile} |
| | | INFO_TARGETDN_PLACEHOLDER_1584={targetDN} |
| | | INFO_TIME_PLACEHOLDER_1585={time} |
| | | INFO_TRUE_FALSE_PLACEHOLDER_1586={true|false} |
| | | INFO_INDEX_PLACEHOLDER_1587={index} |
| | | INFO_STOP_REASON_PLACEHOLDER_1588={stopReason} |
| | | INFO_STOP_TIME_PLACEHOLDER_1589={stopTime} |
| | | INFO_SECONDS_PLACEHOLDER_1590={seconds} |
| | | INFO_DATA_PLACEHOLDER_1591={data} |
| | | INFO_ADDRESS_PLACEHOLDER_1592={address} |
| | | INFO_SUBJECT_PLACEHOLDER_1593={subject} |
| | | INFO_ADMINUID_PLACEHOLDER_1594={adminUID} |
| | | INFO_KEYSTORE_PWD_FILE_PLACEHOLDER_1595={keyStorePasswordFile} |
| | | INFO_PSEARCH_PLACEHOLDER_1596=ps[:changetype[:changesonly[:entrychgcontrols]]] |
| | | |
| | | INFO_MULTICHOICE_TRUE_VALUE_1597=true |
| | | INFO_MULTICHOICE_FALSE_VALUE_1598=false |
| | |
| | | INFO_EMAIL_ATTACH_DESCRIPTION_177=The path to a file to attach to the e-mail \ |
| | | message |
| | | INFO_EMAIL_HELP_DESCRIPTION_178=Display this usage information |
| | | SEVERE_ERR_CANNOT_INITIALIZE_ARGS_179=An error occurred while attempting to \ |
| | | initialize the argument parser: %s |
| | | SEVERE_ERR_CANNOT_PARSE_ARGS_180=An error occurred while attempting to parse \ |
| | | the provided command-line arguments: %s |
| | | SEVERE_ERR_EMAIL_NO_SUCH_BODY_FILE_181=The file %s specified as the body file \ |
| | | for the e-mail message does not exist |
| | | SEVERE_ERR_EMAIL_CANNOT_PROCESS_BODY_FILE_182=An error occurred while \ |
| | |
| | | FILE_OPTION_SHORT, |
| | | FILE_OPTION_LONG, |
| | | false, false, true, |
| | | "{file}", |
| | | INFO_FILE_PLACEHOLDER.get(), |
| | | null, null, INFO_UPGRADE_DESCRIPTION_FILE.get()); |
| | | argParser.addArgument(file); |
| | | |
| | |
| | | REVERT_ARCHIVE_OPTION_SHORT, |
| | | REVERT_ARCHIVE_OPTION_LONG, |
| | | false, false, true, |
| | | "{directory}", |
| | | INFO_DIRECTORY_PLACEHOLDER.get(), |
| | | null, null, INFO_REVERT_DESCRIPTION_DIRECTORY.get()); |
| | | argParser.addArgument(reversionArchive); |
| | | |
| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2006-2007 Sun Microsystems, Inc. |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.admin.client.cli; |
| | | |
| | | import static org.opends.messages.AdminMessages.*; |
| | | import static org.opends.messages.ToolMessages.*; |
| | | import static org.opends.server.tools.ToolConstants.*; |
| | | |
| | | import java.io.OutputStream; |
| | |
| | | |
| | | createAdsBackendNameArg = new StringArgument("backendName", |
| | | OPTION_SHORT_BACKENDNAME, OPTION_LONG_BACKENDNAME, false, true, |
| | | OPTION_VALUE_BACKENDNAME, |
| | | INFO_BACKENDNAME_PLACEHOLDER.get(), |
| | | INFO_ADMIN_ARG_BACKENDNAME_DESCRIPTION.get()); |
| | | createAdsSubCmd.addArgument(createAdsBackendNameArg); |
| | | |
| | |
| | | |
| | | deleteAdsBackendNameArg = new StringArgument("backendName", |
| | | OPTION_SHORT_BACKENDNAME, OPTION_LONG_BACKENDNAME, true, true, |
| | | OPTION_VALUE_BACKENDNAME, |
| | | INFO_BACKENDNAME_PLACEHOLDER.get(), |
| | | INFO_ADMIN_ARG_BACKENDNAME_DESCRIPTION.get()); |
| | | deleteAdsSubCmd.addArgument(deleteAdsBackendNameArg); |
| | | } |
| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2007 Sun Microsystems, Inc. |
| | | * Copyright 2007-2008 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.admin.client.cli; |
| | | import org.opends.messages.Message; |
| | |
| | | subCommands.add(createAdminUserSubCmd); |
| | | |
| | | createAdminUserUserIdArg = new StringArgument("userID", null, |
| | | OPTION_LONG_USERID, false, true, OPTION_VALUE_USERID, |
| | | OPTION_LONG_USERID, false, true, INFO_USERID_PLACEHOLDER.get(), |
| | | INFO_ADMIN_ARG_USERID_DESCRIPTION.get()); |
| | | createAdminUserSubCmd.addArgument(createAdminUserUserIdArg); |
| | | |
| | | createAdminUserSetArg = new StringArgument(OPTION_LONG_SET, |
| | | OPTION_SHORT_SET, OPTION_LONG_SET, false, true, true, |
| | | OPTION_VALUE_SET, null, null, INFO_DSCFG_DESCRIPTION_PROP_VAL.get()); |
| | | INFO_VALUE_SET_PLACEHOLDER.get(), null, null, |
| | | INFO_DSCFG_DESCRIPTION_PROP_VAL.get()); |
| | | createAdminUserSubCmd.addArgument(createAdminUserSetArg); |
| | | |
| | | // delete-admin-user subcommand. |
| | |
| | | subCommands.add(deleteAdminUserSubCmd); |
| | | |
| | | deleteAdminUserUserIdArg = new StringArgument("userID", null, |
| | | OPTION_LONG_USERID, false, true, OPTION_VALUE_USERID, |
| | | OPTION_LONG_USERID, false, true, INFO_USERID_PLACEHOLDER.get(), |
| | | INFO_ADMIN_ARG_USERID_DESCRIPTION.get()); |
| | | deleteAdminUserSubCmd.addArgument(deleteAdminUserUserIdArg); |
| | | |
| | |
| | | subCommands.add(getAdminUserPropertiesSubCmd); |
| | | |
| | | getAdminUserPropertiesUserIdArg = new StringArgument("userID", null, |
| | | OPTION_LONG_USERID, false, true, OPTION_VALUE_USERID, |
| | | OPTION_LONG_USERID, false, true, INFO_USERID_PLACEHOLDER.get(), |
| | | INFO_ADMIN_ARG_USERID_DESCRIPTION.get()); |
| | | getAdminUserPropertiesUserIdArg.setMultiValued(true); |
| | | getAdminUserPropertiesSubCmd.addArgument(getAdminUserPropertiesUserIdArg); |
| | |
| | | subCommands.add(setAdminUserPropertiesSubCmd); |
| | | |
| | | setAdminUserPropertiesUserIdArg = new StringArgument("userID", null, |
| | | OPTION_LONG_USERID, false, true, OPTION_VALUE_USERID, |
| | | OPTION_LONG_USERID, false, true, INFO_USERID_PLACEHOLDER.get(), |
| | | INFO_ADMIN_ARG_USERID_DESCRIPTION.get()); |
| | | setAdminUserPropertiesSubCmd.addArgument(setAdminUserPropertiesUserIdArg); |
| | | |
| | | setAdminUserPropertiesSetArg = new StringArgument(OPTION_LONG_SET, |
| | | OPTION_SHORT_SET, OPTION_LONG_SET, false, true, true, |
| | | OPTION_VALUE_SET, null, null, INFO_DSCFG_DESCRIPTION_PROP_VAL.get()); |
| | | INFO_VALUE_SET_PLACEHOLDER.get(), null, null, |
| | | INFO_DSCFG_DESCRIPTION_PROP_VAL.get()); |
| | | setAdminUserPropertiesSubCmd.addArgument(setAdminUserPropertiesSetArg); |
| | | |
| | | // list-admin-user-properties subcommand. |
| | |
| | | AdministratorProperty prop = AdministratorProperty.UID; |
| | | String attName = prop.getAttributeName(); |
| | | StringArgument arg = new StringArgument(attName, null, |
| | | attName, false, false, true, "", null, null, null); |
| | | attName, false, false, true, Message.raw(""), null, null, null); |
| | | userAdminProperties.put(prop, arg); |
| | | } |
| | | |
| | |
| | | AdministratorProperty prop = AdministratorProperty.PASSWORD; |
| | | String attName = prop.getAttributeName(); |
| | | StringArgument arg = new StringArgument(attName, null, |
| | | attName, false, false, true, "", null, null, null); |
| | | attName, false, false, true, Message.raw(""), null, null, null); |
| | | userAdminProperties.put(prop, arg); |
| | | } |
| | | |
| | |
| | | AdministratorProperty prop = AdministratorProperty.DESCRIPTION; |
| | | String attName = prop.getAttributeName(); |
| | | StringArgument arg = new StringArgument(attName, null, |
| | | attName, false, false, true, "", null, null, null); |
| | | attName, false, false, true, Message.raw(""), null, null, null); |
| | | userAdminProperties.put(prop, arg); |
| | | } |
| | | |
| | |
| | | AdministratorProperty prop = AdministratorProperty.ADMINISTRATOR_DN; |
| | | String attName = prop.getAttributeName(); |
| | | StringArgument arg = new StringArgument(attName, null, |
| | | attName, false, false, true, "", null, null, null); |
| | | attName, false, false, true, Message.raw(""), null, null, null); |
| | | userAdminProperties.put(prop, arg); |
| | | readonlyadminUserProperties.add(prop); |
| | | } |
| | |
| | | AdministratorProperty prop = AdministratorProperty.PRIVILEGE; |
| | | String attName = prop.getAttributeName(); |
| | | StringArgument arg = new StringArgument(attName, null, |
| | | attName, true, true, true, "", "root", null, null); |
| | | attName, true, true, true, Message.raw(""), "root", null, null); |
| | | userAdminProperties.put(prop, arg); |
| | | } |
| | | } |
| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.admin.client.cli; |
| | | import org.opends.messages.Message; |
| | |
| | | subCommands.add(registerServerSubCmd); |
| | | |
| | | registerServerServerIdArg = new StringArgument("serverID", null, |
| | | OPTION_LONG_SERVERID, false, true, OPTION_VALUE_SERVERID, |
| | | OPTION_LONG_SERVERID, false, true, INFO_SERVERID_PLACEHOLDER.get(), |
| | | INFO_ADMIN_ARG_SERVERID_DESCRIPTION.get()); |
| | | registerServerSubCmd.addArgument(registerServerServerIdArg); |
| | | |
| | | registerServerSetArg = new StringArgument(OPTION_LONG_SET, |
| | | OPTION_SHORT_SET, OPTION_LONG_SET, false, true, true, |
| | | OPTION_VALUE_SET, null, null, INFO_DSCFG_DESCRIPTION_PROP_VAL.get()); |
| | | INFO_VALUE_SET_PLACEHOLDER.get(), null, null, |
| | | INFO_DSCFG_DESCRIPTION_PROP_VAL.get()); |
| | | registerServerSubCmd.addArgument(registerServerSetArg); |
| | | |
| | | // unregister-server subcommand |
| | |
| | | subCommands.add(unregisterServerSubCmd); |
| | | |
| | | unregisterServerServerIDArg = new StringArgument("serverID", null, |
| | | OPTION_LONG_SERVERID, false, true, OPTION_VALUE_SERVERID, |
| | | OPTION_LONG_SERVERID, false, true, INFO_SERVERID_PLACEHOLDER.get(), |
| | | INFO_ADMIN_ARG_SERVERID_DESCRIPTION.get()); |
| | | unregisterServerSubCmd.addArgument(unregisterServerServerIDArg); |
| | | |
| | |
| | | subCommands.add(getServerPropertiesSubCmd); |
| | | |
| | | getServerPropertiesServerIdArg = new StringArgument("serverID", null, |
| | | OPTION_LONG_SERVERID, false, true, OPTION_VALUE_SERVERID, |
| | | OPTION_LONG_SERVERID, false, true, INFO_SERVERID_PLACEHOLDER.get(), |
| | | INFO_ADMIN_ARG_SERVERID_DESCRIPTION.get()); |
| | | getServerPropertiesServerIdArg.setMultiValued(true); |
| | | getServerPropertiesSubCmd.addArgument(getServerPropertiesServerIdArg); |
| | |
| | | subCommands.add(setServerPropertiesSubCmd); |
| | | |
| | | setServerPropertiesServerIdArg = new StringArgument("serverID", null, |
| | | OPTION_LONG_SERVERID, true, true, OPTION_VALUE_SERVERID, |
| | | OPTION_LONG_SERVERID, true, true, INFO_SERVERID_PLACEHOLDER.get(), |
| | | INFO_ADMIN_ARG_SERVERID_DESCRIPTION.get()); |
| | | setServerPropertiesSubCmd.addArgument(setServerPropertiesServerIdArg); |
| | | |
| | | setServerPropertiesSetArg = new StringArgument(OPTION_LONG_SET, |
| | | OPTION_SHORT_SET, OPTION_LONG_SET, false, true, true, |
| | | OPTION_VALUE_SET, null, null, INFO_DSCFG_DESCRIPTION_PROP_VAL.get()); |
| | | INFO_VALUE_SET_PLACEHOLDER.get(), null, null, |
| | | INFO_DSCFG_DESCRIPTION_PROP_VAL.get()); |
| | | setServerPropertiesSubCmd.addArgument(setServerPropertiesSetArg); |
| | | |
| | | |
| | |
| | | ServerProperty prop = ServerProperty.ID; |
| | | String attName = prop.getAttributeName(); |
| | | StringArgument arg = new StringArgument(attName, null, |
| | | prop.getAttributeName(), false, false, true, "", null, null, null); |
| | | prop.getAttributeName(), false, false, true, Message.raw(""), null, |
| | | null, null); |
| | | serverProperties.put(prop, arg); |
| | | } |
| | | |
| | |
| | | String attName = prop.getAttributeName(); |
| | | readonlyServerProperties.add(prop); |
| | | StringArgument arg = new StringArgument(attName, null, attName, true, |
| | | false, true, "", "localhost", null, null); |
| | | false, true, Message.raw(""), "localhost", null, null); |
| | | serverProperties.put(prop, arg); |
| | | } |
| | | |
| | |
| | | ServerProperty prop = ServerProperty.LDAP_PORT; |
| | | String attName = prop.getAttributeName(); |
| | | IntegerArgument arg = new IntegerArgument(attName, null, attName, true, |
| | | true, true, attName, 389, null, null); |
| | | true, true, Message.raw(attName), 389, null, null); |
| | | serverProperties.put(prop, arg); |
| | | } |
| | | |
| | |
| | | ServerProperty prop = ServerProperty.JMX_PORT; |
| | | String attName = prop.getAttributeName(); |
| | | IntegerArgument arg = new IntegerArgument(attName, null, attName, |
| | | false, true, attName, null); |
| | | false, true, Message.raw(attName), null); |
| | | arg.setMultiValued(true); |
| | | serverProperties.put(prop, arg); |
| | | } |
| | |
| | | ServerProperty prop = ServerProperty.JMXS_PORT; |
| | | String attName = prop.getAttributeName(); |
| | | IntegerArgument arg = new IntegerArgument(attName, null, attName, |
| | | false, true, attName, null); |
| | | false, true, Message.raw(attName), null); |
| | | arg.setMultiValued(true); |
| | | serverProperties.put(prop, arg); |
| | | } |
| | |
| | | ServerProperty prop = ServerProperty.LDAPS_PORT; |
| | | String attName = prop.getAttributeName(); |
| | | IntegerArgument arg = new IntegerArgument(attName, null, attName, |
| | | false, true, attName, null); |
| | | false, true, Message.raw(attName), null); |
| | | arg.setMultiValued(true); |
| | | serverProperties.put(prop, arg); |
| | | } |
| | |
| | | ServerProperty prop = ServerProperty.CERTIFICATE; |
| | | String attName = prop.getAttributeName(); |
| | | StringArgument arg = new StringArgument(attName, null, attName, false, |
| | | false, true, attName, null, null, null); |
| | | false, true, Message.raw(attName), null, null, null); |
| | | serverProperties.put(prop, arg); |
| | | } |
| | | |
| | |
| | | ServerProperty prop = ServerProperty.INSTANCE_PATH; |
| | | String attName = prop.getAttributeName(); |
| | | StringArgument arg = new StringArgument(attName, null, attName, false, |
| | | false, true, attName, null, null, null); |
| | | false, true, Message.raw(attName), null, null, null); |
| | | serverProperties.put(prop, arg); |
| | | } |
| | | |
| | |
| | | ServerProperty prop = ServerProperty.DESCRIPTION; |
| | | String attName = prop.getAttributeName(); |
| | | StringArgument arg = new StringArgument(attName, null, attName, false, |
| | | false, true, attName, null, null, null); |
| | | false, true, Message.raw(attName), null, null, null); |
| | | serverProperties.put(prop, arg); |
| | | } |
| | | |
| | |
| | | ServerProperty prop = ServerProperty.HOST_OS; |
| | | String attName = prop.getAttributeName(); |
| | | StringArgument arg = new StringArgument(attName, null, attName, false, |
| | | false, true, attName, null, null, null); |
| | | false, true, Message.raw(attName), null, null, null); |
| | | serverProperties.put(prop, arg); |
| | | } |
| | | |
| | |
| | | ServerProperty prop = ServerProperty.LOCATION; |
| | | String attName = prop.getAttributeName(); |
| | | StringArgument arg = new StringArgument(attName, null, attName, false, |
| | | false, true, attName, null, null, null); |
| | | false, true, Message.raw(attName), null, null, null); |
| | | serverProperties.put(prop, arg); |
| | | } |
| | | |
| | |
| | | ServerProperty prop = ServerProperty.GROUPS; |
| | | String attName = prop.getAttributeName(); |
| | | StringArgument arg = new StringArgument(attName, null, attName, false, |
| | | true, true, attName, null, null, null); |
| | | true, true, Message.raw(attName), null, null, null); |
| | | arg.setHidden(true); |
| | | serverProperties.put(prop, arg); |
| | | } |
| | |
| | | ServerProperty prop = ServerProperty.INSTANCE_KEY_ID; |
| | | String attName = prop.getAttributeName(); |
| | | StringArgument arg = new StringArgument(attName, null, prop |
| | | .getAttributeName(), false, false, true, "", null, null, null); |
| | | .getAttributeName(), false, false, true, Message.raw(""), null, null, |
| | | null); |
| | | serverProperties.put(prop, arg); |
| | | } |
| | | |
| | |
| | | ServerProperty prop = ServerProperty.INSTANCE_PUBLIC_KEY_CERTIFICATE; |
| | | String attName = prop.getAttributeName(); |
| | | StringArgument arg = new StringArgument(attName, null, prop |
| | | .getAttributeName(), false, false, true, "", null, null, null); |
| | | .getAttributeName(), false, false, true, Message.raw(""), null, null, |
| | | null); |
| | | serverProperties.put(prop, arg); |
| | | } |
| | | } |
| | |
| | | Set<Map<ServerProperty, Object>> serverList = |
| | | adsCtx.readServerRegistry(); |
| | | boolean found = false; |
| | | Map<ServerProperty,Object> serverProperties = null ; |
| | | for (Map<ServerProperty,Object> elm : serverList) |
| | | { |
| | | if (serverId.equals(elm.get(ServerProperty.ID))) |
| | | { |
| | | found = true ; |
| | | serverProperties = elm ; |
| | | break ; |
| | | } |
| | | } |
| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2006-2007 Sun Microsystems, Inc. |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.admin.client.cli; |
| | | |
| | | import static org.opends.messages.AdminMessages.*; |
| | | import static org.opends.messages.ToolMessages.*; |
| | | import static org.opends.server.tools.ToolConstants.*; |
| | | |
| | | import java.io.IOException; |
| | |
| | | |
| | | createGroupDescriptionArg = new StringArgument("description", |
| | | OPTION_SHORT_DESCRIPTION, OPTION_LONG_DESCRIPTION, false, false, |
| | | true, OPTION_VALUE_DESCRIPTION, "", null, |
| | | true, INFO_DESCRIPTION_PLACEHOLDER.get(), "", null, |
| | | INFO_ADMIN_ARG_DESCRIPTION_DESCRIPTION.get()); |
| | | createGroupSubCmd.addArgument(createGroupDescriptionArg); |
| | | |
| | | createGroupGroupNameArg = new StringArgument("groupName", |
| | | OPTION_SHORT_GROUPNAME, OPTION_LONG_GROUPNAME, true, true, |
| | | OPTION_VALUE_GROUPNAME, |
| | | INFO_GROUPNAME_PLACEHOLDER.get(), |
| | | INFO_ADMIN_ARG_CREATE_GROUP_GROUPNAME_DESCRIPTION.get()); |
| | | createGroupSubCmd.addArgument(createGroupGroupNameArg); |
| | | |
| | |
| | | |
| | | modifyGroupDescriptionArg = new StringArgument("new-description", |
| | | OPTION_SHORT_DESCRIPTION, OPTION_LONG_DESCRIPTION, false, false, |
| | | true, OPTION_VALUE_DESCRIPTION, "", null, |
| | | true, INFO_DESCRIPTION_PLACEHOLDER.get(), "", null, |
| | | INFO_ADMIN_ARG_NEW_DESCRIPTION_DESCRIPTION.get()); |
| | | modifyGroupSubCmd.addArgument(modifyGroupDescriptionArg); |
| | | |
| | | modifyGroupGroupIdArg = new StringArgument("new-groupName", |
| | | OPTION_SHORT_NEWGROUPNAME, OPTION_LONG_NEWGROUPNAME, false, false, true, |
| | | OPTION_VALUE_GROUPNAME, "", null, |
| | | INFO_GROUPNAME_PLACEHOLDER.get(), "", null, |
| | | INFO_ADMIN_ARG_NEW_GROUPNAME_DESCRIPTION.get()); |
| | | modifyGroupSubCmd.addArgument(modifyGroupGroupIdArg); |
| | | |
| | | modifyGroupGroupNameArg = new StringArgument("groupName", |
| | | OPTION_SHORT_GROUPNAME, OPTION_LONG_GROUPNAME, true, true, |
| | | OPTION_VALUE_GROUPNAME, |
| | | INFO_GROUPNAME_PLACEHOLDER.get(), |
| | | INFO_ADMIN_ARG_GROUPNAME_DESCRIPTION.get()); |
| | | modifyGroupSubCmd.addArgument(modifyGroupGroupNameArg); |
| | | |
| | |
| | | |
| | | deleteGroupGroupNameArg = new StringArgument("groupName", |
| | | OPTION_SHORT_GROUPNAME, OPTION_LONG_GROUPNAME, true, true, |
| | | OPTION_VALUE_GROUPNAME, |
| | | INFO_GROUPNAME_PLACEHOLDER.get(), |
| | | INFO_ADMIN_ARG_GROUPNAME_DESCRIPTION.get()); |
| | | deleteGroupSubCmd.addArgument(deleteGroupGroupNameArg); |
| | | |
| | |
| | | |
| | | addToGoupMemberNameArg = new StringArgument("memberName", |
| | | OPTION_SHORT_MEMBERNAME, OPTION_LONG_MEMBERNAME, true, true, |
| | | OPTION_VALUE_MEMBERNAME, |
| | | INFO_MEMBERNAME_PLACEHOLDER.get(), |
| | | INFO_ADMIN_ARG_ADD_MEMBERNAME_DESCRIPTION.get()); |
| | | addToGroupSubCmd.addArgument(addToGoupMemberNameArg); |
| | | |
| | | addToGroupGroupNameArg = new StringArgument("groupName", |
| | | OPTION_SHORT_GROUPNAME, OPTION_LONG_GROUPNAME, true, true, |
| | | OPTION_VALUE_GROUPNAME, |
| | | INFO_GROUPNAME_PLACEHOLDER.get(), |
| | | INFO_ADMIN_ARG_GROUPNAME_DESCRIPTION.get()); |
| | | addToGroupSubCmd.addArgument(addToGroupGroupNameArg); |
| | | |
| | |
| | | |
| | | removeFromGoupMemberNameArg = new StringArgument("memberName", |
| | | OPTION_SHORT_MEMBERNAME, OPTION_LONG_MEMBERNAME, true, true, |
| | | OPTION_VALUE_MEMBERNAME, |
| | | INFO_MEMBERNAME_PLACEHOLDER.get(), |
| | | INFO_ADMIN_ARG_REMOVE_MEMBERNAME_DESCRIPTION.get()); |
| | | removeFromGroupSubCmd.addArgument(removeFromGoupMemberNameArg); |
| | | |
| | | removeFromGroupGroupNameArg = new StringArgument("groupName", |
| | | OPTION_SHORT_GROUPNAME, OPTION_LONG_GROUPNAME, true, true, |
| | | OPTION_VALUE_GROUPNAME, |
| | | INFO_GROUPNAME_PLACEHOLDER.get(), |
| | | INFO_ADMIN_ARG_GROUPNAME_DESCRIPTION.get()); |
| | | removeFromGroupSubCmd.addArgument(removeFromGroupGroupNameArg); |
| | | |
| | |
| | | |
| | | listMembersGroupNameArg = new StringArgument("groupName", |
| | | OPTION_SHORT_GROUPNAME, OPTION_LONG_GROUPNAME, true, true, |
| | | OPTION_VALUE_GROUPNAME, |
| | | INFO_GROUPNAME_PLACEHOLDER.get(), |
| | | INFO_ADMIN_ARG_GROUPNAME_DESCRIPTION.get()); |
| | | listMembersSubCmd.addArgument(listMembersGroupNameArg); |
| | | |
| | |
| | | |
| | | listMembershipMemberNameArg = new StringArgument("memberName", |
| | | OPTION_SHORT_MEMBERNAME, OPTION_LONG_MEMBERNAME, true, true, |
| | | OPTION_VALUE_MEMBERNAME, |
| | | INFO_MEMBERNAME_PLACEHOLDER.get(), |
| | | INFO_ADMIN_ARG_MEMBERNAME_DESCRIPTION.get()); |
| | | listMembershipSubCmd.addArgument(listMembershipMemberNameArg); |
| | | |
| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2007 Sun Microsystems, Inc. |
| | | * Copyright 2007-2008 Sun Microsystems, Inc. |
| | | */ |
| | | |
| | | package org.opends.server.admin.client.cli; |
| | |
| | | argList.add(useStartTLSArg); |
| | | |
| | | hostNameArg = new StringArgument("host", OPTION_SHORT_HOST, |
| | | OPTION_LONG_HOST, false, false, true, OPTION_VALUE_HOST, "localhost", |
| | | OPTION_LONG_HOST, false, false, true, INFO_HOST_PLACEHOLDER.get(), |
| | | "localhost", |
| | | null, INFO_DESCRIPTION_HOST.get()); |
| | | hostNameArg.setPropertyName(OPTION_LONG_HOST); |
| | | argList.add(hostNameArg); |
| | | |
| | | portArg = new IntegerArgument("port", OPTION_SHORT_PORT, OPTION_LONG_PORT, |
| | | false, false, true, OPTION_VALUE_PORT, 389, null, |
| | | false, false, true, INFO_PORT_PLACEHOLDER.get(), 389, null, |
| | | INFO_DESCRIPTION_PORT.get()); |
| | | portArg.setPropertyName(OPTION_LONG_PORT); |
| | | argList.add(portArg); |
| | | |
| | | bindDnArg = new StringArgument("bindDN", OPTION_SHORT_BINDDN, |
| | | OPTION_LONG_BINDDN, false, false, true, OPTION_VALUE_BINDDN, |
| | | OPTION_LONG_BINDDN, false, false, true, INFO_BINDDN_PLACEHOLDER.get(), |
| | | "cn=Directory Manager", null, INFO_DESCRIPTION_BINDDN.get()); |
| | | bindDnArg.setPropertyName(OPTION_LONG_BINDDN); |
| | | argList.add(bindDnArg); |
| | |
| | | // It is up to the classes that required admin UID to make this argument |
| | | // visible and add it. |
| | | adminUidArg = new StringArgument("adminUID", 'I', |
| | | "adminUID", false, false, true, "adminUID", |
| | | "adminUID", false, false, true, INFO_ADMINUID_PLACEHOLDER.get(), |
| | | Constants.GLOBAL_ADMIN_UID, null, |
| | | INFO_DESCRIPTION_ADMIN_UID.get()); |
| | | adminUidArg.setPropertyName("adminUID"); |
| | |
| | | |
| | | bindPasswordArg = new StringArgument("bindPassword", |
| | | OPTION_SHORT_BINDPWD, OPTION_LONG_BINDPWD, false, false, true, |
| | | OPTION_VALUE_BINDPWD, null, null, INFO_DESCRIPTION_BINDPASSWORD.get()); |
| | | INFO_BINDPWD_PLACEHOLDER.get(), null, null, |
| | | INFO_DESCRIPTION_BINDPASSWORD.get()); |
| | | bindPasswordArg.setPropertyName(OPTION_LONG_BINDPWD); |
| | | argList.add(bindPasswordArg); |
| | | |
| | | bindPasswordFileArg = new FileBasedArgument("bindPasswordFile", |
| | | OPTION_SHORT_BINDPWD_FILE, OPTION_LONG_BINDPWD_FILE, false, false, |
| | | OPTION_VALUE_BINDPWD_FILE, null, null, |
| | | INFO_BINDPWD_FILE_PLACEHOLDER.get(), null, null, |
| | | INFO_DESCRIPTION_BINDPASSWORDFILE.get()); |
| | | bindPasswordFileArg.setPropertyName(OPTION_LONG_BINDPWD_FILE); |
| | | argList.add(bindPasswordFileArg); |
| | |
| | | "sasloption", OPTION_SHORT_SASLOPTION, |
| | | OPTION_LONG_SASLOPTION, false, |
| | | true, true, |
| | | OPTION_VALUE_SASLOPTION, null, null, |
| | | INFO_SASL_OPTION_PLACEHOLDER.get(), null, null, |
| | | INFO_LDAP_CONN_DESCRIPTION_SASLOPTIONS.get()); |
| | | saslOptionArg.setPropertyName(OPTION_LONG_SASLOPTION); |
| | | argList.add(saslOptionArg); |
| | |
| | | |
| | | trustStorePathArg = new StringArgument("trustStorePath", |
| | | OPTION_SHORT_TRUSTSTOREPATH, OPTION_LONG_TRUSTSTOREPATH, false, |
| | | false, true, OPTION_VALUE_TRUSTSTOREPATH, null, null, |
| | | false, true, INFO_TRUSTSTOREPATH_PLACEHOLDER.get(), null, null, |
| | | INFO_DESCRIPTION_TRUSTSTOREPATH.get()); |
| | | trustStorePathArg.setPropertyName(OPTION_LONG_TRUSTSTOREPATH); |
| | | argList.add(trustStorePathArg); |
| | | |
| | | trustStorePasswordArg = new StringArgument("trustStorePassword", |
| | | OPTION_SHORT_TRUSTSTORE_PWD, OPTION_LONG_TRUSTSTORE_PWD, false, false, |
| | | true, OPTION_VALUE_TRUSTSTORE_PWD, null, null, |
| | | true, INFO_TRUSTSTORE_PWD_PLACEHOLDER.get(), null, null, |
| | | INFO_DESCRIPTION_TRUSTSTOREPASSWORD.get()); |
| | | trustStorePasswordArg.setPropertyName(OPTION_LONG_TRUSTSTORE_PWD); |
| | | argList.add(trustStorePasswordArg); |
| | | |
| | | trustStorePasswordFileArg = new FileBasedArgument("trustStorePasswordFile", |
| | | OPTION_SHORT_TRUSTSTORE_PWD_FILE, OPTION_LONG_TRUSTSTORE_PWD_FILE, |
| | | false, false, OPTION_VALUE_TRUSTSTORE_PWD_FILE, null, null, |
| | | false, false, INFO_TRUSTSTORE_PWD_FILE_PLACEHOLDER.get(), null, null, |
| | | INFO_DESCRIPTION_TRUSTSTOREPASSWORD_FILE.get()); |
| | | trustStorePasswordFileArg.setPropertyName(OPTION_LONG_TRUSTSTORE_PWD_FILE); |
| | | argList.add(trustStorePasswordFileArg); |
| | | |
| | | keyStorePathArg = new StringArgument("keyStorePath", |
| | | OPTION_SHORT_KEYSTOREPATH, OPTION_LONG_KEYSTOREPATH, false, false, |
| | | true, OPTION_VALUE_KEYSTOREPATH, null, null, |
| | | true, INFO_KEYSTOREPATH_PLACEHOLDER.get(), null, null, |
| | | INFO_DESCRIPTION_KEYSTOREPATH.get()); |
| | | keyStorePathArg.setPropertyName(OPTION_LONG_KEYSTOREPATH); |
| | | argList.add(keyStorePathArg); |
| | |
| | | keyStorePasswordArg = new StringArgument("keyStorePassword", |
| | | OPTION_SHORT_KEYSTORE_PWD, |
| | | OPTION_LONG_KEYSTORE_PWD, false, false, true, |
| | | OPTION_VALUE_KEYSTORE_PWD, null, null, |
| | | INFO_KEYSTORE_PWD_PLACEHOLDER.get(), null, null, |
| | | INFO_DESCRIPTION_KEYSTOREPASSWORD.get()); |
| | | keyStorePasswordArg.setPropertyName(OPTION_LONG_KEYSTORE_PWD); |
| | | argList.add(keyStorePasswordArg); |
| | | |
| | | keyStorePasswordFileArg = new FileBasedArgument("keystorePasswordFile", |
| | | OPTION_SHORT_KEYSTORE_PWD_FILE, OPTION_LONG_KEYSTORE_PWD_FILE, false, |
| | | false, OPTION_VALUE_KEYSTORE_PWD_FILE, null, null, |
| | | false, INFO_KEYSTORE_PWD_FILE_PLACEHOLDER.get(), null, null, |
| | | INFO_DESCRIPTION_KEYSTOREPASSWORD_FILE.get()); |
| | | keyStorePasswordFileArg.setPropertyName(OPTION_LONG_KEYSTORE_PWD_FILE); |
| | | argList.add(keyStorePasswordFileArg); |
| | | |
| | | certNicknameArg = new StringArgument("certNickname", |
| | | OPTION_SHORT_CERT_NICKNAME, OPTION_LONG_CERT_NICKNAME, |
| | | false, false, true, OPTION_VALUE_CERT_NICKNAME, null, null, |
| | | false, false, true, INFO_NICKNAME_PLACEHOLDER.get(), null, null, |
| | | INFO_DESCRIPTION_CERT_NICKNAME.get()); |
| | | certNicknameArg.setPropertyName(OPTION_LONG_CERT_NICKNAME); |
| | | argList.add(certNicknameArg); |
| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2007 Sun Microsystems, Inc. |
| | | * Copyright 2007-2008 Sun Microsystems, Inc. |
| | | */ |
| | | |
| | | package org.opends.server.admin.client.cli; |
| | |
| | | |
| | | propertiesFileArg = new StringArgument("propertiesFilePath", |
| | | null, OPTION_LONG_PROP_FILE_PATH, |
| | | false, false, true, OPTION_VALUE_PROP_FILE_PATH, null, null, |
| | | false, false, true, INFO_PROP_FILE_PATH_PLACEHOLDER.get(), null, null, |
| | | INFO_DESCRIPTION_PROP_FILE_PATH.get()); |
| | | setFilePropertiesArgument(propertiesFileArg); |
| | | set.add(propertiesFileArg); |
| | |
| | | try |
| | | { |
| | | configClass = new StringArgument("configclass", 'C', "configClass", |
| | | true, false, true, "{configClass}", |
| | | true, false, true, |
| | | INFO_CONFIGCLASS_PLACEHOLDER.get(), |
| | | ConfigFileHandler.class.getName(), null, |
| | | INFO_DSCORE_DESCRIPTION_CONFIG_CLASS |
| | | .get()); |
| | |
| | | |
| | | |
| | | configFile = new StringArgument("configfile", 'f', "configFile", |
| | | true, false, true, "{configFile}", null, |
| | | true, false, true, |
| | | INFO_CONFIGFILE_PLACEHOLDER.get(), null, |
| | | null, |
| | | INFO_DSCORE_DESCRIPTION_CONFIG_FILE |
| | | .get()); |
| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2006-2007 Sun Microsystems, Inc. |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.plugins.profiler; |
| | | import org.opends.messages.Message; |
| | |
| | | import org.opends.server.util.args.StringArgument; |
| | | |
| | | import static org.opends.messages.PluginMessages.*; |
| | | import static org.opends.messages.ToolMessages.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | | |
| | |
| | | { |
| | | fileNames = |
| | | new StringArgument("filenames", 'f', "fileName", true, true, true, |
| | | "{file}", null, null, |
| | | INFO_FILE_PLACEHOLDER.get(), null, null, |
| | | INFO_PROFILEVIEWER_DESCRIPTION_FILENAMES.get()); |
| | | argParser.addArgument(fileNames); |
| | | |
| | |
| | | new StringArgument( |
| | | "configclass", OPTION_SHORT_CONFIG_CLASS, |
| | | OPTION_LONG_CONFIG_CLASS, true, false, |
| | | true, OPTION_VALUE_CONFIG_CLASS, |
| | | true, INFO_CONFIGCLASS_PLACEHOLDER.get(), |
| | | ConfigFileHandler.class.getName(), null, |
| | | INFO_DESCRIPTION_CONFIG_CLASS.get()); |
| | | configClass.setHidden(true); |
| | |
| | | configFile = |
| | | new StringArgument( |
| | | "configfile", 'f', "configFile", true, false, |
| | | true, "{configFile}", null, null, |
| | | true, INFO_CONFIGFILE_PLACEHOLDER.get(), null, null, |
| | | INFO_DESCRIPTION_CONFIG_FILE.get()); |
| | | configFile.setHidden(true); |
| | | argParser.addArgument(configFile); |
| | |
| | | backendID = |
| | | new StringArgument( |
| | | "backendid", 'n', "backendID", false, true, true, |
| | | "{backendID}", null, null, |
| | | INFO_BACKENDNAME_PLACEHOLDER.get(), null, null, |
| | | INFO_BACKUPDB_DESCRIPTION_BACKEND_ID.get()); |
| | | argParser.addArgument(backendID); |
| | | |
| | |
| | | backupIDString = |
| | | new StringArgument( |
| | | "backupid", 'I', "backupID", false, false, true, |
| | | "{backupID}", null, null, |
| | | INFO_BACKUPID_PLACEHOLDER.get(), null, null, |
| | | INFO_BACKUPDB_DESCRIPTION_BACKUP_ID.get()); |
| | | argParser.addArgument(backupIDString); |
| | | |
| | |
| | | backupDirectory = |
| | | new StringArgument( |
| | | "backupdirectory", 'd', "backupDirectory", true, |
| | | false, true, "{backupDir}", null, null, |
| | | false, true, INFO_BACKUPDIR_PLACEHOLDER.get(), null, null, |
| | | INFO_BACKUPDB_DESCRIPTION_BACKUP_DIR.get()); |
| | | argParser.addArgument(backupDirectory); |
| | | |
| | |
| | | incrementalBaseID = |
| | | new StringArgument( |
| | | "incrementalbaseid", 'B', "incrementalBaseID", |
| | | false, false, true, "{backupID}", null, null, |
| | | false, false, true, INFO_BACKUPID_PLACEHOLDER.get(), null, |
| | | null, |
| | | INFO_BACKUPDB_DESCRIPTION_INCREMENTAL_BASE_ID.get()); |
| | | argParser.addArgument(incrementalBaseID); |
| | | |
| | |
| | | try |
| | | { |
| | | configFile = new StringArgument("configfile", 'c', "configFile", true, |
| | | false, true, "{configFile}", null, null, |
| | | false, true, |
| | | INFO_CONFIGFILE_PLACEHOLDER.get(), null, |
| | | null, |
| | | INFO_DESCRIPTION_CONFIG_FILE.get()); |
| | | configFile.setHidden(true); |
| | | argParser.addArgument(configFile); |
| | | |
| | | configClass = new StringArgument("configclass", OPTION_SHORT_CONFIG_CLASS, |
| | | OPTION_LONG_CONFIG_CLASS, false, |
| | | false, true, OPTION_VALUE_CONFIG_CLASS, |
| | | false, true, INFO_CONFIGCLASS_PLACEHOLDER.get(), |
| | | ConfigFileHandler.class.getName(), null, |
| | | INFO_DESCRIPTION_CONFIG_CLASS.get()); |
| | | configClass.setHidden(true); |
| | |
| | | |
| | | ldapPort = new IntegerArgument("ldapport", OPTION_SHORT_PORT, |
| | | "ldapPort", false, false, |
| | | true, "{ldapPort}", 389, null, true, 1, |
| | | true, INFO_LDAPPORT_PLACEHOLDER.get(), 389, |
| | | null, true, 1, |
| | | true, 65535, |
| | | INFO_CONFIGDS_DESCRIPTION_LDAP_PORT.get()); |
| | | argParser.addArgument(ldapPort); |
| | | |
| | | ldapsPort = new IntegerArgument("ldapsPort", 'P', "ldapsPort", false, |
| | | false, true, "{ldapPort}", 636, null, true, 1, true, 65535, |
| | | false, true, INFO_LDAPPORT_PLACEHOLDER.get(), 636, null, true, 1, |
| | | true, 65535, |
| | | INFO_CONFIGDS_DESCRIPTION_LDAPS_PORT.get()); |
| | | argParser.addArgument(ldapsPort); |
| | | |
| | |
| | | argParser.addArgument(enableStartTLS); |
| | | |
| | | jmxPort = new IntegerArgument("jmxport", 'x', "jmxPort", false, false, |
| | | true, "{jmxPort}", SetupUtils.getDefaultJMXPort(), null, true, 1, |
| | | true, INFO_JMXPORT_PLACEHOLDER.get(), SetupUtils.getDefaultJMXPort(), |
| | | null, true, 1, |
| | | true, 65535, |
| | | INFO_CONFIGDS_DESCRIPTION_JMX_PORT.get()); |
| | | argParser.addArgument(jmxPort); |
| | |
| | | 'k', |
| | | "keyManagerProviderDN", |
| | | false, false, |
| | | true, "{keyManagerProviderDN}", |
| | | true, INFO_KEY_MANAGER_PROVIDER_DN_PLACEHOLDER.get(), |
| | | null, |
| | | null, |
| | | INFO_CONFIGDS_DESCRIPTION_KEYMANAGER_PROVIDER_DN.get()); |
| | |
| | | 't', |
| | | "trustManagerProviderDN", |
| | | false, false, |
| | | true, "{trustManagerProviderDN}", |
| | | true, INFO_TRUST_MANAGER_PROVIDER_DN_PLACEHOLDER.get(), |
| | | null, |
| | | null, |
| | | INFO_CONFIGDS_DESCRIPTION_TRUSTMANAGER_PROVIDER_DN.get()); |
| | |
| | | 'm', |
| | | "keyManagerPath", |
| | | false, false, true, |
| | | "{keyManagerPath}", |
| | | INFO_KEY_MANAGER_PATH_PLACEHOLDER.get(), |
| | | null, |
| | | null, |
| | | INFO_CONFIGDS_DESCRIPTION_KEYMANAGER_PATH.get()); |
| | |
| | | 'a', |
| | | "certNickName", |
| | | false, false, |
| | | true, "{certNickName}", |
| | | true, INFO_NICKNAME_PLACEHOLDER.get(), |
| | | null, |
| | | null, |
| | | INFO_CONFIGDS_DESCRIPTION_CERTNICKNAME.get()); |
| | |
| | | baseDNString = new StringArgument( |
| | | "basedn", OPTION_SHORT_BASEDN, |
| | | OPTION_LONG_BASEDN, false, true, |
| | | true, OPTION_VALUE_BASEDN, |
| | | true, INFO_BASEDN_PLACEHOLDER.get(), |
| | | "dc=example,dc=com", |
| | | null, |
| | | INFO_CONFIGDS_DESCRIPTION_BASE_DN.get()); |
| | |
| | | rootDNString = new StringArgument( |
| | | "rootdn", OPTION_SHORT_ROOT_USER_DN, |
| | | OPTION_LONG_ROOT_USER_DN, false, false, |
| | | true, OPTION_VALUE_ROOT_USER_DN, |
| | | true, INFO_ROOT_USER_DN_PLACEHOLDER.get(), |
| | | "cn=Directory Manager", null, |
| | | INFO_CONFIGDS_DESCRIPTION_ROOT_DN.get()); |
| | | argParser.addArgument(rootDNString); |
| | |
| | | rootPassword = new StringArgument( |
| | | "rootpw", OPTION_SHORT_BINDPWD, |
| | | "rootPassword", false, |
| | | false, true, "{rootUserPW}", null, null, |
| | | false, true, INFO_ROOT_USER_PWD_PLACEHOLDER.get(), null, null, |
| | | INFO_CONFIGDS_DESCRIPTION_ROOT_PW.get()); |
| | | argParser.addArgument(rootPassword); |
| | | |
| | |
| | | "rootpwfile", |
| | | OPTION_SHORT_BINDPWD_FILE, |
| | | "rootPasswordFile", false, false, |
| | | "{filename}", null, null, |
| | | INFO_FILE_PLACEHOLDER.get(), null, null, |
| | | INFO_CONFIGDS_DESCRIPTION_ROOT_PW_FILE.get()); |
| | | argParser.addArgument(rootPasswordFile); |
| | | |
| | |
| | | serverRoot = new StringArgument("serverRoot", |
| | | ToolConstants.OPTION_SHORT_SERVER_ROOT, |
| | | ToolConstants.OPTION_LONG_SERVER_ROOT, |
| | | false, false, true, "{serverRootDir}", null, null, |
| | | null); |
| | | false, false, true, INFO_SERVER_ROOT_DIR_PLACEHOLDER.get(), null, |
| | | null, null); |
| | | serverRoot.setHidden(true); |
| | | argParser.addArgument(serverRoot); |
| | | } |
| | |
| | | argParser.addArgument(serviceState); |
| | | |
| | | cleanupService = new StringArgument("cleanupservice", 'c', |
| | | "cleanupService", false, false, true, "{serviceName}", null, null, |
| | | "cleanupService", false, false, true, |
| | | INFO_SERVICE_NAME_PLACEHOLDER.get(), null, null, |
| | | INFO_CONFIGURE_WINDOWS_SERVICE_DESCRIPTION_CLEANUP.get()); |
| | | argParser.addArgument(cleanupService); |
| | | |
| | |
| | | try |
| | | { |
| | | outputFile = new StringArgument("outputfile", 'f', "outputFile", true, |
| | | false, true, "{path}", null, null, |
| | | false, true, INFO_PATH_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_CREATERC_OUTFILE_DESCRIPTION.get()); |
| | | argParser.addArgument(outputFile); |
| | | |
| | | |
| | | userName = new StringArgument("username", 'u', "userName", false, false, |
| | | true, "{username}", null, null, |
| | | true, INFO_USER_NAME_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_CREATERC_USER_DESCRIPTION.get()); |
| | | argParser.addArgument(userName); |
| | | |
| | | |
| | | javaHome = new StringArgument("javahome", 'j', "javaHome", false, false, |
| | | true, "{path}", null, null, |
| | | true, INFO_PATH_PLACEHOLDER.get(), null, |
| | | null, |
| | | INFO_CREATERC_JAVA_HOME_DESCRIPTION.get()); |
| | | argParser.addArgument(javaHome); |
| | | |
| | | |
| | | javaArgs = new StringArgument("javaargs", 'J', "javaArgs", false, false, |
| | | true, "{args}", null,null, |
| | | true, INFO_ARGS_PLACEHOLDER.get(), null, |
| | | null, |
| | | INFO_CREATERC_JAVA_ARGS_DESCRIPTION.get()); |
| | | argParser.addArgument(javaArgs); |
| | | |
| | |
| | | import org.opends.messages.Message; |
| | | import static org.opends.server.tools.ToolConstants.OPTION_SHORT_CONFIG_CLASS; |
| | | import static org.opends.server.tools.ToolConstants.OPTION_LONG_CONFIG_CLASS; |
| | | import static org.opends.server.tools.ToolConstants.OPTION_VALUE_CONFIG_CLASS; |
| | | import static org.opends.server.tools.ToolConstants.OPTION_SHORT_HELP; |
| | | import static org.opends.server.tools.ToolConstants.OPTION_LONG_HELP; |
| | | import org.opends.server.extensions.ConfigFileHandler; |
| | |
| | | configClass = |
| | | new StringArgument("configclass", OPTION_SHORT_CONFIG_CLASS, |
| | | OPTION_LONG_CONFIG_CLASS, true, false, |
| | | true, OPTION_VALUE_CONFIG_CLASS, |
| | | true, INFO_CONFIGCLASS_PLACEHOLDER.get(), |
| | | ConfigFileHandler.class.getName(), null, |
| | | INFO_DESCRIPTION_CONFIG_CLASS.get()); |
| | | configClass.setHidden(true); |
| | | |
| | | configFile = |
| | | new StringArgument("configfile", 'f', "configFile", true, false, |
| | | true, "{configFile}", null, null, |
| | | true, INFO_CONFIGFILE_PLACEHOLDER.get(), null, |
| | | null, |
| | | INFO_DESCRIPTION_CONFIG_FILE.get()); |
| | | configFile.setHidden(true); |
| | | |
| | |
| | | INFO_DESCRIPTION_DBTEST_SUBCMD_LIST_ENTRY_CONTAINERS.get()); |
| | | backendID = |
| | | new StringArgument("backendid", 'n', "backendID", true, false, true, |
| | | "{backendID}", null, null, |
| | | INFO_BACKENDNAME_PLACEHOLDER.get(), null, null, |
| | | INFO_DESCRIPTION_DBTEST_BACKEND_ID.get()); |
| | | sub.addArgument(backendID); |
| | | |
| | |
| | | INFO_DESCRIPTION_DBTEST_SUBCMD_LIST_DATABASE_CONTAINERS.get()); |
| | | backendID = |
| | | new StringArgument("backendid", 'n', "backendID", true, false, true, |
| | | "{backendID}", null, null, |
| | | INFO_BACKENDNAME_PLACEHOLDER.get(), null, null, |
| | | INFO_DESCRIPTION_DBTEST_BACKEND_ID.get()); |
| | | sub.addArgument(backendID); |
| | | baseDN = |
| | | new StringArgument("basedn", 'b', "baseDN", false, |
| | | false, true, "{baseDN}", null, null, |
| | | false, true, INFO_BASEDN_PLACEHOLDER.get(), null, |
| | | null, |
| | | INFO_DESCRIPTION_DBTEST_BASE_DN.get()); |
| | | sub.addArgument(baseDN); |
| | | |
| | |
| | | INFO_DESCRIPTION_DBTEST_SUBCMD_DUMP_DATABASE_CONTAINER.get()); |
| | | backendID = |
| | | new StringArgument("backendid", 'n', "backendID", true, false, true, |
| | | "{backendID}", null, null, |
| | | INFO_BACKENDNAME_PLACEHOLDER.get(), null, null, |
| | | INFO_DESCRIPTION_DBTEST_BACKEND_ID.get()); |
| | | sub.addArgument(backendID); |
| | | baseDN = |
| | | new StringArgument("basedn", 'b', "baseDN", true, |
| | | false, true, "{baseDN}", null, null, |
| | | false, true, INFO_BASEDN_PLACEHOLDER.get(), null, |
| | | null, |
| | | INFO_DESCRIPTION_DBTEST_BASE_DN.get()); |
| | | sub.addArgument(baseDN); |
| | | databaseName = |
| | | new StringArgument("databasename", 'd', "databaseName", true, |
| | | false, true, "{databaseName}", null, null, |
| | | false, true, INFO_DATABASE_NAME_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_DESCRIPTION_DBTEST_DATABASE_NAME.get()); |
| | | sub.addArgument(databaseName); |
| | | skipDecode = |
| | |
| | | INFO_DESCRIPTION_DBTEST_SKIP_DECODE.get()); |
| | | sub.addArgument(skipDecode); |
| | | maxKeyValue = new StringArgument("maxkeyvalue", 'K', "maxKeyValue", false, |
| | | false, true, "{maxKeyValue}", null, null, |
| | | false, true, |
| | | INFO_MAX_KEY_VALUE_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_DESCRIPTION_DBTEST_MAX_KEY_VALUE.get()); |
| | | sub.addArgument(maxKeyValue); |
| | | minKeyValue = new StringArgument("minkeyvalue", 'k', "minKeyValue", false, |
| | | false, true, "{minKeyValue}", null, null, |
| | | false, true, |
| | | INFO_MIN_KEY_VALUE_PLACEHOLDER.get(), |
| | | null, |
| | | null, |
| | | INFO_DESCRIPTION_DBTEST_MIN_KEY_VALUE.get()); |
| | | sub.addArgument(minKeyValue); |
| | | maxDataSize = new IntegerArgument("maxdatasize", 'S', "maxDataSize", |
| | | false, false, true, "{maxDataSize}", -1, |
| | | false, false, true, |
| | | INFO_MAX_DATA_SIZE_PLACEHOLDER.get(), |
| | | -1, |
| | | null, |
| | | INFO_DESCRIPTION_DBTEST_MAX_DATA_SIZE.get()); |
| | | sub.addArgument(maxDataSize); |
| | | minDataSize = new IntegerArgument("mindatasize", 's', "minDataSize", |
| | | false, false, true, "{minDataSize}", -1, |
| | | false, false, true, |
| | | INFO_MIN_DATA_SIZE_PLACEHOLDER.get(), |
| | | -1, |
| | | null, |
| | | INFO_DESCRIPTION_DBTEST_MIN_DATA_SIZE.get()); |
| | | sub.addArgument(minDataSize); |
| | |
| | | INFO_DESCRIPTION_DBTEST_SUBCMD_LIST_INDEX_STATUS.get()); |
| | | backendID = |
| | | new StringArgument("backendid", 'n', "backendID", true, false, true, |
| | | "{backendID}", null, null, |
| | | INFO_BACKENDNAME_PLACEHOLDER.get(), null, null, |
| | | INFO_DESCRIPTION_DBTEST_BACKEND_ID.get()); |
| | | sub.addArgument(backendID); |
| | | baseDN = |
| | | new StringArgument("basedn", 'b', "baseDN", true, |
| | | true, true, "{baseDN}", null, null, |
| | | true, true, INFO_BASEDN_PLACEHOLDER.get(), null, |
| | | null, |
| | | INFO_DESCRIPTION_DBTEST_BASE_DN.get()); |
| | | sub.addArgument(baseDN); |
| | | |
| | |
| | | |
| | | |
| | | clearPassword = new StringArgument("clearpw", 'c', "clearPassword", false, |
| | | false, true, "{clearPW}", null, null, |
| | | false, true, INFO_CLEAR_PWD.get(), |
| | | null, null, |
| | | INFO_ENCPW_DESCRIPTION_CLEAR_PW.get()); |
| | | argParser.addArgument(clearPassword); |
| | | |
| | | |
| | | clearPasswordFile = |
| | | new FileBasedArgument("clearpwfile", 'f', "clearPasswordFile", false, |
| | | false, "{filename}", null, null, |
| | | false, INFO_FILE_PLACEHOLDER.get(), null, null, |
| | | INFO_ENCPW_DESCRIPTION_CLEAR_PW_FILE.get()); |
| | | argParser.addArgument(clearPasswordFile); |
| | | |
| | | |
| | | encodedPassword = new StringArgument( |
| | | "encodedpw", 'e', "encodedPassword", |
| | | false, false, true, "{encodedPW}", |
| | | false, false, true, INFO_ENCODED_PWD_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_ENCPW_DESCRIPTION_ENCODED_PW.get()); |
| | | argParser.addArgument(encodedPassword); |
| | |
| | | |
| | | encodedPasswordFile = |
| | | new FileBasedArgument("encodedpwfile", 'E', "encodedPasswordFile", |
| | | false, false, "{filename}", null, null, |
| | | false, false, INFO_FILE_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_ENCPW_DESCRIPTION_ENCODED_PW_FILE.get()); |
| | | argParser.addArgument(encodedPasswordFile); |
| | | |
| | |
| | | configClass = new StringArgument("configclass", OPTION_SHORT_CONFIG_CLASS, |
| | | OPTION_LONG_CONFIG_CLASS, |
| | | true, false, true, |
| | | OPTION_VALUE_CONFIG_CLASS, |
| | | INFO_CONFIGCLASS_PLACEHOLDER.get(), |
| | | ConfigFileHandler.class.getName(), null, |
| | | INFO_DESCRIPTION_CONFIG_CLASS.get()); |
| | | configClass.setHidden(true); |
| | |
| | | |
| | | |
| | | configFile = new StringArgument("configfile", 'F', "configFile", |
| | | true, false, true, "{configFile}", null, |
| | | true, false, true, |
| | | INFO_CONFIGFILE_PLACEHOLDER.get(), null, |
| | | null, |
| | | INFO_DESCRIPTION_CONFIG_FILE.get()); |
| | | configFile.setHidden(true); |
| | |
| | | |
| | | |
| | | schemeName = new StringArgument("scheme", 's', "storageScheme", false, |
| | | false, true, "{scheme}", null, null, |
| | | false, true, |
| | | INFO_STORAGE_SCHEME_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_ENCPW_DESCRIPTION_SCHEME.get()); |
| | | argParser.addArgument(schemeName); |
| | | |
| | |
| | | configClass = |
| | | new StringArgument("configclass", OPTION_SHORT_CONFIG_CLASS, |
| | | OPTION_LONG_CONFIG_CLASS, true, false, |
| | | true, OPTION_VALUE_CONFIG_CLASS, |
| | | true, INFO_CONFIGCLASS_PLACEHOLDER.get(), |
| | | ConfigFileHandler.class.getName(), null, |
| | | INFO_DESCRIPTION_CONFIG_CLASS.get()); |
| | | configClass.setHidden(true); |
| | |
| | | |
| | | configFile = |
| | | new StringArgument("configfile", 'f', "configFile", true, false, |
| | | true, "{configFile}", null, null, |
| | | true, INFO_CONFIGFILE_PLACEHOLDER.get(), null, |
| | | null, |
| | | INFO_DESCRIPTION_CONFIG_FILE.get()); |
| | | configFile.setHidden(true); |
| | | argParser.addArgument(configFile); |
| | |
| | | ldifFile = |
| | | new StringArgument("ldiffile", OPTION_SHORT_LDIF_FILE, |
| | | OPTION_LONG_LDIF_FILE,true, false, true, |
| | | OPTION_VALUE_LDIF_FILE, null, null, |
| | | INFO_LDIFFILE_PLACEHOLDER.get(), null, null, |
| | | INFO_LDIFEXPORT_DESCRIPTION_LDIF_FILE.get()); |
| | | argParser.addArgument(ldifFile); |
| | | |
| | |
| | | |
| | | backendID = |
| | | new StringArgument("backendid", 'n', "backendID", true, false, true, |
| | | "{backendID}", null, null, |
| | | INFO_BACKENDNAME_PLACEHOLDER.get(), null, null, |
| | | INFO_LDIFEXPORT_DESCRIPTION_BACKEND_ID.get()); |
| | | argParser.addArgument(backendID); |
| | | |
| | | |
| | | includeBranchStrings = |
| | | new StringArgument("includebranch", 'b', "includeBranch", false, |
| | | true, true, "{branchDN}", null, null, |
| | | true, true, INFO_BRANCH_DN_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_LDIFEXPORT_DESCRIPTION_INCLUDE_BRANCH.get()); |
| | | argParser.addArgument(includeBranchStrings); |
| | | |
| | | |
| | | excludeBranchStrings = |
| | | new StringArgument("excludebranch", 'B', "excludeBranch", false, |
| | | true, true, "{branchDN}", null, null, |
| | | true, true, INFO_BRANCH_DN_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_LDIFEXPORT_DESCRIPTION_EXCLUDE_BRANCH.get()); |
| | | argParser.addArgument(excludeBranchStrings); |
| | | |
| | |
| | | includeAttributeStrings = |
| | | new StringArgument( |
| | | "includeattribute", 'i', "includeAttribute", |
| | | false, true, true, "{attribute}", null, null, |
| | | false, true, true, INFO_ATTRIBUTE_PLACEHOLDER.get(), null, |
| | | null, |
| | | INFO_LDIFEXPORT_DESCRIPTION_INCLUDE_ATTRIBUTE.get()); |
| | | argParser.addArgument(includeAttributeStrings); |
| | | |
| | |
| | | excludeAttributeStrings = |
| | | new StringArgument( |
| | | "excludeattribute", 'e', "excludeAttribute", |
| | | false, true, true, "{attribute}", null, null, |
| | | false, true, true, INFO_ATTRIBUTE_PLACEHOLDER.get(), null, |
| | | null, |
| | | INFO_LDIFEXPORT_DESCRIPTION_EXCLUDE_ATTRIBUTE.get()); |
| | | argParser.addArgument(excludeAttributeStrings); |
| | | |
| | | |
| | | includeFilterStrings = |
| | | new StringArgument("includefilter", 'I', "includeFilter", |
| | | false, true, true, "{filter}", null, null, |
| | | false, true, true, INFO_FILTER_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_LDIFEXPORT_DESCRIPTION_INCLUDE_FILTER.get()); |
| | | argParser.addArgument(includeFilterStrings); |
| | | |
| | | |
| | | excludeFilterStrings = |
| | | new StringArgument("excludefilter", 'E', "excludeFilter", |
| | | false, true, true, "{filter}", null, null, |
| | | false, true, true, INFO_FILTER_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_LDIFEXPORT_DESCRIPTION_EXCLUDE_FILTER.get()); |
| | | argParser.addArgument(excludeFilterStrings); |
| | | |
| | |
| | | |
| | | wrapColumn = |
| | | new IntegerArgument("wrapcolumn", null, "wrapColumn", false, false, |
| | | true, "{wrapColumn}", 0, null, true, 0, false, 0, |
| | | true, INFO_WRAP_COLUMN_PLACEHOLDER.get(), 0, |
| | | null, true, 0, false, 0, |
| | | INFO_LDIFEXPORT_DESCRIPTION_WRAP_COLUMN.get()); |
| | | argParser.addArgument(wrapColumn); |
| | | |
| | |
| | | configClass = |
| | | new StringArgument("configclass", OPTION_SHORT_CONFIG_CLASS, |
| | | OPTION_LONG_CONFIG_CLASS, true, false, |
| | | true, OPTION_VALUE_CONFIG_CLASS, |
| | | true, INFO_CONFIGCLASS_PLACEHOLDER.get(), |
| | | ConfigFileHandler.class.getName(), null, |
| | | INFO_DESCRIPTION_CONFIG_CLASS.get()); |
| | | configClass.setHidden(true); |
| | |
| | | |
| | | configFile = |
| | | new StringArgument("configfile", 'f', "configFile", true, false, |
| | | true, "{configFile}", null, null, |
| | | true, INFO_CONFIGFILE_PLACEHOLDER.get(), null, |
| | | null, |
| | | INFO_DESCRIPTION_CONFIG_FILE.get()); |
| | | configFile.setHidden(true); |
| | | argParser.addArgument(configFile); |
| | |
| | | ldifFiles = |
| | | new StringArgument("ldiffile", OPTION_SHORT_LDIF_FILE, |
| | | OPTION_LONG_LDIF_FILE, false, true, true, |
| | | OPTION_VALUE_LDIF_FILE, null, null, |
| | | INFO_LDIFFILE_PLACEHOLDER.get(), null, null, |
| | | INFO_LDIFIMPORT_DESCRIPTION_LDIF_FILE.get()); |
| | | argParser.addArgument(ldifFiles); |
| | | |
| | | |
| | | templateFile = |
| | | new StringArgument("templatefile", 'A', "templateFile", false, false, |
| | | true, "{templateFile}", null, null, |
| | | true, INFO_TEMPLATE_FILE_PLACEHOLDER.get(), null, |
| | | null, |
| | | INFO_LDIFIMPORT_DESCRIPTION_TEMPLATE_FILE.get()); |
| | | argParser.addArgument(templateFile); |
| | | |
| | |
| | | |
| | | backendID = |
| | | new StringArgument("backendid", 'n', "backendID", false, false, true, |
| | | "{backendID}", null, null, |
| | | INFO_BACKENDNAME_PLACEHOLDER.get(), null, null, |
| | | INFO_LDIFIMPORT_DESCRIPTION_BACKEND_ID.get()); |
| | | argParser.addArgument(backendID); |
| | | |
| | |
| | | |
| | | includeBranchStrings = |
| | | new StringArgument("includebranch", 'b', "includeBranch", false, |
| | | true, true, "{branchDN}", null, null, |
| | | true, true, INFO_BRANCH_DN_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_LDIFIMPORT_DESCRIPTION_INCLUDE_BRANCH.get()); |
| | | argParser.addArgument(includeBranchStrings); |
| | | |
| | | |
| | | excludeBranchStrings = |
| | | new StringArgument("excludebranch", 'B', "excludeBranch", false, |
| | | true, true, "{branchDN}", null, null, |
| | | true, true, INFO_BRANCH_DN_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_LDIFIMPORT_DESCRIPTION_EXCLUDE_BRANCH.get()); |
| | | argParser.addArgument(excludeBranchStrings); |
| | | |
| | |
| | | includeAttributeStrings = |
| | | new StringArgument( |
| | | "includeattribute", 'i', "includeAttribute", |
| | | false, true, true, "{attribute}", null, null, |
| | | false, true, true, INFO_ATTRIBUTE_PLACEHOLDER.get(), null, |
| | | null, |
| | | INFO_LDIFIMPORT_DESCRIPTION_INCLUDE_ATTRIBUTE.get()); |
| | | argParser.addArgument(includeAttributeStrings); |
| | | |
| | |
| | | excludeAttributeStrings = |
| | | new StringArgument( |
| | | "excludeattribute", 'e', "excludeAttribute", |
| | | false, true, true, "{attribute}", null, null, |
| | | false, true, true, INFO_ATTRIBUTE_PLACEHOLDER.get(), null, |
| | | null, |
| | | INFO_LDIFIMPORT_DESCRIPTION_EXCLUDE_ATTRIBUTE.get()); |
| | | argParser.addArgument(excludeAttributeStrings); |
| | | |
| | |
| | | includeFilterStrings = |
| | | new StringArgument( |
| | | "includefilter", 'I', "includeFilter", |
| | | false, true, true, "{filter}", null, null, |
| | | false, true, true, INFO_FILTER_PLACEHOLDER.get(), null, null, |
| | | INFO_LDIFIMPORT_DESCRIPTION_INCLUDE_FILTER.get()); |
| | | argParser.addArgument(includeFilterStrings); |
| | | |
| | | |
| | | excludeFilterStrings = |
| | | new StringArgument("excludefilter", 'E', "excludeFilter", |
| | | false, true, true, "{filter}", null, null, |
| | | false, true, true, INFO_FILTER_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_LDIFIMPORT_DESCRIPTION_EXCLUDE_FILTER.get()); |
| | | argParser.addArgument(excludeFilterStrings); |
| | | |
| | | |
| | | rejectFile = |
| | | new StringArgument("rejectfile", 'R', "rejectFile", false, false, |
| | | true, "{rejectFile}", null, null, |
| | | true, INFO_REJECT_FILE_PLACEHOLDER.get(), null, |
| | | null, |
| | | INFO_LDIFIMPORT_DESCRIPTION_REJECT_FILE.get()); |
| | | argParser.addArgument(rejectFile); |
| | | |
| | | |
| | | skipFile = |
| | | new StringArgument("skipfile", null, "skipFile", false, false, |
| | | true, "{skipFile}", null, null, |
| | | true, INFO_SKIP_FILE_PLACEHOLDER.get(), null, |
| | | null, |
| | | INFO_LDIFIMPORT_DESCRIPTION_SKIP_FILE.get()); |
| | | argParser.addArgument(skipFile); |
| | | |
| | |
| | | randomSeed = |
| | | new IntegerArgument("randomseed", OPTION_SHORT_RANDOM_SEED, |
| | | OPTION_LONG_RANDOM_SEED, false, false, |
| | | true, OPTION_VALUE_RANDOM_SEED, |
| | | true, INFO_SEED_PLACEHOLDER.get(), |
| | | 0, null, false, 0, false, 0, |
| | | INFO_LDIFIMPORT_DESCRIPTION_RANDOM_SEED.get()); |
| | | argParser.addArgument(randomSeed); |
| | |
| | | |
| | | configFileArg = new StringArgument( |
| | | "configfile", 'c', "configFile", false, |
| | | false, true, "{configFile}", getDefaultConfigFile(), "configFile", |
| | | false, true, INFO_CONFIGFILE_PLACEHOLDER.get(), getDefaultConfigFile(), |
| | | "configFile", |
| | | INFO_DESCRIPTION_CONFIG_FILE.get()); |
| | | configFileArg.setHidden(true); |
| | | addArgument(configFileArg); |
| | |
| | | configClassArg = new StringArgument( |
| | | "configclass", OPTION_SHORT_CONFIG_CLASS, |
| | | OPTION_LONG_CONFIG_CLASS, false, |
| | | false, true, OPTION_VALUE_CONFIG_CLASS, |
| | | false, true, INFO_CONFIGCLASS_PLACEHOLDER.get(), |
| | | ConfigFileHandler.class.getName(), OPTION_LONG_CONFIG_CLASS, |
| | | INFO_DESCRIPTION_CONFIG_CLASS.get()); |
| | | configClassArg.setHidden(true); |
| | |
| | | } |
| | | progNameArg = new StringArgument( |
| | | "progname", 'P', "programName", false, |
| | | false, true, "{programName}", defaultProgName, |
| | | false, true, INFO_PROGRAM_NAME_PLACEHOLDER.get(), defaultProgName, |
| | | "programName", INFO_INSTALLDS_DESCRIPTION_PROGNAME.get()); |
| | | progNameArg.setHidden(true); |
| | | addArgument(progNameArg); |
| | |
| | | |
| | | propertiesFileArgument = new StringArgument( |
| | | "propertiesFilePath", null, OPTION_LONG_PROP_FILE_PATH, false, false, |
| | | true, OPTION_VALUE_PROP_FILE_PATH, null, null, |
| | | true, INFO_PROP_FILE_PATH_PLACEHOLDER.get(), null, null, |
| | | INFO_DESCRIPTION_PROP_FILE_PATH.get()); |
| | | addArgument(propertiesFileArgument); |
| | | setFilePropertiesArgument(propertiesFileArgument); |
| | |
| | | baseDNArg = new StringArgument( |
| | | "basedn", OPTION_SHORT_BASEDN, |
| | | OPTION_LONG_BASEDN, false, true, true, |
| | | OPTION_VALUE_BASEDN, |
| | | INFO_BASEDN_PLACEHOLDER.get(), |
| | | "dc=example,dc=com", OPTION_LONG_BASEDN, |
| | | INFO_INSTALLDS_DESCRIPTION_BASEDN.get()); |
| | | addArgument(baseDNArg); |
| | |
| | | importLDIFArg = new StringArgument( |
| | | "importldif", OPTION_SHORT_LDIF_FILE, |
| | | OPTION_LONG_LDIF_FILE, false, |
| | | true, true, OPTION_VALUE_LDIF_FILE, |
| | | true, true, INFO_LDIFFILE_PLACEHOLDER.get(), |
| | | null, OPTION_LONG_LDIF_FILE, |
| | | INFO_INSTALLDS_DESCRIPTION_IMPORTLDIF.get()); |
| | | addArgument(importLDIFArg); |
| | | |
| | | rejectedImportFileArg = new StringArgument( |
| | | "rejectfile", 'R', "rejectFile", false, false, |
| | | true, "{rejectFile}", null, "rejectFile", |
| | | true, INFO_REJECT_FILE_PLACEHOLDER.get(), null, "rejectFile", |
| | | INFO_INSTALLDS_DESCRIPTION_REJECTED_FILE.get()); |
| | | addArgument(rejectedImportFileArg); |
| | | |
| | | skippedImportFileArg = new StringArgument( |
| | | "skipFile", null, "skipFile", false, false, |
| | | true, "{skipFile}", null, "skipFile", |
| | | true, INFO_SKIP_FILE_PLACEHOLDER.get(), null, "skipFile", |
| | | INFO_INSTALLDS_DESCRIPTION_SKIPPED_FILE.get()); |
| | | addArgument(skippedImportFileArg); |
| | | |
| | | sampleDataArg = new IntegerArgument( |
| | | "sampledata", 'd', "sampleData", false, |
| | | false, true, "{numEntries}", 0, "sampleData", |
| | | false, true, INFO_NUM_ENTRIES_PLACEHOLDER.get(), 0, "sampleData", |
| | | true, 0, false, 0, |
| | | INFO_INSTALLDS_DESCRIPTION_SAMPLE_DATA.get()); |
| | | addArgument(sampleDataArg); |
| | |
| | | ldapPortArg = new IntegerArgument( |
| | | "ldapport", OPTION_SHORT_PORT, |
| | | "ldapPort", false, false, |
| | | true, OPTION_VALUE_PORT, defaultPort, |
| | | true, INFO_PORT_PLACEHOLDER.get(), defaultPort, |
| | | "ldapPort", true, 1, true, 65535, |
| | | INFO_INSTALLDS_DESCRIPTION_LDAPPORT.get()); |
| | | addArgument(ldapPortArg); |
| | | |
| | | jmxPortArg = new IntegerArgument( |
| | | "jmxport", 'x', "jmxPort", false, false, |
| | | true, "{jmxPort}", |
| | | true, INFO_JMXPORT_PLACEHOLDER.get(), |
| | | SetupUtils.getDefaultJMXPort(), "jmxPort", true, |
| | | 1, true, 65535, |
| | | INFO_INSTALLDS_DESCRIPTION_JMXPORT.get()); |
| | |
| | | directoryManagerDNArg = new StringArgument( |
| | | "rootdn",OPTION_SHORT_ROOT_USER_DN, |
| | | OPTION_LONG_ROOT_USER_DN, false, false, |
| | | true, OPTION_VALUE_ROOT_USER_DN, |
| | | true, INFO_ROOT_USER_DN_PLACEHOLDER.get(), |
| | | "cn=Directory Manager", |
| | | OPTION_LONG_ROOT_USER_DN, INFO_INSTALLDS_DESCRIPTION_ROOTDN.get()); |
| | | addArgument(directoryManagerDNArg); |
| | |
| | | "rootpwstring", OPTION_SHORT_BINDPWD, |
| | | "rootUserPassword", |
| | | false, false, true, |
| | | "{password}", null, |
| | | INFO_ROOT_USER_PWD_PLACEHOLDER.get(), null, |
| | | "rootUserPassword", |
| | | INFO_INSTALLDS_DESCRIPTION_ROOTPW.get()); |
| | | addArgument(directoryManagerPwdStringArg); |
| | |
| | | "rootpwfile", |
| | | OPTION_SHORT_BINDPWD_FILE, |
| | | "rootUserPasswordFile", false, false, |
| | | OPTION_VALUE_BINDPWD_FILE, |
| | | INFO_ROOT_USER_PWD_FILE_PLACEHOLDER.get(), |
| | | null, "rootUserPasswordFile", |
| | | INFO_INSTALLDS_DESCRIPTION_ROOTPWFILE.get()); |
| | | addArgument(directoryManagerPwdFileArg); |
| | |
| | | ldapsPortArg = new IntegerArgument( |
| | | "ldapsport", OPTION_SHORT_USE_SSL, |
| | | "ldapsPort", false, false, |
| | | true, OPTION_VALUE_PORT, defaultSecurePort, |
| | | true, INFO_PORT_PLACEHOLDER.get(), defaultSecurePort, |
| | | "ldapsPort", true, 1, true, 65535, |
| | | INFO_INSTALLDS_DESCRIPTION_LDAPSPORT.get()); |
| | | addArgument(ldapsPortArg); |
| | |
| | | |
| | | useJavaKeyStoreArg = new StringArgument("useJavaKeystore", |
| | | null, "useJavaKeystore", false, false, |
| | | true, OPTION_VALUE_KEYSTOREPATH, null, "useJavaKeystore", |
| | | true, INFO_KEYSTOREPATH_PLACEHOLDER.get(), null, "useJavaKeystore", |
| | | INFO_INSTALLDS_DESCRIPTION_USE_JAVAKEYSTORE.get()); |
| | | addArgument(useJavaKeyStoreArg); |
| | | |
| | | usePkcs12Arg = new StringArgument("usePkcs12keyStore", |
| | | null, "usePkcs12keyStore", false, false, |
| | | true, OPTION_VALUE_KEYSTOREPATH, null, "usePkcs12keyStore", |
| | | true, INFO_KEYSTOREPATH_PLACEHOLDER.get(), null, "usePkcs12keyStore", |
| | | INFO_INSTALLDS_DESCRIPTION_USE_PKCS12.get()); |
| | | addArgument(usePkcs12Arg); |
| | | |
| | | keyStorePasswordArg = new StringArgument("keystorePassword", |
| | | OPTION_SHORT_KEYSTORE_PWD, |
| | | OPTION_LONG_KEYSTORE_PWD, false, false, true, |
| | | OPTION_VALUE_KEYSTORE_PWD, null, OPTION_LONG_KEYSTORE_PWD, |
| | | INFO_KEYSTORE_PWD_PLACEHOLDER.get(), null, OPTION_LONG_KEYSTORE_PWD, |
| | | INFO_INSTALLDS_DESCRIPTION_KEYSTOREPASSWORD.get()); |
| | | addDefaultArgument(keyStorePasswordArg); |
| | | |
| | | keyStorePasswordFileArg = new FileBasedArgument("keystorePasswordFile", |
| | | OPTION_SHORT_KEYSTORE_PWD_FILE, OPTION_LONG_KEYSTORE_PWD_FILE, false, |
| | | false, OPTION_VALUE_KEYSTORE_PWD_FILE, null, |
| | | false, INFO_KEYSTORE_PWD_FILE_PLACEHOLDER.get(), null, |
| | | OPTION_LONG_KEYSTORE_PWD_FILE, |
| | | INFO_INSTALLDS_DESCRIPTION_KEYSTOREPASSWORD_FILE.get()); |
| | | addDefaultArgument(keyStorePasswordFileArg); |
| | | |
| | | certNicknameArg = new StringArgument("certnickname", |
| | | OPTION_SHORT_CERT_NICKNAME, OPTION_LONG_CERT_NICKNAME, |
| | | false, false, true, OPTION_VALUE_CERT_NICKNAME, null, |
| | | false, false, true, INFO_NICKNAME_PLACEHOLDER.get(), null, |
| | | OPTION_LONG_CERT_NICKNAME, |
| | | INFO_INSTALLDS_DESCRIPTION_CERT_NICKNAME.get()); |
| | | addDefaultArgument(certNicknameArg); |
| | |
| | | |
| | | propertiesFileArg = new StringArgument("propertiesFile", |
| | | 'p', "propertiesFile", false, |
| | | false, true, "{path}", getDefaultPropertiesValue(), |
| | | false, true, INFO_PATH_PLACEHOLDER.get(), getDefaultPropertiesValue(), |
| | | "propertiesFile", |
| | | INFO_JAVAPROPERTIES_DESCRIPTION_PROPERTIES_FILE.get( |
| | | getDefaultPropertiesValue())); |
| | |
| | | |
| | | destinationFileArg = new StringArgument("destinationFile", |
| | | 'd', "destinationFile", false, |
| | | false, true, "{path}", getDefaultDestinationValue(), |
| | | false, true, INFO_PATH_PLACEHOLDER.get(), getDefaultDestinationValue(), |
| | | "destinationFile", |
| | | INFO_JAVAPROPERTIES_DESCRIPTION_DESTINATION_FILE.get( |
| | | getDefaultDestinationValue())); |
| | |
| | | { |
| | | propertiesFileArgument = new StringArgument("propertiesFilePath", |
| | | null, OPTION_LONG_PROP_FILE_PATH, |
| | | false, false, true, OPTION_VALUE_PROP_FILE_PATH, null, null, |
| | | false, false, true, INFO_PROP_FILE_PATH_PLACEHOLDER.get(), null, null, |
| | | INFO_DESCRIPTION_PROP_FILE_PATH.get()); |
| | | argParser.addArgument(propertiesFileArgument); |
| | | argParser.setFilePropertiesArgument(propertiesFileArgument); |
| | |
| | | |
| | | hostName = new StringArgument("host", OPTION_SHORT_HOST, |
| | | OPTION_LONG_HOST, false, false, true, |
| | | OPTION_VALUE_HOST, "localhost", null, |
| | | INFO_HOST_PLACEHOLDER.get(), "localhost", |
| | | null, |
| | | INFO_DESCRIPTION_HOST.get()); |
| | | hostName.setPropertyName(OPTION_LONG_HOST); |
| | | argParser.addArgument(hostName); |
| | | |
| | | port = new IntegerArgument("port", OPTION_SHORT_PORT, |
| | | OPTION_LONG_PORT, false, false, true, |
| | | OPTION_VALUE_PORT, 389, null, |
| | | INFO_PORT_PLACEHOLDER.get(), 389, null, |
| | | INFO_DESCRIPTION_PORT.get()); |
| | | port.setPropertyName(OPTION_LONG_PORT); |
| | | argParser.addArgument(port); |
| | |
| | | |
| | | bindDN = new StringArgument("bindDN", OPTION_SHORT_BINDDN, |
| | | OPTION_LONG_BINDDN, false, false, true, |
| | | OPTION_VALUE_BINDDN, null, null, |
| | | INFO_BINDDN_PLACEHOLDER.get(), null, null, |
| | | INFO_DESCRIPTION_BINDDN.get()); |
| | | bindDN.setPropertyName(OPTION_LONG_BINDDN); |
| | | argParser.addArgument(bindDN); |
| | |
| | | bindPassword = new StringArgument("bindPassword", OPTION_SHORT_BINDPWD, |
| | | OPTION_LONG_BINDPWD, |
| | | false, false, true, |
| | | OPTION_VALUE_BINDPWD, |
| | | INFO_BINDPWD_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_DESCRIPTION_BINDPASSWORD.get()); |
| | | bindPassword.setPropertyName(OPTION_LONG_BINDPWD); |
| | |
| | | OPTION_SHORT_BINDPWD_FILE, |
| | | OPTION_LONG_BINDPWD_FILE, |
| | | false, false, |
| | | OPTION_VALUE_BINDPWD_FILE, null, |
| | | INFO_BINDPWD_FILE_PLACEHOLDER.get(), null, |
| | | null, INFO_DESCRIPTION_BINDPASSWORDFILE.get()); |
| | | bindPasswordFile.setPropertyName(OPTION_LONG_BINDPWD_FILE); |
| | | argParser.addArgument(bindPasswordFile); |
| | | |
| | | filename = new StringArgument("filename", OPTION_SHORT_FILENAME, |
| | | OPTION_LONG_FILENAME, false, false, |
| | | true, OPTION_VALUE_FILENAME, null, null, |
| | | true, INFO_FILE_PLACEHOLDER.get(), null, |
| | | null, |
| | | INFO_COMPARE_DESCRIPTION_FILENAME.get()); |
| | | filename.setPropertyName(OPTION_LONG_FILENAME); |
| | | argParser.addArgument(filename); |
| | |
| | | saslOptions = new StringArgument("saslOption", OPTION_SHORT_SASLOPTION, |
| | | OPTION_LONG_SASLOPTION, false, |
| | | true, true, |
| | | OPTION_VALUE_SASLOPTION, null, null, |
| | | INFO_SASL_OPTION_PLACEHOLDER.get(), null, |
| | | null, |
| | | INFO_DESCRIPTION_SASL_PROPERTIES.get()); |
| | | saslOptions.setPropertyName(OPTION_LONG_SASLOPTION); |
| | | argParser.addArgument(saslOptions); |
| | |
| | | OPTION_SHORT_KEYSTOREPATH, |
| | | OPTION_LONG_KEYSTOREPATH, |
| | | false, false, true, |
| | | OPTION_VALUE_KEYSTOREPATH, |
| | | INFO_KEYSTOREPATH_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_DESCRIPTION_KEYSTOREPATH.get()); |
| | | keyStorePath.setPropertyName(OPTION_LONG_KEYSTOREPATH); |
| | |
| | | keyStorePassword = new StringArgument("keyStorePassword", |
| | | OPTION_SHORT_KEYSTORE_PWD, |
| | | OPTION_LONG_KEYSTORE_PWD, false, false, |
| | | true, "{keyStorePassword}", null, null, |
| | | true, INFO_KEYSTORE_PWD_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_DESCRIPTION_KEYSTOREPASSWORD.get()); |
| | | keyStorePassword.setPropertyName(OPTION_LONG_KEYSTORE_PWD); |
| | | argParser.addArgument(keyStorePassword); |
| | |
| | | OPTION_SHORT_KEYSTORE_PWD_FILE, |
| | | OPTION_LONG_KEYSTORE_PWD_FILE, |
| | | false, false, |
| | | OPTION_VALUE_KEYSTORE_PWD_FILE, |
| | | INFO_KEYSTORE_PWD_FILE_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_DESCRIPTION_KEYSTOREPASSWORD_FILE.get()); |
| | | keyStorePasswordFile.setPropertyName(OPTION_LONG_KEYSTORE_PWD_FILE); |
| | |
| | | |
| | | certNickname = |
| | | new StringArgument("certnickname", 'N', "certNickname", |
| | | false, false, true, "{nickname}", null, |
| | | false, false, true, |
| | | INFO_NICKNAME_PLACEHOLDER.get(), null, |
| | | null, INFO_DESCRIPTION_CERT_NICKNAME.get()); |
| | | certNickname.setPropertyName("certNickname"); |
| | | argParser.addArgument(certNickname); |
| | |
| | | OPTION_SHORT_TRUSTSTOREPATH, |
| | | OPTION_LONG_TRUSTSTOREPATH, |
| | | false, false, true, |
| | | OPTION_VALUE_TRUSTSTOREPATH, |
| | | INFO_TRUSTSTOREPATH_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_DESCRIPTION_TRUSTSTOREPATH.get()); |
| | | trustStorePath.setPropertyName(OPTION_LONG_TRUSTSTOREPATH); |
| | |
| | | new StringArgument("trustStorePassword", null, |
| | | OPTION_LONG_TRUSTSTORE_PWD, |
| | | false, false, true, |
| | | OPTION_VALUE_TRUSTSTORE_PWD, null, |
| | | INFO_TRUSTSTORE_PWD_PLACEHOLDER.get(), null, |
| | | null, INFO_DESCRIPTION_TRUSTSTOREPASSWORD.get()); |
| | | trustStorePassword.setPropertyName(OPTION_LONG_TRUSTSTORE_PWD); |
| | | argParser.addArgument(trustStorePassword); |
| | |
| | | "trustStorePasswordFile", |
| | | OPTION_SHORT_TRUSTSTORE_PWD_FILE, |
| | | OPTION_LONG_TRUSTSTORE_PWD_FILE, false, false, |
| | | OPTION_VALUE_TRUSTSTORE_PWD_FILE, null, null, |
| | | INFO_TRUSTSTORE_PWD_FILE_PLACEHOLDER.get(), null, |
| | | null, |
| | | INFO_DESCRIPTION_TRUSTSTOREPASSWORD_FILE.get()); |
| | | trustStorePasswordFile.setPropertyName(OPTION_LONG_TRUSTSTORE_PWD_FILE); |
| | | argParser.addArgument(trustStorePasswordFile); |
| | | |
| | | assertionFilter = new StringArgument("assertionfilter", null, |
| | | OPTION_LONG_ASSERTION_FILE, false, false, true, |
| | | OPTION_VALUE_ASSERTION_FILE, null, null, |
| | | INFO_ASSERTION_FILTER_PLACEHOLDER.get(), null, |
| | | null, |
| | | INFO_DESCRIPTION_ASSERTION_FILTER.get()); |
| | | assertionFilter.setPropertyName(OPTION_LONG_ASSERTION_FILE); |
| | | argParser.addArgument(assertionFilter); |
| | | |
| | | controlStr = |
| | | new StringArgument("control", 'J', "control", false, true, true, |
| | | "{controloid[:criticality[:value|::b64value|:<filePath]]}", |
| | | null, null, INFO_DESCRIPTION_CONTROLS.get()); |
| | | INFO_LDAP_CONTROL_PLACEHOLDER.get(), |
| | | null, null, INFO_DESCRIPTION_CONTROLS.get()); |
| | | controlStr.setPropertyName("control"); |
| | | argParser.addArgument(controlStr); |
| | | |
| | | version = new IntegerArgument("version", OPTION_SHORT_PROTOCOL_VERSION, |
| | | OPTION_LONG_PROTOCOL_VERSION, |
| | | false, false, true, |
| | | OPTION_VALUE_PROTOCOL_VERSION, |
| | | INFO_PROTOCOL_VERSION_PLACEHOLDER.get(), |
| | | 3, null, INFO_DESCRIPTION_VERSION.get()); |
| | | version.setPropertyName(OPTION_LONG_PROTOCOL_VERSION); |
| | | argParser.addArgument(version); |
| | | |
| | | encodingStr = new StringArgument("encoding", 'i', "encoding", |
| | | false, false, |
| | | true, "{encoding}", null, null, |
| | | true, INFO_ENCODING_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_DESCRIPTION_ENCODING.get()); |
| | | encodingStr.setPropertyName("encoding"); |
| | | argParser.addArgument(encodingStr); |
| | |
| | | { |
| | | propertiesFileArgument = new StringArgument("propertiesFilePath", |
| | | null, OPTION_LONG_PROP_FILE_PATH, |
| | | false, false, true, OPTION_VALUE_PROP_FILE_PATH, null, null, |
| | | false, false, true, INFO_PROP_FILE_PATH_PLACEHOLDER.get(), null, null, |
| | | INFO_DESCRIPTION_PROP_FILE_PATH.get()); |
| | | argParser.addArgument(propertiesFileArgument); |
| | | argParser.setFilePropertiesArgument(propertiesFileArgument); |
| | |
| | | |
| | | hostName = new StringArgument("host", OPTION_SHORT_HOST, |
| | | OPTION_LONG_HOST, false, false, true, |
| | | OPTION_VALUE_HOST, "localhost", null, |
| | | INFO_HOST_PLACEHOLDER.get(), "localhost", |
| | | null, |
| | | INFO_DESCRIPTION_HOST.get()); |
| | | hostName.setPropertyName(OPTION_LONG_HOST); |
| | | argParser.addArgument(hostName); |
| | | |
| | | port = new IntegerArgument("port", OPTION_SHORT_PORT, |
| | | OPTION_LONG_PORT, false, false, true, |
| | | OPTION_VALUE_PORT, 389, null, |
| | | INFO_PORT_PLACEHOLDER.get(), 389, null, |
| | | INFO_DESCRIPTION_PORT.get()); |
| | | port.setPropertyName(OPTION_LONG_PORT); |
| | | argParser.addArgument(port); |
| | |
| | | |
| | | bindDN = new StringArgument("bindDN", OPTION_SHORT_BINDDN, |
| | | OPTION_LONG_BINDDN, false, false, true, |
| | | OPTION_VALUE_BINDDN, null, null, |
| | | INFO_BINDDN_PLACEHOLDER.get(), null, null, |
| | | INFO_DESCRIPTION_BINDDN.get()); |
| | | bindDN.setPropertyName(OPTION_LONG_BINDPWD); |
| | | argParser.addArgument(bindDN); |
| | |
| | | bindPassword = new StringArgument("bindPassword", OPTION_SHORT_BINDPWD, |
| | | OPTION_LONG_BINDPWD, |
| | | false, false, true, |
| | | OPTION_VALUE_BINDPWD, |
| | | INFO_BINDPWD_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_DESCRIPTION_BINDPASSWORD.get()); |
| | | bindPassword.setPropertyName(OPTION_LONG_BINDPWD); |
| | |
| | | new FileBasedArgument("bindPasswordFile", OPTION_SHORT_BINDPWD_FILE, |
| | | OPTION_LONG_BINDPWD_FILE, |
| | | false, false, |
| | | OPTION_VALUE_BINDPWD_FILE, null, |
| | | INFO_BINDPWD_FILE_PLACEHOLDER.get(), null, |
| | | null, INFO_DESCRIPTION_BINDPASSWORDFILE.get()); |
| | | bindPasswordFile.setPropertyName(OPTION_LONG_BINDPWD_FILE); |
| | | argParser.addArgument(bindPasswordFile); |
| | | |
| | | filename = new StringArgument("filename", OPTION_SHORT_FILENAME, |
| | | OPTION_LONG_FILENAME, false, false, |
| | | true, OPTION_VALUE_FILENAME, null, null, |
| | | true, INFO_FILE_PLACEHOLDER.get(), null, |
| | | null, |
| | | INFO_DELETE_DESCRIPTION_FILENAME.get()); |
| | | filename.setPropertyName(OPTION_LONG_FILENAME); |
| | | argParser.addArgument(filename); |
| | |
| | | "saslOption", OPTION_SHORT_SASLOPTION, |
| | | OPTION_LONG_SASLOPTION, |
| | | false, true, true, |
| | | OPTION_VALUE_SASLOPTION, null, |
| | | INFO_SASL_OPTION_PLACEHOLDER.get(), null, |
| | | null, INFO_DESCRIPTION_SASL_PROPERTIES.get()); |
| | | saslOptions.setPropertyName(OPTION_LONG_SASLOPTION); |
| | | argParser.addArgument(saslOptions); |
| | |
| | | OPTION_SHORT_KEYSTOREPATH, |
| | | OPTION_LONG_KEYSTOREPATH, |
| | | false, false, true, |
| | | OPTION_VALUE_KEYSTOREPATH, |
| | | INFO_KEYSTOREPATH_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_DESCRIPTION_KEYSTOREPATH.get()); |
| | | keyStorePath.setPropertyName(OPTION_LONG_KEYSTOREPATH); |
| | |
| | | OPTION_SHORT_KEYSTORE_PWD, |
| | | OPTION_LONG_KEYSTORE_PWD, |
| | | false, false, |
| | | true, OPTION_VALUE_KEYSTORE_PWD, |
| | | true, INFO_KEYSTORE_PWD_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_DESCRIPTION_KEYSTOREPASSWORD.get()); |
| | | keyStorePassword.setPropertyName(OPTION_LONG_KEYSTORE_PWD); |
| | |
| | | OPTION_SHORT_KEYSTORE_PWD_FILE, |
| | | OPTION_LONG_KEYSTORE_PWD_FILE, |
| | | false, false, |
| | | OPTION_VALUE_KEYSTORE_PWD_FILE, |
| | | INFO_KEYSTORE_PWD_FILE_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_DESCRIPTION_KEYSTOREPASSWORD_FILE.get()); |
| | | keyStorePasswordFile.setPropertyName(OPTION_LONG_KEYSTORE_PWD_FILE); |
| | |
| | | |
| | | certNickname = new StringArgument( |
| | | "certnickname", 'N', "certNickname", |
| | | false, false, true, "{nickname}", null, |
| | | false, false, true, INFO_NICKNAME_PLACEHOLDER.get(), null, |
| | | null, INFO_DESCRIPTION_CERT_NICKNAME.get()); |
| | | certNickname.setPropertyName("certNickname"); |
| | | argParser.addArgument(certNickname); |
| | |
| | | OPTION_SHORT_TRUSTSTOREPATH, |
| | | OPTION_LONG_TRUSTSTOREPATH, |
| | | false, false, true, |
| | | OPTION_VALUE_TRUSTSTOREPATH, |
| | | INFO_TRUSTSTOREPATH_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_DESCRIPTION_TRUSTSTOREPATH.get()); |
| | | trustStorePath.setPropertyName(OPTION_LONG_TRUSTSTOREPATH); |
| | |
| | | new StringArgument("trustStorePassword", null, |
| | | OPTION_LONG_TRUSTSTORE_PWD, |
| | | false, false, true, |
| | | OPTION_VALUE_TRUSTSTORE_PWD, null, |
| | | INFO_TRUSTSTORE_PWD_PLACEHOLDER.get(), null, |
| | | null, INFO_DESCRIPTION_TRUSTSTOREPASSWORD.get()); |
| | | trustStorePassword.setPropertyName(OPTION_LONG_TRUSTSTORE_PWD); |
| | | argParser.addArgument(trustStorePassword); |
| | |
| | | "trustStorePasswordFile", |
| | | OPTION_SHORT_TRUSTSTORE_PWD_FILE, |
| | | OPTION_LONG_TRUSTSTORE_PWD_FILE, false, false, |
| | | OPTION_VALUE_TRUSTSTORE_PWD_FILE, null, null, |
| | | INFO_TRUSTSTORE_PWD_FILE_PLACEHOLDER.get(), null, null, |
| | | INFO_DESCRIPTION_TRUSTSTOREPASSWORD_FILE.get()); |
| | | trustStorePasswordFile.setPropertyName(OPTION_LONG_TRUSTSTORE_PWD_FILE); |
| | | argParser.addArgument(trustStorePasswordFile); |
| | |
| | | |
| | | controlStr = |
| | | new StringArgument("control", 'J', "control", false, true, true, |
| | | "{controloid[:criticality[:value|::b64value|:<fileurl]]}", |
| | | INFO_LDAP_CONTROL_PLACEHOLDER.get(), |
| | | null, null, INFO_DESCRIPTION_CONTROLS.get()); |
| | | controlStr.setPropertyName("control"); |
| | | argParser.addArgument(controlStr); |
| | | |
| | | version = new IntegerArgument("version", OPTION_SHORT_PROTOCOL_VERSION, |
| | | OPTION_LONG_PROTOCOL_VERSION, false, false, |
| | | true, OPTION_VALUE_PROTOCOL_VERSION, 3, |
| | | true, |
| | | INFO_PROTOCOL_VERSION_PLACEHOLDER.get(), 3, |
| | | null, INFO_DESCRIPTION_VERSION.get()); |
| | | version.setPropertyName(OPTION_LONG_PROTOCOL_VERSION); |
| | | argParser.addArgument(version); |
| | | |
| | | encodingStr = new StringArgument("encoding", 'i', |
| | | OPTION_LONG_ENCODING, false, |
| | | false, true, "{encoding}", null, null, |
| | | false, true, |
| | | INFO_ENCODING_PLACEHOLDER.get(), null, |
| | | null, |
| | | INFO_DESCRIPTION_ENCODING.get()); |
| | | encodingStr.setPropertyName(OPTION_LONG_ENCODING); |
| | | argParser.addArgument(encodingStr); |
| | |
| | | { |
| | | propertiesFileArgument = new StringArgument("propertiesFilePath", |
| | | null, OPTION_LONG_PROP_FILE_PATH, |
| | | false, false, true, OPTION_VALUE_PROP_FILE_PATH, null, null, |
| | | false, false, true, INFO_PROP_FILE_PATH_PLACEHOLDER.get(), null, null, |
| | | INFO_DESCRIPTION_PROP_FILE_PATH.get()); |
| | | argParser.addArgument(propertiesFileArgument); |
| | | argParser.setFilePropertiesArgument(propertiesFileArgument); |
| | |
| | | |
| | | hostName = new StringArgument("host", OPTION_SHORT_HOST, |
| | | OPTION_LONG_HOST, false, false, true, |
| | | OPTION_VALUE_HOST, "localhost", null, |
| | | INFO_HOST_PLACEHOLDER.get(), "localhost", |
| | | null, |
| | | INFO_DESCRIPTION_HOST.get()); |
| | | hostName.setPropertyName(OPTION_LONG_HOST); |
| | | argParser.addArgument(hostName); |
| | | |
| | | port = new IntegerArgument("port", OPTION_SHORT_PORT, |
| | | OPTION_LONG_PORT, false, false, true, |
| | | OPTION_VALUE_PORT, 389, null, |
| | | INFO_PORT_PLACEHOLDER.get(), 389, null, |
| | | INFO_DESCRIPTION_PORT.get()); |
| | | port.setPropertyName(OPTION_LONG_PORT); |
| | | argParser.addArgument(port); |
| | |
| | | |
| | | bindDN = new StringArgument("bindDN", OPTION_SHORT_BINDDN, |
| | | OPTION_LONG_BINDDN, false, false, true, |
| | | OPTION_VALUE_BINDDN, null, null, |
| | | INFO_BINDDN_PLACEHOLDER.get(), null, null, |
| | | INFO_DESCRIPTION_BINDDN.get()); |
| | | bindDN.setPropertyName(OPTION_LONG_BINDDN); |
| | | argParser.addArgument(bindDN); |
| | |
| | | bindPassword = new StringArgument("bindPassword", OPTION_SHORT_BINDPWD, |
| | | OPTION_LONG_BINDPWD, |
| | | false, false, true, |
| | | OPTION_VALUE_BINDPWD, |
| | | INFO_BINDPWD_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_DESCRIPTION_BINDPASSWORD.get()); |
| | | bindPassword.setPropertyName(OPTION_LONG_BINDPWD); |
| | |
| | | OPTION_SHORT_BINDPWD_FILE, |
| | | OPTION_LONG_BINDPWD_FILE, |
| | | false, false, |
| | | OPTION_VALUE_BINDPWD_FILE, null, |
| | | INFO_BINDPWD_FILE_PLACEHOLDER.get(), null, |
| | | null, INFO_DESCRIPTION_BINDPASSWORDFILE.get()); |
| | | bindPasswordFile.setPropertyName(OPTION_VALUE_BINDPWD_FILE); |
| | | bindPasswordFile.setPropertyName(OPTION_LONG_BINDPWD_FILE); |
| | | argParser.addArgument(bindPasswordFile); |
| | | |
| | | defaultAdd = new BooleanArgument( |
| | |
| | | |
| | | filename = new StringArgument("filename", OPTION_SHORT_FILENAME, |
| | | OPTION_LONG_FILENAME, false, false, |
| | | true, OPTION_VALUE_FILENAME, null, null, |
| | | true, INFO_FILE_PLACEHOLDER.get(), null, |
| | | null, |
| | | INFO_LDAPMODIFY_DESCRIPTION_FILENAME.get()); |
| | | filename.setPropertyName(OPTION_LONG_FILENAME); |
| | | argParser.addArgument(filename); |
| | |
| | | saslOptions = new StringArgument("saslOption", OPTION_SHORT_SASLOPTION, |
| | | OPTION_LONG_SASLOPTION, false, |
| | | true, true, |
| | | OPTION_VALUE_SASLOPTION, null, null, |
| | | INFO_SASL_OPTION_PLACEHOLDER.get(), null, |
| | | null, |
| | | INFO_DESCRIPTION_SASL_PROPERTIES.get()); |
| | | saslOptions.setPropertyName(OPTION_LONG_SASLOPTION); |
| | | argParser.addArgument(saslOptions); |
| | |
| | | OPTION_SHORT_KEYSTOREPATH, |
| | | OPTION_LONG_KEYSTOREPATH, |
| | | false, false, true, |
| | | OPTION_VALUE_KEYSTOREPATH, |
| | | INFO_KEYSTOREPATH_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_DESCRIPTION_KEYSTOREPATH.get()); |
| | | keyStorePath.setPropertyName(OPTION_LONG_KEYSTOREPATH); |
| | |
| | | OPTION_LONG_KEYSTORE_PWD, |
| | | false, false, |
| | | true, |
| | | OPTION_VALUE_KEYSTORE_PWD, |
| | | INFO_KEYSTORE_PWD_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_DESCRIPTION_KEYSTOREPASSWORD.get()); |
| | | keyStorePassword.setPropertyName(OPTION_LONG_KEYSTORE_PWD); |
| | |
| | | new FileBasedArgument("keystorepasswordfile", |
| | | OPTION_SHORT_KEYSTORE_PWD_FILE, |
| | | OPTION_LONG_KEYSTORE_PWD_FILE, |
| | | false, false, OPTION_VALUE_KEYSTORE_PWD_FILE, |
| | | false, false, |
| | | INFO_KEYSTORE_PWD_FILE_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_DESCRIPTION_KEYSTOREPASSWORD_FILE.get()); |
| | | keyStorePasswordFile.setPropertyName(OPTION_LONG_KEYSTORE_PWD_FILE); |
| | |
| | | |
| | | certNickname = new StringArgument( |
| | | "certnickname", 'N', "certNickname", |
| | | false, false, true, "{nickname}", null, |
| | | false, false, true, INFO_NICKNAME_PLACEHOLDER.get(), null, |
| | | null, INFO_DESCRIPTION_CERT_NICKNAME.get()); |
| | | certNickname.setPropertyName("certNickname"); |
| | | argParser.addArgument(certNickname); |
| | |
| | | OPTION_SHORT_TRUSTSTOREPATH, |
| | | OPTION_LONG_TRUSTSTOREPATH, |
| | | false, false, true, |
| | | OPTION_VALUE_TRUSTSTOREPATH, |
| | | INFO_TRUSTSTOREPATH_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_DESCRIPTION_TRUSTSTOREPATH.get()); |
| | | trustStorePath.setPropertyName(OPTION_LONG_TRUSTSTOREPATH); |
| | |
| | | new StringArgument("trustStorePassword", null, |
| | | OPTION_LONG_TRUSTSTORE_PWD , |
| | | false, false, true, |
| | | OPTION_VALUE_TRUSTSTORE_PWD, null, |
| | | INFO_TRUSTSTORE_PWD_PLACEHOLDER.get(), null, |
| | | null, INFO_DESCRIPTION_TRUSTSTOREPASSWORD.get()); |
| | | trustStorePassword.setPropertyName(OPTION_LONG_TRUSTSTORE_PWD); |
| | | argParser.addArgument(trustStorePassword); |
| | |
| | | "truststorepasswordfile", |
| | | OPTION_SHORT_TRUSTSTORE_PWD_FILE, |
| | | OPTION_LONG_TRUSTSTORE_PWD_FILE, false, false, |
| | | OPTION_VALUE_TRUSTSTORE_PWD_FILE, null, null, |
| | | INFO_TRUSTSTORE_PWD_FILE_PLACEHOLDER.get(), null, null, |
| | | INFO_DESCRIPTION_TRUSTSTOREPASSWORD_FILE.get()); |
| | | trustStorePasswordFile.setPropertyName(OPTION_LONG_TRUSTSTORE_PWD_FILE); |
| | | argParser.addArgument(trustStorePasswordFile); |
| | |
| | | OPTION_SHORT_PROXYAUTHID, |
| | | OPTION_LONG_PROXYAUTHID, false, |
| | | false, true, |
| | | OPTION_VALUE_PROXYAUTHID, null, null, |
| | | INFO_PROXYAUTHID_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_DESCRIPTION_PROXY_AUTHZID.get()); |
| | | proxyAuthzID.setPropertyName(OPTION_LONG_PROXYAUTHID); |
| | | argParser.addArgument(proxyAuthzID); |
| | |
| | | OPTION_LONG_ASSERTION_FILE, |
| | | false, false, |
| | | true, |
| | | OPTION_VALUE_ASSERTION_FILE, |
| | | INFO_ASSERTION_FILTER_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_DESCRIPTION_ASSERTION_FILTER.get()); |
| | | assertionFilter.setPropertyName(OPTION_LONG_ASSERTION_FILE); |
| | |
| | | preReadAttributes = new StringArgument( |
| | | "prereadattrs", null, |
| | | "preReadAttributes", false, false, |
| | | true, "{attrList}", null, null, |
| | | true, INFO_ATTRIBUTE_LIST_PLACEHOLDER.get(), null, null, |
| | | INFO_DESCRIPTION_PREREAD_ATTRS.get()); |
| | | preReadAttributes.setPropertyName("preReadAttributes"); |
| | | argParser.addArgument(preReadAttributes); |
| | |
| | | postReadAttributes = new StringArgument( |
| | | "postreadattrs", null, |
| | | "postReadAttributes", false, |
| | | false, true, "{attrList}", null, |
| | | false, true, INFO_ATTRIBUTE_LIST_PLACEHOLDER.get(), null, |
| | | null, |
| | | INFO_DESCRIPTION_POSTREAD_ATTRS.get()); |
| | | postReadAttributes.setPropertyName("postReadAttributes"); |
| | |
| | | |
| | | controlStr = |
| | | new StringArgument("control", 'J', "control", false, true, true, |
| | | "{controloid[:criticality[:value|::b64value|:<fileurl]]}", |
| | | INFO_LDAP_CONTROL_PLACEHOLDER.get(), |
| | | null, null, INFO_DESCRIPTION_CONTROLS.get()); |
| | | controlStr.setPropertyName("control"); |
| | | argParser.addArgument(controlStr); |
| | |
| | | version = new IntegerArgument("version", OPTION_SHORT_PROTOCOL_VERSION, |
| | | OPTION_LONG_PROTOCOL_VERSION, |
| | | false, false, true, |
| | | OPTION_VALUE_PROTOCOL_VERSION, 3, null, |
| | | INFO_PROTOCOL_VERSION_PLACEHOLDER.get(), 3, null, |
| | | INFO_DESCRIPTION_VERSION.get()); |
| | | version.setPropertyName(OPTION_LONG_PROTOCOL_VERSION); |
| | | argParser.addArgument(version); |
| | | |
| | | encodingStr = new StringArgument("encoding", 'i', "encoding", |
| | | false, false, |
| | | true, "{encoding}", null, null, |
| | | true, INFO_ENCODING_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_DESCRIPTION_ENCODING.get()); |
| | | encodingStr.setPropertyName("encoding"); |
| | | argParser.addArgument(encodingStr); |
| | |
| | | { |
| | | propertiesFileArgument = new StringArgument("propertiesFilePath", |
| | | null, OPTION_LONG_PROP_FILE_PATH, |
| | | false, false, true, OPTION_VALUE_PROP_FILE_PATH, null, null, |
| | | false, false, true, INFO_PROP_FILE_PATH_PLACEHOLDER.get(), null, null, |
| | | INFO_DESCRIPTION_PROP_FILE_PATH.get()); |
| | | argParser.addArgument(propertiesFileArgument); |
| | | argParser.setFilePropertiesArgument(propertiesFileArgument); |
| | |
| | | |
| | | ldapHost = new StringArgument("ldaphost", OPTION_SHORT_HOST, |
| | | OPTION_LONG_HOST, false, false, |
| | | true, OPTION_VALUE_HOST, "127.0.0.1", null, |
| | | true, INFO_HOST_PLACEHOLDER.get(), |
| | | "127.0.0.1", null, |
| | | INFO_LDAPPWMOD_DESCRIPTION_HOST.get()); |
| | | ldapHost.setPropertyName(OPTION_LONG_HOST); |
| | | argParser.addArgument(ldapHost); |
| | |
| | | ldapPort = new IntegerArgument( |
| | | "ldapport", OPTION_SHORT_PORT, |
| | | OPTION_LONG_PORT, false, false, |
| | | true, OPTION_VALUE_PORT, 389, |
| | | true, INFO_PORT_PLACEHOLDER.get(), 389, |
| | | null, true, 1, true, |
| | | 65535, INFO_LDAPPWMOD_DESCRIPTION_PORT.get()); |
| | | ldapPort.setPropertyName(OPTION_LONG_PORT); |
| | |
| | | |
| | | bindDN = new StringArgument("binddn", OPTION_SHORT_BINDDN, |
| | | OPTION_LONG_BINDDN, false, false, true, |
| | | OPTION_VALUE_BINDDN, null, null, |
| | | INFO_BINDDN_PLACEHOLDER.get(), null, null, |
| | | INFO_LDAPPWMOD_DESCRIPTION_BIND_DN.get()); |
| | | bindDN.setPropertyName(OPTION_LONG_BINDDN); |
| | | argParser.addArgument(bindDN); |
| | |
| | | |
| | | bindPW = new StringArgument("bindpw", OPTION_SHORT_BINDPWD, |
| | | OPTION_LONG_BINDPWD, false, false, |
| | | true, OPTION_VALUE_BINDPWD, null, null, |
| | | true, INFO_BINDPWD_PLACEHOLDER.get(), null, |
| | | null, |
| | | INFO_LDAPPWMOD_DESCRIPTION_BIND_PW.get()); |
| | | bindPW.setPropertyName(OPTION_LONG_BINDPWD); |
| | | argParser.addArgument(bindPW); |
| | |
| | | bindPWFile = |
| | | new FileBasedArgument("bindpwfile", OPTION_SHORT_BINDPWD_FILE, |
| | | OPTION_LONG_BINDPWD_FILE, false, |
| | | false, OPTION_VALUE_BINDPWD_FILE, null, null, |
| | | false, INFO_BINDPWD_FILE_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_LDAPPWMOD_DESCRIPTION_BIND_PW_FILE.get()); |
| | | bindPWFile.setPropertyName(OPTION_LONG_BINDPWD_FILE); |
| | | argParser.addArgument(bindPWFile); |
| | | |
| | | |
| | | authzID = new StringArgument("authzid", 'a', "authzID", false, false, |
| | | true, "{authzID}", null, null, |
| | | true, INFO_PROXYAUTHID_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_LDAPPWMOD_DESCRIPTION_AUTHZID.get()); |
| | | authzID.setPropertyName("authzID"); |
| | | argParser.addArgument(authzID); |
| | |
| | | |
| | | |
| | | newPW = new StringArgument("newpw", 'n', "newPassword", false, false, |
| | | true, "{newPassword}", null, null, |
| | | true, INFO_NEW_PASSWORD_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_LDAPPWMOD_DESCRIPTION_NEWPW.get()); |
| | | newPW.setPropertyName("newPassword"); |
| | | argParser.addArgument(newPW); |
| | |
| | | |
| | | newPWFile = new FileBasedArgument( |
| | | "newpwfile", 'N', "newPasswordFile", |
| | | false, false, "{file}", null, null, |
| | | false, false, INFO_FILE_PLACEHOLDER.get(), null, null, |
| | | INFO_LDAPPWMOD_DESCRIPTION_NEWPWFILE.get()); |
| | | newPWFile.setPropertyName("newPasswordFile"); |
| | | argParser.addArgument(newPWFile); |
| | |
| | | |
| | | currentPW = |
| | | new StringArgument("currentpw", 'c', "currentPassword", false, false, |
| | | true, "{currentPassword}", null, null, |
| | | true, INFO_CURRENT_PASSWORD_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_LDAPPWMOD_DESCRIPTION_CURRENTPW.get()); |
| | | currentPW.setPropertyName("currentPassword"); |
| | | argParser.addArgument(currentPW); |
| | |
| | | currentPWFile = |
| | | new FileBasedArgument( |
| | | "currentpwfile", 'C', "currentPasswordFile", |
| | | false, false, "{file}", null, null, |
| | | false, false, INFO_FILE_PLACEHOLDER.get(), null, null, |
| | | INFO_LDAPPWMOD_DESCRIPTION_CURRENTPWFILE.get()); |
| | | currentPWFile.setPropertyName("currentPasswordFile"); |
| | | argParser.addArgument(currentPWFile); |
| | |
| | | sslKeyStore = |
| | | new StringArgument("keystorepath", OPTION_SHORT_KEYSTOREPATH, |
| | | OPTION_LONG_KEYSTOREPATH, false, false, |
| | | true, OPTION_VALUE_KEYSTOREPATH, null, null, |
| | | true, INFO_KEYSTOREPATH_PLACEHOLDER.get(), null, |
| | | null, |
| | | INFO_LDAPPWMOD_DESCRIPTION_KEYSTORE.get()); |
| | | sslKeyStore.setPropertyName(OPTION_LONG_KEYSTOREPATH); |
| | | argParser.addArgument(sslKeyStore); |
| | |
| | | OPTION_SHORT_KEYSTORE_PWD, |
| | | OPTION_LONG_KEYSTORE_PWD , |
| | | false, false, true, |
| | | OPTION_VALUE_KEYSTORE_PWD, |
| | | INFO_KEYSTORE_PWD_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_LDAPPWMOD_DESCRIPTION_KEYSTORE_PIN.get()); |
| | | sslKeyStorePIN.setPropertyName(OPTION_LONG_KEYSTORE_PWD); |
| | |
| | | "keystorepasswordfile", |
| | | OPTION_SHORT_KEYSTORE_PWD_FILE, |
| | | OPTION_LONG_KEYSTORE_PWD_FILE, |
| | | false, false, OPTION_VALUE_KEYSTORE_PWD_FILE, |
| | | false, false, INFO_KEYSTORE_PWD_FILE_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_LDAPPWMOD_DESCRIPTION_KEYSTORE_PINFILE.get()); |
| | | sslKeyStorePINFile.setPropertyName(OPTION_LONG_KEYSTORE_PWD_FILE); |
| | | argParser.addArgument(sslKeyStorePINFile); |
| | | |
| | | certNickname = new StringArgument("certnickname", null, "certNickname", |
| | | false, false, true, "{nickname}", null, null, |
| | | false, false, true, INFO_NICKNAME_PLACEHOLDER.get(), null, null, |
| | | INFO_DESCRIPTION_CERT_NICKNAME.get()); |
| | | certNickname.setPropertyName("certNickname"); |
| | | argParser.addArgument(certNickname); |
| | |
| | | OPTION_SHORT_TRUSTSTOREPATH, |
| | | OPTION_LONG_TRUSTSTOREPATH, false, |
| | | false, true, |
| | | OPTION_VALUE_TRUSTSTOREPATH, null, null, |
| | | INFO_TRUSTSTOREPATH_PLACEHOLDER.get(), null, null, |
| | | INFO_LDAPPWMOD_DESCRIPTION_TRUSTSTORE.get()); |
| | | sslTrustStore.setPropertyName(OPTION_LONG_TRUSTSTOREPATH); |
| | | argParser.addArgument(sslTrustStore); |
| | |
| | | new StringArgument("truststorepassword", null, |
| | | OPTION_LONG_TRUSTSTORE_PWD, |
| | | false, false, true, |
| | | OPTION_VALUE_TRUSTSTORE_PWD, null, null, |
| | | INFO_TRUSTSTORE_PWD_PLACEHOLDER.get(), null, null, |
| | | INFO_LDAPPWMOD_DESCRIPTION_TRUSTSTORE_PIN.get()); |
| | | sslTrustStorePIN.setPropertyName(OPTION_LONG_TRUSTSTORE_PWD); |
| | | argParser.addArgument(sslTrustStorePIN); |
| | |
| | | new FileBasedArgument("truststorepasswordfile", |
| | | OPTION_SHORT_TRUSTSTORE_PWD_FILE, |
| | | OPTION_LONG_TRUSTSTORE_PWD_FILE, false, false, |
| | | OPTION_VALUE_TRUSTSTORE_PWD_FILE, null, |
| | | INFO_TRUSTSTORE_PWD_FILE_PLACEHOLDER.get(), null, |
| | | null, INFO_LDAPPWMOD_DESCRIPTION_TRUSTSTORE_PINFILE.get()); |
| | | sslTrustStorePINFile.setPropertyName(OPTION_LONG_TRUSTSTORE_PWD_FILE); |
| | | argParser.addArgument(sslTrustStorePINFile); |
| | |
| | | |
| | | controlStr = |
| | | new StringArgument("control", 'J', "control", false, true, true, |
| | | "{controloid[:criticality[:value|::b64value|:<fileurl]]}", |
| | | INFO_LDAP_CONTROL_PLACEHOLDER.get(), |
| | | null, null, INFO_DESCRIPTION_CONTROLS.get()); |
| | | controlStr.setPropertyName("control"); |
| | | argParser.addArgument(controlStr); |
| | |
| | | { |
| | | propertiesFileArgument = new StringArgument("propertiesFilePath", |
| | | null, OPTION_LONG_PROP_FILE_PATH, |
| | | false, false, true, OPTION_VALUE_PROP_FILE_PATH, null, null, |
| | | false, false, true, INFO_PROP_FILE_PATH_PLACEHOLDER.get(), null, null, |
| | | INFO_DESCRIPTION_PROP_FILE_PATH.get()); |
| | | argParser.addArgument(propertiesFileArgument); |
| | | argParser.setFilePropertiesArgument(propertiesFileArgument); |
| | |
| | | |
| | | hostName = new StringArgument("host", OPTION_SHORT_HOST, |
| | | OPTION_LONG_HOST, false, false, true, |
| | | OPTION_VALUE_HOST, "localhost", null, |
| | | INFO_HOST_PLACEHOLDER.get(), "localhost", |
| | | null, |
| | | INFO_DESCRIPTION_HOST.get()); |
| | | hostName.setPropertyName(OPTION_LONG_HOST); |
| | | argParser.addArgument(hostName); |
| | | |
| | | port = new IntegerArgument("port", OPTION_SHORT_PORT, |
| | | OPTION_LONG_PORT, false, false, true, |
| | | OPTION_VALUE_PORT, 389, null, |
| | | INFO_PORT_PLACEHOLDER.get(), 389, null, |
| | | INFO_DESCRIPTION_PORT.get()); |
| | | port.setPropertyName(OPTION_LONG_PORT); |
| | | argParser.addArgument(port); |
| | |
| | | |
| | | bindDN = new StringArgument("bindDN", OPTION_SHORT_BINDDN, |
| | | OPTION_LONG_BINDDN, false, false, true, |
| | | OPTION_VALUE_BINDDN, null, null, |
| | | INFO_BINDDN_PLACEHOLDER.get(), null, null, |
| | | INFO_DESCRIPTION_BINDDN.get()); |
| | | bindDN.setPropertyName(OPTION_LONG_BINDDN); |
| | | argParser.addArgument(bindDN); |
| | |
| | | bindPassword = new StringArgument("bindPassword", OPTION_SHORT_BINDPWD, |
| | | OPTION_LONG_BINDPWD, |
| | | false, false, true, |
| | | OPTION_VALUE_BINDPWD, |
| | | INFO_BINDPWD_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_DESCRIPTION_BINDPASSWORD.get()); |
| | | bindPassword.setPropertyName(OPTION_LONG_BINDPWD); |
| | |
| | | new FileBasedArgument("bindPasswordFile", OPTION_SHORT_BINDPWD_FILE, |
| | | OPTION_LONG_BINDPWD_FILE, |
| | | false, false, |
| | | OPTION_VALUE_BINDPWD_FILE, null, |
| | | INFO_BINDPWD_FILE_PLACEHOLDER.get(), null, |
| | | null, INFO_DESCRIPTION_BINDPASSWORDFILE.get()); |
| | | bindPasswordFile.setPropertyName(OPTION_LONG_BINDPWD_FILE); |
| | | argParser.addArgument(bindPasswordFile); |
| | | |
| | | baseDN = new StringArgument("baseDN", OPTION_SHORT_BASEDN, |
| | | OPTION_LONG_BASEDN, true, false, true, |
| | | OPTION_VALUE_BASEDN, null, null, |
| | | INFO_BASEDN_PLACEHOLDER.get(), null, null, |
| | | INFO_SEARCH_DESCRIPTION_BASEDN.get()); |
| | | baseDN.setPropertyName(OPTION_LONG_BASEDN); |
| | | argParser.addArgument(baseDN); |
| | | |
| | | searchScope = new StringArgument( |
| | | "searchScope", 's', "searchScope", false, |
| | | false, true, "{searchScope}", null, null, |
| | | false, true, INFO_SEARCH_SCOPE_PLACEHOLDER.get(), null, null, |
| | | INFO_SEARCH_DESCRIPTION_SEARCH_SCOPE.get()); |
| | | searchScope.setPropertyName("searchScope"); |
| | | argParser.addArgument(searchScope); |
| | | |
| | | filename = new StringArgument("filename", OPTION_SHORT_FILENAME, |
| | | OPTION_LONG_FILENAME, false, false, |
| | | true, OPTION_VALUE_FILENAME, null, null, |
| | | true, INFO_FILE_PLACEHOLDER.get(), null, |
| | | null, |
| | | INFO_SEARCH_DESCRIPTION_FILENAME.get()); |
| | | searchScope.setPropertyName(OPTION_LONG_FILENAME); |
| | | argParser.addArgument(filename); |
| | |
| | | saslOptions = new StringArgument("saslOption", OPTION_SHORT_SASLOPTION, |
| | | OPTION_LONG_SASLOPTION, false, |
| | | true, true, |
| | | OPTION_VALUE_SASLOPTION, null, null, |
| | | INFO_SASL_OPTION_PLACEHOLDER.get(), null, |
| | | null, |
| | | INFO_DESCRIPTION_SASL_PROPERTIES.get()); |
| | | saslOptions.setPropertyName(OPTION_LONG_SASLOPTION); |
| | | argParser.addArgument(saslOptions); |
| | |
| | | keyStorePath = new StringArgument("keyStorePath", |
| | | OPTION_SHORT_KEYSTOREPATH, |
| | | OPTION_LONG_KEYSTOREPATH, false, false, true, |
| | | OPTION_VALUE_KEYSTOREPATH, null, null, |
| | | INFO_KEYSTOREPATH_PLACEHOLDER.get(), null, |
| | | null, |
| | | INFO_DESCRIPTION_KEYSTOREPATH.get()); |
| | | keyStorePath.setPropertyName(OPTION_LONG_KEYSTOREPATH); |
| | | argParser.addArgument(keyStorePath); |
| | |
| | | keyStorePassword = new StringArgument("keyStorePassword", |
| | | OPTION_SHORT_KEYSTORE_PWD, |
| | | OPTION_LONG_KEYSTORE_PWD, false, false, |
| | | true, OPTION_VALUE_KEYSTORE_PWD, null, null, |
| | | true, INFO_KEYSTORE_PWD_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_DESCRIPTION_KEYSTOREPASSWORD.get()); |
| | | keyStorePassword.setPropertyName(OPTION_LONG_KEYSTORE_PWD); |
| | | argParser.addArgument(keyStorePassword); |
| | |
| | | OPTION_SHORT_KEYSTORE_PWD_FILE, |
| | | OPTION_LONG_KEYSTORE_PWD_FILE, |
| | | false, false, |
| | | OPTION_VALUE_KEYSTORE_PWD_FILE, |
| | | INFO_KEYSTORE_PWD_FILE_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_DESCRIPTION_KEYSTOREPASSWORD_FILE.get()); |
| | | keyStorePasswordFile.setPropertyName(OPTION_LONG_KEYSTORE_PWD_FILE); |
| | |
| | | certNickname = new StringArgument( |
| | | "certnickname", OPTION_SHORT_CERT_NICKNAME, |
| | | OPTION_LONG_CERT_NICKNAME, |
| | | false, false, true, "{nickname}", null, |
| | | false, false, true, INFO_NICKNAME_PLACEHOLDER.get(), null, |
| | | null, INFO_DESCRIPTION_CERT_NICKNAME.get()); |
| | | certNickname.setPropertyName(OPTION_LONG_CERT_NICKNAME); |
| | | argParser.addArgument(certNickname); |
| | |
| | | OPTION_SHORT_TRUSTSTOREPATH, |
| | | OPTION_LONG_TRUSTSTOREPATH, |
| | | false, false, true, |
| | | OPTION_VALUE_TRUSTSTOREPATH, null, null, |
| | | INFO_TRUSTSTOREPATH_PLACEHOLDER.get(), null, |
| | | null, |
| | | INFO_DESCRIPTION_TRUSTSTOREPATH.get()); |
| | | trustStorePath.setPropertyName(OPTION_LONG_TRUSTSTOREPATH); |
| | | argParser.addArgument(trustStorePath); |
| | |
| | | trustStorePassword = |
| | | new StringArgument("trustStorePassword", null, |
| | | OPTION_LONG_TRUSTSTORE_PWD, |
| | | false, false, true, OPTION_VALUE_TRUSTSTORE_PWD, |
| | | false, false, true, |
| | | INFO_TRUSTSTORE_PWD_PLACEHOLDER.get(), |
| | | null, |
| | | null, INFO_DESCRIPTION_TRUSTSTOREPASSWORD.get()); |
| | | trustStorePassword.setPropertyName(OPTION_LONG_TRUSTSTORE_PWD); |
| | |
| | | "truststorepasswordfile", |
| | | OPTION_SHORT_TRUSTSTORE_PWD_FILE, |
| | | OPTION_LONG_TRUSTSTORE_PWD_FILE, false, false, |
| | | OPTION_VALUE_TRUSTSTORE_PWD_FILE, null, null, |
| | | INFO_TRUSTSTORE_PWD_FILE_PLACEHOLDER.get(), null, null, |
| | | INFO_DESCRIPTION_TRUSTSTOREPASSWORD_FILE.get()); |
| | | trustStorePasswordFile.setPropertyName(OPTION_LONG_TRUSTSTORE_PWD_FILE); |
| | | argParser.addArgument(trustStorePasswordFile); |
| | |
| | | OPTION_SHORT_PROXYAUTHID, |
| | | OPTION_LONG_PROXYAUTHID, false, |
| | | false, true, |
| | | OPTION_VALUE_PROXYAUTHID, null, null, |
| | | INFO_PROXYAUTHID_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_DESCRIPTION_PROXY_AUTHZID.get()); |
| | | proxyAuthzID.setPropertyName(OPTION_LONG_PROXYAUTHID); |
| | | argParser.addArgument(proxyAuthzID); |
| | |
| | | |
| | | pSearchInfo = new StringArgument("psearchinfo", 'C', "persistentSearch", |
| | | false, false, true, |
| | | "ps[:changetype[:changesonly[:entrychgcontrols]]]", |
| | | INFO_PSEARCH_PLACEHOLDER.get(), |
| | | null, null, INFO_DESCRIPTION_PSEARCH_INFO.get()); |
| | | pSearchInfo.setPropertyName("persistentSearch"); |
| | | argParser.addArgument(pSearchInfo); |
| | |
| | | simplePageSize = new IntegerArgument( |
| | | "simplepagesize", null, |
| | | "simplePageSize", false, false, true, |
| | | "{numEntries}", 1000, null, true, 1, |
| | | INFO_NUM_ENTRIES_PLACEHOLDER.get(), 1000, null, true, 1, |
| | | false, 0, |
| | | INFO_DESCRIPTION_SIMPLE_PAGE_SIZE.get()); |
| | | simplePageSize.setPropertyName("simplePageSize"); |
| | |
| | | "assertionfilter", null, |
| | | OPTION_LONG_ASSERTION_FILE, |
| | | false, false, |
| | | true, OPTION_VALUE_ASSERTION_FILE, |
| | | true, INFO_ASSERTION_FILTER_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_DESCRIPTION_ASSERTION_FILTER.get()); |
| | | assertionFilter.setPropertyName(OPTION_LONG_ASSERTION_FILE); |
| | |
| | | matchedValuesFilter = new StringArgument( |
| | | "matchedvalues", null, |
| | | "matchedValuesFilter", false, true, true, |
| | | "{filter}", null, null, |
| | | INFO_FILTER_PLACEHOLDER.get(), null, null, |
| | | INFO_DESCRIPTION_MATCHED_VALUES_FILTER.get()); |
| | | matchedValuesFilter.setPropertyName("matchedValuesFilter"); |
| | | argParser.addArgument(matchedValuesFilter); |
| | | |
| | | sortOrder = new StringArgument( |
| | | "sortorder", 'S', "sortOrder", false, |
| | | false, true, "{sortOrder}", null, null, |
| | | false, true, INFO_SORT_ORDER_PLACEHOLDER.get(), null, null, |
| | | INFO_DESCRIPTION_SORT_ORDER.get()); |
| | | sortOrder.setPropertyName("sortOrder"); |
| | | argParser.addArgument(sortOrder); |
| | |
| | | new StringArgument( |
| | | "vlvdescriptor", 'G', "virtualListView", false, |
| | | false, true, |
| | | "{before:after:index:count | before:after:value}", |
| | | INFO_VLV_PLACEHOLDER.get(), |
| | | null, null, INFO_DESCRIPTION_VLV.get()); |
| | | vlvDescriptor.setPropertyName("virtualListView"); |
| | | argParser.addArgument(vlvDescriptor); |
| | | |
| | | controlStr = |
| | | new StringArgument("control", 'J', "control", false, true, true, |
| | | "{controloid[:criticality[:value|::b64value|:<fileurl]]}", |
| | | INFO_LDAP_CONTROL_PLACEHOLDER.get(), |
| | | null, null, INFO_DESCRIPTION_CONTROLS.get()); |
| | | controlStr.setPropertyName("control"); |
| | | argParser.addArgument(controlStr); |
| | |
| | | new StringArgument("effectiveRightsUser", |
| | | OPTION_SHORT_EFFECTIVERIGHTSUSER, |
| | | OPTION_LONG_EFFECTIVERIGHTSUSER, false, false, true, |
| | | "{authzid}", null, null, |
| | | INFO_PROXYAUTHID_PLACEHOLDER.get(), null, null, |
| | | INFO_DESCRIPTION_EFFECTIVERIGHTS_USER.get( )); |
| | | effectiveRightsUser.setPropertyName(OPTION_LONG_EFFECTIVERIGHTSUSER); |
| | | argParser.addArgument(effectiveRightsUser); |
| | |
| | | new StringArgument("effectiveRightsAttrs", |
| | | OPTION_SHORT_EFFECTIVERIGHTSATTR, |
| | | OPTION_LONG_EFFECTIVERIGHTSATTR, false, true, true, |
| | | "{attribute}", null, null, |
| | | INFO_ATTRIBUTE_PLACEHOLDER.get(), null, null, |
| | | INFO_DESCRIPTION_EFFECTIVERIGHTS_ATTR.get( )); |
| | | effectiveRightsAttrs.setPropertyName(OPTION_LONG_EFFECTIVERIGHTSATTR); |
| | | argParser.addArgument(effectiveRightsAttrs); |
| | | |
| | | version = new IntegerArgument("version", OPTION_SHORT_PROTOCOL_VERSION, |
| | | OPTION_LONG_PROTOCOL_VERSION, false, false, |
| | | true, OPTION_VALUE_PROTOCOL_VERSION, 3, |
| | | true, |
| | | INFO_PROTOCOL_VERSION_PLACEHOLDER.get(), 3, |
| | | null, INFO_DESCRIPTION_VERSION.get()); |
| | | version.setPropertyName(OPTION_LONG_PROTOCOL_VERSION); |
| | | argParser.addArgument(version); |
| | | |
| | | encodingStr = new StringArgument("encoding", 'i', "encoding", false, |
| | | false, true, "{encoding}", null, null, |
| | | false, true, |
| | | INFO_ENCODING_PLACEHOLDER.get(), null, |
| | | null, |
| | | INFO_DESCRIPTION_ENCODING.get()); |
| | | encodingStr.setPropertyName("encoding"); |
| | | argParser.addArgument(encodingStr); |
| | | |
| | | dereferencePolicy = |
| | | new StringArgument("derefpolicy", 'a', "dereferencePolicy", false, |
| | | false, true, "{dereferencePolicy}", null, null, |
| | | false, true, |
| | | INFO_DEREFERENCE_POLICE_PLACEHOLDER.get(), null, |
| | | null, |
| | | INFO_SEARCH_DESCRIPTION_DEREFERENCE_POLICY.get()); |
| | | dereferencePolicy.setPropertyName("dereferencePolicy"); |
| | | argParser.addArgument(dereferencePolicy); |
| | |
| | | argParser.addArgument(typesOnly); |
| | | |
| | | sizeLimit = new IntegerArgument("sizeLimit", 'z', "sizeLimit", false, |
| | | false, true, "{sizeLimit}", 0, null, |
| | | false, true, |
| | | INFO_SIZE_LIMIT_PLACEHOLDER.get(), 0, |
| | | null, |
| | | INFO_SEARCH_DESCRIPTION_SIZE_LIMIT.get()); |
| | | sizeLimit.setPropertyName("sizeLimit"); |
| | | argParser.addArgument(sizeLimit); |
| | | |
| | | timeLimit = new IntegerArgument("timeLimit", 'l', "timeLimit", false, |
| | | false, true, "{timeLimit}", 0, null, |
| | | false, true, |
| | | INFO_TIME_LIMIT_PLACEHOLDER.get(), 0, |
| | | null, |
| | | INFO_SEARCH_DESCRIPTION_TIME_LIMIT.get()); |
| | | timeLimit.setPropertyName("timeLimit"); |
| | | argParser.addArgument(timeLimit); |
| | |
| | | { |
| | | sourceLDIF = new StringArgument( |
| | | "sourceldif", 's', "sourceLDIF", true, |
| | | false, true, "{filename}", null, null, |
| | | false, true, INFO_FILE_PLACEHOLDER.get(), null, null, |
| | | INFO_LDIFDIFF_DESCRIPTION_SOURCE_LDIF.get()); |
| | | argParser.addArgument(sourceLDIF); |
| | | |
| | | targetLDIF = new StringArgument( |
| | | "targetldif", 't', "targetLDIF", true, |
| | | false, true, "{filename}", null, null, |
| | | false, true, INFO_FILE_PLACEHOLDER.get(), null, null, |
| | | INFO_LDIFDIFF_DESCRIPTION_TARGET_LDIF.get()); |
| | | argParser.addArgument(targetLDIF); |
| | | |
| | | outputLDIF = new StringArgument( |
| | | "outputldif", 'o', "outputLDIF", false, |
| | | false, true, "{filename}", null, null, |
| | | false, true, INFO_FILE_PLACEHOLDER.get(), null, null, |
| | | INFO_LDIFDIFF_DESCRIPTION_OUTPUT_LDIF.get()); |
| | | argParser.addArgument(outputLDIF); |
| | | |
| | |
| | | argParser.addArgument(singleValueChanges); |
| | | |
| | | configFile = new StringArgument("configfile", 'c', "configFile", false, |
| | | false, true, "{configFile}", null, null, |
| | | false, true, |
| | | INFO_CONFIGFILE_PLACEHOLDER.get(), null, |
| | | null, |
| | | INFO_DESCRIPTION_CONFIG_FILE.get()); |
| | | configFile.setHidden(true); |
| | | argParser.addArgument(configFile); |
| | | |
| | | configClass = new StringArgument("configclass", OPTION_SHORT_CONFIG_CLASS, |
| | | OPTION_LONG_CONFIG_CLASS, false, |
| | | false, true, OPTION_VALUE_CONFIG_CLASS, |
| | | false, true, INFO_CONFIGCLASS_PLACEHOLDER.get(), |
| | | ConfigFileHandler.class.getName(), null, |
| | | INFO_DESCRIPTION_CONFIG_CLASS.get()); |
| | | configClass.setHidden(true); |
| | |
| | | try |
| | | { |
| | | configFile = new StringArgument("configfile", 'c', "configFile", true, |
| | | false, true, "{configFile}", null, null, |
| | | false, true, |
| | | INFO_CONFIGFILE_PLACEHOLDER.get(), null, |
| | | null, |
| | | INFO_DESCRIPTION_CONFIG_FILE.get()); |
| | | configFile.setHidden(true); |
| | | argParser.addArgument(configFile); |
| | |
| | | |
| | | configClass = new StringArgument("configclass", OPTION_SHORT_CONFIG_CLASS, |
| | | OPTION_LONG_CONFIG_CLASS, false, |
| | | false, true, OPTION_VALUE_CONFIG_CLASS, |
| | | false, true, INFO_CONFIGCLASS_PLACEHOLDER.get(), |
| | | ConfigFileHandler.class.getName(), null, |
| | | INFO_DESCRIPTION_CONFIG_CLASS.get()); |
| | | configClass.setHidden(true); |
| | |
| | | |
| | | |
| | | sourceFile = new StringArgument("sourceldif", 's', "sourceLDIF", true, |
| | | false, true, "{file}", null, null, |
| | | false, true, |
| | | INFO_LDIFFILE_PLACEHOLDER.get(), null, |
| | | null, |
| | | INFO_LDIFMODIFY_DESCRIPTION_SOURCE.get()); |
| | | argParser.addArgument(sourceFile); |
| | | |
| | | |
| | | changesFile = |
| | | new StringArgument("changesldif", 'm', "changesLDIF", true, |
| | | false, true, "{file}", null, null, |
| | | false, true, INFO_LDIFFILE_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_LDIFMODIFY_DESCRIPTION_CHANGES.get()); |
| | | argParser.addArgument(changesFile); |
| | | |
| | | |
| | | targetFile = new StringArgument("targetldif", 't', "targetLDIF", true, |
| | | false, true, "{file}", null, null, |
| | | false, true, |
| | | INFO_LDIFFILE_PLACEHOLDER.get(), null, |
| | | null, |
| | | INFO_LDIFMODIFY_DESCRIPTION_TARGET.get()); |
| | | argParser.addArgument(targetFile); |
| | | |
| | |
| | | { |
| | | ldifFile = new StringArgument( |
| | | "ldiffile", 'l', "ldifFile", false, true, |
| | | true, "{ldifFile}", null, null, |
| | | true, INFO_LDIFFILE_PLACEHOLDER.get(), null, null, |
| | | INFO_LDIFSEARCH_DESCRIPTION_LDIF_FILE.get()); |
| | | argParser.addArgument(ldifFile); |
| | | |
| | | baseDNString = new StringArgument( |
| | | "basedn", OPTION_SHORT_BASEDN, |
| | | OPTION_LONG_BASEDN, false, true, |
| | | true, OPTION_VALUE_BASEDN, "", null, |
| | | true, INFO_BASEDN_PLACEHOLDER.get(), "", null, |
| | | INFO_LDIFSEARCH_DESCRIPTION_BASEDN.get()); |
| | | argParser.addArgument(baseDNString); |
| | | |
| | | scopeString = new MultiChoiceArgument( |
| | | "scope", 's', "scope", false, false, |
| | | true, "{scope}", SCOPE_STRING_SUB, |
| | | true, INFO_SCOPE_PLACEHOLDER.get(), SCOPE_STRING_SUB, |
| | | null, scopeStrings, false, |
| | | INFO_LDIFSEARCH_DESCRIPTION_SCOPE.get()); |
| | | argParser.addArgument(scopeString); |
| | | |
| | | configFile = new StringArgument( |
| | | "configfile", 'c', "configFile", false, |
| | | false, true, "{configFile}", null, null, |
| | | false, true, INFO_CONFIGFILE_PLACEHOLDER.get(), null, null, |
| | | INFO_DESCRIPTION_CONFIG_FILE.get()); |
| | | configFile.setHidden(true); |
| | | argParser.addArgument(configFile); |
| | | |
| | | configClass = new StringArgument("configclass", OPTION_SHORT_CONFIG_CLASS, |
| | | OPTION_LONG_CONFIG_CLASS, false, |
| | | false, true, OPTION_VALUE_CONFIG_CLASS, |
| | | false, true, INFO_CONFIGCLASS_PLACEHOLDER.get(), |
| | | ConfigFileHandler.class.getName(), null, |
| | | INFO_DESCRIPTION_CONFIG_CLASS.get()); |
| | | configClass.setHidden(true); |
| | | argParser.addArgument(configClass); |
| | | |
| | | filterFile = new FileBasedArgument("filterfile", 'f', "filterFile", false, |
| | | false, "{filterFile}", null, null, |
| | | false, INFO_FILTER_FILE_PLACEHOLDER.get(), null, |
| | | null, |
| | | INFO_LDIFSEARCH_DESCRIPTION_FILTER_FILE.get()); |
| | | argParser.addArgument(filterFile); |
| | | |
| | | outputFile = new StringArgument( |
| | | "outputfile", 'o', "outputFile", false, |
| | | false, true, "{outputFile}", null, null, |
| | | false, true, INFO_OUTPUT_FILE_PLACEHOLDER.get(), null, null, |
| | | INFO_LDIFSEARCH_DESCRIPTION_OUTPUT_FILE.get()); |
| | | argParser.addArgument(outputFile); |
| | | |
| | |
| | | |
| | | sizeLimit = new IntegerArgument( |
| | | "sizelimit", 'z', "sizeLimit", false, |
| | | false, true, "{sizeLimit}", 0, null, |
| | | false, true, INFO_SIZE_LIMIT_PLACEHOLDER.get(), 0, null, |
| | | true, 0, false, 0, |
| | | INFO_LDIFSEARCH_DESCRIPTION_SIZE_LIMIT.get()); |
| | | argParser.addArgument(sizeLimit); |
| | | |
| | | timeLimit = new IntegerArgument( |
| | | "timelimit", 't', "timeLimit", false, |
| | | false, true, "{timeLimit}", 0, null, |
| | | false, true, INFO_TIME_LIMIT_PLACEHOLDER.get(), 0, null, |
| | | true, 0, false, 0, |
| | | INFO_LDIFSEARCH_DESCRIPTION_TIME_LIMIT.get()); |
| | | argParser.addArgument(timeLimit); |
| | |
| | | configClass = |
| | | new StringArgument("configclass", OPTION_SHORT_CONFIG_CLASS, |
| | | OPTION_LONG_CONFIG_CLASS, true, false, |
| | | true, OPTION_VALUE_CONFIG_CLASS, |
| | | true, INFO_CONFIGCLASS_PLACEHOLDER.get(), |
| | | ConfigFileHandler.class.getName(), null, |
| | | INFO_DESCRIPTION_CONFIG_CLASS.get()); |
| | | configClass.setHidden(true); |
| | |
| | | |
| | | configFile = |
| | | new StringArgument("configfile", 'f', "configFile", true, false, |
| | | true, "{configFile}", null, null, |
| | | true, INFO_CONFIGFILE_PLACEHOLDER.get(), null, |
| | | null, |
| | | INFO_DESCRIPTION_CONFIG_FILE.get()); |
| | | configFile.setHidden(true); |
| | | argParser.addArgument(configFile); |
| | |
| | | |
| | | backendID = new StringArgument( |
| | | "backendid", 'n', "backendID", false, |
| | | true, true, "{backendID}", null, null, |
| | | true, true, INFO_BACKENDNAME_PLACEHOLDER.get(), null, null, |
| | | INFO_LISTBACKENDS_DESCRIPTION_BACKEND_ID.get()); |
| | | argParser.addArgument(backendID); |
| | | |
| | |
| | | baseDN = new StringArgument( |
| | | "basedn", OPTION_SHORT_BASEDN, |
| | | OPTION_LONG_BASEDN, false, true, true, |
| | | OPTION_VALUE_BASEDN, null, null, |
| | | INFO_BASEDN_PLACEHOLDER.get(), null, null, |
| | | INFO_LISTBACKENDS_DESCRIPTION_BASE_DN.get()); |
| | | argParser.addArgument(baseDN); |
| | | |
| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.tools; |
| | |
| | | { |
| | | host = new StringArgument("host", OPTION_SHORT_HOST, |
| | | OPTION_LONG_HOST, false, false, true, |
| | | OPTION_VALUE_HOST, "127.0.0.1", null, |
| | | INFO_HOST_PLACEHOLDER.get(), "127.0.0.1", null, |
| | | INFO_PWPSTATE_DESCRIPTION_HOST.get()); |
| | | argParser.addGlobalArgument(host); |
| | | |
| | | port = new IntegerArgument( |
| | | "port", OPTION_SHORT_PORT, |
| | | OPTION_LONG_PORT, false, false, true, |
| | | OPTION_VALUE_PORT, 389, null, true, 1, |
| | | INFO_PORT_PLACEHOLDER.get(), 389, null, true, 1, |
| | | true, 65535, INFO_PWPSTATE_DESCRIPTION_PORT.get()); |
| | | argParser.addGlobalArgument(port); |
| | | |
| | |
| | | |
| | | bindDN = new StringArgument("binddn", OPTION_SHORT_BINDDN, |
| | | OPTION_LONG_BINDDN, false, false, true, |
| | | OPTION_VALUE_BINDDN, null, null, |
| | | INFO_BINDDN_PLACEHOLDER.get(), null, null, |
| | | INFO_PWPSTATE_DESCRIPTION_BINDDN.get()); |
| | | argParser.addGlobalArgument(bindDN); |
| | | |
| | | bindPW = new StringArgument("bindpw", OPTION_SHORT_BINDPWD, |
| | | OPTION_LONG_BINDPWD, false, false, |
| | | true, |
| | | OPTION_VALUE_BINDPWD, null, null, |
| | | INFO_BINDPWD_PLACEHOLDER.get(), null, null, |
| | | INFO_PWPSTATE_DESCRIPTION_BINDPW.get()); |
| | | argParser.addGlobalArgument(bindPW); |
| | | |
| | |
| | | OPTION_SHORT_BINDPWD_FILE, |
| | | OPTION_LONG_BINDPWD_FILE, |
| | | false, false, |
| | | OPTION_VALUE_BINDPWD_FILE, |
| | | INFO_BINDPWD_FILE_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_PWPSTATE_DESCRIPTION_BINDPWFILE.get()); |
| | | argParser.addGlobalArgument(bindPWFile); |
| | | |
| | | targetDN = new StringArgument("targetdn", 'b', "targetDN", true, false, |
| | | true, "{targetDN}", null, null, |
| | | true, INFO_TARGETDN_PLACEHOLDER.get(), null, |
| | | null, |
| | | INFO_PWPSTATE_DESCRIPTION_TARGETDN.get()); |
| | | argParser.addGlobalArgument(targetDN); |
| | | |
| | |
| | | "sasloption", OPTION_SHORT_SASLOPTION, |
| | | OPTION_LONG_SASLOPTION, false, |
| | | true, true, |
| | | OPTION_VALUE_SASLOPTION, null, null, |
| | | INFO_SASL_OPTION_PLACEHOLDER.get(), null, null, |
| | | INFO_PWPSTATE_DESCRIPTION_SASLOPTIONS.get()); |
| | | argParser.addGlobalArgument(saslOption); |
| | | |
| | |
| | | OPTION_SHORT_KEYSTOREPATH, |
| | | OPTION_LONG_KEYSTOREPATH, |
| | | false, false, true, |
| | | OPTION_VALUE_KEYSTOREPATH, |
| | | INFO_KEYSTOREPATH_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_PWPSTATE_DESCRIPTION_KSFILE.get()); |
| | | argParser.addGlobalArgument(keyStoreFile); |
| | |
| | | keyStorePW = new StringArgument("keystorepw", OPTION_SHORT_KEYSTORE_PWD, |
| | | OPTION_LONG_KEYSTORE_PWD, |
| | | false, false, true, |
| | | OPTION_VALUE_KEYSTORE_PWD, |
| | | INFO_KEYSTORE_PWD_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_PWPSTATE_DESCRIPTION_KSPW.get()); |
| | | argParser.addGlobalArgument(keyStorePW); |
| | |
| | | keyStorePWFile = new FileBasedArgument("keystorepwfile", |
| | | OPTION_SHORT_KEYSTORE_PWD_FILE, |
| | | OPTION_LONG_KEYSTORE_PWD_FILE, false, false, |
| | | OPTION_VALUE_KEYSTORE_PWD_FILE, null, null, |
| | | INFO_KEYSTORE_PWD_FILE_PLACEHOLDER.get(), null, |
| | | null, |
| | | INFO_PWPSTATE_DESCRIPTION_KSPWFILE.get()); |
| | | argParser.addGlobalArgument(keyStorePWFile); |
| | | |
| | | certNickname = new StringArgument( |
| | | "certnickname", 'N', "certNickname", |
| | | false, false, true, "{nickname}", null, |
| | | false, false, true, INFO_NICKNAME_PLACEHOLDER.get(), null, |
| | | null, INFO_DESCRIPTION_CERT_NICKNAME.get()); |
| | | argParser.addGlobalArgument(certNickname); |
| | | |
| | |
| | | OPTION_SHORT_TRUSTSTOREPATH, |
| | | OPTION_LONG_TRUSTSTOREPATH, |
| | | false, false, true, |
| | | OPTION_VALUE_TRUSTSTOREPATH, |
| | | INFO_TRUSTSTOREPATH_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_PWPSTATE_DESCRIPTION_TSFILE.get()); |
| | | argParser.addGlobalArgument(trustStoreFile); |
| | |
| | | "truststorepw", 'T', |
| | | OPTION_LONG_TRUSTSTORE_PWD, |
| | | false, false, |
| | | true, OPTION_VALUE_TRUSTSTORE_PWD, null, |
| | | true, INFO_TRUSTSTORE_PWD_PLACEHOLDER.get(), null, |
| | | null, INFO_PWPSTATE_DESCRIPTION_TSPW.get()); |
| | | argParser.addGlobalArgument(trustStorePW); |
| | | |
| | |
| | | OPTION_SHORT_TRUSTSTORE_PWD_FILE, |
| | | OPTION_LONG_TRUSTSTORE_PWD_FILE, |
| | | false, false, |
| | | OPTION_VALUE_TRUSTSTORE_PWD_FILE, null, null, |
| | | INFO_TRUSTSTORE_PWD_FILE_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_PWPSTATE_DESCRIPTION_TSPWFILE.get()); |
| | | argParser.addGlobalArgument(trustStorePWFile); |
| | | |
| | |
| | | |
| | | |
| | | HashSet<String> booleanValues = new HashSet<String>(2); |
| | | booleanValues.add("true"); |
| | | booleanValues.add("false"); |
| | | booleanValues.add(INFO_MULTICHOICE_TRUE_VALUE.get().toString()); |
| | | booleanValues.add(INFO_MULTICHOICE_FALSE_VALUE.get().toString()); |
| | | |
| | | |
| | | Message msg = INFO_DESCRIPTION_PWPSTATE_GET_ALL.get(); |
| | |
| | | msg); |
| | | sc.addArgument(new MultiChoiceArgument(ARG_OP_VALUE, 'O', |
| | | "operationValue", true, false, true, |
| | | "{true|false}", null, null, booleanValues, false, |
| | | INFO_TRUE_FALSE_PLACEHOLDER.get(), null, null, |
| | | booleanValues, false, |
| | | INFO_DESCRIPTION_OPERATION_BOOLEAN_VALUE.get())); |
| | | |
| | | msg = INFO_DESCRIPTION_PWPSTATE_CLEAR_ACCOUNT_DISABLED_STATE.get(); |
| | |
| | | msg = INFO_DESCRIPTION_PWPSTATE_SET_ACCOUNT_EXPIRATION_TIME.get(); |
| | | sc = new SubCommand(argParser, SC_SET_ACCOUNT_EXPIRATION_TIME, msg); |
| | | sc.addArgument(new StringArgument(ARG_OP_VALUE, 'O', "operationValue", |
| | | false, false, true, "{time}", null, null, |
| | | false, false, true, INFO_TIME_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_DESCRIPTION_OPERATION_TIME_VALUE.get())); |
| | | sc.setHidden(true); |
| | | |
| | |
| | | msg = INFO_DESCRIPTION_PWPSTATE_SET_PASSWORD_CHANGED_TIME.get(); |
| | | sc = new SubCommand(argParser, SC_SET_PASSWORD_CHANGED_TIME, msg); |
| | | sc.addArgument(new StringArgument(ARG_OP_VALUE, 'O', "operationValue", |
| | | false, false, true, "{time}", null, null, |
| | | false, false, true, INFO_TIME_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_DESCRIPTION_OPERATION_TIME_VALUE.get())); |
| | | sc.setHidden(true); |
| | | |
| | |
| | | .get(); |
| | | sc = new SubCommand(argParser, SC_SET_PASSWORD_EXP_WARNED_TIME, msg); |
| | | sc.addArgument(new StringArgument(ARG_OP_VALUE, 'O', "operationValue", |
| | | false, false, true, "{time}", null, null, |
| | | false, false, true, INFO_TIME_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_DESCRIPTION_OPERATION_TIME_VALUE.get())); |
| | | sc.setHidden(true); |
| | | |
| | |
| | | sc = new SubCommand(argParser, SC_ADD_AUTHENTICATION_FAILURE_TIME, |
| | | msg); |
| | | sc.addArgument(new StringArgument(ARG_OP_VALUE, 'O', "operationValue", |
| | | false, true, true, "{time}", null, null, |
| | | false, true, true, INFO_TIME_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_DESCRIPTION_OPERATION_TIME_VALUE.get())); |
| | | sc.setHidden(true); |
| | | |
| | |
| | | sc = new SubCommand(argParser, SC_SET_AUTHENTICATION_FAILURE_TIMES, |
| | | msg); |
| | | sc.addArgument(new StringArgument(ARG_OP_VALUE, 'O', "operationValue", |
| | | false, true, true, "{time}", null, null, |
| | | false, true, true, INFO_TIME_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_DESCRIPTION_OPERATION_TIME_VALUES.get())); |
| | | sc.setHidden(true); |
| | | |
| | |
| | | msg = INFO_DESCRIPTION_PWPSTATE_SET_LAST_LOGIN_TIME.get(); |
| | | sc = new SubCommand(argParser, SC_SET_LAST_LOGIN_TIME, msg); |
| | | sc.addArgument(new StringArgument(ARG_OP_VALUE, 'O', "operationValue", |
| | | false, false, true, "{time}", null, null, |
| | | false, false, true, INFO_TIME_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_DESCRIPTION_OPERATION_TIME_VALUE.get())); |
| | | sc.setHidden(true); |
| | | |
| | |
| | | sc = new SubCommand(argParser, SC_SET_PASSWORD_RESET_STATE, msg); |
| | | sc.addArgument(new MultiChoiceArgument(ARG_OP_VALUE, 'O', |
| | | "operationValue", true, false, true, |
| | | "{true|false}", null, null, booleanValues, false, |
| | | INFO_TRUE_FALSE_PLACEHOLDER.get(), null, null, |
| | | booleanValues, false, |
| | | INFO_DESCRIPTION_OPERATION_BOOLEAN_VALUE.get())); |
| | | sc.setHidden(true); |
| | | |
| | |
| | | msg = INFO_DESCRIPTION_PWPSTATE_ADD_GRACE_LOGIN_USE_TIME.get(); |
| | | sc = new SubCommand(argParser, SC_ADD_GRACE_LOGIN_USE_TIME, msg); |
| | | sc.addArgument(new StringArgument(ARG_OP_VALUE, 'O', "operationValue", |
| | | false, true, true, "{time}", null, null, |
| | | false, true, true, INFO_TIME_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_DESCRIPTION_OPERATION_TIME_VALUE.get())); |
| | | sc.setHidden(true); |
| | | |
| | | msg = INFO_DESCRIPTION_PWPSTATE_SET_GRACE_LOGIN_USE_TIMES.get(); |
| | | sc = new SubCommand(argParser, SC_SET_GRACE_LOGIN_USE_TIMES, msg); |
| | | sc.addArgument(new StringArgument(ARG_OP_VALUE, 'O', "operationValue", |
| | | false, true, true, "{time}", null, null, |
| | | false, true, true, INFO_TIME_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_DESCRIPTION_OPERATION_TIME_VALUES.get())); |
| | | sc.setHidden(true); |
| | | |
| | |
| | | sc = new SubCommand(argParser, SC_SET_PASSWORD_CHANGED_BY_REQUIRED_TIME, |
| | | msg); |
| | | sc.addArgument(new StringArgument(ARG_OP_VALUE, 'O', "operationValue", |
| | | false, false, true, "{time}", null, null, |
| | | false, false, true, INFO_TIME_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_DESCRIPTION_OPERATION_TIME_VALUE.get())); |
| | | sc.setHidden(true); |
| | | |
| | |
| | | |
| | | StringArgument propertiesFileArgument = new StringArgument( |
| | | "propertiesFilePath", null, OPTION_LONG_PROP_FILE_PATH, false, false, |
| | | true, OPTION_VALUE_PROP_FILE_PATH, null, null, |
| | | true, INFO_PROP_FILE_PATH_PLACEHOLDER.get(), null, null, |
| | | INFO_DESCRIPTION_PROP_FILE_PATH.get()); |
| | | argParser.addArgument(propertiesFileArgument); |
| | | argParser.setFilePropertiesArgument(propertiesFileArgument); |
| | |
| | | |
| | | task = new StringArgument( |
| | | "info", 'i', "info", |
| | | false, true, "{taskID}", |
| | | false, true, INFO_TASK_ID_PLACEHOLDER.get(), |
| | | INFO_TASKINFO_TASK_ARG_DESCRIPTION.get()); |
| | | argParser.addArgument(task); |
| | | |
| | | cancel = new StringArgument( |
| | | "cancel", 'c', "cancel", |
| | | false, true, "{taskID}", |
| | | false, true, INFO_TASK_ID_PLACEHOLDER.get(), |
| | | INFO_TASKINFO_TASK_ARG_CANCEL.get()); |
| | | argParser.addArgument(cancel); |
| | | |
| | |
| | | { |
| | | configClass = |
| | | new StringArgument("configclass", 'C', "configClass", true, false, |
| | | true, "{configClass}", |
| | | true, INFO_CONFIGCLASS_PLACEHOLDER.get(), |
| | | ConfigFileHandler.class.getName(), null, |
| | | INFO_DESCRIPTION_CONFIG_CLASS.get()); |
| | | configClass.setHidden(true); |
| | |
| | | |
| | | configFile = |
| | | new StringArgument("configfile", 'f', "configFile", true, false, |
| | | true, "{configFile}", null, null, |
| | | true, INFO_CONFIGFILE_PLACEHOLDER.get(), null, |
| | | null, |
| | | INFO_DESCRIPTION_CONFIG_FILE.get()); |
| | | configFile.setHidden(true); |
| | | argParser.addArgument(configFile); |
| | |
| | | |
| | | baseDNString = |
| | | new StringArgument("basedn", 'b', "baseDN", true, false, true, |
| | | "{baseDN}", null, null, |
| | | INFO_BASEDN_PLACEHOLDER.get(), null, null, |
| | | INFO_REBUILDINDEX_DESCRIPTION_BASE_DN.get()); |
| | | argParser.addArgument(baseDNString); |
| | | |
| | |
| | | indexList = |
| | | new StringArgument("index", 'i', "index", |
| | | false, true, true, |
| | | "{index}", null, null, |
| | | INFO_INDEX_PLACEHOLDER.get(), null, null, |
| | | INFO_REBUILDINDEX_DESCRIPTION_INDEX_NAME.get()); |
| | | argParser.addArgument(indexList); |
| | | |
| | |
| | | configClass = |
| | | new StringArgument("configclass", OPTION_SHORT_CONFIG_CLASS, |
| | | OPTION_LONG_CONFIG_CLASS, true, false, |
| | | true, OPTION_VALUE_CONFIG_CLASS, |
| | | true, INFO_CONFIGCLASS_PLACEHOLDER.get(), |
| | | ConfigFileHandler.class.getName(), null, |
| | | INFO_DESCRIPTION_CONFIG_CLASS.get()); |
| | | configClass.setHidden(true); |
| | |
| | | |
| | | configFile = |
| | | new StringArgument("configfile", 'f', "configFile", true, false, |
| | | true, "{configFile}", null, null, |
| | | true, INFO_CONFIGFILE_PLACEHOLDER.get(), null, |
| | | null, |
| | | INFO_DESCRIPTION_CONFIG_FILE.get()); |
| | | configFile.setHidden(true); |
| | | argParser.addArgument(configFile); |
| | | |
| | | |
| | | backupIDString = |
| | | new StringArgument("backupid", 'I', "backupID", false, false, true, |
| | | "{backupID}", null, null, |
| | | INFO_BACKUPID_PLACEHOLDER.get(), null, null, |
| | | INFO_RESTOREDB_DESCRIPTION_BACKUP_ID.get()); |
| | | argParser.addArgument(backupIDString); |
| | | |
| | | |
| | | backupDirectory = |
| | | new StringArgument("backupdirectory", 'd', "backupDirectory", true, |
| | | false, true, "{backupDir}", null, null, |
| | | false, true, INFO_BACKUPDIR_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_RESTOREDB_DESCRIPTION_BACKUP_DIR.get()); |
| | | argParser.addArgument(backupDirectory); |
| | | |
| | |
| | | { |
| | | propertiesFileArgument = new StringArgument("propertiesFilePath", |
| | | null, OPTION_LONG_PROP_FILE_PATH, |
| | | false, false, true, OPTION_VALUE_PROP_FILE_PATH, null, null, |
| | | false, false, true, INFO_PROP_FILE_PATH_PLACEHOLDER.get(), null, null, |
| | | INFO_DESCRIPTION_PROP_FILE_PATH.get()); |
| | | argParser.addArgument(propertiesFileArgument); |
| | | argParser.setFilePropertiesArgument(propertiesFileArgument); |
| | |
| | | |
| | | host = new StringArgument("host", OPTION_SHORT_HOST, |
| | | OPTION_LONG_HOST, false, false, true, |
| | | OPTION_VALUE_HOST, "127.0.0.1", null, |
| | | INFO_HOST_PLACEHOLDER.get(), "127.0.0.1", null, |
| | | INFO_STOPDS_DESCRIPTION_HOST.get()); |
| | | host.setPropertyName(OPTION_LONG_HOST); |
| | | argParser.addArgument(host); |
| | |
| | | port = new IntegerArgument( |
| | | "port", OPTION_SHORT_PORT, |
| | | OPTION_LONG_PORT, false, false, true, |
| | | OPTION_VALUE_PORT, 389, null, true, 1, |
| | | INFO_PORT_PLACEHOLDER.get(), 389, null, true, 1, |
| | | true, 65535, INFO_STOPDS_DESCRIPTION_PORT.get()); |
| | | port.setPropertyName(OPTION_LONG_PORT); |
| | | argParser.addArgument(port); |
| | |
| | | |
| | | bindDN = new StringArgument("binddn", OPTION_SHORT_BINDDN, |
| | | OPTION_LONG_BINDDN, false, false, true, |
| | | OPTION_VALUE_BINDDN, null, null, |
| | | INFO_BINDDN_PLACEHOLDER.get(), null, null, |
| | | INFO_STOPDS_DESCRIPTION_BINDDN.get()); |
| | | bindDN.setPropertyName(OPTION_LONG_BINDDN); |
| | | argParser.addArgument(bindDN); |
| | |
| | | bindPW = new StringArgument("bindpw", OPTION_SHORT_BINDPWD, |
| | | OPTION_LONG_BINDPWD, false, false, |
| | | true, |
| | | OPTION_VALUE_BINDPWD, null, null, |
| | | INFO_BINDPWD_PLACEHOLDER.get(), null, null, |
| | | INFO_STOPDS_DESCRIPTION_BINDPW.get()); |
| | | bindPW.setPropertyName(OPTION_LONG_BINDPWD); |
| | | argParser.addArgument(bindPW); |
| | |
| | | OPTION_SHORT_BINDPWD_FILE, |
| | | OPTION_LONG_BINDPWD_FILE, |
| | | false, false, |
| | | OPTION_VALUE_BINDPWD_FILE, |
| | | INFO_BINDPWD_FILE_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_STOPDS_DESCRIPTION_BINDPWFILE.get()); |
| | | bindPWFile.setPropertyName(OPTION_LONG_BINDPWD_FILE); |
| | |
| | | "sasloption", OPTION_SHORT_SASLOPTION, |
| | | OPTION_LONG_SASLOPTION, false, |
| | | true, true, |
| | | OPTION_VALUE_SASLOPTION, null, null, |
| | | INFO_SASL_OPTION_PLACEHOLDER.get(), null, null, |
| | | INFO_STOPDS_DESCRIPTION_SASLOPTIONS.get()); |
| | | saslOption.setPropertyName(OPTION_LONG_SASLOPTION); |
| | | argParser.addArgument(saslOption); |
| | |
| | | OPTION_SHORT_PROXYAUTHID, |
| | | OPTION_LONG_PROXYAUTHID, false, |
| | | false, true, |
| | | OPTION_VALUE_PROXYAUTHID, null, |
| | | INFO_PROXYAUTHID_PLACEHOLDER.get(), null, |
| | | null, |
| | | INFO_STOPDS_DESCRIPTION_PROXYAUTHZID.get()); |
| | | proxyAuthzID.setPropertyName(OPTION_LONG_PROXYAUTHID); |
| | |
| | | |
| | | stopReason = new StringArgument( |
| | | "stopreason", 'r', "stopReason", false, |
| | | false, true, "{stopReason}", null, null, |
| | | false, true, INFO_STOP_REASON_PLACEHOLDER.get(), null, null, |
| | | INFO_STOPDS_DESCRIPTION_STOP_REASON.get()); |
| | | stopReason.setPropertyName("stopReason"); |
| | | argParser.addArgument(stopReason); |
| | |
| | | argParser.addArgument(restart); |
| | | |
| | | stopTimeStr = new StringArgument("stoptime", 't', "stopTime", false, |
| | | false, true, "{stopTime}", null, null, |
| | | false, true, |
| | | INFO_STOP_TIME_PLACEHOLDER.get(), null, |
| | | null, |
| | | INFO_STOPDS_DESCRIPTION_STOP_TIME.get()); |
| | | stopTimeStr.setPropertyName("stopTime"); |
| | | argParser.addArgument(stopTimeStr); |
| | |
| | | OPTION_SHORT_KEYSTOREPATH, |
| | | OPTION_LONG_KEYSTOREPATH, |
| | | false, false, true, |
| | | OPTION_VALUE_KEYSTOREPATH, |
| | | INFO_KEYSTOREPATH_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_STOPDS_DESCRIPTION_KSFILE.get()); |
| | | keyStoreFile.setPropertyName(OPTION_LONG_KEYSTOREPATH); |
| | |
| | | keyStorePW = new StringArgument("keystorepw", OPTION_SHORT_KEYSTORE_PWD, |
| | | OPTION_LONG_KEYSTORE_PWD, |
| | | false, false, true, |
| | | OPTION_VALUE_KEYSTORE_PWD, |
| | | INFO_KEYSTORE_PWD_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_STOPDS_DESCRIPTION_KSPW.get()); |
| | | keyStorePW.setPropertyName(OPTION_LONG_KEYSTORE_PWD); |
| | |
| | | OPTION_SHORT_KEYSTORE_PWD_FILE, |
| | | OPTION_LONG_KEYSTORE_PWD_FILE, |
| | | false, false, |
| | | OPTION_VALUE_KEYSTORE_PWD_FILE, |
| | | INFO_KEYSTORE_PWD_FILE_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_STOPDS_DESCRIPTION_KSPWFILE.get()); |
| | | keyStorePWFile.setPropertyName(OPTION_LONG_KEYSTORE_PWD_FILE); |
| | |
| | | |
| | | certNickname = new StringArgument( |
| | | "certnickname", 'N', "certNickname", |
| | | false, false, true, "{nickname}", null, |
| | | false, false, true, INFO_NICKNAME_PLACEHOLDER.get(), null, |
| | | null, INFO_DESCRIPTION_CERT_NICKNAME.get()); |
| | | certNickname.setPropertyName("certNickname"); |
| | | argParser.addArgument(certNickname); |
| | |
| | | OPTION_SHORT_TRUSTSTOREPATH, |
| | | OPTION_LONG_TRUSTSTOREPATH, |
| | | false, false, true, |
| | | OPTION_VALUE_TRUSTSTOREPATH, |
| | | INFO_TRUSTSTOREPATH_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_STOPDS_DESCRIPTION_TSFILE.get()); |
| | | trustStoreFile.setPropertyName(OPTION_LONG_TRUSTSTOREPATH); |
| | |
| | | "truststorepw", 'T', |
| | | OPTION_LONG_TRUSTSTORE_PWD, |
| | | false, false, |
| | | true, OPTION_VALUE_TRUSTSTORE_PWD, null, |
| | | true, INFO_TRUSTSTORE_PWD_PLACEHOLDER.get(), null, |
| | | null, INFO_STOPDS_DESCRIPTION_TSPW.get()); |
| | | trustStorePW.setPropertyName(OPTION_LONG_TRUSTSTORE_PWD); |
| | | argParser.addArgument(trustStorePW); |
| | |
| | | OPTION_SHORT_TRUSTSTORE_PWD_FILE, |
| | | OPTION_LONG_TRUSTSTORE_PWD_FILE, |
| | | false, false, |
| | | OPTION_VALUE_TRUSTSTORE_PWD_FILE, null, null, |
| | | INFO_TRUSTSTORE_PWD_FILE_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_STOPDS_DESCRIPTION_TSPWFILE.get()); |
| | | trustStorePWFile.setPropertyName(OPTION_LONG_TRUSTSTORE_PWD_FILE); |
| | | argParser.addArgument(trustStorePWFile); |
| | |
| | | public static final String OPTION_LONG_CONFIG_CLASS = "configClass"; |
| | | |
| | | /** |
| | | * The placeholder value of configClass that will be displayed in usage |
| | | * information. |
| | | */ |
| | | public static final String OPTION_VALUE_CONFIG_CLASS = "{configClass}"; |
| | | |
| | | /** |
| | | * The value for the short option hostname. |
| | | */ |
| | | public static final char OPTION_SHORT_HOST = 'h'; |
| | |
| | | public static final String OPTION_LONG_HOST = "hostname"; |
| | | |
| | | /** |
| | | * The placeholder value of hostname that will be displayed in usage |
| | | * information. |
| | | */ |
| | | public static final String OPTION_VALUE_HOST = "{host}"; |
| | | |
| | | /** |
| | | * The value for the short option port. |
| | | */ |
| | | public static final char OPTION_SHORT_PORT = 'p'; |
| | |
| | | public static final String OPTION_LONG_PORT = "port"; |
| | | |
| | | /** |
| | | * The placeholder value of port that will be displayed in usage |
| | | * information. |
| | | */ |
| | | public static final String OPTION_VALUE_PORT = "{port}"; |
| | | |
| | | /** |
| | | * The value for the short option useSSL. |
| | | */ |
| | | public static final char OPTION_SHORT_USE_SSL = 'Z'; |
| | |
| | | public static final String OPTION_LONG_BASEDN = "baseDN"; |
| | | |
| | | /** |
| | | * The placeholder value of baseDN that will be displayed in usage |
| | | * information. |
| | | */ |
| | | public static final String OPTION_VALUE_BASEDN = "{baseDN}"; |
| | | |
| | | /** |
| | | * The value for the short option rootUserDN. |
| | | */ |
| | | public static final char OPTION_SHORT_ROOT_USER_DN = 'D'; |
| | |
| | | public static final String OPTION_LONG_ROOT_USER_DN = "rootUserDN"; |
| | | |
| | | /** |
| | | * The placeholder value of hostname that will be displayed in usage |
| | | * information. |
| | | */ |
| | | public static final String OPTION_VALUE_ROOT_USER_DN = "{rootUserDN}"; |
| | | |
| | | /** |
| | | * The value for the short option bindDN. |
| | | */ |
| | | public static final char OPTION_SHORT_BINDDN = 'D'; |
| | |
| | | public static final String OPTION_LONG_BINDDN = "bindDN"; |
| | | |
| | | /** |
| | | * The placeholder value of bindDN that will be displayed in usage |
| | | * information. |
| | | */ |
| | | public static final String OPTION_VALUE_BINDDN = "{bindDN}"; |
| | | |
| | | /** |
| | | * The value for the short option bindPassword. |
| | | */ |
| | | public static final char OPTION_SHORT_BINDPWD = 'w'; |
| | |
| | | public static final String OPTION_LONG_BINDPWD = "bindPassword"; |
| | | |
| | | /** |
| | | * The placeholder value of bindPassword that will be displayed in usage |
| | | * information. |
| | | */ |
| | | public static final String OPTION_VALUE_BINDPWD = "{bindPassword}"; |
| | | |
| | | /** |
| | | * The value for the short option bindPasswordFile. |
| | | */ |
| | | public static final char OPTION_SHORT_BINDPWD_FILE = 'j'; |
| | |
| | | public static final String OPTION_LONG_BINDPWD_FILE = "bindPasswordFile"; |
| | | |
| | | /** |
| | | * The placeholder value of bindPasswordFile that will be displayed in usage |
| | | * information. |
| | | */ |
| | | public static final String OPTION_VALUE_BINDPWD_FILE = "{bindPasswordFile}"; |
| | | |
| | | |
| | | /** |
| | | * The value for the short option compress. |
| | | */ |
| | | public static final char OPTION_SHORT_COMPRESS = 'c'; |
| | |
| | | public static final String OPTION_LONG_FILENAME = "filename"; |
| | | |
| | | /** |
| | | * The placeholder value of filename that will be displayed in usage |
| | | * information. |
| | | */ |
| | | public static final String OPTION_VALUE_FILENAME = "{filename}"; |
| | | |
| | | /** |
| | | * The value for the short option ldifFile. |
| | | */ |
| | | public static final char OPTION_SHORT_LDIF_FILE = 'l'; |
| | |
| | | public static final String OPTION_LONG_LDIF_FILE = "ldifFile"; |
| | | |
| | | /** |
| | | * The placeholder value of ldifFile that will be displayed in usage |
| | | * information. |
| | | */ |
| | | public static final String OPTION_VALUE_LDIF_FILE = "{ldifFile}"; |
| | | |
| | | /** |
| | | * The value for the short option useStartTLS. |
| | | */ |
| | | public static final char OPTION_SHORT_START_TLS = 'q'; |
| | |
| | | public static final String OPTION_LONG_RANDOM_SEED = "randomSeed"; |
| | | |
| | | /** |
| | | * The placeholder value of randomSeed that will be displayed in usage |
| | | * information. |
| | | */ |
| | | public static final String OPTION_VALUE_RANDOM_SEED = "{seed}"; |
| | | |
| | | /** |
| | | * The value for the short option keyStorePath. |
| | | */ |
| | | public static final char OPTION_SHORT_KEYSTOREPATH = 'K'; |
| | |
| | | public static final String OPTION_LONG_KEYSTOREPATH = "keyStorePath"; |
| | | |
| | | /** |
| | | * The placeholder value of keyStorePath that will be displayed in usage |
| | | * information. |
| | | */ |
| | | public static final String OPTION_VALUE_KEYSTOREPATH = "{keyStorePath}"; |
| | | |
| | | /** |
| | | * The value for the short option trustStorePath. |
| | | */ |
| | | public static final char OPTION_SHORT_TRUSTSTOREPATH = 'P'; |
| | |
| | | public static final String OPTION_LONG_TRUSTSTOREPATH = "trustStorePath"; |
| | | |
| | | /** |
| | | * The placeholder value of trustStorePath that will be displayed in usage |
| | | * information. |
| | | */ |
| | | public static final String OPTION_VALUE_TRUSTSTOREPATH = "{trustStorePath}"; |
| | | |
| | | /** |
| | | * The value for the short option keyStorePassword. |
| | | */ |
| | | public static final char OPTION_SHORT_KEYSTORE_PWD = 'W'; |
| | |
| | | public static final String OPTION_LONG_KEYSTORE_PWD = "keyStorePassword"; |
| | | |
| | | /** |
| | | * The placeholder value of keyStorePassword that will be displayed in usage |
| | | * information. |
| | | */ |
| | | public static final String OPTION_VALUE_KEYSTORE_PWD = "{keyStorePassword}"; |
| | | |
| | | /** |
| | | * The value for the short option trustStorePassword. |
| | | */ |
| | | public static final char OPTION_SHORT_TRUSTSTORE_PWD = 'T'; |
| | |
| | | public static final String OPTION_LONG_TRUSTSTORE_PWD = "trustStorePassword"; |
| | | |
| | | /** |
| | | * The placeholder value of trustStorePassword that will be displayed in usage |
| | | * information. |
| | | */ |
| | | public static final String OPTION_VALUE_TRUSTSTORE_PWD = |
| | | "{trustStorePassword}"; |
| | | |
| | | /** |
| | | * The value for the short option keyStorePasswordFile . |
| | | */ |
| | | public static final char OPTION_SHORT_KEYSTORE_PWD_FILE = 'u'; |
| | |
| | | "keyStorePasswordFile"; |
| | | |
| | | /** |
| | | * The placeholder value of keyStorePasswordFile that will be |
| | | * displayed in usage information. |
| | | */ |
| | | public static final String OPTION_VALUE_KEYSTORE_PWD_FILE = "{path}"; |
| | | |
| | | /** |
| | | * The value for the short option keyStorePasswordFile . |
| | | */ |
| | | public static final char OPTION_SHORT_TRUSTSTORE_PWD_FILE = 'U'; |
| | |
| | | */ |
| | | public static final String OPTION_LONG_TRUSTSTORE_PWD_FILE = |
| | | "trustStorePasswordFile"; |
| | | |
| | | /** |
| | | * The placeholder value of keyStorePasswordFile that will be |
| | | * displayed in usage information. |
| | | */ |
| | | public static final String OPTION_VALUE_TRUSTSTORE_PWD_FILE = "{path}"; |
| | | |
| | | /** |
| | | * The value for the short option trustAll . |
| | | */ |
| | |
| | | public static final String OPTION_LONG_CERT_NICKNAME = "certNickname"; |
| | | |
| | | /** |
| | | * The placeholder value of certNickname that will be displayed in usage |
| | | * information. |
| | | */ |
| | | public static final String OPTION_VALUE_CERT_NICKNAME = "{nickname}"; |
| | | |
| | | /** |
| | | * The value for the long option assertionFilter . |
| | | */ |
| | | public static final String OPTION_LONG_ASSERTION_FILE = "assertionFilter"; |
| | | |
| | | /** |
| | | * The placeholder value of assertionFilter that will be displayed in usage |
| | | * information. |
| | | */ |
| | | public static final String OPTION_VALUE_ASSERTION_FILE = "{filter}"; |
| | | |
| | | /** |
| | | * The value for the short option dry-run. |
| | | */ |
| | | public static final char OPTION_SHORT_DRYRUN = 'n'; |
| | |
| | | public static final String OPTION_LONG_PROXYAUTHID = "proxyAs"; |
| | | |
| | | /** |
| | | * The placeholder value of proxyAs that will be |
| | | * displayed in usage information. |
| | | */ |
| | | public static final String OPTION_VALUE_PROXYAUTHID = "{authzID}"; |
| | | |
| | | /** |
| | | * The value for the short option saslOption. |
| | | */ |
| | | public static final char OPTION_SHORT_SASLOPTION = 'o'; |
| | |
| | | public static final String OPTION_LONG_SASLOPTION = "saslOption"; |
| | | |
| | | /** |
| | | * The placeholder value of saslOption that will be |
| | | * displayed in usage information. |
| | | */ |
| | | public static final String OPTION_VALUE_SASLOPTION = "{name=value}"; |
| | | |
| | | /** |
| | | * The value for the short option geteffectiverights control authzid. |
| | | */ |
| | | public static final char OPTION_SHORT_EFFECTIVERIGHTSUSER = 'g'; |
| | |
| | | "ldapVersion"; |
| | | |
| | | /** |
| | | * The placeholder value of protocol version that will be |
| | | * displayed in usage information. |
| | | */ |
| | | public static final String OPTION_VALUE_PROTOCOL_VERSION = "{version}"; |
| | | |
| | | /** |
| | | * The value for the long option version. |
| | | */ |
| | | public static final char OPTION_SHORT_PRODUCT_VERSION = 'V'; |
| | |
| | | public static final String OPTION_LONG_DESCRIPTION = "description"; |
| | | |
| | | /** |
| | | * The placeholder value of description that will be |
| | | * displayed in usage information. |
| | | */ |
| | | public static final String OPTION_VALUE_DESCRIPTION = "{description}"; |
| | | |
| | | /** |
| | | * The value for the short option groupName attributes. |
| | | */ |
| | | public static final char OPTION_SHORT_GROUPNAME = 'g'; |
| | |
| | | public static final String OPTION_LONG_GROUPNAME= "groupName"; |
| | | |
| | | /** |
| | | * The placeholder value of groupName that will be |
| | | * displayed in usage information. |
| | | */ |
| | | public static final String OPTION_VALUE_GROUPNAME = "{group-name}"; |
| | | |
| | | /** |
| | | * The value for the short option newGroupName attribute. |
| | | */ |
| | | public static final char OPTION_SHORT_NEWGROUPNAME = 'n'; |
| | |
| | | public static final String OPTION_LONG_MEMBERNAME= "memberName"; |
| | | |
| | | /** |
| | | * The placeholder value of member-name that will be |
| | | * displayed in usage information. |
| | | */ |
| | | public static final String OPTION_VALUE_MEMBERNAME = "{member-name}"; |
| | | |
| | | /** |
| | | * The value for the short option backendName attributes. |
| | | */ |
| | | public static final char OPTION_SHORT_BACKENDNAME = 'b'; |
| | |
| | | public static final String OPTION_LONG_BACKENDNAME= "backendName"; |
| | | |
| | | /** |
| | | * The placeholder value of backendName that will be |
| | | * displayed in usage information. |
| | | */ |
| | | public static final String OPTION_VALUE_BACKENDNAME = "{backend-name}"; |
| | | |
| | | /** |
| | | * The value for the short option serverID attributes. |
| | | */ |
| | | public static final String OPTION_SHORT_SERVERID = null; |
| | |
| | | public static final String OPTION_LONG_SERVERID= "serverID"; |
| | | |
| | | /** |
| | | * The placeholder value of serverID that will be |
| | | * displayed in usage information. |
| | | */ |
| | | public static final String OPTION_VALUE_SERVERID = "{serverID}"; |
| | | |
| | | /** |
| | | * The value for the short option userID attributes. |
| | | */ |
| | | public static final String OPTION_SHORT_USERID = null; |
| | |
| | | public static final String OPTION_LONG_USERID= "userID"; |
| | | |
| | | /** |
| | | * The placeholder value of userID that will be |
| | | * displayed in usage information. |
| | | */ |
| | | public static final String OPTION_VALUE_USERID = "{userID}"; |
| | | |
| | | /** |
| | | * The value for the short option set. |
| | | */ |
| | | public static final Character OPTION_SHORT_SET = null; |
| | |
| | | */ |
| | | public static final String OPTION_LONG_SET = "set"; |
| | | |
| | | /** |
| | | * The placeholder value for the long option set. |
| | | */ |
| | | public static final String OPTION_VALUE_SET = "{PROP:VAL}"; |
| | | |
| | | /** |
| | | * Value for the server root option short form. |
| | | */ |
| | |
| | | public static final Character OPTION_SHORT_START_DATETIME = 't'; |
| | | |
| | | /** |
| | | * Placeholder string for the usage statement. |
| | | */ |
| | | public static final String OPTION_VALUE_START_DATETIME = "{startTime}"; |
| | | |
| | | /** |
| | | * The value for the long option propertiesFilePAth . |
| | | */ |
| | | public static final String OPTION_LONG_PROP_FILE_PATH = "propertiesFilePath"; |
| | |
| | | |
| | | |
| | | /** |
| | | * The placeholder value of propertiesFilePAth that will be |
| | | * displayed in usage information. |
| | | */ |
| | | public static final String OPTION_VALUE_PROP_FILE_PATH = |
| | | "{propertiesFilePath}"; |
| | | |
| | | /** |
| | | * The value for the long option propertiesFilePAth . |
| | | */ |
| | | public static final String OPTION_LONG_NO_PROP_FILE = "noPropertiesFile"; |
| | |
| | | |
| | | |
| | | /** |
| | | * Value placeholder for options taking email addresses. |
| | | */ |
| | | public static final String OPTION_VALUE_EMAIL_ADDRESS = "{emailAddress}"; |
| | | |
| | | |
| | | /** |
| | | * Value placeholder for options taking task IDs. |
| | | */ |
| | | public static final String OPTION_VALUE_TASK_ID = "{taskId}"; |
| | | |
| | | |
| | | /** |
| | | * Value placeholder for options taking actions. |
| | | */ |
| | | public static final String OPTION_VALUE_ACTION = "{action}"; |
| | | |
| | | |
| | | /** |
| | | * The default separator to be used in tables. |
| | | */ |
| | | public static final String LIST_TABLE_SEPARATOR = ":"; |
| | |
| | | configClass = |
| | | new StringArgument("configclass", OPTION_SHORT_CONFIG_CLASS, |
| | | OPTION_LONG_CONFIG_CLASS, true, false, |
| | | true, OPTION_VALUE_CONFIG_CLASS, |
| | | true, INFO_CONFIGCLASS_PLACEHOLDER.get(), |
| | | ConfigFileHandler.class.getName(), null, |
| | | INFO_DESCRIPTION_CONFIG_CLASS.get()); |
| | | configClass.setHidden(true); |
| | |
| | | |
| | | configFile = |
| | | new StringArgument("configfile", 'f', "configFile", true, false, |
| | | true, "{configFile}", null, null, |
| | | true, INFO_CONFIGFILE_PLACEHOLDER.get(), null, |
| | | null, |
| | | INFO_DESCRIPTION_CONFIG_FILE.get()); |
| | | configFile.setHidden(true); |
| | | argParser.addArgument(configFile); |
| | |
| | | baseDNString = |
| | | new StringArgument("basedn", OPTION_SHORT_BASEDN, |
| | | OPTION_LONG_BASEDN, true, false, true, |
| | | OPTION_VALUE_BASEDN, null, null, |
| | | INFO_BASEDN_PLACEHOLDER.get(), null, null, |
| | | INFO_VERIFYINDEX_DESCRIPTION_BASE_DN.get()); |
| | | argParser.addArgument(baseDNString); |
| | | |
| | |
| | | indexList = |
| | | new StringArgument("index", 'i', "index", |
| | | false, true, true, |
| | | "{index}", null, null, |
| | | INFO_INDEX_PLACEHOLDER.get(), null, null, |
| | | INFO_VERIFYINDEX_DESCRIPTION_INDEX_NAME.get()); |
| | | argParser.addArgument(indexList); |
| | | |
| | |
| | | { |
| | | targetFilePath = |
| | | new StringArgument("targetfile", 'f', "targetFile", true, false, |
| | | true, "{path}", null, null, |
| | | true, INFO_PATH_PLACEHOLDER.get(), null, null, |
| | | INFO_WAIT4DEL_DESCRIPTION_TARGET_FILE.get()); |
| | | argParser.addArgument(targetFilePath); |
| | | |
| | | |
| | | logFilePath = new StringArgument( |
| | | "logfile", 'l', "logFile", false, false, |
| | | true, "{path}", null, null, |
| | | true, INFO_PATH_PLACEHOLDER.get(), null, null, |
| | | INFO_WAIT4DEL_DESCRIPTION_LOG_FILE.get()); |
| | | argParser.addArgument(logFilePath); |
| | | |
| | |
| | | outputFilePath = new StringArgument( |
| | | "outputfile", 'o', "outputFile", |
| | | false, false, |
| | | true, "{path}", null, null, |
| | | true, INFO_PATH_PLACEHOLDER.get(), null, null, |
| | | INFO_WAIT4DEL_DESCRIPTION_OUTPUT_FILE.get()); |
| | | argParser.addArgument(outputFilePath); |
| | | |
| | | |
| | | timeout = new IntegerArgument("timeout", 't', "timeout", true, false, |
| | | true, "{seconds}", 60, null, true, 0, false, |
| | | true, INFO_SECONDS_PLACEHOLDER.get(), 60, |
| | | null, true, 0, false, |
| | | 0, INFO_WAIT4DEL_DESCRIPTION_TIMEOUT.get()); |
| | | argParser.addArgument(timeout); |
| | | |
| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2007 Sun Microsystems, Inc. |
| | | * Copyright 2007-2008 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.tools.dsconfig; |
| | | |
| | | |
| | | |
| | | import static org.opends.messages.DSConfigMessages.*; |
| | | import static org.opends.messages.ToolMessages.*; |
| | | import static org.opends.server.tools.dsconfig.ArgumentExceptionFactory.*; |
| | | |
| | | import java.util.Collection; |
| | |
| | | // property values. |
| | | this.propertySetArgument = new StringArgument(OPTION_DSCFG_LONG_SET, |
| | | OPTION_DSCFG_SHORT_SET, OPTION_DSCFG_LONG_SET, false, true, true, |
| | | "{PROP:VALUE}", null, null, INFO_DSCFG_DESCRIPTION_PROP_VAL.get()); |
| | | INFO_VALUE_SET_PLACEHOLDER.get(), null, null, |
| | | INFO_DSCFG_DESCRIPTION_PROP_VAL.get()); |
| | | this.subCommand.addArgument(this.propertySetArgument); |
| | | |
| | | // Build the -t option usage. |
| | |
| | | if (!types.containsKey(DSConfig.GENERIC_TYPE)) { |
| | | // The option is mandatory when non-interactive. |
| | | this.typeArgument = new StringArgument("type", OPTION_DSCFG_SHORT_TYPE, |
| | | OPTION_DSCFG_LONG_TYPE, false, false, true, "{TYPE}", null, null, |
| | | OPTION_DSCFG_LONG_TYPE, false, false, true, |
| | | INFO_TYPE_PLACEHOLDER.get(), null, null, |
| | | INFO_DSCFG_DESCRIPTION_TYPE.get(r.getChildDefinition() |
| | | .getUserFriendlyName(), typeUsage)); |
| | | } else { |
| | | // The option has a sensible default "generic". |
| | | this.typeArgument = new StringArgument("type", OPTION_DSCFG_SHORT_TYPE, |
| | | OPTION_DSCFG_LONG_TYPE, false, false, true, "{TYPE}", |
| | | OPTION_DSCFG_LONG_TYPE, false, false, true, |
| | | INFO_TYPE_PLACEHOLDER.get(), |
| | | DSConfig.GENERIC_TYPE, null, INFO_DSCFG_DESCRIPTION_TYPE_DEFAULT.get( |
| | | r.getChildDefinition().getUserFriendlyName(), |
| | | DSConfig.GENERIC_TYPE, typeUsage)); |
| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2007-2008 Sun Microsystems, Inc. |
| | | * Copyright 2007-2008 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.tools.dsconfig; |
| | | |
| | |
| | | |
| | | propertiesFileArgument = new StringArgument("propertiesFilePath", |
| | | null, OPTION_LONG_PROP_FILE_PATH, |
| | | false, false, true, OPTION_VALUE_PROP_FILE_PATH, null, null, |
| | | false, false, true, INFO_PROP_FILE_PATH_PLACEHOLDER.get(), null, null, |
| | | INFO_DESCRIPTION_PROP_FILE_PATH.get()); |
| | | |
| | | noPropertiesFileArgument = new BooleanArgument( |
| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2007-2008 Sun Microsystems, Inc. |
| | | * Copyright 2007-2008 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.tools.dsconfig; |
| | | |
| | |
| | | |
| | | import static org.opends.messages.DSConfigMessages.*; |
| | | import static org.opends.messages.UtilityMessages.*; |
| | | import static org.opends.messages.ToolMessages.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | |
| | | import java.io.PrintStream; |
| | |
| | | |
| | | this.categoryArgument = new StringArgument(OPTION_DSCFG_LONG_CATEGORY, |
| | | OPTION_DSCFG_SHORT_CATEGORY, OPTION_DSCFG_LONG_CATEGORY, false, false, |
| | | true, "{CATEGORY}", null, null, INFO_DSCFG_DESCRIPTION_HELP_CATEGORY |
| | | .get()); |
| | | true, INFO_CATEGORY_PLACEHOLDER.get(), null, null, |
| | | INFO_DSCFG_DESCRIPTION_HELP_CATEGORY.get()); |
| | | this.subCommand.addArgument(this.categoryArgument); |
| | | |
| | | this.typeArgument = new StringArgument(OPTION_DSCFG_LONG_TYPE, |
| | | OPTION_DSCFG_SHORT_TYPE, OPTION_DSCFG_LONG_TYPE, false, false, true, |
| | | "{TYPE}", null, null, INFO_DSCFG_DESCRIPTION_HELP_TYPE.get()); |
| | | INFO_TYPE_PLACEHOLDER.get(), null, null, |
| | | INFO_DSCFG_DESCRIPTION_HELP_TYPE.get()); |
| | | this.subCommand.addArgument(this.typeArgument); |
| | | |
| | | this.inheritedModeArgument = new BooleanArgument( |
| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2007-2008 Sun Microsystems, Inc. |
| | | * Copyright 2007-2008 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.tools.dsconfig; |
| | | |
| | | |
| | | |
| | | import static org.opends.messages.DSConfigMessages.*; |
| | | import static org.opends.messages.ToolMessages.*; |
| | | import static org.opends.server.tools.dsconfig.ArgumentExceptionFactory.*; |
| | | |
| | | import java.util.HashMap; |
| | |
| | | // Create the --set argument. |
| | | this.propertySetArgument = new StringArgument(OPTION_DSCFG_LONG_SET, |
| | | OPTION_DSCFG_SHORT_SET, OPTION_DSCFG_LONG_SET, false, true, true, |
| | | "{PROP:VAL}", null, null, INFO_DSCFG_DESCRIPTION_PROP_VAL.get()); |
| | | INFO_VALUE_SET_PLACEHOLDER.get(), null, null, |
| | | INFO_DSCFG_DESCRIPTION_PROP_VAL.get()); |
| | | this.subCommand.addArgument(this.propertySetArgument); |
| | | |
| | | // Create the --reset argument. |
| | | this.propertyResetArgument = new StringArgument(OPTION_DSCFG_LONG_RESET, |
| | | OPTION_DSCFG_SHORT_RESET, OPTION_DSCFG_LONG_RESET, false, true, true, |
| | | "{PROP}", null, null, INFO_DSCFG_DESCRIPTION_RESET_PROP.get()); |
| | | INFO_PROPERTY_PLACEHOLDER.get(), null, null, |
| | | INFO_DSCFG_DESCRIPTION_RESET_PROP.get()); |
| | | this.subCommand.addArgument(this.propertyResetArgument); |
| | | |
| | | // Create the --add argument. |
| | | this.propertyAddArgument = new StringArgument(OPTION_DSCFG_LONG_ADD, |
| | | OPTION_DSCFG_SHORT_ADD, OPTION_DSCFG_LONG_ADD, false, true, true, |
| | | "{PROP:VAL}", null, null, INFO_DSCFG_DESCRIPTION_ADD_PROP_VAL.get()); |
| | | INFO_VALUE_SET_PLACEHOLDER.get(), null, null, |
| | | INFO_DSCFG_DESCRIPTION_ADD_PROP_VAL.get()); |
| | | this.subCommand.addArgument(this.propertyAddArgument); |
| | | |
| | | // Create the --remove argument. |
| | | this.propertyRemoveArgument = new StringArgument(OPTION_DSCFG_LONG_REMOVE, |
| | | OPTION_DSCFG_SHORT_REMOVE, OPTION_DSCFG_LONG_REMOVE, false, true, true, |
| | | "{PROP:VAL}", null, null, INFO_DSCFG_DESCRIPTION_REMOVE_PROP_VAL.get()); |
| | | INFO_VALUE_SET_PLACEHOLDER.get(), null, null, |
| | | INFO_DSCFG_DESCRIPTION_REMOVE_PROP_VAL.get()); |
| | | this.subCommand.addArgument(this.propertyRemoveArgument); |
| | | |
| | | // Register the tags associated with the child managed objects. |
| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2007 Sun Microsystems, Inc. |
| | | * Copyright 2007-2008 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.tools.dsconfig; |
| | | |
| | | |
| | | |
| | | import static org.opends.messages.DSConfigMessages.*; |
| | | import static org.opends.messages.ToolMessages.*; |
| | | |
| | | import java.io.PrintStream; |
| | | import java.util.ArrayList; |
| | |
| | | // Use syntax and description from naming property. |
| | | PropertyDefinitionUsageBuilder b = |
| | | new PropertyDefinitionUsageBuilder(false); |
| | | String usage = "{" + b.getUsage(pd) + "}"; |
| | | Message usage = Message.raw("{" + b.getUsage(pd) + "}"); |
| | | arg = new StringArgument(argName, null, argName, false, true, |
| | | usage, INFO_DSCFG_DESCRIPTION_NAME_CREATE_EXT.get(d |
| | | .getUserFriendlyName(), pd.getName(), pd.getSynopsis())); |
| | | } else { |
| | | arg = new StringArgument(argName, null, argName, false, true, |
| | | "{NAME}", INFO_DSCFG_DESCRIPTION_NAME_CREATE.get(d |
| | | .getUserFriendlyName())); |
| | | INFO_NAME_PLACEHOLDER.get(), |
| | | INFO_DSCFG_DESCRIPTION_NAME_CREATE.get( |
| | | d.getUserFriendlyName())); |
| | | } |
| | | } else { |
| | | // A normal naming argument. |
| | | arg = new StringArgument(argName, null, argName, false, true, |
| | | "{NAME}", INFO_DSCFG_DESCRIPTION_NAME.get( |
| | | INFO_NAME_PLACEHOLDER.get(), INFO_DSCFG_DESCRIPTION_NAME.get( |
| | | d.getUserFriendlyName())); |
| | | } |
| | | subCommand.addArgument(arg); |
| | |
| | | throws ArgumentException { |
| | | this.propertyArgument = new StringArgument(OPTION_DSCFG_LONG_PROPERTY, |
| | | OPTION_DSCFG_SHORT_PROPERTY, OPTION_DSCFG_LONG_PROPERTY, false, true, |
| | | true, "{PROP}", null, null, INFO_DSCFG_DESCRIPTION_PROP.get()); |
| | | true, INFO_PROPERTY_PLACEHOLDER.get(), null, null, |
| | | INFO_DSCFG_DESCRIPTION_PROP.get()); |
| | | subCommand.addArgument(propertyArgument); |
| | | } |
| | | |
| | |
| | | throws ArgumentException { |
| | | this.unitSizeArgument = new StringArgument(OPTION_DSCFG_LONG_UNIT_SIZE, |
| | | OPTION_DSCFG_SHORT_UNIT_SIZE, OPTION_DSCFG_LONG_UNIT_SIZE, false, true, |
| | | "{UNIT}", INFO_DSCFG_DESCRIPTION_UNIT_SIZE.get()); |
| | | INFO_UNIT_PLACEHOLDER.get(), INFO_DSCFG_DESCRIPTION_UNIT_SIZE.get()); |
| | | this.unitSizeArgument.setPropertyName(OPTION_DSCFG_LONG_UNIT_SIZE); |
| | | |
| | | subCommand.addArgument(unitSizeArgument); |
| | |
| | | throws ArgumentException { |
| | | this.unitTimeArgument = new StringArgument(OPTION_DSCFG_LONG_UNIT_TIME, |
| | | OPTION_DSCFG_SHORT_UNIT_TIME, OPTION_DSCFG_LONG_UNIT_TIME, false, true, |
| | | "{UNIT}", INFO_DSCFG_DESCRIPTION_UNIT_TIME.get()); |
| | | INFO_UNIT_PLACEHOLDER.get(), INFO_DSCFG_DESCRIPTION_UNIT_TIME.get()); |
| | | this.unitTimeArgument.setPropertyName(OPTION_DSCFG_LONG_UNIT_TIME); |
| | | |
| | | subCommand.addArgument(unitTimeArgument); |
| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2006-2007 Sun Microsystems, Inc. |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.tools.makeldif; |
| | | import org.opends.messages.Message; |
| | |
| | | try |
| | | { |
| | | configFile = new StringArgument("configfile", 'c', "configFile", true, |
| | | false, true, "{configFile}", null, null, |
| | | false, true, |
| | | INFO_CONFIGFILE_PLACEHOLDER.get(), null, |
| | | null, |
| | | INFO_DESCRIPTION_CONFIG_FILE.get()); |
| | | configFile.setHidden(true); |
| | | argParser.addArgument(configFile); |
| | |
| | | configClass = new StringArgument("configclass", OPTION_SHORT_CONFIG_CLASS, |
| | | OPTION_LONG_CONFIG_CLASS, false, |
| | | false, true, |
| | | OPTION_VALUE_CONFIG_CLASS, null, null, |
| | | INFO_CONFIGCLASS_PLACEHOLDER.get(), null, |
| | | null, |
| | | INFO_DESCRIPTION_CONFIG_CLASS.get()); |
| | | configClass.setHidden(true); |
| | | argParser.addArgument(configClass); |
| | |
| | | |
| | | resourcePath = |
| | | new StringArgument("resourcepath", 'r', "resourcePath", true, false, |
| | | true, "{path}", null, null, |
| | | true, INFO_PATH_PLACEHOLDER.get(), null, null, |
| | | INFO_MAKELDIF_DESCRIPTION_RESOURCE_PATH.get()); |
| | | resourcePath.setHidden(true); |
| | | argParser.addArgument(resourcePath); |
| | |
| | | |
| | | templatePath = |
| | | new StringArgument("templatefile", 't', "templateFile", |
| | | true, false, true, "{file}", null, null, |
| | | true, false, true, INFO_FILE_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_MAKELDIF_DESCRIPTION_TEMPLATE.get()); |
| | | argParser.addArgument(templatePath); |
| | | |
| | | |
| | | ldifFile = new StringArgument("ldiffile", 'o', "ldifFile", true, false, |
| | | true, "{file}", null, null, |
| | | INFO_MAKELDIF_DESCRIPTION_LDIF.get()); |
| | | true, INFO_FILE_PLACEHOLDER.get(), null, |
| | | null, INFO_MAKELDIF_DESCRIPTION_LDIF.get()); |
| | | argParser.addArgument(ldifFile); |
| | | |
| | | |
| | | randomSeed = new IntegerArgument("randomseed", OPTION_SHORT_RANDOM_SEED, |
| | | OPTION_LONG_RANDOM_SEED, false, |
| | | false, true, OPTION_VALUE_RANDOM_SEED, |
| | | false, true, INFO_SEED_PLACEHOLDER.get(), |
| | | 0, null, |
| | | INFO_MAKELDIF_DESCRIPTION_SEED.get()); |
| | | argParser.addArgument(randomSeed); |
| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2007 Sun Microsystems, Inc. |
| | | * Copyright 2007-2008 Sun Microsystems, Inc. |
| | | */ |
| | | |
| | | package org.opends.server.tools.tasks; |
| | |
| | | StringArgument propertiesFileArgument = new StringArgument( |
| | | "propertiesFilePath", |
| | | null, OPTION_LONG_PROP_FILE_PATH, |
| | | false, false, true, OPTION_VALUE_PROP_FILE_PATH, null, null, |
| | | false, false, true, INFO_PROP_FILE_PATH_PLACEHOLDER.get(), null, null, |
| | | INFO_DESCRIPTION_PROP_FILE_PATH.get()); |
| | | argParser.addArgument(propertiesFileArgument); |
| | | argParser.setFilePropertiesArgument(propertiesFileArgument); |
| | |
| | | OPTION_LONG_START_DATETIME, |
| | | OPTION_SHORT_START_DATETIME, |
| | | OPTION_LONG_START_DATETIME, false, false, |
| | | true, OPTION_VALUE_START_DATETIME, |
| | | true, INFO_START_DATETIME_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_DESCRIPTION_START_DATETIME.get()); |
| | | argParser.addArgument(startArg, taskGroup); |
| | |
| | | OPTION_LONG_COMPLETION_NOTIFICATION_EMAIL, |
| | | OPTION_SHORT_COMPLETION_NOTIFICATION_EMAIL, |
| | | OPTION_LONG_COMPLETION_NOTIFICATION_EMAIL, |
| | | false, true, true, OPTION_VALUE_EMAIL_ADDRESS, |
| | | false, true, true, INFO_EMAIL_ADDRESS_PLACEHOLDER.get(), |
| | | null, null, INFO_DESCRIPTION_TASK_COMPLETION_NOTIFICATION.get()); |
| | | argParser.addArgument(completionNotificationArg, taskGroup); |
| | | |
| | |
| | | OPTION_LONG_ERROR_NOTIFICATION_EMAIL, |
| | | OPTION_SHORT_ERROR_NOTIFICATION_EMAIL, |
| | | OPTION_LONG_ERROR_NOTIFICATION_EMAIL, |
| | | false, true, true, OPTION_VALUE_EMAIL_ADDRESS, |
| | | false, true, true, INFO_EMAIL_ADDRESS_PLACEHOLDER.get(), |
| | | null, null, INFO_DESCRIPTION_TASK_ERROR_NOTIFICATION.get()); |
| | | argParser.addArgument(errorNotificationArg, taskGroup); |
| | | |
| | |
| | | OPTION_LONG_DEPENDENCY, |
| | | OPTION_SHORT_DEPENDENCY, |
| | | OPTION_LONG_DEPENDENCY, |
| | | false, true, true, OPTION_VALUE_TASK_ID, |
| | | false, true, true, INFO_TASK_ID_PLACEHOLDER.get(), |
| | | null, null, INFO_DESCRIPTION_TASK_DEPENDENCY_ID.get()); |
| | | argParser.addArgument(dependencyArg, taskGroup); |
| | | |
| | |
| | | OPTION_LONG_FAILED_DEPENDENCY_ACTION, |
| | | OPTION_SHORT_FAILED_DEPENDENCY_ACTION, |
| | | OPTION_LONG_FAILED_DEPENDENCY_ACTION, |
| | | false, true, true, OPTION_VALUE_ACTION, |
| | | false, true, true, INFO_ACTION_PLACEHOLDER.get(), |
| | | null, null, INFO_DESCRIPTION_TASK_FAILED_DEPENDENCY_ACTION.get( |
| | | StaticUtils.collectionToString(fdaValSet, ","), |
| | | FailedDependencyAction.defaultValue().name())); |
| | |
| | | import org.opends.server.util.args.SubCommandArgumentParser; |
| | | |
| | | import static org.opends.messages.UtilityMessages.*; |
| | | import static org.opends.messages.ToolMessages.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | import static org.opends.server.util.Validator.*; |
| | | |
| | |
| | | |
| | | |
| | | encodedData = new StringArgument("encodeddata", 'd', "encodedData", false, |
| | | false, true, "{data}", null, null, |
| | | false, true, INFO_DATA_PLACEHOLDER.get(), null, |
| | | null, |
| | | INFO_BASE64_ENCODED_DATA_DESCRIPTION.get()); |
| | | decodeSubCommand.addArgument(encodedData); |
| | | |
| | | |
| | | encodedFile = new StringArgument("encodedfile", 'f', "encodedDataFile", |
| | | false, false, true, "{path}", null, null, |
| | | false, false, true, INFO_PATH_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_BASE64_ENCODED_FILE_DESCRIPTION.get()); |
| | | decodeSubCommand.addArgument(encodedFile); |
| | | |
| | | |
| | | toRawFile = new StringArgument("torawfile", 'o', "toRawFile", false, |
| | | false, true, "{path}", null, null, |
| | | false, true, INFO_PATH_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_BASE64_TO_RAW_FILE_DESCRIPTION.get()); |
| | | decodeSubCommand.addArgument(toRawFile); |
| | | |
| | | |
| | | rawData = new StringArgument("rawdata", 'd', "rawData", false, false, |
| | | true, "{data}", null, null, |
| | | true, INFO_DATA_PLACEHOLDER.get(), null, |
| | | null, |
| | | INFO_BASE64_RAW_DATA_DESCRIPTION.get()); |
| | | encodeSubCommand.addArgument(rawData); |
| | | |
| | | |
| | | rawFile = new StringArgument("rawfile", 'f', "rawDataFile", false, false, |
| | | true, "{path}", null, null, |
| | | true, INFO_PATH_PLACEHOLDER.get(), null, |
| | | null, |
| | | INFO_BASE64_RAW_FILE_DESCRIPTION.get()); |
| | | encodeSubCommand.addArgument(rawFile); |
| | | |
| | | |
| | | toEncodedFile = new StringArgument("toencodedfile", 'o', "toEncodedFile", |
| | | false, false, true, "{path}", null, null, |
| | | false, false, true, INFO_PATH_PLACEHOLDER.get(), |
| | | null, null, |
| | | INFO_BASE64_TO_ENCODED_FILE_DESCRIPTION.get()); |
| | | encodeSubCommand.addArgument(toEncodedFile); |
| | | |
| | |
| | | } |
| | | catch (ArgumentException ae) |
| | | { |
| | | System.err.println(ERR_CANNOT_PARSE_ARGS.get(ae.getMessage()).toString()); |
| | | System.err.println( |
| | | ERR_ERROR_PARSING_ARGS.get(ae.getMessage()).toString()); |
| | | System.exit(1); |
| | | } |
| | | |
| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.util; |
| | |
| | | import org.opends.server.util.args.BooleanArgument; |
| | | import org.opends.server.util.args.StringArgument; |
| | | |
| | | import static org.opends.messages.ToolMessages.*; |
| | | import static org.opends.messages.UtilityMessages.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | |
| | | try |
| | | { |
| | | host = new StringArgument("host", 'h', "host", true, true, true, |
| | | "{host}", "127.0.0.1", null, |
| | | INFO_HOST_PLACEHOLDER.get(), "127.0.0.1", null, |
| | | INFO_EMAIL_HOST_DESCRIPTION.get()); |
| | | argParser.addArgument(host); |
| | | |
| | | |
| | | from = new StringArgument("from", 'f', "from", true, false, true, |
| | | "{address}", null, null, |
| | | INFO_ADDRESS_PLACEHOLDER.get(), null, null, |
| | | INFO_EMAIL_FROM_DESCRIPTION.get()); |
| | | argParser.addArgument(from); |
| | | |
| | | |
| | | to = new StringArgument("to", 't', "to", true, true, true, "{address}", |
| | | to = new StringArgument("to", 't', "to", true, true, true, |
| | | INFO_ADDRESS_PLACEHOLDER.get(), |
| | | null, null, INFO_EMAIL_TO_DESCRIPTION.get()); |
| | | argParser.addArgument(to); |
| | | |
| | | |
| | | subject = new StringArgument("subject", 's', "subject", true, false, true, |
| | | "{subject}", null, null, |
| | | INFO_SUBJECT_PLACEHOLDER.get(), null, null, |
| | | INFO_EMAIL_SUBJECT_DESCRIPTION.get()); |
| | | argParser.addArgument(subject); |
| | | |
| | | |
| | | bodyFile = new StringArgument("bodyfile", 'b', "body", true, true, true, |
| | | "{path}", null, null, |
| | | INFO_PATH_PLACEHOLDER.get(), null, null, |
| | | INFO_EMAIL_BODY_DESCRIPTION.get()); |
| | | argParser.addArgument(bodyFile); |
| | | |
| | | |
| | | attachFile = new StringArgument("attachfile", 'a', "attach", false, true, |
| | | true, "{path}", null, null, |
| | | true, INFO_PATH_PLACEHOLDER.get(), null, |
| | | null, |
| | | INFO_EMAIL_ATTACH_DESCRIPTION.get()); |
| | | argParser.addArgument(attachFile); |
| | | |
| | |
| | | } |
| | | catch (ArgumentException ae) |
| | | { |
| | | System.err.println(ERR_CANNOT_PARSE_ARGS.get(ae.getMessage()).toString()); |
| | | System.err.println( |
| | | ERR_ERROR_PARSING_ARGS.get(ae.getMessage()).toString()); |
| | | System.exit(1); |
| | | } |
| | | |
| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2006-2007 Sun Microsystems, Inc. |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.util.args; |
| | | import org.opends.messages.Message; |
| | |
| | | |
| | | // The value placeholder for this argument, which will be used in usage |
| | | // information. |
| | | private String valuePlaceholder; |
| | | private Message valuePlaceholder; |
| | | |
| | | // Indicates whether this argument was provided in the set of properties |
| | | // found is a properties file. |
| | |
| | | protected Argument(String name, Character shortIdentifier, |
| | | String longIdentifier, boolean isRequired, |
| | | boolean isMultiValued, boolean needsValue, |
| | | String valuePlaceholder, String defaultValue, |
| | | Message valuePlaceholder, String defaultValue, |
| | | String propertyName, |
| | | Message description) |
| | | throws ArgumentException |
| | |
| | | * the generated usage information, or <CODE>null</CODE> if there is |
| | | * none. |
| | | */ |
| | | public String getValuePlaceholder() |
| | | public Message getValuePlaceholder() |
| | | { |
| | | return valuePlaceholder; |
| | | } |
| | |
| | | * @param valuePlaceholder The value placeholder that will be displayed for |
| | | * this argument in the generated usage information. |
| | | */ |
| | | public void setValuePlaceholder(String valuePlaceholder) |
| | | public void setValuePlaceholder(Message valuePlaceholder) |
| | | { |
| | | this.valuePlaceholder = valuePlaceholder; |
| | | } |
| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2006-2007 Sun Microsystems, Inc. |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.util.args; |
| | | import org.opends.messages.Message; |
| | |
| | | */ |
| | | public FileBasedArgument(String name, Character shortIdentifier, |
| | | String longIdentifier, boolean isRequired, |
| | | String valuePlaceholder, |
| | | Message valuePlaceholder, |
| | | Message description) |
| | | throws ArgumentException |
| | | { |
| | |
| | | */ |
| | | public FileBasedArgument(String name, Character shortIdentifier, |
| | | String longIdentifier, boolean isRequired, |
| | | boolean isMultiValued, String valuePlaceholder, |
| | | boolean isMultiValued, Message valuePlaceholder, |
| | | String defaultValue, String propertyName, |
| | | Message description) |
| | | throws ArgumentException |
| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2006-2007 Sun Microsystems, Inc. |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.util.args; |
| | | import org.opends.messages.Message; |
| | |
| | | */ |
| | | public IntegerArgument(String name, Character shortIdentifier, |
| | | String longIdentifier, boolean isRequired, |
| | | boolean needsValue, String valuePlaceholder, |
| | | boolean needsValue, Message valuePlaceholder, |
| | | Message description) |
| | | throws ArgumentException |
| | | { |
| | |
| | | */ |
| | | public IntegerArgument(String name, Character shortIdentifier, |
| | | String longIdentifier, boolean isRequired, |
| | | boolean needsValue, String valuePlaceholder, |
| | | boolean needsValue, Message valuePlaceholder, |
| | | boolean hasLowerBound, int lowerBound, |
| | | boolean hasUpperBound, int upperBound, |
| | | Message description) |
| | |
| | | public IntegerArgument(String name, Character shortIdentifier, |
| | | String longIdentifier, boolean isRequired, |
| | | boolean isMultiValued, boolean needsValue, |
| | | String valuePlaceholder, int defaultValue, |
| | | Message valuePlaceholder, int defaultValue, |
| | | String propertyName, |
| | | Message description) |
| | | throws ArgumentException |
| | |
| | | public IntegerArgument(String name, Character shortIdentifier, |
| | | String longIdentifier, boolean isRequired, |
| | | boolean isMultiValued, boolean needsValue, |
| | | String valuePlaceholder, int defaultValue, |
| | | Message valuePlaceholder, int defaultValue, |
| | | String propertyName, boolean hasLowerBound, |
| | | int lowerBound, boolean hasUpperBound, int upperBound, |
| | | Message description) |
| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2006-2007 Sun Microsystems, Inc. |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.util.args; |
| | | import org.opends.messages.Message; |
| | |
| | | */ |
| | | public MultiChoiceArgument(String name, Character shortIdentifier, |
| | | String longIdentifier, boolean isRequired, |
| | | boolean needsValue, String valuePlaceholder, |
| | | boolean needsValue, Message valuePlaceholder, |
| | | HashSet<String> allowedValues, |
| | | boolean caseSensitive, |
| | | Message description) |
| | |
| | | public MultiChoiceArgument(String name, Character shortIdentifier, |
| | | String longIdentifier, boolean isRequired, |
| | | boolean isMultiValued, boolean needsValue, |
| | | String valuePlaceholder, String defaultValue, |
| | | Message valuePlaceholder, String defaultValue, |
| | | String propertyName, HashSet<String> allowedValues, |
| | | boolean caseSensitive, |
| | | Message description) |
| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2006-2007 Sun Microsystems, Inc. |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.util.args; |
| | | import org.opends.messages.Message; |
| | |
| | | */ |
| | | public StringArgument(String name, Character shortIdentifier, |
| | | String longIdentifier, boolean isRequired, |
| | | boolean needsValue, String valuePlaceholder, |
| | | boolean needsValue, Message valuePlaceholder, |
| | | Message description) |
| | | throws ArgumentException |
| | | { |
| | |
| | | public StringArgument(String name, Character shortIdentifier, |
| | | String longIdentifier, boolean isRequired, |
| | | boolean isMultiValued, boolean needsValue, |
| | | String valuePlaceholder, String defaultValue, |
| | | Message valuePlaceholder, String defaultValue, |
| | | String propertyName, Message description) |
| | | throws ArgumentException |
| | | { |
| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2006-2007 Sun Microsystems, Inc. |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.util.args; |
| | | import org.opends.messages.Message; |
| | | import org.opends.messages.MessageBuilder; |
| | | |
| | | |
| | | import static org.opends.messages.UtilityMessages.*; |
| | | import static org.opends.server.tools.ToolConstants.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | |
| | | String value; |
| | | if (a.needsValue()) |
| | | { |
| | | String valuePlaceholder = a.getValuePlaceholder(); |
| | | if (valuePlaceholder == null) |
| | | Message pHolder = a.getValuePlaceholder(); |
| | | if (pHolder == null) |
| | | { |
| | | value = " {value}"; |
| | | } |
| | | else |
| | | { |
| | | value = " " + valuePlaceholder; |
| | | value = " " + pHolder; |
| | | } |
| | | } |
| | | else |