Package org.apache.syncope.core.persistence.dao

Examples of org.apache.syncope.core.persistence.dao.NotFoundException


    @PreAuthorize("hasRole('CONNECTOR_DELETE')")
    @RequestMapping(method = RequestMethod.GET, value = "/delete/{connInstanceId}")
    public ConnInstanceTO delete(@PathVariable("connInstanceId") final Long connInstanceId) {
        ConnInstance connInstance = connInstanceDAO.find(connInstanceId);
        if (connInstance == null) {
            throw new NotFoundException("Connector '" + connInstanceId + "'");
        }

        if (!connInstance.getResources().isEmpty()) {
            SyncopeClientCompositeErrorException scce =
                    new SyncopeClientCompositeErrorException(HttpStatus.BAD_REQUEST);
View Full Code Here


    @RequestMapping(method = RequestMethod.GET, value = "/read/{connInstanceId}")
    @Transactional(readOnly = true)
    public ConnInstanceTO read(@PathVariable("connInstanceId") final Long connInstanceId) {
        ConnInstance connInstance = connInstanceDAO.find(connInstanceId);
        if (connInstance == null) {
            throw new NotFoundException("Connector '" + connInstanceId + "'");
        }

        return binder.getConnInstanceTO(connInstance);
    }
View Full Code Here

            @RequestParam(required = false, value = "includeSpecial", defaultValue = "false")
            final boolean includeSpecial) {

        final ConnInstance connInstance = connInstanceDAO.find(connInstanceTO.getId());
        if (connInstance == null) {
            throw new NotFoundException("Connector '" + connInstanceTO.getId() + "'");
        }

        // consider the possibility to receive overridden properties only
        final Set<ConnConfProperty> conf = binder.mergeConnConfProperties(connInstanceTO.getConfiguration(),
                connInstance.getConfiguration());
View Full Code Here

    @RequestMapping(method = RequestMethod.POST, value = "/supportedObjectClasses/list")
    @Transactional(readOnly = true)
    public List<String> getSupportedObjectClasses(@RequestBody final ConnInstanceTO connInstanceTO) {
        final ConnInstance connInstance = connInstanceDAO.find(connInstanceTO.getId());
        if (connInstance == null) {
            throw new NotFoundException("Connector '" + connInstanceTO.getId() + "'");
        }

        // consider the possibility to receive overridden properties only
        final Set<ConnConfProperty> conf = binder.mergeConnConfProperties(connInstanceTO.getConfiguration(),
                connInstance.getConfiguration());
View Full Code Here

    public List<ConnConfProperty> getConfigurationProperties(
            @PathVariable("connInstanceId") final Long connInstanceId) {

        final ConnInstance connInstance = connInstanceDAO.find(connInstanceId);
        if (connInstance == null) {
            throw new NotFoundException("Connector '" + connInstanceId + "'");
        }

        return new ArrayList<ConnConfProperty>(connInstance.getConfiguration());
    }
View Full Code Here

    @RequestMapping(method = RequestMethod.GET, value = "/{resourceName}/readByResource")
    @Transactional(readOnly = true)
    public ConnInstanceTO readByResource(@PathVariable("resourceName") final String resourceName) {
        ExternalResource resource = resourceDAO.find(resourceName);
        if (resource == null) {
            throw new NotFoundException("Resource '" + resourceName + "'");
        }

        return binder.getConnInstanceTO(connFactory.getConnector(resource).getActiveConnInstance());
    }
View Full Code Here

            @PathVariable("virtualSchema") final String virtualSchemaName) {

        Class<? extends AbstractVirSchema> reference = getAttributableUtil(kind).virSchemaClass();
        AbstractVirSchema virtualSchema = virSchemaDAO.find(virtualSchemaName, reference);
        if (virtualSchema == null) {
            throw new NotFoundException("Virtual schema '" + virtualSchemaName + "'");
        }
        return binder.getVirtualSchemaTO(virtualSchema);
    }
View Full Code Here

            @PathVariable("kind") final String kind) {

        Class<? extends AbstractVirSchema> reference = getAttributableUtil(kind).virSchemaClass();
        AbstractVirSchema virtualSchema = virSchemaDAO.find(virtualSchemaTO.getName(), reference);
        if (virtualSchema == null) {
            throw new NotFoundException("Virtual schema is null");
        }

        virtualSchema = binder.update(virtualSchemaTO, virtualSchema);
        return binder.getVirtualSchemaTO(virSchemaDAO.save(virtualSchema));
    }
View Full Code Here

            @PathVariable("schema") final String virtualSchemaName) {

        Class<? extends AbstractVirSchema> reference = getAttributableUtil(kind).virSchemaClass();
        AbstractVirSchema virSchema = virSchemaDAO.find(virtualSchemaName, reference);
        if (virSchema == null) {
            throw new NotFoundException("Virtual schema '" + virtualSchemaName + "'");
        }

        VirtualSchemaTO schemaToDelete = binder.getVirtualSchemaTO(virSchema);
        virSchemaDAO.delete(virtualSchemaName, getAttributableUtil(kind));
        return schemaToDelete;
View Full Code Here

            throws NotFoundException {

        Class<? extends AbstractSchema> reference = getAttributableUtil(kind).schemaClass();
        AbstractSchema schema = schemaDAO.find(schemaName, reference);
        if (schema == null) {
            throw new NotFoundException("Schema '" + schemaName + "'");
        }

        SchemaTO schemaToDelete = binder.getSchemaTO(schema);
        schemaDAO.delete(schemaName, getAttributableUtil(kind));
        return schemaToDelete;
View Full Code Here

TOP

Related Classes of org.apache.syncope.core.persistence.dao.NotFoundException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.