Search in sources :

Example 6 with BadRequestException

use of org.apache.syncope.ext.scimv2.api.BadRequestException in project syncope by apache.

the class SCIMDataBinder method toGroupTO.

public GroupTO toGroupTO(final SCIMGroup group) {
    if (!GROUP_SCHEMAS.equals(group.getSchemas())) {
        throw new BadRequestException(ErrorType.invalidValue);
    }
    GroupTO groupTO = new GroupTO();
    groupTO.setRealm(SyncopeConstants.ROOT_REALM);
    groupTO.setKey(group.getId());
    groupTO.setName(group.getDisplayName());
    return groupTO;
}
Also used : BadRequestException(org.apache.syncope.ext.scimv2.api.BadRequestException) GroupTO(org.apache.syncope.common.lib.to.GroupTO)

Aggregations

BadRequestException (org.apache.syncope.ext.scimv2.api.BadRequestException)6 GroupTO (org.apache.syncope.common.lib.to.GroupTO)4 UserTO (org.apache.syncope.common.lib.to.UserTO)3 OrderByClause (org.apache.syncope.core.persistence.api.dao.search.OrderByClause)3 Arrays (java.util.Arrays)2 Collections (java.util.Collections)2 Set (java.util.Set)2 ResponseBuilder (javax.ws.rs.core.Response.ResponseBuilder)2 StringUtils (org.apache.commons.lang3.StringUtils)2 SyncopeConstants (org.apache.syncope.common.lib.SyncopeConstants)2 AnyDAO (org.apache.syncope.core.persistence.api.dao.AnyDAO)2 MembershipCond (org.apache.syncope.core.persistence.api.dao.search.MembershipCond)2 SearchCond (org.apache.syncope.core.persistence.api.dao.search.SearchCond)2 ListResponse (org.apache.syncope.ext.scimv2.api.data.ListResponse)2 Member (org.apache.syncope.ext.scimv2.api.data.Member)2 SCIMGroup (org.apache.syncope.ext.scimv2.api.data.SCIMGroup)2 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 HashSet (java.util.HashSet)1 List (java.util.List)1