Search in sources :

Example 1 with SchemaExtension

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

the class SCIMLogic method resourceTypes.

@PreAuthorize("isAuthenticated()")
public List<ResourceType> resourceTypes(final UriBuilder uriBuilder) {
    synchronized (MONITOR) {
        if (USER == null) {
            USER = new ResourceType("User", "User", "/Users", "User Account", Resource.User.schema(), new Meta(Resource.ResourceType, null, null, null, uriBuilder.path("User").build().toASCIIString()));
            USER.getSchemaExtensions().add(new SchemaExtension(Resource.EnterpriseUser.schema(), true));
        }
        if (GROUP == null) {
            GROUP = new ResourceType("Group", "Group", "/Groups", "Group", Resource.Group.schema(), new Meta(Resource.ResourceType, null, null, null, uriBuilder.path("Group").build().toASCIIString()));
        }
    }
    return Arrays.asList(USER, GROUP);
}
Also used : Meta(org.apache.syncope.ext.scimv2.api.data.Meta) SchemaExtension(org.apache.syncope.ext.scimv2.api.data.SchemaExtension) ResourceType(org.apache.syncope.ext.scimv2.api.data.ResourceType) PreAuthorize(org.springframework.security.access.prepost.PreAuthorize)

Aggregations

Meta (org.apache.syncope.ext.scimv2.api.data.Meta)1 ResourceType (org.apache.syncope.ext.scimv2.api.data.ResourceType)1 SchemaExtension (org.apache.syncope.ext.scimv2.api.data.SchemaExtension)1 PreAuthorize (org.springframework.security.access.prepost.PreAuthorize)1