Package org.apache.jetspeed.security

Examples of org.apache.jetspeed.security.User


    {
        String userName = (String)
            actionRequest.getPortletSession().getAttribute(SecurityResources.PAM_CURRENT_USER,
                                     PortletSession.APPLICATION_SCOPE);
       
        User user = lookupUser(userName);
        if (user != null)
        {
            String userAttrName = actionRequest.getParameter("user_attr_name");
            String userAttrValue = actionRequest.getParameter("user_attr_value");
            if (userAttrName != null && userAttrName.trim().length() > 0)
            {
                Preferences attributes = user.getUserAttributes();
                attributes.put(userAttrName, userAttrValue);
            }
        }
    }
View Full Code Here


        String userName = (String)
            actionRequest.getPortletSession().getAttribute(SecurityResources.PAM_CURRENT_USER,
                                     PortletSession.APPLICATION_SCOPE);
        List deletes = new LinkedList();
       
        User user = lookupUser(userName);
        if (user != null)
        {
            String[] userAttrNames = actionRequest.getParameterValues("user_attr_id");

            if(userAttrNames != null)
            {
                JetspeedUserBean bean = new JetspeedUserBean(user);
                Preferences attributes = user.getUserAttributes();
                Iterator userAttrIter = bean.getAttributes().iterator();
                while (userAttrIter.hasNext())
                {
                    StringAttribute userAttr = (StringAttribute) userAttrIter.next();
                    for(int ix = 0; ix < userAttrNames.length; ix++)
View Full Code Here

    private void removeUserRoles(ActionRequest actionRequest, ActionResponse actionResponse)
    {
        String userName = (String)
            actionRequest.getPortletSession().getAttribute(SecurityResources.PAM_CURRENT_USER,
                                     PortletSession.APPLICATION_SCOPE);
        User user = lookupUser(userName);
        if (user != null)
        {
            String[] roleNames = actionRequest.getParameterValues("user_role_id");

            if(roleNames != null)
View Full Code Here

    {
        String userName = (String)
            actionRequest.getPortletSession().getAttribute(SecurityResources.PAM_CURRENT_USER,
                                     PortletSession.APPLICATION_SCOPE);
       
        User user = lookupUser(userName);
        if (user != null)
        {
            String roleName = actionRequest.getParameter("role_name");
            if (roleName != null && roleName.trim().length() > 0)
            {
View Full Code Here

    private void removeUserGroups(ActionRequest actionRequest, ActionResponse actionResponse)
    {
        String userName = (String)
            actionRequest.getPortletSession().getAttribute(SecurityResources.PAM_CURRENT_USER,
                                     PortletSession.APPLICATION_SCOPE);
        User user = lookupUser(userName);
        if (user != null)
        {
            String[] groupNames = actionRequest.getParameterValues("user_group_id");

            if(groupNames != null)
View Full Code Here

    {
        String userName = (String)
            actionRequest.getPortletSession().getAttribute(SecurityResources.PAM_CURRENT_USER,
                                     PortletSession.APPLICATION_SCOPE);
       
        User user = lookupUser(userName);
        if (user != null)
        {
            String groupName = actionRequest.getParameter("group_name");
            if (groupName != null && groupName.trim().length() > 0)
            {
View Full Code Here

        return credential;
    }
   
    private User lookupUser(String userName)
    {
        User user = null;
        try
        {
            user = userManager.getUser(userName);
        }
        catch (Exception e)
View Full Code Here

    private void addUserProfile(ActionRequest actionRequest, ActionResponse actionResponse)
    {
        String userName = (String)
            actionRequest.getPortletSession().getAttribute(SecurityResources.PAM_CURRENT_USER,
                                     PortletSession.APPLICATION_SCOPE);
        User user = lookupUser(userName);
        if (user != null)
        {
            String locatorName = actionRequest.getParameter("locator_name");
            if (locatorName != null && locatorName.trim().length() > 0)
            {
                try
                {
                    Principal userPrincipal = createPrincipal(user.getSubject(), UserPrincipal.class);                         
                    String ruleName = actionRequest.getParameter("select_rule");
                    profiler.setRuleForPrincipal(userPrincipal,
                            profiler.getRule(ruleName),
                            locatorName);                                                        
                }
View Full Code Here

    private void removeUserProfile(ActionRequest actionRequest, ActionResponse actionResponse)
    {
        String userName = (String)
            actionRequest.getPortletSession().getAttribute(SecurityResources.PAM_CURRENT_USER,
                                     PortletSession.APPLICATION_SCOPE);
        User user = lookupUser(userName);
        if (user != null)
        {
            String[] locatorNames = actionRequest.getParameterValues("user_profile_id");

            if(locatorNames != null)
            {
                Principal userPrincipal = createPrincipal(user.getSubject(), UserPrincipal.class);                                             
                Collection rules = profiler.getRulesForPrincipal(userPrincipal);
                for (int ix = 0; ix < locatorNames.length; ix++)
                {
                    try
                    {
View Full Code Here

            UserBean[] xu = new UserBean[8];
            Iterator it = userManager.getUsers("");
            int ix = 0;
            while (it.hasNext())
            {
                User user = (User)it.next();
                Principal princ = getPrincipal(user.getSubject(), UserPrincipal.class);
                UserBean bean  = new UserBean(princ.getName(), princ.getName());
                xu[ix] = bean;
                ix++;
                //preferences.node(userinfo)
            }
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.security.User

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.