| | |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.forgerock.opendj.config.ConfigurationFramework; |
| | | import org.forgerock.opendj.config.server.ConfigException; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.forgerock.opendj.ldap.schema.AttributeType; |
| | | import org.forgerock.opendj.ldap.schema.MatchingRule; |
| | | import org.forgerock.opendj.ldap.schema.Syntax; |
| | | import org.opends.guitools.controlpanel.ControlPanel; |
| | |
| | | import org.opends.server.admin.ClassLoaderProvider; |
| | | import org.opends.server.api.ConfigHandler; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.LockFileManager; |
| | | import org.opends.server.schema.SchemaConstants; |
| | | import org.opends.server.schema.SomeSchemaElement; |
| | | import org.forgerock.opendj.ldap.schema.AttributeType; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.OpenDsException; |
| | | import org.opends.server.types.RDN; |
| | | import org.opends.server.types.Schema; |
| | | import org.opends.server.util.ServerConstants; |
| | | import org.opends.server.util.StaticUtils; |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Gets the RDN string for a given attribute name and value. |
| | | * @param attrName the attribute name. |
| | | * @param attrValue the attribute value. |
| | | * @return the RDN string for the attribute name and value. |
| | | */ |
| | | public static String getRDNString(String attrName, String attrValue) |
| | | { |
| | | AttributeType attrType = DirectoryServer.getAttributeType(attrName); |
| | | RDN rdn = new RDN(attrType, attrName, ByteString.valueOfUtf8(attrValue)); |
| | | return rdn.toString(); |
| | | } |
| | | |
| | | /** |
| | | * Returns the attribute name with no options (or subtypes). |
| | | * @param attrName the complete attribute name. |
| | | * @return the attribute name with no options (or subtypes). |
| | | */ |
| | | |
| | | public static String getAttributeNameWithoutOptions(String attrName) |
| | | { |
| | | int index = attrName.indexOf(";"); |