| | |
| | | toString = "ADSContextException: error type "+error+"."; |
| | | if (getCause() != null) |
| | | { |
| | | toString += " Root cause: "+getCause().toString(); |
| | | toString += " Root cause: " + getCause(); |
| | | } |
| | | } |
| | | |
| | |
| | | ArrayList<String> dns = new ArrayList<String>(); |
| | | for (BaseDNDescriptor baseDN : baseDNs) |
| | | { |
| | | dns.add("'"+baseDN.getDn().toString()+"'"); |
| | | dns.add("'" + baseDN.getDn() + "'"); |
| | | } |
| | | getProgressDialog().appendProgressHtml( |
| | | Utilities.getProgressWithPoints( |
| | |
| | | args.add("--remove"); |
| | | for (BaseDNDescriptor baseDN : baseDNs) |
| | | { |
| | | args.add("base-dn:"+baseDN.getDn().toString()); |
| | | args.add("base-dn:" + baseDN.getDn()); |
| | | } |
| | | args.addAll(getConnectionCommandLineArguments()); |
| | | args.add("--no-prompt"); |
| | |
| | | lines.add("ds-cfg-filter: "+filter.getText().trim()); |
| | | lines.add("ds-cfg-sort-order: "+getSortOrderStringValue(getSortOrder())); |
| | | lines.add("ds-cfg-base-dn: "+getBaseDN()); |
| | | lines.add("ds-cfg-scope: "+getScope().toString()); |
| | | lines.add("ds-cfg-scope: " + getScope()); |
| | | lines.add("ds-cfg-max-block-size: "+maxBlockSize.getText().trim()); |
| | | StringBuilder sb = new StringBuilder(); |
| | | for (String line : lines) |
| | |
| | | else |
| | | { |
| | | aParentDN = nodeDN.parent(); |
| | | aRdn = nodeDN.rdn().getAttributeValue(0).toString()+"-1"; |
| | | aRdn = nodeDN.rdn().getAttributeValue(0) + "-1"; |
| | | } |
| | | } |
| | | catch (DirectoryException de) |
| | |
| | | lines.add("ds-cfg-index-entry-limit: "+entryLimitValue); |
| | | for (IndexType type : indexTypes) |
| | | { |
| | | lines.add("ds-cfg-index-type: "+type.toString()); |
| | | lines.add("ds-cfg-index-type: " + type); |
| | | } |
| | | StringBuilder sb = new StringBuilder(); |
| | | for (String line : lines) |
| | |
| | | for (IndexType newType : toAdd) |
| | | { |
| | | args.add("--add"); |
| | | args.add("index-type:"+newType.toString()); |
| | | args.add("index-type:" + newType); |
| | | } |
| | | for (IndexType newType : toDelete) |
| | | { |
| | | args.add("--remove"); |
| | | args.add("index-type:"+newType.toString()); |
| | | args.add("index-type:" + newType); |
| | | } |
| | | } |
| | | if (entryLimitValue != indexToModify.getEntryLimit()) |
| | |
| | | while (it.hasNext()) |
| | | { |
| | | args.add("--set"); |
| | | args.add("index-type:" + it.next().toString()); |
| | | args.add("index-type:" + it.next()); |
| | | } |
| | | } |
| | | } |
| | |
| | | lines.add("ds-cfg-index-entry-limit: "+entryLimitValue); |
| | | for (IndexType type : indexTypes) |
| | | { |
| | | lines.add("ds-cfg-index-type: "+type.toString()); |
| | | lines.add("ds-cfg-index-type: " + type); |
| | | } |
| | | StringBuilder sb = new StringBuilder(); |
| | | for (String line : lines) |
| | |
| | | for (IndexType type : indexTypes) |
| | | { |
| | | args.add("--set"); |
| | | args.add("index-type:"+type.toString()); |
| | | args.add("index-type:"+type); |
| | | } |
| | | args.add("--set"); |
| | | args.add("index-entry-limit:"+entryLimitValue); |
| | |
| | | args.add("filter:"+filterValue); |
| | | |
| | | args.add("--set"); |
| | | args.add("scope:"+scope.toString()); |
| | | args.add("scope:"+scope); |
| | | |
| | | args.add("--set"); |
| | | args.add("sort-order:"+sortOrderStringValue); |
| | |
| | | if (indexToModify.getScope() != scope) |
| | | { |
| | | args.add("--set"); |
| | | args.add("scope:"+scope.toString()); |
| | | args.add("scope:"+scope); |
| | | } |
| | | if (!indexToModify.getFilter().equals(filterValue)) |
| | | { |
| | |
| | | */ |
| | | public void setText(String text) |
| | | { |
| | | label.setText(Utilities.applyFont(text.toString(), |
| | | label.getFont())); |
| | | label.setText(Utilities.applyFont(text, label.getFont())); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | public File getBaseSchemaFile() throws ApplicationException |
| | | { |
| | | return new File(getConfigurationUpgradeDirectory(), "schema.ldif." |
| | | + getInstanceSvnRev().toString()); |
| | | return new File(getConfigurationUpgradeDirectory(), |
| | | "schema.ldif." + getInstanceSvnRev()); |
| | | } |
| | | |
| | | |
| | |
| | | */ |
| | | public File getBaseConfigurationFile() throws ApplicationException |
| | | { |
| | | return new File(getConfigurationUpgradeDirectory(), BASE_CONFIG_FILE_PREFIX |
| | | + getInstanceSvnRev().toString()); |
| | | return new File(getConfigurationUpgradeDirectory(), |
| | | BASE_CONFIG_FILE_PREFIX + getInstanceSvnRev()); |
| | | } |
| | | |
| | | |
| | |
| | | default: |
| | | throw new IllegalArgumentException("Unknown iconName: " + iconType); |
| | | } |
| | | return getParentPackagePath() + "/" + key.toString(); |
| | | return getParentPackagePath() + "/" + key; |
| | | } |
| | | |
| | | /** |
| | |
| | | ManagedObjectDefinitionI18NResource resource = |
| | | ManagedObjectDefinitionI18NResource.getInstance(); |
| | | String property = "property." + getName() |
| | | + ".syntax.enumeration.value." + value.toString() |
| | | + ".syntax.enumeration.value." + value |
| | | + ".synopsis"; |
| | | try { |
| | | return resource.getMessage(getManagedObjectDefinition(), |
| | |
| | | // Property table |
| | | startTable(); |
| | | tableRow("Description", |
| | | ((prop.getSynopsis() != null) ? prop.getSynopsis().toString()+ " " : "") + |
| | | ((prop.getSynopsis() != null) ? prop.getSynopsis()+ " " : "") + |
| | | ((prop.getDescription() != null) ? |
| | | prop.getDescription().toString() : "")); |
| | | |
| | |
| | | for (Object cst : en.getEnumConstants()) { |
| | | enumStr += cst.toString(); |
| | | if (prop.getValueSynopsis((Enum) cst) != null) { |
| | | enumStr += " - " + prop.getValueSynopsis((Enum) cst).toString(); |
| | | enumStr += " - " + prop.getValueSynopsis((Enum) cst); |
| | | } |
| | | enumStr += getNewLine() + getNewLine(); |
| | | } |
| | |
| | | EMailMessage message = |
| | | new EMailMessage(taskBackend.getNotificationSenderAddress(), |
| | | new ArrayList<String>(recipients), |
| | | taskState.toString() + " " + taskID); |
| | | taskState + " " + taskID); |
| | | |
| | | String scheduledStartDate; |
| | | if (scheduledStartTime <= 0) |
| | |
| | | |
| | | MBeanConstructorInfo[] mBeanConstructors = new MBeanConstructorInfo[0]; |
| | | return new MBeanInfo(CLASS_NAME, |
| | | "Configurable Attributes for " + |
| | | configEntryDN.toString(), |
| | | "Configurable Attributes for " + configEntryDN, |
| | | mBeanAttributes, mBeanConstructors, mBeanOperations, |
| | | mBeanNotifications); |
| | | } |
| | |
| | | } |
| | | else |
| | | { |
| | | this.authorizationID = "dn:" + authorizationDN.toString(); |
| | | this.authorizationID = "dn:" + authorizationDN; |
| | | } |
| | | } |
| | | |
| | |
| | | public void writeValue(ASN1Writer writer) throws IOException { |
| | | writer.writeStartSequence(ASN1.UNIVERSAL_OCTET_STRING_TYPE); |
| | | writer.writeStartSequence(); |
| | | writer.writeOctetString(cookie.toString()); |
| | | writer.writeOctetString(cookie); |
| | | writer.writeEndSequence(); |
| | | writer.writeEndSequence(); |
| | | } |
| | |
| | | writer.writeStartSequence(); |
| | | if(authzDN != null) |
| | | { |
| | | writer.writeOctetString("dn:" + authzDN.toString()); |
| | | writer.writeOctetString("dn:" + authzDN); |
| | | } |
| | | else if(rawAuthzDN != null) |
| | | { |
| | |
| | | { |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | logger.trace("Encoded password " + v.toString() + |
| | | logger.trace("Encoded password " + v + |
| | | " cannot be decoded and cannot be added to history."); |
| | | } |
| | | } |
| | |
| | | */ |
| | | public String toString() |
| | | { |
| | | return "Free Number Retention Policy " + config.dn().toString(); |
| | | return "Free Number Retention Policy " + config.dn(); |
| | | } |
| | | } |
| | | |
| | |
| | | @Override |
| | | public String toString() |
| | | { |
| | | return "Free Disk Retention Policy " + config.dn().toString(); |
| | | return "Free Disk Retention Policy " + config.dn(); |
| | | } |
| | | } |
| | | |
| | |
| | | @Override |
| | | public String toString() |
| | | { |
| | | return "Size Based Retention Policy " + config.dn().toString(); |
| | | return "Size Based Retention Policy " + config.dn(); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | logger.traceException(ex); |
| | | } |
| | | builder.add(entryCount + " " + dn.toString()); |
| | | builder.add(entryCount + " " + dn); |
| | | } |
| | | } |
| | | else |
| | |
| | | // This is done to avoid recalculating the number of entries |
| | | // using the numSubordinates method in the case where the |
| | | // backend has a single base DN. |
| | | builder.add(backendCount + " " + baseDNs[0].toString()); |
| | | builder.add(backendCount + " " + baseDNs[0]); |
| | | } |
| | | attrs.add(builder.toAttribute()); |
| | | |
| | |
| | | setupWriter(); |
| | | for(Map.Entry<DN,DN> mapEntry : modDNmap.entrySet()) |
| | | { |
| | | writer.write(mapEntry.getKey().toString() + "\t" + mapEntry.getValue().toString()); |
| | | writer.write(mapEntry.getKey() + "\t" + mapEntry.getValue()); |
| | | writer.newLine(); |
| | | } |
| | | writer.flush(); |
| | |
| | | throws InitializationException |
| | | { |
| | | super("LDAP Request Handler " + requestHandlerID + |
| | | " for connection handler " + connectionHandler.toString()); |
| | | " for connection handler " + connectionHandler); |
| | | |
| | | |
| | | handlerName = getName(); |
| | |
| | | */ |
| | | File getServerIdPath(final String domainId, final int serverId) |
| | | { |
| | | return new File(getDomainPath(domainId), String.valueOf(serverId) + SERVER_ID_SUFFIX); |
| | | return new File(getDomainPath(domainId), serverId + SERVER_ID_SUFFIX); |
| | | } |
| | | |
| | | private File getGenerationIdPath(final String domainId, final long generationId) |
| | |
| | | static Entry<String, String> toReplicaEntry(DN baseDN, int serverId) |
| | | { |
| | | final String key = serverId + FIELD_SEPARATOR + baseDN.toIrreversibleReadableString(); |
| | | final String value = serverId + FIELD_SEPARATOR + baseDN.toString(); |
| | | final String value = serverId + FIELD_SEPARATOR + baseDN; |
| | | return new SimpleImmutableEntry<String, String>(key, value); |
| | | } |
| | | |
| | |
| | | { |
| | | final String key = GENERATION_ID_TAG + FIELD_SEPARATOR + baseDN.toIrreversibleReadableString(); |
| | | final String data = GENERATION_ID_TAG + FIELD_SEPARATOR + generationId |
| | | + FIELD_SEPARATOR + baseDN.toString(); |
| | | + FIELD_SEPARATOR + baseDN; |
| | | return new SimpleImmutableEntry<byte[], byte[]>(toBytes(key), toBytes(data)); |
| | | } |
| | | |
| | |
| | | { |
| | | final int serverId = offlineCSN.getServerId(); |
| | | final byte[] key = toReplicaOfflineKey(baseDN, serverId); |
| | | final byte[] data = toBytes(String.valueOf(offlineCSN.getTime()) + FIELD_SEPARATOR + serverId |
| | | + FIELD_SEPARATOR + baseDN.toString()); |
| | | final byte[] data = toBytes(offlineCSN.getTime() + FIELD_SEPARATOR + serverId |
| | | + FIELD_SEPARATOR + baseDN); |
| | | return new SimpleImmutableEntry<byte[], byte[]>(key, data); |
| | | } |
| | | |
| | |
| | | returnValue = SERVICE_CLEANUP_ERROR; |
| | | msg = ERR_WINDOWS_SERVICE_CLEANUP_ERROR.get(serviceName); |
| | | err.println(msg); |
| | | err.println("Exception:" + t.toString()); |
| | | err.println("Exception:" + t); |
| | | } |
| | | return returnValue; |
| | | } |
| | |
| | | for(EntryContainer ec : rc.getEntryContainers()) |
| | | { |
| | | builder.startRow(); |
| | | builder.appendCell("Base DN: " + ec.getBaseDN().toString()); |
| | | builder.appendCell("Base DN: " + ec.getBaseDN()); |
| | | count = appendDatabaseContainerRows(builder, ec, count); |
| | | } |
| | | } |
| | |
| | | { |
| | | LocalizableMessage message = ERR_WINDOWS_SERVICE_START_ERROR.get(); |
| | | err.println(message); |
| | | err.println("Exception:" + t.toString()); |
| | | err.println("Exception:" + t); |
| | | returnValue = SERVICE_START_ERROR; |
| | | } |
| | | } |
| | |
| | | { |
| | | LocalizableMessage message = ERR_WINDOWS_SERVICE_STOP_ERROR.get(); |
| | | err.println(message); |
| | | err.println("Exception:" + t.toString()); |
| | | err.println("Exception:" + t); |
| | | returnValue = SERVICE_STOP_ERROR; |
| | | } |
| | | } |
| | |
| | | |
| | | if (scheduleRecurring) { |
| | | taskID = information.getTaskId(); |
| | | if ((taskID == null) || taskID.length() == 0) { |
| | | taskID = information.getTaskClass().getSimpleName() + |
| | | "-" + UUID.randomUUID().toString(); |
| | | if (taskID == null || taskID.length() == 0) { |
| | | taskID = information.getTaskClass().getSimpleName() + "-" + UUID.randomUUID(); |
| | | } |
| | | } else { |
| | | // Use a formatted time/date for the ID so that is remotely useful |
| | |
| | | private void printAvailableDependencyTaskMessage() |
| | | { |
| | | StringBuilder sb = new StringBuilder(); |
| | | String separator = formatter.getLineBreak().toString() + |
| | | formatter.getTab().toString(); |
| | | String separator = formatter.getLineBreak().toString() + formatter.getTab(); |
| | | for (TaskEntry entry : taskEntries) |
| | | { |
| | | sb.append(separator); |
| | |
| | | |
| | | // The first line in the file will only contain the DN of the |
| | | // configuration entry for the associated backend. |
| | | writer.write(PROPERTY_BACKEND_CONFIG_DN + "=" + |
| | | configEntryDN.toString()); |
| | | writer.write(PROPERTY_BACKEND_CONFIG_DN + "=" + configEntryDN); |
| | | writer.newLine(); |
| | | writer.newLine(); |
| | | |
| | |
| | | File tempFile = new File(concatFilePath + ".tmp"); |
| | | BufferedWriter writer = |
| | | new BufferedWriter(new FileWriter(tempFile, false)); |
| | | writer.write("dn: " + DirectoryServer.getSchemaDN().toString()); |
| | | writer.write("dn: " + DirectoryServer.getSchemaDN()); |
| | | writer.newLine(); |
| | | writer.write("objectClass: top"); |
| | | writer.newLine(); |
| | |
| | | } |
| | | } catch (Exception e) |
| | | { |
| | | System.err.println(e.getMessage().toString()); |
| | | System.err.println(e.getMessage()); |
| | | System.exit(1); |
| | | } |
| | | System.exit(0); |