Package org.aperteworkflow.editor.ui.permission

Examples of org.aperteworkflow.editor.ui.permission.PermissionEditor


                    widget.setWidgetPropertiesPanel(propertiesPanel);
                }
                ts.addTab(widget.getWidgetPropertiesPanel(), messages.getMessage("form.properties"));
            }
            if (widget.hasPermissions()) {
                PermissionEditor permissionEditor = new PermissionEditor();
                permissionEditor.setMargin(true);
                permissionEditor.setProvider(new PermissionProvider() {
                    @Override
                    public Collection<Permission> getPermissions() {
                        return new LinkedHashSet<Permission>(widget.getPermissions());
                    }

                    @Override
                    public Collection<PermissionDefinition> getPermissionDefinitions() {
                        return widget.getPermissionDefinitions();
                    }

                    @Override
                    public boolean isNewPermissionDefinitionAllowed() {
                        return false;
                    }

                    @Override
                    public void addPermission(Permission permission) {
                        Set<Permission> newPermissions = new LinkedHashSet<Permission>(widget.getPermissions());
                        newPermissions.add(permission);
                        widget.setPermissions(new ArrayList<Permission>(newPermissions));
                    }

                    @Override
                    public void removePermission(Permission permission) {
                        Set<Permission> newPermissions = new LinkedHashSet<Permission>(widget.getPermissions());
                        newPermissions.remove(permission);
                        widget.setPermissions(new ArrayList<Permission>(newPermissions));
                    }
                });
                permissionEditor.loadData();
                ts.addTab(permissionEditor, messages.getMessage("form.permissions"));

            }
            layout.addComponent(ts);
    }
View Full Code Here


        stepTree.expandItemsRecursively(rootItem);
    stepTree.setDropHandler(new TreeDropHandler(stepTree, stepTreeContainer));

        paramPanel = new WidgetFormWindow();

        permissionEditor = new PermissionEditor();
        permissionEditor.setMargin(true);
        permissionEditor.setProvider(new PermissionProvider() {
            @Override
            public Collection<Permission> getPermissions() {
                return permissions;
View Full Code Here

    }

    private void initComponent() {
        permissionProvider = new ProcessPermissionProvider();

        permissionEditor = new PermissionEditor();
        permissionEditor.setProvider(permissionProvider);

        setMargin(true);
        addComponent(permissionEditor);
    }
View Full Code Here

TOP

Related Classes of org.aperteworkflow.editor.ui.permission.PermissionEditor

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.