Package org.apache.lenya.ac

Examples of org.apache.lenya.ac.UserManager


    public User[] getUsersWithRole(String roleId) throws ProcessingException {
        List users = new ArrayList();
        try {
            Policy policy =
                policyManager.getPolicy(accessController.getAccreditableManager(), getUrl());
            UserManager userManager = accessController.getAccreditableManager().getUserManager();
            User[] userArray = userManager.getUsers();
            for (int i = 0; i < userArray.length; i++) {
                Identity identity = new Identity();
                identity.addIdentifiable(userArray[i]);
                Role[] roles = policy.getRoles(identity);
                for (int roleIndex = 0; roleIndex < roles.length; roleIndex++) {
View Full Code Here


        User user = getSession().getIdentity().getUser();
        setParameter("user", user);

        try {
            UserManager userManager = user.getAccreditableManager().getUserManager();
            User[] users = userManager.getUsers();
            setParameter("users", users);

        } catch (Exception e) {
            throw new RuntimeException(e);
        }
View Full Code Here

        String recipientId = getRecipient();
        User sender = getSession().getIdentity().getUser();
        User recipient;

        try {
            UserManager userManager = sender.getAccreditableManager().getUserManager();
            recipient = userManager.getUser(recipientId);
            Assert.notNull("user " + recipientId, recipient);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
View Full Code Here

        closeIndexer();

        try {
            Session session = RepositoryUtil.getSession(this.manager, this.request);
            User sender = session.getIdentity().getUser();
            UserManager userManager = (UserManager) sender.getItemManager();
            User recipient = userManager.getUser(this.notificationRecipient);
            Identifiable[] recipients = { recipient };

            String subject = "indexing-failed-subject";
            String[] subjectParams = new String[0];
            String body = "indexing-failed-body";
View Full Code Here

        closeIndexer();

        try {
            Session session = RepositoryUtil.getSession(this.manager, this.request);
            User sender = session.getIdentity().getUser();
            UserManager userManager = (UserManager) sender.getItemManager();
            User recipient = userManager.getUser(this.notificationRecipient);
            Identifiable[] recipients = { recipient };

            String subject = "indexing-failed-subject";
            String[] subjectParams = new String[0];
            String body = "indexing-failed-body";
View Full Code Here

            resolver = (AccessControllerResolver) selector
                    .select(AccessControllerResolver.DEFAULT_RESOLVER);
            controller = resolver.resolveAccessController(webappUrl);

            AccreditableManager accreditableManager = controller.getAccreditableManager();
            UserManager userManager = accreditableManager.getUserManager();
           
            return userManager.getUser(userId);
        } catch (ServiceException e) {
            throw new AccessControlException(e);
        } finally {
            if (selector != null) {
                if (resolver != null) {
View Full Code Here

            resolver = (AccessControllerResolver) selector
                    .select(AccessControllerResolver.DEFAULT_RESOLVER);
            controller = resolver.resolveAccessController(webappUrl);

            AccreditableManager accreditableManager = controller.getAccreditableManager();
            UserManager userManager = accreditableManager.getUserManager();
            User[] users = userManager.getUsers();
            List usersWithRole = new ArrayList();
            PolicyManager policyManager = controller.getPolicyManager();

            Role roleObject = accreditableManager.getRoleManager().getRole(role);
View Full Code Here

        User user = getSession().getIdentity().getUser();
        setParameter(PARAM_USER, user);

        try {
            UserManager userManager = user.getAccreditableManager().getUserManager();
            User[] users = userManager.getUsers();
            setParameter("users", users);

        } catch (Exception e) {
            throw new RuntimeException(e);
        }
View Full Code Here

        String recipientId = getRecipient();
        User sender = getSession().getIdentity().getUser();
        User recipient;

        try {
            UserManager userManager = sender.getAccreditableManager().getUserManager();
            recipient = userManager.getUser(recipientId);
            Assert.notNull("user " + recipientId, recipient);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
View Full Code Here

            Identifiable[] identifiables = identity.getIdentifiables();
            for (int i = 0; i < identifiables.length; i++) {
                identity.removeIdentifiable(identifiables[i]);
            }

            UserManager userManager = controller.getAccreditableManager().getUserManager();
            if (this.userId != null) {
                User user = userManager.getUser(this.userId);

                if (user == null) {
                    throw new RuntimeException("User [" + this.userId + "] does not exist!");
                }
View Full Code Here

TOP

Related Classes of org.apache.lenya.ac.UserManager

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.