Commit da3cb5cf authored by Tuuli Veini's avatar Tuuli Veini

Changed all SCIM dependencies to UnboundID SCIM2 SDK; removed broken endpoints...

Changed all SCIM dependencies to UnboundID SCIM2 SDK; removed broken endpoints and attribute trimming
parent 3755738e
Pipeline #173997078 passed with stage
in 8 minutes and 43 seconds
package fi.jyu.vasara.scim.controller;
import com.bettercloud.scim2.common.GenericScimResource;
import com.bettercloud.scim2.common.exceptions.BadRequestException;
import com.bettercloud.scim2.common.exceptions.ResourceNotFoundException;
import com.bettercloud.scim2.common.exceptions.ScimException;
import com.bettercloud.scim2.common.filters.Filter;
import com.bettercloud.scim2.common.messages.ListResponse;
import com.bettercloud.scim2.common.messages.PatchRequest;
import com.bettercloud.scim2.common.utils.ApiConstants;
import com.bettercloud.scim2.common.utils.Parser;
import com.bettercloud.scim2.server.ResourcePreparer;
import com.bettercloud.scim2.server.ResourceTypeDefinition;
import com.bettercloud.scim2.server.annotation.ScimResource;
import com.bettercloud.scim2.server.evaluator.SchemaAwareFilterEvaluator;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ArrayNode;
import com.fasterxml.jackson.databind.node.ObjectNode;
import com.unboundid.scim2.common.GenericScimResource;
import com.unboundid.scim2.common.exceptions.BadRequestException;
import com.unboundid.scim2.common.exceptions.ResourceNotFoundException;
import com.unboundid.scim2.common.exceptions.ScimException;
import com.unboundid.scim2.common.filters.Filter;
import com.unboundid.scim2.common.messages.ListResponse;
import com.unboundid.scim2.common.messages.PatchRequest;
import com.unboundid.scim2.common.types.GroupResource;
import com.unboundid.scim2.common.types.Member;
import com.unboundid.scim2.common.utils.ApiConstants;
import com.unboundid.scim2.common.utils.Parser;
import com.unboundid.scim2.server.annotations.ResourceType;
import com.unboundid.scim2.server.utils.ResourceTypeDefinition;
import com.unboundid.scim2.server.utils.SchemaAwareFilterEvaluator;
import fi.jyu.vasara.scim.entity.ScimGroupEntity;
import fi.jyu.vasara.scim.ScimSessionFactory;
import org.camunda.bpm.engine.IdentityService;
......@@ -34,6 +33,7 @@ import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import javax.inject.Inject;
import javax.ws.rs.Path;
import java.net.URI;
import java.net.URISyntaxException;
......@@ -41,10 +41,14 @@ import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import static com.bettercloud.scim2.common.utils.ApiConstants.MEDIA_TYPE_SCIM;
import static com.unboundid.scim2.common.utils.ApiConstants.MEDIA_TYPE_SCIM;
/**
* End point to access Group resources.
*/
@RestController
@ScimResource(description = "Access Group Resources", name = "Group", schema = ScimGroupEntity.class)
@ResourceType(description = "Access Group Resources", name = "Group", schema = GroupResource.class)
@Path("/scim/Groups")
@RequestMapping("/scim/Groups")
public class ScimGroupController {
......@@ -57,22 +61,19 @@ public class ScimGroupController {
@Value("${scim2.baseUrl}")
private String baseUri;
private static final ResourceTypeDefinition RESOURCE_TYPE_DEFINITION =
ResourceTypeDefinition.fromJaxRsResource(ScimGroupController.class);
/**
* Retrieve all groups with HTTP GET
* @param filterString filter (optional)
* @param attributes included attributes (optional)
* @param excludedAttributes excluded attributes (optional)
* @return all groups that match query parameters
* @throws ScimException if filtering fails or requested attributes are invalid
* @throws ScimException if filtering fails
* @throws URISyntaxException if URI is invalid
*/
@GetMapping(produces = {MEDIA_TYPE_SCIM, MediaType.APPLICATION_JSON_VALUE})
public ListResponse<ScimGroupEntity> retrieveAll(@RequestParam(value = ApiConstants.QUERY_PARAMETER_FILTER, required = false)
final String filterString,
@RequestParam(value = ApiConstants.QUERY_PARAMETER_ATTRIBUTES, required = false)
final String attributes,
@RequestParam(value = ApiConstants.QUERY_PARAMETER_EXCLUDED_ATTRIBUTES, required = false)
final String excludedAttributes) throws ScimException, URISyntaxException {
final String filterString) throws ScimException, URISyntaxException {
ScimSessionFactory scimSessionFactory = new ScimSessionFactory();
scimSessionFactory.initFromProcessEngineConfiguration(((ProcessEngineConfigurationImpl) processEngineConfiguration), "mappings.xml");
List<ScimGroupEntity> scimGroups = scimSessionFactory.getCommandExecutorTxRequired().execute(new Command<List<ScimGroupEntity>>() {
......@@ -87,7 +88,6 @@ public class ScimGroupController {
}
if (filterString != null) scimGroups = filter(scimGroups, filterString);
if (attributes != null || excludedAttributes != null) scimGroups = trimAll(scimGroups, attributes, excludedAttributes);
return new ListResponse<>(scimGroups.size(), scimGroups, 1, 20);
}
......@@ -95,27 +95,14 @@ public class ScimGroupController {
/**
* Retrieve group with HTTP GET
* @param groupId id of retrieved group
* @param attributes shown attributes (optional)
* @param excludedAttributes hidden attributes (optional)
* @return group
* @throws ResourceNotFoundException if no group with given id exists
* @throws URISyntaxException if URI is invalid
* @throws BadRequestException if request has invalid attributes
*/
@GetMapping(value = "/{id}", produces = {MEDIA_TYPE_SCIM, MediaType.APPLICATION_JSON_VALUE})
public ScimGroupEntity retrieve(@PathVariable("id") String groupId,
@RequestParam(value = ApiConstants.QUERY_PARAMETER_ATTRIBUTES, required = false)
final String attributes,
@RequestParam(value = ApiConstants.QUERY_PARAMETER_EXCLUDED_ATTRIBUTES, required = false)
final String excludedAttributes) throws ResourceNotFoundException, URISyntaxException, BadRequestException {
public ScimGroupEntity retrieve(@PathVariable("id") String groupId) throws ResourceNotFoundException, URISyntaxException {
ScimGroupEntity group = getGroup(groupId);
if (attributes != null || excludedAttributes != null) {
final ResourcePreparer<GenericScimResource> resourcePreparer =
new ResourcePreparer<>(ResourceTypeDefinition.fromScimResource(this.getClass()), attributes, excludedAttributes, new URI(baseUri));
group = trimAttributes(group, resourcePreparer);
}
return group;
}
......@@ -276,8 +263,7 @@ public class ScimGroupController {
*/
public List<ScimGroupEntity> filter(List<ScimGroupEntity> groups, String filterString) throws ScimException {
Filter filter = Parser.parseFilter(filterString);
ResourceTypeDefinition resourceDefinition = ResourceTypeDefinition.fromScimResource(this.getClass());
SchemaAwareFilterEvaluator filterEvaluator = new SchemaAwareFilterEvaluator(resourceDefinition);
SchemaAwareFilterEvaluator filterEvaluator = new SchemaAwareFilterEvaluator(RESOURCE_TYPE_DEFINITION);
List<ScimGroupEntity> foundGroups = new ArrayList<>();
for (ScimGroupEntity groupEntity : groups) {
......@@ -288,46 +274,6 @@ public class ScimGroupController {
return foundGroups;
}
/**
* Trim group's attributes based on query parameters
* @param group group
* @param resourcePreparer resourcepreparer containing information about resourcetype and attributes
* @return trimmed group
* @throws URISyntaxException if URI for any member is invalid
*/
public ScimGroupEntity trimAttributes(ScimGroupEntity group,
ResourcePreparer<GenericScimResource> resourcePreparer) throws URISyntaxException {
GenericScimResource genericGroup = toGenericResource(group);
genericGroup = resourcePreparer.trimRetrievedResource(genericGroup);
group = toGroupEntity(group, genericGroup);
return group;
}
/**
* Trim attributes of all groups based on query parameters
* @param groups list of groups
* @param attributes shown attributes
* @param excludedAttributes hidden attributes
* @return list of trimmed groups
* @throws BadRequestException if request has invalid attributes
* @throws URISyntaxException if URI is invalid
*/
public List<ScimGroupEntity> trimAll(List<ScimGroupEntity> groups,
String attributes,
String excludedAttributes) throws BadRequestException, URISyntaxException {
List<ScimGroupEntity> trimmedGroups = new ArrayList<>();
final ResourcePreparer<GenericScimResource> resourcePreparer =
new ResourcePreparer<>(ResourceTypeDefinition.fromScimResource(this.getClass()), attributes, excludedAttributes, new URI(baseUri));
for (ScimGroupEntity groupEntity : groups) {
groupEntity = trimAttributes(groupEntity, resourcePreparer);
trimmedGroups.add(groupEntity);
}
return trimmedGroups;
}
/**
* Update group's information in database
* @param group updated group
......
package fi.jyu.vasara.scim.controller;
import com.bettercloud.scim2.common.GenericScimResource;
import com.bettercloud.scim2.common.exceptions.ForbiddenException;
import com.bettercloud.scim2.common.utils.ApiConstants;
import com.bettercloud.scim2.server.annotation.ScimResource;
import com.bettercloud.scim2.common.exceptions.ResourceNotFoundException;
import com.bettercloud.scim2.common.exceptions.ScimException;
import com.bettercloud.scim2.common.messages.ListResponse;
import com.bettercloud.scim2.common.types.ResourceTypeResource;
import com.bettercloud.scim2.server.ResourceTypeDefinition;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import java.util.*;
import static com.bettercloud.scim2.common.utils.ApiConstants.MEDIA_TYPE_SCIM;
@ScimResource(description = "SCIM 2.0 Resource Type", name = "ResourceType",
schema = ResourceTypeResource.class, discoverable = false)
@RestController
@RequestMapping("/scim/ResourceTypes")
public class ScimResourceTypesController {
@Autowired
private Set<ResourceTypeDefinition> resourceDefinitions;
@GetMapping(produces = {MEDIA_TYPE_SCIM, MediaType.APPLICATION_JSON_VALUE})
public ListResponse<GenericScimResource> retrieveAll(@RequestParam(value = ApiConstants.QUERY_PARAMETER_FILTER, required = false)
final String filterString) throws ScimException {
if (filterString != null) {
throw new ForbiddenException("Filtering not allowed");
}
Collection<GenericScimResource> resources = new ArrayList<>();
for (ResourceTypeDefinition definition : resourceDefinitions) {
if (definition.isDiscoverable()) {
resources.add(definition.toScimResource().asGenericScimResource());
}
}
return new ListResponse<>(resources);
}
@GetMapping(value = "/{id}", produces = {MEDIA_TYPE_SCIM, MediaType.APPLICATION_JSON_VALUE})
public GenericScimResource retrieve(@PathVariable("id") String id) throws ScimException {
ResourceTypeDefinition resourceTypeDefinition = null;
for (ResourceTypeDefinition definition : resourceDefinitions) {
if (definition.getName().equals(id)) {
resourceTypeDefinition = definition;
break;
}
}
if (resourceTypeDefinition == null) throw new ResourceNotFoundException(id);
ResourceTypeResource scimResource = resourceTypeDefinition.toScimResource();
return scimResource.asGenericScimResource();
}
}
package fi.jyu.vasara.scim.controller;
import com.bettercloud.scim2.common.GenericScimResource;
import com.bettercloud.scim2.common.exceptions.ForbiddenException;
import com.bettercloud.scim2.common.exceptions.ResourceNotFoundException;
import com.bettercloud.scim2.common.exceptions.ScimException;
import com.bettercloud.scim2.common.messages.ListResponse;
import com.bettercloud.scim2.common.types.SchemaResource;
import com.bettercloud.scim2.common.utils.ApiConstants;
import com.bettercloud.scim2.server.ResourceTypeDefinition;
import com.bettercloud.scim2.server.annotation.ScimResource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import java.util.*;
import java.util.stream.Collectors;
import static com.bettercloud.scim2.common.utils.ApiConstants.MEDIA_TYPE_SCIM;
@ScimResource(description = "SCIM 2.0 Schema", name = "Schema", schema = SchemaResource.class, discoverable = false)
@RestController
@RequestMapping("/scim/Schemas")
public class ScimSchemasController {
@Autowired
private Set<ResourceTypeDefinition> resourceDefinitions;
@GetMapping(produces = {MEDIA_TYPE_SCIM, MediaType.APPLICATION_JSON_VALUE})
public ListResponse<GenericScimResource> retrieveAll(@RequestParam(value = ApiConstants.QUERY_PARAMETER_FILTER, required = false)
final String filterString) throws ScimException {
if (filterString != null) {
throw new ForbiddenException("Filtering not allowed");
}
Set<SchemaResource> schemas = new HashSet<>();
for (ResourceTypeDefinition definition : resourceDefinitions) {
if (definition.isDiscoverable() && definition.getCoreSchema() != null) {
schemas.add(definition.getCoreSchema());
for (SchemaResource schemaExtension : definition.getSchemaExtensions().keySet()) {
schemas.add(schemaExtension);
}
}
}
List<GenericScimResource> schemaList = schemas.stream()
.map(SchemaResource::asGenericScimResource).collect(Collectors.toList());
return new ListResponse<>(schemaList);
}
@GetMapping(value = "/{id}", produces = {MEDIA_TYPE_SCIM, MediaType.APPLICATION_JSON_VALUE})
public GenericScimResource retrieve(@PathVariable("id") String id) throws ResourceNotFoundException {
SchemaResource schema = null;
for (ResourceTypeDefinition definition : resourceDefinitions) {
if (definition.getCoreSchema().getId().equals(id)) {
schema = definition.getCoreSchema();
break;
}
}
if (schema == null) throw new ResourceNotFoundException(id);
return schema.asGenericScimResource();
}
}
package fi.jyu.vasara.scim.controller;
import com.bettercloud.scim2.common.types.*;
import com.bettercloud.scim2.server.annotation.ScimResource;
import com.unboundid.scim2.common.types.*;
import com.unboundid.scim2.server.annotations.ResourceType;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
......@@ -12,12 +12,9 @@ import java.net.URI;
import java.util.ArrayList;
import java.util.List;
import static com.bettercloud.scim2.common.utils.ApiConstants.MEDIA_TYPE_SCIM;
import static com.unboundid.scim2.common.utils.ApiConstants.MEDIA_TYPE_SCIM;
@ScimResource(description = "SCIM 2.0 Service Provider Config",
name = "ServiceProviderConfig",
schema = ServiceProviderConfigResource.class,
discoverable = false)
@ResourceType(description = "SCIM 2.0 Service Provider Config", name = "ServiceProviderConfig", schema = ServiceProviderConfigResource.class, discoverable = false)
@RestController
@RequestMapping("/scim/ServiceProviderConfig")
public class ScimServiceProviderConfigController {
......
package fi.jyu.vasara.scim.controller;
import com.bettercloud.scim2.common.GenericScimResource;
import com.bettercloud.scim2.common.exceptions.BadRequestException;
import com.bettercloud.scim2.common.exceptions.ResourceNotFoundException;
import com.bettercloud.scim2.common.exceptions.ScimException;
import com.bettercloud.scim2.common.messages.ListResponse;
import com.bettercloud.scim2.common.messages.PatchRequest;
import com.bettercloud.scim2.common.types.*;
import com.bettercloud.scim2.common.utils.ApiConstants;
import com.bettercloud.scim2.common.utils.Parser;
import com.bettercloud.scim2.server.ResourcePreparer;
import com.bettercloud.scim2.server.annotation.ScimResource;
import com.bettercloud.scim2.common.filters.Filter;
import com.bettercloud.scim2.server.ResourceTypeDefinition;
import com.bettercloud.scim2.server.evaluator.SchemaAwareFilterEvaluator;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.node.ObjectNode;
import com.unboundid.scim2.common.GenericScimResource;
import com.unboundid.scim2.common.exceptions.BadRequestException;
import com.unboundid.scim2.common.exceptions.ResourceNotFoundException;
import com.unboundid.scim2.common.exceptions.ScimException;
import com.unboundid.scim2.common.filters.Filter;
import com.unboundid.scim2.common.messages.ListResponse;
import com.unboundid.scim2.common.messages.PatchRequest;
import com.unboundid.scim2.common.types.*;
import com.unboundid.scim2.common.utils.ApiConstants;
import com.unboundid.scim2.common.utils.Parser;
import com.unboundid.scim2.server.annotations.ResourceType;
import com.unboundid.scim2.server.utils.ResourceTypeDefinition;
import com.unboundid.scim2.server.utils.SchemaAwareFilterEvaluator;
import fi.jyu.vasara.scim.ScimSessionFactory;
import fi.jyu.vasara.scim.entity.ScimUserEntity;
import org.camunda.bpm.engine.IdentityService;
......@@ -31,14 +30,19 @@ import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import javax.inject.Inject;
import javax.ws.rs.Path;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.*;
import static com.bettercloud.scim2.common.utils.ApiConstants.MEDIA_TYPE_SCIM;
import static com.unboundid.scim2.common.utils.ApiConstants.MEDIA_TYPE_SCIM;
/**
* End point to access User resources.
*/
@RestController
@ScimResource(description = "Access User Resources", name = "User", schema = UserResource.class, optionalSchemaExtensions = EnterpriseUserExtension.class)
@ResourceType(description = "Access User Resources", name = "User", schema = UserResource.class, optionalSchemaExtensions = EnterpriseUserExtension.class)
@Path("/scim/Users")
@RequestMapping("/scim/Users")
public class ScimUserController {
......@@ -51,22 +55,19 @@ public class ScimUserController {
@Value("${scim2.baseUrl}")
private String baseUri;
private static final ResourceTypeDefinition RESOURCE_TYPE_DEFINITION =
ResourceTypeDefinition.fromJaxRsResource(ScimGroupController.class);
/**
* Retrieve all users with HTTP GET
* @param filterString filter (optional)
* @param attributes shown attributes (optional)
* @param excludedAttributes hidden attributes (optional)
* @return all users that match query parameters
* @throws ScimException if filtering fails or requested attributes are invalid
* @throws ScimException if filtering fails
* @throws URISyntaxException if URI is invalid
*/
@GetMapping(produces = {MEDIA_TYPE_SCIM, MediaType.APPLICATION_JSON_VALUE})
public ListResponse<ScimUserEntity> retrieveAll(@RequestParam(value = ApiConstants.QUERY_PARAMETER_FILTER, required = false)
final String filterString,
@RequestParam(value = ApiConstants.QUERY_PARAMETER_ATTRIBUTES, required = false)
final String attributes,
@RequestParam(value = ApiConstants.QUERY_PARAMETER_EXCLUDED_ATTRIBUTES, required = false)
final String excludedAttributes) throws ScimException, URISyntaxException {
final String filterString) throws ScimException, URISyntaxException {
ScimSessionFactory scimSessionFactory = new ScimSessionFactory();
scimSessionFactory.initFromProcessEngineConfiguration(((ProcessEngineConfigurationImpl) processEngineConfiguration), "mappings.xml");
List<ScimUserEntity> scimUsers = scimSessionFactory.getCommandExecutorTxRequired().execute(new Command<List<ScimUserEntity>>() {
......@@ -81,7 +82,6 @@ public class ScimUserController {
}
if (filterString != null) scimUsers = filter(scimUsers, filterString);
if (attributes != null || excludedAttributes != null) scimUsers = trimAll(scimUsers, attributes, excludedAttributes);
return new ListResponse<>(scimUsers.size(), scimUsers, 1, 20);
}
......@@ -89,27 +89,14 @@ public class ScimUserController {
/**
* Retrieve user with HTTP GET
* @param userId id of retrieved user
* @param attributes shown attributes (optional)
* @param excludedAttributes hidden attributes (optional)
* @return user
* @throws ResourceNotFoundException if no user with given id exists
* @throws URISyntaxException if URI is invalid
* @throws BadRequestException if request has invalid attributes
*/
@GetMapping(value = "/{id}", produces = {MEDIA_TYPE_SCIM, MediaType.APPLICATION_JSON_VALUE})
public ScimUserEntity retrieve(@PathVariable("id") String userId,
@RequestParam(value = ApiConstants.QUERY_PARAMETER_ATTRIBUTES, required = false)
final String attributes,
@RequestParam(value = ApiConstants.QUERY_PARAMETER_EXCLUDED_ATTRIBUTES, required = false)
final String excludedAttributes) throws ResourceNotFoundException, URISyntaxException, BadRequestException {
public ScimUserEntity retrieve(@PathVariable("id") String userId) throws ResourceNotFoundException, URISyntaxException {
ScimUserEntity scimUser = getUser(userId);
if (attributes != null || excludedAttributes != null) {
final ResourcePreparer<GenericScimResource> resourcePreparer =
new ResourcePreparer<>(ResourceTypeDefinition.fromScimResource(this.getClass()), attributes, excludedAttributes, new URI(baseUri));
scimUser = trimAttributes(scimUser, resourcePreparer);
}
return scimUser;
}
......@@ -285,8 +272,7 @@ public class ScimUserController {
*/
public List<ScimUserEntity> filter(List<ScimUserEntity> users, String filterString) throws ScimException {
Filter filter = Parser.parseFilter(filterString);
ResourceTypeDefinition resourceDefinition = ResourceTypeDefinition.fromScimResource(this.getClass());
SchemaAwareFilterEvaluator filterEvaluator = new SchemaAwareFilterEvaluator(resourceDefinition);
SchemaAwareFilterEvaluator filterEvaluator = new SchemaAwareFilterEvaluator(RESOURCE_TYPE_DEFINITION);
List<ScimUserEntity> foundUsers = new ArrayList<>();
for (ScimUserEntity userEntity : users) {
......@@ -297,46 +283,6 @@ public class ScimUserController {
return foundUsers;
}
/**
* Trim user's attributes based on query parameters
* @param user trimmed user
* @param resourcePreparer resourcepreparer containing information about resourcetype and attributes
* @return trimmed user
* @throws URISyntaxException if URI for any group is invalid
*/
public ScimUserEntity trimAttributes(ScimUserEntity user,
ResourcePreparer<GenericScimResource> resourcePreparer) throws URISyntaxException {
GenericScimResource genericUser = toUserResource(user).asGenericScimResource();
genericUser = resourcePreparer.trimRetrievedResource(genericUser);
user = toUserEntity(user, genericUser);
return user;
}
/**
* Trim attributes of all users based on query parameters
* @param users list of users
* @param attributes included attributes
* @param excludedAttributes excluded attributes
* @return list of users with trimmed attributes
* @throws BadRequestException if request has invalid attributes
* @throws URISyntaxException if URI is invalid
*/
public List<ScimUserEntity> trimAll(List<ScimUserEntity> users,
String attributes,
String excludedAttributes) throws BadRequestException, URISyntaxException {
List<ScimUserEntity> trimmedUsers = new ArrayList<>();
final ResourcePreparer<GenericScimResource> resourcePreparer =
new ResourcePreparer<>(ResourceTypeDefinition.fromScimResource(this.getClass()), attributes, excludedAttributes, new URI(baseUri));
for (ScimUserEntity userEntity : users) {
userEntity = trimAttributes(userEntity, resourcePreparer);
trimmedUsers.add(userEntity);
}
return trimmedUsers;
}
/**
* Updates user's attributes in database
* @param user updated user
......
package fi.jyu.vasara.scim.entity;
import com.bettercloud.scim2.common.annotations.Attribute;
import com.bettercloud.scim2.common.annotations.Schema;
import com.bettercloud.scim2.common.types.AttributeDefinition;
import com.bettercloud.scim2.common.types.Group;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.unboundid.scim2.common.annotations.Attribute;
import com.unboundid.scim2.common.annotations.Schema;
import com.unboundid.scim2.common.types.AttributeDefinition;
import com.unboundid.scim2.common.types.Group;
import com.unboundid.scim2.common.types.Member;
import org.camunda.bpm.engine.impl.persistence.entity.GroupEntity;
......
package fi.jyu.vasara.scim.entity;
import com.bettercloud.scim2.common.annotations.Schema;
import com.bettercloud.scim2.common.types.Group;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.unboundid.scim2.common.annotations.Schema;
import com.unboundid.scim2.common.types.Group;
import org.camunda.bpm.engine.impl.persistence.entity.UserEntity;
import javax.persistence.Entity;
......
......@@ -60,7 +60,7 @@
<result property="firstName" column="FIRST_" jdbcType="VARCHAR" />
<result property="lastName" column="LAST_" jdbcType="VARCHAR" />
<result property="email" column="EMAIL_" jdbcType="VARCHAR" />
<collection property="groups" javaType="list" ofType="com.bettercloud.scim2.common.types.Group">
<collection property="groups" javaType="list" ofType="com.unboundid.scim2.common.types.Group">
<result column="groups" />
</collection>
</resultMap>
......@@ -70,7 +70,7 @@
<id property="groupId" column="m_groupId" />
</resultMap>
<resultMap id="groupResultMap" type="com.bettercloud.scim2.common.types.Group">
<resultMap id="groupResultMap" type="com.unboundid.scim2.common.types.Group">
<id property="id" column="g_id" />
<association property="id" column="m_groupId" javaType="org.camunda.bpm.engine.impl.persistence.entity.MembershipEntity" resultMap="membershipResultMap"/>
</resultMap>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment