| | |
| | | import org.opends.guitools.controlpanel.util.BackgroundTask; |
| | | import org.opends.guitools.controlpanel.util.LDAPEntryReader; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.server.util.Base64; |
| | | import org.opends.server.util.LDIFException; |
| | | |
| | | /** The panel used to duplicate an entry. */ |
| | |
| | | sb.append("\n"); |
| | | if (isBinary(attrName)) |
| | | { |
| | | final String base64 = Base64.encode(value.toByteArray()); |
| | | sb.append(attrName).append(":: ").append(base64); |
| | | sb.append(attrName).append(":: ").append(value.toBase64String()); |
| | | } |
| | | else |
| | | { |
| | |
| | | import org.opends.server.types.LDIFImportConfig; |
| | | import org.opends.server.types.OpenDsException; |
| | | import org.opends.server.types.Schema; |
| | | import org.opends.server.util.Base64; |
| | | import org.opends.server.util.LDIFReader; |
| | | |
| | | /** The panel displaying a simplified view of an entry. */ |
| | |
| | | |
| | | private String getPasswordStringValue(String attrName, ByteString v) |
| | | { |
| | | if (isBinary(attrName)) |
| | | { |
| | | return Base64.encode(v.toByteArray()); |
| | | } |
| | | else |
| | | { |
| | | return v.toString(); |
| | | } |
| | | return isBinary(attrName) ? v.toBase64String() : v.toString(); |
| | | } |
| | | |
| | | private void updatePanel(ObjectClassValue newValue) |
| | |
| | | ByteString v = (ByteString) value; |
| | | if (v.length() > 0) |
| | | { |
| | | appendBase64(sb, attrName, Base64.encode(v.toByteArray())); |
| | | appendBase64(sb, attrName, v.toBase64String()); |
| | | } |
| | | } |
| | | else if (value instanceof byte[]) |