Examples of PermissionSetNotFoundException


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

        Dn dn = SchemaConstants.globalPermissionSetAttribute(permissionSet, attributename);
        Entry entry;
        try {
            entry = dao.lookup(dn);
        } catch (MissingParentException e) {
            throw new PermissionSetNotFoundException(permissionSet);
        } catch (NoSuchNodeException e) {
            throw new NoSuchAttributeException(attributename);
        }
        return LdapUtils.extractAttributeEmptyCheck(entry, SchemaConstants.STRING_ATTRIBUTE);
    }
View Full Code Here

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

        Dn parent = SchemaConstants.ouGlobalPermissionSetAttributes(permissionSet);
        Entry entry = EntryFactory.namedDescriptiveObject(attributename, value, parent);
        try {
            dao.storeOverwriteExisting(entry);
        } catch (MissingParentException e) {
            throw new PermissionSetNotFoundException(permissionSet);
        }
    }
View Full Code Here

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

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

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

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

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

    }

    private void storePermissionSets(Dn parent, String... permissionSet) throws MissingParentException {
        for (String s : permissionSet) {
            if (!dao.exists(SchemaConstants.globalPermissionSet(s))) {
                throw new PermissionSetNotFoundException(s);
            }
        }
        List<Entry> entries = new LinkedList<Entry>();
        for (String s : permissionSet) { // done in separate loop to provide
            // some atomicity
View Full Code Here

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

        throws PermissionSetNotFoundException {
        Dn parent = SchemaConstants.ouGlobalPermissionsDirect(permissionSet);
        try {
            storePermissions(parent, permissions);
        } catch (MissingParentException e) {
            throw new PermissionSetNotFoundException(permissionSet);
        } catch (EntryAlreadyExistsException e) {
            throw new LdapRuntimeException(e); //TODO here is it possible to store duplicates? think not..
        }
    }
View Full Code Here

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

        throws PermissionSetNotFoundException {
        Dn parent = SchemaConstants.ouGlobalPermissionsDirect(permissionSet);
        try {
            deletePermission(parent, permission);
        } catch (MissingParentException e) {
            throw new PermissionSetNotFoundException(permissionSet);
        } catch (NoSuchNodeException e) {
            throw new LdapRuntimeException(e);
        }
    }
View Full Code Here

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

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

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

        throws PermissionSetNotFoundException {
        List<Node> nodes;
        try {
            nodes = dao.searchSubtree(SchemaConstants.ouGlobalPermissionsDirect(permissionSet));
        } catch (MissingParentException e) {
            throw new PermissionSetNotFoundException(permissionSet);
        } catch (NoSuchNodeException e) {
            throw new LdapRuntimeException(e);
        }
        return extractPermissionsFromNodes(nodes);
    }
View Full Code Here

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

            try {
                PermissionSetData found = entityManager.createQuery(query).getSingleResult();
                return found;
            } catch (Exception ex) {
                throw new PermissionSetNotFoundException("permissionSet " + permissionSet + " not found");
            }
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.