Package org.openengsb.core.api.security.service

Examples of org.openengsb.core.api.security.service.UserNotFoundException


        Dn parent = SchemaConstants.ouUserPermissionSets(username);
        List<Entry> entries;
        try {
            entries = dao.getDirectChildren(parent);
        } catch (MissingParentException e) {
            throw new UserNotFoundException(username);
        } catch (NoSuchNodeException e) {
            throw new LdapRuntimeException(e);
        }
        TimebasedOrderFilter.sortById(entries);
        return LdapUtils.extractAttributeEmptyCheck(entries, SchemaConstants.CN_ATTRIBUTE);
View Full Code Here


            PermissionSetNotFoundException {
        Dn parent = SchemaConstants.ouUserPermissionSets(username);
        try {
            storePermissionSets(parent, permissionSet);
        } catch (MissingParentException e) {
            throw new UserNotFoundException(username);
        }
    }
View Full Code Here

    public void addPermissionToUser(String username, Permission... permissions) throws UserNotFoundException {
        Dn parent = SchemaConstants.ouUserPermissionsDirect(username);
        try {
            storePermissions(parent, permissions);
        } catch (MissingParentException e) {
            throw new UserNotFoundException(username);
        } catch (EntryAlreadyExistsException e) {
            throw new LdapRuntimeException(e); //TODO also here duplicates should be allowed but this looks like not
        }
    }
View Full Code Here

    public void removePermissionFromUser(String username, Permission... permission) throws UserNotFoundException {
        Dn parent = SchemaConstants.ouUserPermissionsDirect(username);
        try {
            deletePermission(parent, permission);
        } catch (MissingParentException e) {
            throw new UserNotFoundException(username);
        } catch (NoSuchNodeException e) {
            throw new LdapRuntimeException(e);
        }
    }
View Full Code Here

        for (String child : permissionSet) {
            Dn baseDn = SchemaConstants.userPermissionSet(username, child);
            try {
                dao.deleteSubtreeIncludingRoot(baseDn);
            } catch (MissingParentException e) {
                throw new UserNotFoundException(username);
            } catch (NoSuchNodeException e) {
                LOGGER.warn("permissionSet {} was to be deleted, but not found", child);
            }
        }
    }
View Full Code Here

    public Collection<Permission> getPermissionsForUser(String username) throws UserNotFoundException {
        List<Node> nodes;
        try {
            nodes = dao.searchSubtree(SchemaConstants.ouUserPermissionsDirect(username));
        } catch (MissingParentException e) {
            throw new UserNotFoundException();
        } catch (NoSuchNodeException e) {
            throw new LdapRuntimeException(e);
        }
        return extractPermissionsFromNodes(nodes);
    }
View Full Code Here

            NoSuchAttributeException {
        List<Entry> entries;
        try {
            entries = dao.getDirectChildren(SchemaConstants.userAttribute(username, attributename));
        } catch (MissingParentException e) {
            throw new UserNotFoundException();
        } catch (NoSuchNodeException e) {
            throw new NoSuchAttributeException();
        }
        TimebasedOrderFilter.sortById(entries);
        return extractUserAttributeValues(entries);
View Full Code Here

            dao.storeOverwriteExisting(attribute);
            for (Entry entry : attributeValues) {
                dao.storeSkipExisting(entry);
            }
        } catch (MissingParentException e) {
            throw new UserNotFoundException(username);
        }
    }
View Full Code Here

    @Override
    public void removeUserAttribute(String username, String attributename) throws UserNotFoundException {
        try {
            dao.deleteSubtreeIncludingRoot(SchemaConstants.userAttribute(username, attributename));
        } catch (MissingParentException e) {
            throw new UserNotFoundException();
        } catch (NoSuchNodeException e) {
            LOGGER.warn("attribute {} was to be deleted, but not found", attributename);
        }
    }
View Full Code Here

    @Override
    public void removeUserCredentials(String username, String credentials) throws UserNotFoundException {
        try {
            dao.deleteSubtreeIncludingRoot(SchemaConstants.userCredentials(username, credentials));
        } catch (MissingParentException e) {
            throw new UserNotFoundException();
        } catch (NoSuchNodeException e) {
            LOGGER.warn("credentials {} was to be deleted, but not found", credentials);
        }
    }
View Full Code Here

TOP

Related Classes of org.openengsb.core.api.security.service.UserNotFoundException

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.