Package org.apache.jetspeed.om.common

Examples of org.apache.jetspeed.om.common.SecurityRoleRefComposite


           
            if(name != null)
            {
                String link = actionRequest.getParameter("link");
               
                SecurityRoleRefComposite securityRoleRef = (SecurityRoleRefComposite) portlet.getInitSecurityRoleRefSet().get(name);
                if(securityRoleRef == null && link != null)
                {
                    securityRoleRef = (SecurityRoleRefComposite) portlet.addSecurityRoleRef(name, link);
                }
               
                if(securityRoleRef != null)
                {
                    String description = actionRequest.getParameter("description");
                    if(description != null && description.length() > 0)
                    {
                        String locale = actionRequest.getParameter("locale");
                        if(locale == null)
                        {
                            locale = "en";
                        }
                        securityRoleRef.addDescription(new Locale(locale), description);
                    }
                }
                registry.savePortletDefinition(portlet);
            }
        }
        else if(action.equals("edit_security"))
        {
            Iterator securityIter = portlet.getInitSecurityRoleRefSet().iterator();
            while (securityIter.hasNext())
            {
                SecurityRoleRefComposite secRef = (SecurityRoleRefComposite) securityIter.next();
                String name = secRef.getRoleName();
               
                //TODO:  should this be editable
                String newName = actionRequest.getParameter(name + ":name");
                String link = actionRequest.getParameter(name + ":link");
               
                if(!secRef.getRoleLink().equals(link))
                {
                    secRef.setRoleLink(link);
                }
               
                int index = 0;
                Iterator descIter = secRef.getDescriptionSet().iterator();
                while (descIter.hasNext())
                {
                    MutableDescription description = (MutableDescription) descIter.next();
                    String descParam = actionRequest.getParameter(name + ":description:" + index);
                    //changing locale not allowed.
View Full Code Here


           
            if(name != null)
            {
                String link = actionRequest.getParameter("link");
               
                SecurityRoleRefComposite securityRoleRef = (SecurityRoleRefComposite) portlet.getInitSecurityRoleRefSet().get(name);
                if(securityRoleRef == null && link != null)
                {
                    securityRoleRef = (SecurityRoleRefComposite) portlet.addSecurityRoleRef(name, link);
                }
               
                if(securityRoleRef != null)
                {
                    String description = actionRequest.getParameter("description");
                    if(description != null && description.length() > 0)
                    {
                        String locale = actionRequest.getParameter("locale");
                        if(locale == null)
                        {
                            locale = "en";
                        }
                        securityRoleRef.addDescription(new Locale(locale), description);
                    }
                }
            }
        }
        else if(action.equals("edit_security"))
        {
            Iterator securityIter = portlet.getInitSecurityRoleRefSet().iterator();
            while (securityIter.hasNext())
            {
                SecurityRoleRefComposite secRef = (SecurityRoleRefComposite) securityIter.next();
                String name = secRef.getRoleName();
               
                //TODO:  should this be editable
//                String newName = actionRequest.getParameter(name + ":name");
                String link = actionRequest.getParameter(name + ":link");
               
                if(!secRef.getRoleLink().equals(link))
                {
                    secRef.setRoleLink(link);
                }
               
                int index = 0;
                Iterator descIter = secRef.getDescriptionSet().iterator();
                while (descIter.hasNext())
                {
                    MutableDescription description = (MutableDescription) descIter.next();
                    String descParam = actionRequest.getParameter(name + ":description:" + index);
                    //changing locale not allowed.
View Full Code Here

           
            if(name != null)
            {
                String link = actionRequest.getParameter("link");
               
                SecurityRoleRefComposite securityRoleRef = (SecurityRoleRefComposite) portlet.getInitSecurityRoleRefSet().get(name);
                if(securityRoleRef == null && link != null)
                {
                    securityRoleRef = (SecurityRoleRefComposite) portlet.addSecurityRoleRef(name, link);
                }
               
                if(securityRoleRef != null)
                {
                    String description = actionRequest.getParameter("description");
                    if(description != null && description.length() > 0)
                    {
                        String locale = actionRequest.getParameter("locale");
                        if(locale == null)
                        {
                            locale = "en";
                        }
                        securityRoleRef.addDescription(new Locale(locale), description);
                    }
                }
            }
        }
        else if(action.equals("edit_security"))
        {
            Iterator securityIter = portlet.getInitSecurityRoleRefSet().iterator();
            while (securityIter.hasNext())
            {
                SecurityRoleRefComposite secRef = (SecurityRoleRefComposite) securityIter.next();
                String name = secRef.getRoleName();
               
                //TODO:  should this be editable
//                String newName = actionRequest.getParameter(name + ":name");
                String link = actionRequest.getParameter(name + ":link");
               
                if(!secRef.getRoleLink().equals(link))
                {
                    secRef.setRoleLink(link);
                }
               
                int index = 0;
                Iterator descIter = secRef.getDescriptionSet().iterator();
                while (descIter.hasNext())
                {
                    MutableDescription description = (MutableDescription) descIter.next();
                    String descParam = actionRequest.getParameter(name + ":description:" + index);
                    //changing locale not allowed.
View Full Code Here

           
            if(name != null)
            {
                String link = actionRequest.getParameter("link");
               
                SecurityRoleRefComposite securityRoleRef = (SecurityRoleRefComposite) portlet.getInitSecurityRoleRefSet().get(name);
                if(securityRoleRef == null && link != null)
                {
                    securityRoleRef = (SecurityRoleRefComposite) portlet.addSecurityRoleRef(name, link);
                }
               
                if(securityRoleRef != null)
                {
                    String description = actionRequest.getParameter("description");
                    if(description != null && description.length() > 0)
                    {
                        String locale = actionRequest.getParameter("locale");
                        if(locale == null)
                        {
                            locale = "en";
                        }
                        securityRoleRef.addDescription(new Locale(locale), description);
                    }
                }
                registry.savePortletDefinition(portlet);
            }
        }
        else if(action.equals("edit_security"))
        {
            Iterator securityIter = portlet.getInitSecurityRoleRefSet().iterator();
            while (securityIter.hasNext())
            {
                SecurityRoleRefComposite secRef = (SecurityRoleRefComposite) securityIter.next();
                String name = secRef.getRoleName();
               
                //TODO:  should this be editable
                String newName = actionRequest.getParameter(name + ":name");
                String link = actionRequest.getParameter(name + ":link");
               
                if(!secRef.getRoleLink().equals(link))
                {
                    secRef.setRoleLink(link);
                }
               
                int index = 0;
                Iterator descIter = secRef.getDescriptionSet().iterator();
                while (descIter.hasNext())
                {
                    MutableDescription description = (MutableDescription) descIter.next();
                    String descParam = actionRequest.getParameter(name + ":description:" + index);
                    //changing locale not allowed.
View Full Code Here

           
            if(name != null)
            {
                String link = actionRequest.getParameter("link");
               
                SecurityRoleRefComposite securityRoleRef = (SecurityRoleRefComposite) portlet.getInitSecurityRoleRefSet().get(name);
                if(securityRoleRef == null && link != null)
                {
                    securityRoleRef = (SecurityRoleRefComposite) portlet.addSecurityRoleRef(name, link);
                }
               
                if(securityRoleRef != null)
                {
                    String description = actionRequest.getParameter("description");
                    if(description != null && description.length() > 0)
                    {
                        String locale = actionRequest.getParameter("locale");
                        if(locale == null)
                        {
                            locale = "en";
                        }
                        securityRoleRef.addDescription(new Locale(locale), description);
                    }
                }
                registry.savePortletDefinition(portlet);
            }
        }
        else if(action.equals("edit_security"))
        {
            Iterator securityIter = portlet.getInitSecurityRoleRefSet().iterator();
            while (securityIter.hasNext())
            {
                SecurityRoleRefComposite secRef = (SecurityRoleRefComposite) securityIter.next();
                String name = secRef.getRoleName();
               
                //TODO:  should this be editable
                String newName = actionRequest.getParameter(name + ":name");
                String link = actionRequest.getParameter(name + ":link");
               
                if(!secRef.getRoleLink().equals(link))
                {
                    secRef.setRoleLink(link);
                }
               
                int index = 0;
                Iterator descIter = secRef.getDescriptionSet().iterator();
                while (descIter.hasNext())
                {
                    MutableDescription description = (MutableDescription) descIter.next();
                    String descParam = actionRequest.getParameter(name + ":description:" + index);
                    //changing locale not allowed.
View Full Code Here

           
            if(name != null)
            {
                String link = actionRequest.getParameter("link");
               
                SecurityRoleRefComposite securityRoleRef = (SecurityRoleRefComposite) portlet.getInitSecurityRoleRefSet().get(name);
                if(securityRoleRef == null && link != null)
                {
                    securityRoleRef = (SecurityRoleRefComposite) portlet.addSecurityRoleRef(name, link);
                }
               
                if(securityRoleRef != null)
                {
                    String description = actionRequest.getParameter("description");
                    if(description != null && description.length() > 0)
                    {
                        String locale = actionRequest.getParameter("locale");
                        if(locale == null)
                        {
                            locale = "en";
                        }
                        securityRoleRef.addDescription(new Locale(locale), description);
                    }
                }
                registry.savePortletDefinition(portlet);
            }
        }
        else if(action.equals("edit_security"))
        {
            Iterator securityIter = portlet.getInitSecurityRoleRefSet().iterator();
            while (securityIter.hasNext())
            {
                SecurityRoleRefComposite secRef = (SecurityRoleRefComposite) securityIter.next();
                String name = secRef.getRoleName();
               
                //TODO:  should this be editable
                String newName = actionRequest.getParameter(name + ":name");
                String link = actionRequest.getParameter(name + ":link");
               
                if(!secRef.getRoleLink().equals(link))
                {
                    secRef.setRoleLink(link);
                }
               
                int index = 0;
                Iterator descIter = secRef.getDescriptionSet().iterator();
                while (descIter.hasNext())
                {
                    MutableDescription description = (MutableDescription) descIter.next();
                    String descParam = actionRequest.getParameter(name + ":description:" + index);
                    //changing locale not allowed.
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.om.common.SecurityRoleRefComposite

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.