Package org.openengsb.core.services.internal.security.model

Examples of org.openengsb.core.services.internal.security.model.PermissionSetData


        }
    }

    @Override
    public void createPermissionSet(String permissionSet, Permission... permission) {
        PermissionSetData data = new PermissionSetData(permissionSet);
        if (permission != null) {
            Collection<PermissionData> permissions = data.getPermissions();
            for (Permission p : permission) {
                permissions.add(convertPermissionToPermissionData(p));
            }
        }
        synchronized (entityManager) {
View Full Code Here


        doRemovePermissionSetFromSet(user.getPermissionSet(), permissionSet);
    }

    @Override
    public void addPermissionSetToPermissionSet(String permissionSetParent, String... permissionSet) {
        PermissionSetData parent = doFindPermissionSet(permissionSetParent);
        doAddPermissionSetToSet(parent, permissionSet);
    }
View Full Code Here

        doAddPermissionSetToSet(parent, permissionSet);
    }

    @Override
    public Collection<String> getPermissionSetsFromPermissionSet(String permissionSet) throws UserNotFoundException {
        PermissionSetData parent = doFindPermissionSet(permissionSet);
        return Collections2.transform(parent.getPermissionSets(), new Function<PermissionSetData, String>() {
            @Override
            public String apply(PermissionSetData input) {
                return input.getName();
            }
        });
View Full Code Here

        });
    }

    @Override
    public void removePermissionSetFromPermissionSet(String permissionSetParent, String... permissionSet) {
        PermissionSetData parent = doFindPermissionSet(permissionSetParent);
        doRemovePermissionSetFromSet(parent, permissionSet);
    }
View Full Code Here

        doRemovePermissionSetFromSet(parent, permissionSet);
    }

    @Override
    public Collection<Permission> getPermissionsFromPermissionSet(String permissionSet) {
        PermissionSetData set = doFindPermissionSet(permissionSet);
        return getPermissionsFromSetData(set);
    }
View Full Code Here

        return getPermissionsFromSetData(set);
    }

    @Override
    public Collection<Permission> getAllPermissionsFromPermissionSet(String permissionSet) {
        PermissionSetData set = doFindPermissionSet(permissionSet);
        return getAllPermissionsFromSetData(set);
    }
View Full Code Here

        return getAllPermissionsFromSetData(set);
    }

    @Override
    public void addPermissionToSet(String permissionSet, Permission... permission) {
        PermissionSetData set = doFindPermissionSet(permissionSet);
        addPermissionsToSet(set, permission);
    }
View Full Code Here

        }
    }

    @Override
    public void removePermissionFromSet(String permissionSet, Permission... permission) {
        PermissionSetData set = doFindPermissionSet(permissionSet);
        doRemovePermissionsFromSet(set, permission);
    }
View Full Code Here

        doFindPermissionSet(permissionSet).getMetadata().put(attributename, value);
    }

    private void doAddPermissionSetToSet(PermissionSetData parent, String... permissionSet) {
        for (String p : permissionSet) {
            PermissionSetData child = doFindPermissionSet(p);
            parent.getPermissionSets().add(child);
        }
        synchronized (entityManager) {
            entityManager.merge(parent);
        }
View Full Code Here

        }
    }

    private void doRemovePermissionSetFromSet(PermissionSetData parent, String... permissionSet) {
        for (String p : permissionSet) {
            PermissionSetData child = doFindPermissionSet(p);
            parent.getPermissionSets().remove(child);
        }
        synchronized (entityManager) {
            entityManager.merge(parent);
        }
View Full Code Here

TOP

Related Classes of org.openengsb.core.services.internal.security.model.PermissionSetData

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.