| | |
| | | * |
| | | * |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013-2014 ForgeRock AS |
| | | * Portions Copyright 2013-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.tools; |
| | | |
| | |
| | | import static com.forgerock.opendj.cli.Utils.*; |
| | | |
| | | import static org.opends.messages.ToolMessages.*; |
| | | import static org.opends.server.backends.jeb.JebFormat.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | | /** |
| | |
| | | for(EntryContainer ec : rc.getEntryContainers()) |
| | | { |
| | | builder.startRow(); |
| | | builder.appendCell(ec.getBaseDN().toNormalizedString()); |
| | | builder.appendCell(ec.getBaseDN().toString()); |
| | | builder.appendCell(ec.getDatabasePrefix()); |
| | | builder.appendCell(ec.getEntryCount()); |
| | | count++; |
| | |
| | | if(ec == null) |
| | | { |
| | | printMessage(ERR_DBTEST_NO_ENTRY_CONTAINERS_FOR_BASE_DN.get( |
| | | base.toNormalizedString(), backend.getBackendID())); |
| | | base.toString(), backend.getBackendID())); |
| | | return 1; |
| | | } |
| | | |
| | |
| | | for(EntryContainer ec : rc.getEntryContainers()) |
| | | { |
| | | builder.startRow(); |
| | | builder.appendCell("Base DN: " + ec.getBaseDN().toNormalizedString()); |
| | | builder.appendCell("Base DN: " + ec.getBaseDN().toString()); |
| | | count = appendDatabaseContainerRows(builder, ec, count); |
| | | } |
| | | } |
| | |
| | | if(ec == null) |
| | | { |
| | | printMessage(ERR_DBTEST_NO_ENTRY_CONTAINERS_FOR_BASE_DN.get( |
| | | base.toNormalizedString(), backend.getBackendID())); |
| | | base.toString(), backend.getBackendID())); |
| | | return 1; |
| | | } |
| | | |
| | |
| | | if(ec == null) |
| | | { |
| | | printMessage(ERR_DBTEST_NO_ENTRY_CONTAINERS_FOR_BASE_DN.get( |
| | | base.toNormalizedString(), backend.getBackendID())); |
| | | base.toString(), backend.getBackendID())); |
| | | return 1; |
| | | } |
| | | |
| | |
| | | if(databaseContainer == null) |
| | | { |
| | | printMessage(ERR_DBTEST_NO_DATABASE_CONTAINERS_FOR_NAME.get( |
| | | databaseName.getValue(), base.toNormalizedString(), |
| | | databaseName.getValue(), base.toString(), |
| | | backend.getBackendID())); |
| | | return 1; |
| | | } |
| | |
| | | { |
| | | try |
| | | { |
| | | formatedKey = dnFromDNKey(key.getData(), ec.getBaseDN()).toNormalizedString(); |
| | | formatedKey = ByteString.valueOf(key.getData()).toHexString() + ec.getBaseDN(); |
| | | keyLabel = INFO_LABEL_DBTEST_ENTRY_DN.get(); |
| | | } |
| | | catch(Exception e) |
| | |
| | | || databaseContainer instanceof DN2URI) |
| | | { |
| | | // Encode the value as a DN |
| | | return StaticUtils.getBytes( |
| | | DN.valueOf(value).toNormalizedString()); |
| | | return DN.valueOf(value).toIrreversibleNormalizedByteString().toByteArray(); |
| | | } |
| | | else if(databaseContainer instanceof ID2Entry) |
| | | { |