Search in sources :

Example 6 with DomainTO

use of org.apache.syncope.common.lib.to.DomainTO in project syncope by apache.

the class DomainITCase method restoreTwo.

private void restoreTwo() {
    DomainTO two = new DomainTO();
    two.setKey("Two");
    two.setAdminCipherAlgorithm(CipherAlgorithm.SHA);
    two.setAdminPwd("password2");
    domainService.create(two);
}
Also used : DomainTO(org.apache.syncope.common.lib.to.DomainTO)

Example 7 with DomainTO

use of org.apache.syncope.common.lib.to.DomainTO in project syncope by apache.

the class DomainITCase method list.

@Test
public void list() {
    List<DomainTO> domains = domainService.list();
    assertNotNull(domains);
    assertFalse(domains.isEmpty());
    for (DomainTO domain : domains) {
        assertNotNull(domain);
    }
}
Also used : DomainTO(org.apache.syncope.common.lib.to.DomainTO) Test(org.junit.jupiter.api.Test)

Example 8 with DomainTO

use of org.apache.syncope.common.lib.to.DomainTO in project syncope by apache.

the class DomainServiceImpl method create.

@Override
public Response create(final DomainTO anyTypeTO) {
    DomainTO created = logic.create(anyTypeTO);
    URI location = uriInfo.getAbsolutePathBuilder().path(created.getKey()).build();
    return Response.created(location).header(RESTHeaders.RESOURCE_KEY, created.getKey()).build();
}
Also used : DomainTO(org.apache.syncope.common.lib.to.DomainTO) URI(java.net.URI)

Aggregations

DomainTO (org.apache.syncope.common.lib.to.DomainTO)8 Test (org.junit.jupiter.api.Test)4 SyncopeClientException (org.apache.syncope.common.lib.SyncopeClientException)2 URI (java.net.URI)1 AccessControlException (java.security.AccessControlException)1 SyncopeClientFactoryBean (org.apache.syncope.client.lib.SyncopeClientFactoryBean)1 NotFoundException (org.apache.syncope.core.persistence.api.dao.NotFoundException)1 Domain (org.apache.syncope.core.persistence.api.entity.Domain)1 PreAuthorize (org.springframework.security.access.prepost.PreAuthorize)1