Search in sources :

Example 1 with LdapObjectClass

use of org.gluu.site.ldap.persistence.annotation.LdapObjectClass in project oxCore by GluuFederation.

the class AbstractEntryManager method getTypeObjectClasses.

protected String[] getTypeObjectClasses(Class<?> entryClass) {
    // Check if entry is LDAP Entry
    List<Annotation> entryAnnotations = ReflectHelper.getClassAnnotations(entryClass, LDAP_ENTRY_TYPE_ANNOTATIONS);
    // Get object classes
    Annotation ldapObjectClass = ReflectHelper.getAnnotationByType(entryAnnotations, LdapObjectClass.class);
    if (ldapObjectClass == null) {
        return EMPTY_STRING_ARRAY;
    }
    return ((LdapObjectClass) ldapObjectClass).values();
}
Also used : LdapObjectClass(org.gluu.site.ldap.persistence.annotation.LdapObjectClass) Annotation(java.lang.annotation.Annotation)

Example 2 with LdapObjectClass

use of org.gluu.site.ldap.persistence.annotation.LdapObjectClass in project oxCore by GluuFederation.

the class BaseEntryManager method getTypeObjectClasses.

protected String[] getTypeObjectClasses(Class<?> entryClass) {
    // Check if entry is LDAP Entry
    List<Annotation> entryAnnotations = ReflectHelper.getClassAnnotations(entryClass, LDAP_ENTRY_TYPE_ANNOTATIONS);
    // Get object classes
    Annotation ldapObjectClass = ReflectHelper.getAnnotationByType(entryAnnotations, LdapObjectClass.class);
    if (ldapObjectClass == null) {
        return EMPTY_STRING_ARRAY;
    }
    return ((LdapObjectClass) ldapObjectClass).values();
}
Also used : LdapObjectClass(org.gluu.site.ldap.persistence.annotation.LdapObjectClass) PropertyAnnotation(org.gluu.persist.model.PropertyAnnotation) Annotation(java.lang.annotation.Annotation)

Aggregations

Annotation (java.lang.annotation.Annotation)2 LdapObjectClass (org.gluu.site.ldap.persistence.annotation.LdapObjectClass)2 PropertyAnnotation (org.gluu.persist.model.PropertyAnnotation)1