| | |
| | | if (attr.size() >= 1 && |
| | | MULTIVALUED_SERVER_GROUP_PROPERTIES.contains(prop)) |
| | | { |
| | | |
| | | Set<String> set = new HashSet<String>(); |
| | | NamingEnumeration<?> ae = attr.getAll(); |
| | | try |
| | |
| | | } |
| | | else |
| | | { |
| | | |
| | | if (attr.size() >= 1 && MULTIVALUED_SERVER_PROPERTIES.contains(prop)) |
| | | { |
| | | Set<String> set = new HashSet<String>(); |
| | |
| | | result.addToEnvironment(STARTTLS_PROPERTY, "true"); |
| | | if (fDn != null) |
| | | { |
| | | |
| | | result.addToEnvironment(Context.SECURITY_AUTHENTICATION , "simple"); |
| | | result.addToEnvironment(Context.SECURITY_PRINCIPAL, fDn); |
| | | if (fPwd != null) |
| | |
| | | } |
| | | else |
| | | { |
| | | |
| | | final HTMLTable.ICell cell = row.newCell (); |
| | | cell.setText (" ", true); |
| | | } |
| | |
| | | */ |
| | | public void actionPerformed(ActionEvent ev) |
| | | { |
| | | |
| | | if (editOcDlg == null) |
| | | { |
| | | editOcPanel = new ObjectClassEditorPanel(); |
| | |
| | | StringBuilder msg = new StringBuilder(); |
| | | for (String m : col) |
| | | { |
| | | |
| | | if (msg.length() > 0) |
| | | { |
| | | msg.append(separator); |
| | |
| | | ServerDescriptor.ServerProperty.IS_REPLICATION_SERVER); |
| | | if (!Boolean.TRUE.equals(v)) |
| | | { |
| | | |
| | | AuthenticationData authData = new AuthenticationData(); |
| | | authData.setPort(Constants.DEFAULT_REPLICATION_PORT); |
| | | authData.setUseSecureConnection(false); |
| | |
| | | StringBuilder msg = new StringBuilder(); |
| | | for (String m : col) |
| | | { |
| | | |
| | | if (msg.length() > 0) |
| | | { |
| | | msg.append(separator); |
| | |
| | | // ----------------------- |
| | | else if (subCmd.getName().equals(listMembershipSubCmd.getName())) |
| | | { |
| | | |
| | | ctx = argParser.getContext(outStream, errStream); |
| | | if (ctx == null) |
| | | { |
| | |
| | | } |
| | | else |
| | | { |
| | | |
| | | LocalizableMessage message = ERR_SCHEMA_MODIFY_CANNOT_WRITE_ORIG_FILES_NOT_CLEANED |
| | | .get(getExceptionMessage(e)); |
| | | |
| | |
| | | if (results.isDefined() && |
| | | results.size() <= IndexFilter.FILTER_CANDIDATE_THRESHOLD) |
| | | { |
| | | |
| | | if(debugBuffer != null) |
| | | { |
| | | debugBuffer.append("[INDEX:"); |
| | |
| | | // already exists. Just update index entry limit. |
| | | if(this.equalityIndex.setIndexEntryLimit(indexEntryLimit)) |
| | | { |
| | | |
| | | adminActionRequired = true; |
| | | LocalizableMessage message = |
| | | NOTE_JEB_CONFIG_INDEX_ENTRY_LIMIT_REQUIRES_REBUILD.get( |
| | |
| | | |
| | | try |
| | | { |
| | | |
| | | if(debugBuffer != null) |
| | | { |
| | | debugBuffer.append("[INDEX:"); |
| | |
| | | status == OperationStatus.SUCCESS; |
| | | status = cursor.getNextNoDup(key, data, LockMode.DEFAULT)) |
| | | { |
| | | |
| | | int cmp = dn2uriComparator.compare(key.getData(), end); |
| | | if (cmp >= 0) |
| | | { |
| | |
| | | { |
| | | if (ldapurl.getBaseDN().isRootDN()) |
| | | { |
| | | |
| | | ldapurl.setBaseDN(dn); |
| | | } |
| | | ldapurl.getAttributes().clear(); |
| | |
| | | |
| | | Set<byte[]> dummySet = new AbstractSet<byte[]>() |
| | | { |
| | | |
| | | public Iterator<byte[]> iterator() |
| | | { |
| | | // The set is always empty. |
| | |
| | | while (status == OperationStatus.SUCCESS |
| | | && !importConfiguration.isCancelled() && !isCanceled) |
| | | { |
| | | |
| | | boolean found = false; |
| | | for (byte[] includeBranch : includeBranches) |
| | | { |
| | |
| | | |
| | | try |
| | | { |
| | | |
| | | LocalizableMessage message = INFO_TASKBE_INTERRUPTED_BY_SHUTDOWN.get(); |
| | | |
| | | taskScheduler.interruptRunningTasks(TaskState.STOPPED_BY_SHUTDOWN, |
| | |
| | | } |
| | | else if (! p.exists()) |
| | | { |
| | | |
| | | unacceptableReasons.add(ERR_TASKBE_BACKING_FILE_MISSING_PARENT.get( |
| | | p.getPath(), |
| | | tmpBackingFile)); |
| | |
| | | File f = getFileForPath(tmpBackingFile); |
| | | if (f.exists()) |
| | | { |
| | | |
| | | messages.add(ERR_TASKBE_BACKING_FILE_EXISTS.get(tmpBackingFile)); |
| | | resultCode = ResultCode.CONSTRAINT_VIOLATION; |
| | | } |
| | |
| | | File p = f.getParentFile(); |
| | | if (p == null) |
| | | { |
| | | |
| | | messages.add(ERR_TASKBE_INVALID_BACKING_FILE_PATH.get( |
| | | tmpBackingFile)); |
| | | resultCode = ResultCode.CONSTRAINT_VIOLATION; |
| | |
| | | |
| | | if (hasLowerBound && (longValue < lowerBound)) |
| | | { |
| | | |
| | | LocalizableMessage message = ERR_CONFIG_ATTR_INT_BELOW_LOWER_BOUND.get( |
| | | getName(), longValue, lowerBound); |
| | | if (allowFailures) |
| | |
| | | */ |
| | | public javax.management.Attribute toJMXAttribute() |
| | | { |
| | | |
| | | return _toJMXAttribute(false); |
| | | } |
| | | |
| | |
| | | */ |
| | | public javax.management.Attribute toJMXAttributePending() |
| | | { |
| | | |
| | | return new javax.management.Attribute(getName() + ";" |
| | | + OPTION_PENDING_VALUES, pendingIntValue + " " + pendingUnit); |
| | | } |
| | |
| | | */ |
| | | public JMXMBean(DN configEntryDN) |
| | | { |
| | | |
| | | this.configEntryDN = configEntryDN; |
| | | |
| | | alertGenerators = new CopyOnWriteArrayList<AlertGenerator>(); |
| | |
| | | Class backendClass = DirectoryServer.loadClass(className); |
| | | if (! Backend.class.isAssignableFrom(backendClass)) |
| | | { |
| | | |
| | | unacceptableReason.add(ERR_CONFIG_BACKEND_CLASS_NOT_BACKEND.get(className, backendDN)); |
| | | return false; |
| | | } |
| | |
| | | } |
| | | else |
| | | { |
| | | |
| | | messages.add(NOTE_CONFIG_BACKEND_CANNOT_REMOVE_BACKEND_WITH_SUBORDINATES.get(backendDN)); |
| | | resultCode = ResultCode.UNWILLING_TO_PERFORM; |
| | | return new ConfigChangeResult(resultCode, adminActionRequired, messages); |
| | |
| | | // then we can't get a shared lock on it. |
| | | if (exclusiveLocks.containsKey(lockFile)) |
| | | { |
| | | |
| | | failureReason.append( |
| | | ERR_FILELOCKER_LOCK_SHARED_REJECTED_BY_EXCLUSIVE.get(lockFile)); |
| | | return false; |
| | |
| | | String workQueueClass = configuration.getJavaClass(); |
| | | if (! workQueueClass.equals(workQueue.getClass().getName())) |
| | | { |
| | | |
| | | messages.add(INFO_CONFIG_WORK_QUEUE_CLASS_CHANGE_REQUIRES_RESTART.get( |
| | | workQueue.getClass().getName(), |
| | | workQueueClass)); |
| | |
| | | (config.isCheckSubstrings() && |
| | | containsSubstring(password, minSubstringLength, a))) |
| | | { |
| | | |
| | | invalidReason.append(ERR_ATTRVALUE_VALIDATOR_PASSWORD_IN_ENTRY.get()); |
| | | return false; |
| | | } |
| | |
| | | int sharpPos = valueStr.indexOf('#'); |
| | | if (sharpPos < 0) |
| | | { |
| | | |
| | | invalidReason.append( |
| | | ERR_ATTR_SYNTAX_ENHANCEDGUIDE_NO_SHARP.get(valueStr)); |
| | | return false; |
| | |
| | | int ocLength = ocName.length(); |
| | | if (ocLength == 0) |
| | | { |
| | | |
| | | invalidReason.append(ERR_ATTR_SYNTAX_ENHANCEDGUIDE_NO_OC.get(valueStr)); |
| | | return false; |
| | | } |
| | |
| | | int lastSharpPos = valueStr.lastIndexOf('#'); |
| | | if (lastSharpPos == sharpPos) |
| | | { |
| | | |
| | | invalidReason.append( |
| | | ERR_ATTR_SYNTAX_ENHANCEDGUIDE_NO_FINAL_SHARP.get(valueStr)); |
| | | return false; |
| | |
| | | { |
| | | if (scopeStr.length() == 0) |
| | | { |
| | | |
| | | invalidReason.append( |
| | | ERR_ATTR_SYNTAX_ENHANCEDGUIDE_NO_SCOPE.get(valueStr)); |
| | | } |
| | | else |
| | | { |
| | | |
| | | invalidReason.append( |
| | | ERR_ATTR_SYNTAX_ENHANCEDGUIDE_INVALID_SCOPE.get( |
| | | valueStr, scopeStr)); |
| | |
| | | int criteriaLength = criteria.length(); |
| | | if (criteriaLength == 0) |
| | | { |
| | | |
| | | invalidReason.append( |
| | | ERR_ATTR_SYNTAX_ENHANCEDGUIDE_NO_CRITERIA.get(valueStr)); |
| | | return false; |
| | |
| | | // The value must contain at least one character. |
| | | if (valueLength == 0) |
| | | { |
| | | |
| | | invalidReason.append(ERR_ATTR_SYNTAX_FAXNUMBER_EMPTY.get()); |
| | | return false; |
| | | } |
| | |
| | | // character was a dollar sign. |
| | | if (c == '$') |
| | | { |
| | | |
| | | invalidReason.append(ERR_ATTR_SYNTAX_FAXNUMBER_END_WITH_DOLLAR.get( |
| | | valueString)); |
| | | return false; |
| | |
| | | String paramStr = valueString.substring(paramStartPos, pos); |
| | | if (! ALLOWED_FAX_PARAMETERS.contains(paramStr)) |
| | | { |
| | | |
| | | invalidReason.append(ERR_ATTR_SYNTAX_FAXNUMBER_ILLEGAL_PARAMETER.get( |
| | | valueString, paramStr, paramStartPos, (pos-1))); |
| | | return false; |
| | |
| | | int ocLength = ocName.length(); |
| | | if (ocLength == 0) |
| | | { |
| | | |
| | | invalidReason.append(ERR_ATTR_SYNTAX_GUIDE_NO_OC.get(valueStr)); |
| | | return false; |
| | | } |
| | |
| | | } |
| | | else |
| | | { |
| | | |
| | | invalidReason.append( |
| | | ERR_ATTR_SYNTAX_GUIDE_ILLEGAL_CHAR.get( |
| | | valueStr, criteria, c, (i+1))); |
| | |
| | | char c = valueStr.charAt(pos++); |
| | | if (c != '(') |
| | | { |
| | | |
| | | LocalizableMessage message = |
| | | ERR_ATTR_SYNTAX_LDAPSYNTAX_EXPECTED_OPEN_PARENTHESIS.get(valueStr, (pos-1), c); |
| | | throw new DirectoryException(ResultCode.INVALID_ATTRIBUTE_SYNTAX, |
| | |
| | | { |
| | | if (lastWasPeriod) |
| | | { |
| | | |
| | | invalidReason.append( |
| | | ERR_ATTR_SYNTAX_MR_DOUBLE_PERIOD_IN_NUMERIC_OID.get( |
| | | valueStr, (pos-1))); |
| | |
| | | // description. Otherwise, parse out the OID. |
| | | if (pos >= length) |
| | | { |
| | | |
| | | invalidReason.append(ERR_ATTR_SYNTAX_MR_TRUNCATED_VALUE.get(valueStr)); |
| | | return false; |
| | | } |
| | |
| | | // We must be at the end of the value. If not, then that's a problem. |
| | | if (pos < length) |
| | | { |
| | | |
| | | invalidReason.append( |
| | | ERR_ATTR_SYNTAX_MR_UNEXPECTED_CLOSE_PARENTHESIS.get( |
| | | valueStr, (pos-1))); |
| | |
| | | // Make sure that a syntax was specified. |
| | | if (syntax == null) |
| | | { |
| | | |
| | | invalidReason.append(ERR_ATTR_SYNTAX_MR_NO_SYNTAX.get(valueStr)); |
| | | return false; |
| | | } |
| | |
| | | char c = valueString.charAt(i); |
| | | if (! ((c == '0') || (c == '1'))) |
| | | { |
| | | |
| | | invalidReason.append( |
| | | ERR_ATTR_SYNTAX_NAMEANDUID_ILLEGAL_BINARY_DIGIT.get(valueString, c, i)); |
| | | return false; |
| | |
| | | // It must have at least one digit or space. |
| | | if (length == 0) |
| | | { |
| | | |
| | | invalidReason.append(ERR_ATTR_SYNTAX_NUMERIC_STRING_EMPTY_VALUE.get()); |
| | | return false; |
| | | } |
| | |
| | | // acceptable. |
| | | if (value == null) |
| | | { |
| | | |
| | | invalidReason.append(ERR_ATTR_SYNTAX_OTHER_MAILBOX_EMPTY_VALUE.get()); |
| | | return false; |
| | | } |
| | |
| | | int valueLength = valueString.length(); |
| | | if (valueLength == 0) |
| | | { |
| | | |
| | | invalidReason.append(ERR_ATTR_SYNTAX_OTHER_MAILBOX_EMPTY_VALUE.get()); |
| | | return false; |
| | | } |
| | |
| | | { |
| | | if (pos == 0) |
| | | { |
| | | |
| | | invalidReason.append(ERR_ATTR_SYNTAX_OTHER_MAILBOX_NO_MBTYPE.get( |
| | | valueString)); |
| | | return false; |
| | |
| | | // Make sure there is at least one character left for the mailbox. |
| | | if (pos >= valueLength) |
| | | { |
| | | |
| | | invalidReason.append(ERR_ATTR_SYNTAX_OTHER_MAILBOX_NO_MAILBOX.get( |
| | | valueString)); |
| | | return false; |
| | |
| | | // acceptable. |
| | | if (value == null) |
| | | { |
| | | |
| | | invalidReason.append(WARN_ATTR_SYNTAX_PRINTABLE_STRING_EMPTY_VALUE.get()); |
| | | return false; |
| | | } |
| | |
| | | int valueLength = valueString.length(); |
| | | if (valueLength == 0) |
| | | { |
| | | |
| | | invalidReason.append(WARN_ATTR_SYNTAX_PRINTABLE_STRING_EMPTY_VALUE.get()); |
| | | return false; |
| | | } |
| | |
| | | // The value must contain at least one character. |
| | | if (valueLength == 0) |
| | | { |
| | | |
| | | invalidReason.append(ERR_ATTR_SYNTAX_TELETEXID_EMPTY.get()); |
| | | return false; |
| | | } |
| | |
| | | // character was a dollar sign. |
| | | if (c == '$') |
| | | { |
| | | |
| | | invalidReason.append(ERR_ATTR_SYNTAX_TELETEXID_END_WITH_DOLLAR.get( |
| | | valueString)); |
| | | return false; |
| | |
| | | int colonPos = paramStr.indexOf(':'); |
| | | if (colonPos < 0) |
| | | { |
| | | |
| | | invalidReason.append(ERR_ATTR_SYNTAX_TELETEXID_PARAM_NO_COLON.get( |
| | | valueString)); |
| | | return false; |
| | |
| | | String paramName = paramStr.substring(0, colonPos); |
| | | if (! ALLOWED_TTX_PARAMETERS.contains(paramName)) |
| | | { |
| | | |
| | | invalidReason.append(ERR_ATTR_SYNTAX_TELETEXID_ILLEGAL_PARAMETER.get( |
| | | valueString, paramName)); |
| | | return false; |
| | |
| | | int colonPos = paramStr.indexOf(':'); |
| | | if (colonPos < 0) |
| | | { |
| | | |
| | | invalidReason.append(ERR_ATTR_SYNTAX_TELETEXID_PARAM_NO_COLON.get( |
| | | valueString)); |
| | | return false; |
| | |
| | | String paramName = paramStr.substring(0, colonPos); |
| | | if (! ALLOWED_TTX_PARAMETERS.contains(paramName)) |
| | | { |
| | | |
| | | invalidReason.append(ERR_ATTR_SYNTAX_TELETEXID_ILLEGAL_PARAMETER.get( |
| | | valueString, paramName)); |
| | | return false; |
| | |
| | | |
| | | if (valueLength < 5) |
| | | { |
| | | |
| | | invalidReason.append(ERR_ATTR_SYNTAX_TELEX_TOO_SHORT.get(valueString)); |
| | | return false; |
| | | } |
| | |
| | | |
| | | if (pos >= valueLength) |
| | | { |
| | | |
| | | invalidReason.append(ERR_ATTR_SYNTAX_TELEX_TRUNCATED.get(valueString)); |
| | | return false; |
| | | } |
| | |
| | | |
| | | if (pos >= valueLength) |
| | | { |
| | | |
| | | invalidReason.append(ERR_ATTR_SYNTAX_TELEX_TRUNCATED.get(valueString)); |
| | | return false; |
| | | } |
| | |
| | | String valueString = value.toString(); |
| | | if (valueString.length() != 36) |
| | | { |
| | | |
| | | invalidReason.append(WARN_ATTR_SYNTAX_UUID_INVALID_LENGTH.get(valueString, |
| | | valueString.length())); |
| | | return false; |
| | |
| | | { |
| | | try |
| | | { |
| | | |
| | | StringConfigAttribute idStub = |
| | | new StringConfigAttribute( |
| | | ATTR_BACKEND_ID, |
| | |
| | | String backendID; |
| | | try |
| | | { |
| | | |
| | | StringConfigAttribute idStub = |
| | | new StringConfigAttribute( |
| | | ATTR_BACKEND_ID, |
| | |
| | | String backendID; |
| | | try |
| | | { |
| | | |
| | | StringConfigAttribute idStub = |
| | | new StringConfigAttribute(ATTR_BACKEND_ID, |
| | | INFO_CONFIG_BACKEND_ATTR_DESCRIPTION_BACKEND_ID.get(), true, |
| | |
| | | String backendClassName; |
| | | try |
| | | { |
| | | |
| | | StringConfigAttribute classStub = |
| | | new StringConfigAttribute(ATTR_BACKEND_CLASS, |
| | | INFO_CONFIG_BACKEND_ATTR_DESCRIPTION_CLASS.get(), true, false, |
| | |
| | | List<DN> baseDNs = null; |
| | | try |
| | | { |
| | | |
| | | DNConfigAttribute baseDNStub = |
| | | new DNConfigAttribute(ATTR_BACKEND_BASE_DN, |
| | | INFO_CONFIG_BACKEND_ATTR_DESCRIPTION_BASE_DNS.get(), true, |
| | |
| | | // If no DNs were provided, then exit with an error. |
| | | if (dnStrings.isEmpty() && (! filename.isPresent()) ) |
| | | { |
| | | |
| | | err.println(wrapText(ERR_LDAPCOMPARE_NO_DNS.get(), MAX_LINE_WIDTH)); |
| | | return CLIENT_SIDE_PARAM_ERROR; |
| | | } |
| | |
| | | } |
| | | else if (c.getOID().equals(OID_NS_PASSWORD_EXPIRED)) |
| | | { |
| | | |
| | | LocalizableMessage message = INFO_BIND_PASSWORD_EXPIRED.get(); |
| | | out.println(message); |
| | | } |
| | |
| | | } |
| | | else |
| | | { |
| | | |
| | | LocalizableMessage msg = INFO_OPERATION_FAILED.get("DELETE"); |
| | | err.println(wrapText(msg, MAX_LINE_WIDTH)); |
| | | err.println(wrapText(ae.getMessage(), MAX_LINE_WIDTH)); |
| | |
| | | { |
| | | if(resultCode != SUCCESS && resultCode != REFERRAL) |
| | | { |
| | | |
| | | LocalizableMessage msg = INFO_OPERATION_FAILED.get("DELETE"); |
| | | LDAPToolUtils.printErrorMessage(err, msg, resultCode, errorMessage, |
| | | op.getMatchedDN()); |
| | | } else |
| | | { |
| | | |
| | | LocalizableMessage msg = INFO_OPERATION_SUCCESSFUL.get("DELETE", line); |
| | | out.println(msg); |
| | | } |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | |
| | | err.println(wrapText( |
| | | ERR_LDAPMODIFY_POSTREAD_CANNOT_DECODE_VALUE.get( |
| | | de.getMessage()), |
| | |
| | | LocalizableMessage errorMessage = extendedResponse.getErrorMessage(); |
| | | if ((errorMessage != null) && (errorMessage.length() > 0)) |
| | | { |
| | | |
| | | message = ERR_LDAPPWMOD_FAILURE_ERROR_MESSAGE.get(errorMessage); |
| | | err.println(wrapText(message, MAX_LINE_WIDTH)); |
| | | } |
| | |
| | | DN matchedDN = extendedResponse.getMatchedDN(); |
| | | if (matchedDN != null) |
| | | { |
| | | |
| | | message = ERR_LDAPPWMOD_FAILURE_MATCHED_DN.get(matchedDN); |
| | | err.println(wrapText(message, MAX_LINE_WIDTH)); |
| | | } |
| | |
| | | LocalizableMessage additionalInfo = extendedResponse.getErrorMessage(); |
| | | if ((additionalInfo != null) && (additionalInfo.length() > 0)) |
| | | { |
| | | |
| | | message = INFO_LDAPPWMOD_ADDITIONAL_INFO.get(additionalInfo); |
| | | out.println(wrapText(message, MAX_LINE_WIDTH)); |
| | | } |
| | |
| | | out.println(INFO_LDAPSEARCH_ACCTUSABLE_HEADER.get()); |
| | | if (acrc.isUsable()) |
| | | { |
| | | |
| | | out.println(INFO_LDAPSEARCH_ACCTUSABLE_IS_USABLE.get()); |
| | | if (acrc.getSecondsBeforeExpiration() > 0) |
| | | { |
| | |
| | | } |
| | | else |
| | | { |
| | | |
| | | out.println( |
| | | INFO_LDAPSEARCH_ACCTUSABLE_NOT_USABLE.get()); |
| | | if (acrc.isInactive()) |
| | | { |
| | | |
| | | out.println( |
| | | INFO_LDAPSEARCH_ACCTUSABLE_ACCT_INACTIVE.get()); |
| | | } |
| | |
| | | } |
| | | if (acrc.isExpired()) |
| | | { |
| | | |
| | | out.println( |
| | | INFO_LDAPSEARCH_ACCTUSABLE_PW_EXPIRED.get()); |
| | | |
| | | if (acrc.getRemainingGraceLogins() > 0) |
| | | { |
| | | |
| | | out.println( |
| | | INFO_LDAPSEARCH_ACCTUSABLE_REMAINING_GRACE |
| | | .get(acrc.getRemainingGraceLogins())); |
| | |
| | | } |
| | | if (acrc.isLocked()) |
| | | { |
| | | |
| | | out.println(INFO_LDAPSEARCH_ACCTUSABLE_LOCKED.get()); |
| | | if (acrc.getSecondsBeforeUnlock() > 0) |
| | | { |
| | |
| | | argParser.setUsageArgument(showUsage, out); |
| | | } catch (ArgumentException ae) |
| | | { |
| | | |
| | | LocalizableMessage message = ERR_CANNOT_INITIALIZE_ARGS.get(ae.getMessage()); |
| | | |
| | | err.println(wrapText(message, MAX_LINE_WIDTH)); |
| | |
| | | |
| | | if(filters.isEmpty()) |
| | | { |
| | | |
| | | err.println(wrapText(ERR_SEARCH_NO_FILTERS.get(), MAX_LINE_WIDTH)); |
| | | err.println(argParser.getUsage()); |
| | | return CLIENT_SIDE_PARAM_ERROR; |
| | |
| | | searchScope = SUBORDINATE_SUBTREE; |
| | | } else |
| | | { |
| | | |
| | | err.println(ERR_SEARCH_INVALID_SEARCH_SCOPE.get(scope)); |
| | | return false; |
| | | } |
| | |
| | | { |
| | | if(sslSocketFactory == null) |
| | | { |
| | | |
| | | throw new SSLConnectionException( |
| | | ERR_TOOLS_SSL_CONNECTION_NOT_INITIALIZED.get()); |
| | | } |
| | |
| | | String serviceName = ConfigureWindowsService.getServiceName(); |
| | | if (serviceName == null) |
| | | { |
| | | |
| | | LocalizableMessage message = ERR_WINDOWS_SERVICE_NOT_FOUND.get(); |
| | | err.println(message); |
| | | returnValue = SERVICE_NOT_FOUND; |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | |
| | | LocalizableMessage message = ERR_WINDOWS_SERVICE_START_ERROR.get(); |
| | | err.println(message); |
| | | err.println("Exception:" + t.toString()); |
| | |
| | | String serviceName = ConfigureWindowsService.getServiceName(); |
| | | if (serviceName == null) |
| | | { |
| | | |
| | | LocalizableMessage message = ERR_WINDOWS_SERVICE_NOT_FOUND.get(); |
| | | err.println(message); |
| | | returnValue = SERVICE_NOT_FOUND; |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | |
| | | LocalizableMessage message = ERR_WINDOWS_SERVICE_STOP_ERROR.get(); |
| | | err.println(message); |
| | | err.println("Exception:" + t.toString()); |
| | |
| | | } |
| | | catch (ArgumentException ae) |
| | | { |
| | | |
| | | LocalizableMessage message = ERR_CANNOT_INITIALIZE_ARGS.get(ae.getMessage()); |
| | | |
| | | err.println(wrapText(message, MAX_LINE_WIDTH)); |
| | |
| | | } |
| | | catch (ArgumentException ae) |
| | | { |
| | | |
| | | LocalizableMessage message = ERR_ERROR_PARSING_ARGS.get(ae.getMessage()); |
| | | |
| | | err.println(wrapText(message, MAX_LINE_WIDTH)); |
| | |
| | | { |
| | | for (ReplicaDescriptor rep2 : replicas2) |
| | | { |
| | | |
| | | switch (type) |
| | | { |
| | | case NOT_REPLICATED: |
| | |
| | | |
| | | if (!uData.configureReplicationServer1() && repPort1 > 0) |
| | | { |
| | | |
| | | println(INFO_REPLICATION_SERVER_CONFIGURED_WARNING.get( |
| | | ConnectionUtils.getHostPort(ctx1), repPort1)); |
| | | println(); |
| | |
| | | } |
| | | if (replicationServer != null) |
| | | { |
| | | |
| | | String s = String.valueOf(replicationServer.getReplicationPort()); |
| | | printProgress(formatter.getFormattedWithPoints( |
| | | INFO_REPLICATION_DISABLING_REPLICATION_SERVER.get(s, |
| | |
| | | if ((attributeType == null) || |
| | | attributeType.equals(rdn.getAttributeType(i))) |
| | | { |
| | | |
| | | AttributeValue v = rdn.getAttributeValue(i); |
| | | ByteString nv = |
| | | matchingRule.normalizeValue(v.getValue()); |
| | |
| | | */ |
| | | public AndRefinement(final Collection<Refinement> refinementSet) |
| | | { |
| | | |
| | | this.refinementSet = refinementSet; |
| | | } |
| | | |
| | |
| | | @Override |
| | | public boolean equals(final Object obj) |
| | | { |
| | | |
| | | if (this == obj) |
| | | { |
| | | return true; |
| | |
| | | @Override |
| | | public int hashCode() |
| | | { |
| | | |
| | | return refinementSet.hashCode(); |
| | | } |
| | | |
| | |
| | | */ |
| | | public FilterRefinement(final SearchFilter filter) |
| | | { |
| | | |
| | | this.filter = filter; |
| | | } |
| | | |
| | |
| | | @Override |
| | | public boolean equals(final Object obj) |
| | | { |
| | | |
| | | if (this == obj) |
| | | { |
| | | return true; |
| | |
| | | @Override |
| | | public int hashCode() |
| | | { |
| | | |
| | | return filter.hashCode(); |
| | | } |
| | | |
| | |
| | | */ |
| | | public ItemRefinement(final String objectClass) |
| | | { |
| | | |
| | | this.objectClass = objectClass; |
| | | this.normalizedObjectClass = StaticUtils |
| | | .toLowerCase(objectClass.trim()); |
| | |
| | | @Override |
| | | public boolean equals(final Object obj) |
| | | { |
| | | |
| | | if (this == obj) |
| | | { |
| | | return true; |
| | |
| | | @Override |
| | | public int hashCode() |
| | | { |
| | | |
| | | return normalizedObjectClass.hashCode(); |
| | | } |
| | | |
| | |
| | | */ |
| | | public NotRefinement(final Refinement refinement) |
| | | { |
| | | |
| | | this.refinement = refinement; |
| | | } |
| | | |
| | |
| | | @Override |
| | | public boolean equals(final Object obj) |
| | | { |
| | | |
| | | if (this == obj) |
| | | { |
| | | return true; |
| | |
| | | @Override |
| | | public int hashCode() |
| | | { |
| | | |
| | | return refinement.hashCode(); |
| | | } |
| | | |
| | |
| | | */ |
| | | public OrRefinement(final Collection<Refinement> refinementSet) |
| | | { |
| | | |
| | | this.refinementSet = refinementSet; |
| | | } |
| | | |
| | |
| | | @Override |
| | | public boolean equals(final Object obj) |
| | | { |
| | | |
| | | if (this == obj) |
| | | { |
| | | return true; |
| | |
| | | @Override |
| | | public int hashCode() |
| | | { |
| | | |
| | | return refinementSet.hashCode(); |
| | | } |
| | | |
| | |
| | | if ((chopBefore.iterator().hasNext()) |
| | | || (chopAfter.iterator().hasNext())) |
| | | { |
| | | |
| | | if (!isFirstElement) |
| | | { |
| | | builder.append(","); |
| | |
| | | { |
| | | if (startPos + breakColumn >= l.length()) |
| | | { |
| | | |
| | | writer.write("# "); |
| | | writer.write(l.substring(startPos)); |
| | | writer.newLine(); |
| | |
| | | |
| | | static |
| | | { |
| | | |
| | | Method normalize = null; |
| | | Object formNFKC = null; |
| | | try |
| | |
| | | // If the line read is null, then that means the file was empty. |
| | | if (line == null) |
| | | { |
| | | |
| | | invalidReason.append(ERR_FILEARG_EMPTY_FILE.get(valueString, getName())); |
| | | return false; |
| | | } |
| | |
| | | // it. |
| | | if (hasUpperBound && (intValue > upperBound)) |
| | | { |
| | | |
| | | invalidReason.append(ERR_INTARG_VALUE_ABOVE_UPPER_BOUND.get( |
| | | getName(), intValue, upperBound)); |
| | | return false; |
| | |
| | | public static void main( String[] args ) |
| | | |
| | | { |
| | | |
| | | |
| | | FileWriter out = null; |
| | | |
| | | files = new HashMap<String,File>(); |
| | |
| | | |
| | | for(int k = 0; k < arrayTests.size(); k++) |
| | | { |
| | | |
| | | ArrayData testSuitePath = (ArrayData)(arrayTests.get(k)); |
| | | if(testSuitePath.size() > 0) |
| | | { |
| | | |
| | | { |
| | | String specPath=testSuitePath.getTestSuite(0); |
| | | |
| | | String specName = (new File(specPath)).getName(); |
| | |
| | | { |
| | | if(vlvIndex.getName().contains("testvlvindex")) |
| | | { |
| | | |
| | | |
| | | SortValuesSet svs1 = |
| | | vlvIndex.getSortValuesSet(null, 0, |
| | | expectedSortedValues.first().getValues()); |
| | |
| | | { |
| | | if(vlvIndex.getName().contains("testvlvindex")) |
| | | { |
| | | |
| | | |
| | | SortValuesSet svs1 = |
| | | vlvIndex.getSortValuesSet(null, 0, |
| | | expectedSortedValues.first().getValues()); |
| | |
| | | { |
| | | if(vlvIndex.getName().contains("testvlvindex")) |
| | | { |
| | | |
| | | |
| | | SortValuesSet svs1 = |
| | | vlvIndex.getSortValuesSet(null, 0, |
| | | expectedSortedValues.first().getValues()); |
| | |
| | | // Check null, null |
| | | try |
| | | { |
| | | |
| | | mvf = MatchedValuesFilter.createGreaterOrEqualFilter((String) null, |
| | | (ByteString) null); |
| | | assertTrue(false, "Expected NullPointerException"); |
| | |
| | | { |
| | | if(line.startsWith(userCert)) |
| | | { |
| | | |
| | | builder.append("userCertificate:"); |
| | | builder.append(line.substring(userCert.length()+1, line.length())); |
| | | } |
| | |
| | | public FakeReplicationServer(byte groupId, int port, int serverId, boolean assured, |
| | | String testcase) |
| | | { |
| | | |
| | | this.groupId = groupId; |
| | | this.port = port; |
| | | this.serverId = serverId; |
| | |
| | | |
| | | try |
| | | { |
| | | |
| | | int DEGRADED_STATUS_THRESHOLD = 1; |
| | | |
| | | // RS1 starts with 1 message as degraded status threshold value |