Package org.jitterbit.integration.client.project.permission

Examples of org.jitterbit.integration.client.project.permission.PermissionsManager


    }

    @Override
    public void save() {
        synchronized (lock) {
            final PermissionsManager mgr = view.getPermissions();
            if (mgr == null) {
                return;
            }
            if (savingService == null) {
                savingService = Executors.newFixedThreadPool(1);
            }
            savingService.submit(new Runnable() {

                @Override
                public void run() {
                    try {
                        mgr.save();
                    } catch (PermissionsStorageException e) {
                        ErrorLog.attention(PermissionsPage.class, Strings.get("Permissions.Page.Save.Error"), e);
                    }
                }
            });
View Full Code Here


    /**
     * Creates a panel displaying the effective permissions <tt>user</tt> has on <tt>entity</tt>.
     *
     */
    public EffectivePermissionsPanel(PermissionsViewImpl view, IntegrationEntity entity, User user) {
        PermissionsManager mgr = view.getPermissions();
        Permissions perms = mgr.getEffectivePermissions(user, entity);
        createPanel(perms);
    }
View Full Code Here

    /**
     * Creates a panel displaying the effective permissions <tt>group</tt> has on <tt>entity</tt>.
     *
     */
    public EffectivePermissionsPanel(PermissionsViewImpl view, IntegrationEntity entity, Group group) {
        PermissionsManager mgr = view.getPermissions();
        Permissions perms = mgr.getEffectivePermissions(group, entity);
        createPanel(perms);
    }
View Full Code Here

        return ListUtils.createModel(getListItems());
    }

    private List<ListItem> getListItems() {
        List<ListItem> items = new ArrayList<ListItem>();
        PermissionsManager perms = view.getPermissions();
        if (perms != null) {
            UserManager mgr = perms.getUserManager();
            addUserItems(mgr, items);
            addGroupItems(mgr, items);
        }
        return items;
    }
View Full Code Here

        refreshButton.setContentAreaFilled(false);
        ButtonUtils.enableRolloverForButton(refreshButton);
    }

    private void updateUsersList() {
        PermissionsManager mgr = view.getPermissions();
        if (mgr != null) {
            WaitLock wait = view.getWindow().startWait();
            UpdateUserManagerCallback callback = new UpdateUserAndGroupCallback(wait);
            mgr.getUserManager().updateUsersAndGroups(false, callback);
        }
    }
View Full Code Here

    }

    private void copyPermissions(IntegrationEntity original, IntegrationEntity copy, IntegrationProject project) {
        try {
            ManagedProject mp = project.getExtensionObject(ManagedProject.class);
            PermissionsManager perms = mp.getPermissions();
            perms.copyPermissions(original, copy);
            perms.save();
        } catch (PermissionsStorageException e) {
            ErrorLog.attention(getClass(), "The permission settings could not be copied.", e);
        }
    }
View Full Code Here

    }

    private PermissionsManager createPermissionsManager() {
        UserManager users = manager.getUserManager();
        PermissionsStorage storage = new PermissionsFileStorage(ProjectFolders.getPermissionsFolder(rootDirectory));
        PermissionsManager mgr = new PermissionsManager(project, storage, new ProjectDependenciesImpl(), users);
        mgr.addEntityPermissionsListener(new EntityPermissionsListener() {

            @Override
            public void permissionsChanged(final IntegrationEntity entity) {
                IntegrationProjectLock.acquire();
                try {
View Full Code Here

TOP

Related Classes of org.jitterbit.integration.client.project.permission.PermissionsManager

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.