in scim-server/src/main/java/org/apache/directory/scim/server/rest/BaseResourceTypeResourceImpl.java [176:205]
public Response create(T resource, AttributeReferenceListWrapper attributes, AttributeReferenceListWrapper excludedAttributes) throws ScimException, ResourceException {
Repository<T> repository = getRepositoryInternal();
Set<AttributeReference> attributeReferences = AttributeReferenceListWrapper.getAttributeReferences(attributes);
Set<AttributeReference> excludedAttributeReferences = AttributeReferenceListWrapper.getAttributeReferences(excludedAttributes);
validateAttributes(attributeReferences, excludedAttributeReferences);
T created = repository.create(resource);
EntityTag etag = etag(created);
// Process Attributes
created = processFilterAttributeExtensions(repository, created, attributeReferences, excludedAttributeReferences);
try {
created = attributesForDisplay(created, attributeReferences, excludedAttributeReferences);
} catch (AttributeException e) {
log.debug("Exception thrown while processing attributes", e);
return Response.status(Status.CREATED)
.location(buildLocationTag(created))
.tag(etag)
.build();
}
return Response.status(Status.CREATED)
.location(buildLocationTag(created))
.tag(etag)
.entity(created)
.build();
}