Search in sources :

Example 11 with SchemaEntry

use of org.xdi.model.SchemaEntry in project oxCore by GluuFederation.

the class SchemaService method removeObjectClassWithDefinition.

private void removeObjectClassWithDefinition(String objectClassDefinition) {
    SchemaEntry schemaEntry = new SchemaEntry();
    schemaEntry.setDn(getDnForSchema());
    schemaEntry.addObjectClass(objectClassDefinition);
    log.debug("Removing objectClass: {}", schemaEntry);
    ldapEntryManager.remove(schemaEntry);
}
Also used : SchemaEntry(org.xdi.model.SchemaEntry)

Example 12 with SchemaEntry

use of org.xdi.model.SchemaEntry in project oxCore by GluuFederation.

the class SchemaService method removeObjectClass.

/**
 * Remove object class
 *
 * @param objectClass
 *            Object class name
 */
public void removeObjectClass(String objectClass) {
    SchemaEntry schema = getSchema();
    String objectClassDefinition = getObjectClassDefinition(schema, objectClass);
    if (objectClassDefinition != null) {
        removeObjectClassWithDefinition(objectClassDefinition);
    }
}
Also used : SchemaEntry(org.xdi.model.SchemaEntry)

Aggregations

SchemaEntry (org.xdi.model.SchemaEntry)12 AttributeTypeDefinition (com.unboundid.ldap.sdk.schema.AttributeTypeDefinition)3 ArrayList (java.util.ArrayList)3 InvalidSchemaUpdateException (org.xdi.util.exception.InvalidSchemaUpdateException)2 HashMap (java.util.HashMap)1 GluuCustomAttribute (org.gluu.oxtrust.model.GluuCustomAttribute)1 GluuSAMLTrustRelationship (org.gluu.oxtrust.model.GluuSAMLTrustRelationship)1 GluuAttribute (org.xdi.model.GluuAttribute)1