
package org.apache.syncope.client.enduser.rest;

import java.util.List;
import org.apache.syncope.common.lib.to.TypeExtensionTO;
import org.apache.syncope.common.rest.api.service.SyncopeService;

public class SyncopeRestClient extends BaseRestClient {

    private static final long serialVersionUID = -2211371717449597247L;

    public static List<String> searchUserTypeExtensions(final String groupName) {
        List<String> types = List.of();
        try {
            TypeExtensionTO typeExtensionTO = getService(SyncopeService.class).readUserTypeExtension(groupName);
            types = typeExtensionTO == null ? types : typeExtensionTO.getAuxClasses();
        } catch (Exception e) {
            LOG.error("While reading all any type classes for group [{}]", groupName, e);
        }
        return types;
    }
}
