| | |
| | | |
| | | |
| | | import static org.forgerock.opendj.ldap.CoreMessages.*; |
| | | import static org.forgerock.opendj.ldap.ErrorResultException.newErrorResult; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.Collections; |
| | |
| | | import org.forgerock.opendj.ldap.*; |
| | | import org.forgerock.opendj.ldap.requests.Requests; |
| | | import org.forgerock.opendj.ldap.requests.SearchRequest; |
| | | import org.forgerock.opendj.ldap.responses.Responses; |
| | | import org.forgerock.opendj.ldap.responses.Result; |
| | | import org.forgerock.opendj.ldap.responses.SearchResultEntry; |
| | | |
| | | import com.forgerock.opendj.util.FutureResultTransformer; |
| | |
| | | if (subentryAttr == null || subentryAttr.isEmpty()) |
| | | { |
| | | // Did not get the subschema sub-entry attribute. |
| | | final Result result = Responses.newResult( |
| | | ResultCode.CLIENT_SIDE_NO_RESULTS_RETURNED).setDiagnosticMessage( |
| | | ERR_NO_SUBSCHEMA_SUBENTRY_ATTR.get(name.toString()).toString()); |
| | | throw ErrorResultException.wrap(result); |
| | | throw newErrorResult( |
| | | ResultCode.CLIENT_SIDE_NO_RESULTS_RETURNED, |
| | | ERR_NO_SUBSCHEMA_SUBENTRY_ATTR.get(name.toString()) |
| | | .toString()); |
| | | } |
| | | |
| | | final String dnString = subentryAttr.iterator().next().toString(); |
| | |
| | | } |
| | | catch (final LocalizedIllegalArgumentException e) |
| | | { |
| | | final Result result = Responses.newResult( |
| | | ResultCode.CLIENT_SIDE_NO_RESULTS_RETURNED).setDiagnosticMessage( |
| | | ERR_INVALID_SUBSCHEMA_SUBENTRY_ATTR.get(name.toString(), dnString, |
| | | e.getMessageObject()).toString()); |
| | | throw ErrorResultException.wrap(result); |
| | | throw newErrorResult( |
| | | ResultCode.CLIENT_SIDE_NO_RESULTS_RETURNED, |
| | | ERR_INVALID_SUBSCHEMA_SUBENTRY_ATTR.get(name.toString(), |
| | | dnString, e.getMessageObject()).toString()); |
| | | } |
| | | return subschemaDN; |
| | | } |