@Test public void getMissedObjectClasses() { assertList(LdapUtils.getMissedObjectClasses(null, null, new String[] { "class" }), (String[]) null); assertList(LdapUtils.getMissedObjectClasses(null, "person", new String[] { "class" }), "person"); assertList(LdapUtils.getMissedObjectClasses(new String[] { "inetOrgPerson" }, "person", new String[] { "class" }), "person", "inetOrgPerson"); assertList(LdapUtils.getMissedObjectClasses(new String[] { "inetOrgPerson", "posixAccount" }, "person", new String[] { "class" }), "person", "inetOrgPerson", "posixAccount"); assertList(LdapUtils.getMissedObjectClasses(new String[] { "inetOrgPerson", "posixAccount" }, null, new String[] { "class" }), "inetOrgPerson", "posixAccount"); assertList(LdapUtils.getMissedObjectClasses(new String[] { "inetOrgPerson", "posixAccount" }, "person", null), "person", "inetOrgPerson", "posixAccount"); assertList(LdapUtils.getMissedObjectClasses(new String[] { "inetOrgPerson", "posixAccount" }, "person", new String[] { "person" }), "inetOrgPerson", "posixAccount"); assertList( LdapUtils.getMissedObjectClasses(new String[] { "inetOrgPerson", "posixAccount" }, "person", new String[] { "person", "inetOrgPerson" }), "posixAccount"); }
public static List<String> getMissedObjectClasses(final String[] expectedAdditionalObjectClasses, final String expectedObjectClass, final String[] objectClasses) { List<String> list = null; if (expectedObjectClass != null && (objectClasses == null || !StringHelper.isIn(expectedObjectClass, objectClasses))) { list = addEntry(list, expectedObjectClass); } if (expectedAdditionalObjectClasses != null) { for (final String objectClass : expectedAdditionalObjectClasses) { if (objectClasses == null || !StringHelper.isIn(objectClass, objectClasses)) { list = addEntry(list, objectClass); } } } return list; }
LdapUtils { public static List<String> getMissedObjectClasses(final String[] expectedAdditionalObjectClasses, final String expectedObjectClass, final String[] objectClasses) { List<String> list = null; if (expectedObjectClass != null && (objectClasses == null || !StringHelper.isIn(expectedObjectClass, objectClasses))) { list = addEntry(list, expectedObjectClass); } if (expectedAdditionalObjectClasses != null) { for (final String objectClass : expectedAdditionalObjectClasses) { if (objectClasses == null || !StringHelper.isIn(objectClass, objectClasses)) { list = addEntry(list, objectClass); } } } return list; } }
LdapUtils { public static List<String> getMissedObjectClasses(final String[] expectedAdditionalObjectClasses, final String expectedObjectClass, final String[] objectClasses) { List<String> list = null; if (expectedObjectClass != null && (objectClasses == null || !StringHelper.isIn(expectedObjectClass, objectClasses))) { list = addEntry(list, expectedObjectClass); } if (expectedAdditionalObjectClasses != null) { for (final String objectClass : expectedAdditionalObjectClasses) { if (objectClasses == null || !StringHelper.isIn(objectClass, objectClasses)) { list = addEntry(list, objectClass); } } } return list; }  }
LdapUtils { public static List<String> getMissedObjectClasses(final String[] expectedAdditionalObjectClasses, final String expectedObjectClass, final String[] objectClasses) { List<String> list = null; if (expectedObjectClass != null && (objectClasses == null || !StringHelper.isIn(expectedObjectClass, objectClasses))) { list = addEntry(list, expectedObjectClass); } if (expectedAdditionalObjectClasses != null) { for (final String objectClass : expectedAdditionalObjectClasses) { if (objectClasses == null || !StringHelper.isIn(objectClass, objectClasses)) { list = addEntry(list, objectClass); } } } return list; }  static String escapeCommonName(final String name); static String getOu(final String... organizationalUnits); static String getOu(final String ou, final String[] organizationalUnits); static void buildOu(final StringBuffer buf, final String ou, final String[] organizationalUnits); static void buildOu(final StringBuffer buf, final String... organizationalUnits); static void appendOu(final StringBuffer buf, final String... organizationalUnits); static String getOrganizationalUnit(final String dn); static String getOrganizationalUnit(final String dn, final String ouBase); static Object getAttributeValue(final Attributes attributes, final String attrId); static String getAttributeStringValue(final Attributes attributes, final String attrId); static String[] getAttributeStringValues(final Attributes attributes, final String attrId); static Integer getAttributeIntegerValue(final Attributes attributes, final String attrId); static Attribute putAttribute(final Attributes attributes, final String attrId, final String attrValue); static String splitMultipleAttribute(final String attrId, final String value); static List<String> getMissedObjectClasses(final String[] expectedAdditionalObjectClasses, final String expectedObjectClass,
      final String[] objectClasses); }
LdapUtils { public static List<String> getMissedObjectClasses(final String[] expectedAdditionalObjectClasses, final String expectedObjectClass, final String[] objectClasses) { List<String> list = null; if (expectedObjectClass != null && (objectClasses == null || !StringHelper.isIn(expectedObjectClass, objectClasses))) { list = addEntry(list, expectedObjectClass); } if (expectedAdditionalObjectClasses != null) { for (final String objectClass : expectedAdditionalObjectClasses) { if (objectClasses == null || !StringHelper.isIn(objectClass, objectClasses)) { list = addEntry(list, objectClass); } } } return list; }  static String escapeCommonName(final String name); static String getOu(final String... organizationalUnits); static String getOu(final String ou, final String[] organizationalUnits); static void buildOu(final StringBuffer buf, final String ou, final String[] organizationalUnits); static void buildOu(final StringBuffer buf, final String... organizationalUnits); static void appendOu(final StringBuffer buf, final String... organizationalUnits); static String getOrganizationalUnit(final String dn); static String getOrganizationalUnit(final String dn, final String ouBase); static Object getAttributeValue(final Attributes attributes, final String attrId); static String getAttributeStringValue(final Attributes attributes, final String attrId); static String[] getAttributeStringValues(final Attributes attributes, final String attrId); static Integer getAttributeIntegerValue(final Attributes attributes, final String attrId); static Attribute putAttribute(final Attributes attributes, final String attrId, final String attrValue); static String splitMultipleAttribute(final String attrId, final String value); static List<String> getMissedObjectClasses(final String[] expectedAdditionalObjectClasses, final String expectedObjectClass,
      final String[] objectClasses);  }