Examples of SecurityConstraintsDef


Examples of org.apache.jetspeed.om.page.SecurityConstraintsDef

    public boolean checkConstraint(String securityConstraintName, String actions)
    {
        try
        {
            PageSecurity security = this.getPageSecurity();
            SecurityConstraintsDef def = security.getSecurityConstraintsDef(securityConstraintName);
            if (def != null)
            {
                return PageManagerSecurityUtils.checkConstraint(def, actions);
            }           
        }
View Full Code Here

Examples of org.apache.jetspeed.om.page.SecurityConstraintsDef

            throw new AJAXException("Missing 'name' parameter");
       
        try
        {
            PageSecurity pageSecurity = pageManager.getPageSecurity();       
            SecurityConstraintsDef def = pageSecurity.getSecurityConstraintsDef(name);
            if (def == null)
            {
                return 0;
            }
            List defs = pageSecurity.getSecurityConstraintsDefs();
View Full Code Here

Examples of org.apache.jetspeed.om.page.SecurityConstraintsDef

            StringReader reader = new StringReader(xml);
            Document document = saxBuilder.build(reader);
            Element root = document.getRootElement();
            String name = root.getAttribute("name").getValue();
            PageSecurity pageSecurity = pageManager.getPageSecurity();
            SecurityConstraintsDef def = pageSecurity.getSecurityConstraintsDef(name);
            int defsSize = 0;
            if (def == null)
            {
                def = pageManager.newSecurityConstraintsDef();
                def.setName(name);
                added = true;
            }
            int xmlSize = root.getChildren("security-constraint").size();
            if (added == false)
            {
                defsSize = def.getSecurityConstraints().size();
            }
            int min = (xmlSize < defsSize) ? xmlSize : defsSize;
            List xmlConstraints = root.getChildren("security-constraint");
            List constraints = def.getSecurityConstraints();
            Element owner = root.getChild("owner");
            if (owner != null)
            {
            }
            for (int ix = 0; ix < min; ix++)
View Full Code Here

Examples of org.apache.jetspeed.om.page.SecurityConstraintsDef

            throw new AJAXException("Missing 'name' parameter");
       
        try
        {
            PageSecurity pageSecurity = pageManager.getPageSecurity();       
            SecurityConstraintsDef def = pageSecurity.getSecurityConstraintsDef(name);
            if (def == null)
            {
                return 0;
            }
            List defs = pageSecurity.getSecurityConstraintsDefs();
View Full Code Here

Examples of org.apache.jetspeed.om.page.SecurityConstraintsDef

            StringReader reader = new StringReader(xml);
            Document document = saxBuilder.build(reader);
            Element root = document.getRootElement();
            String name = root.getAttribute("name").getValue();
            PageSecurity pageSecurity = pageManager.getPageSecurity();
            SecurityConstraintsDef def = pageSecurity.getSecurityConstraintsDef(name);
            int defsSize = 0;
            if (def == null)
            {
                def = pageManager.newSecurityConstraintsDef();
                def.setName(name);
                added = true;
            }
            int xmlSize = root.getChildren("security-constraint").size();
            if (added == false)
            {
                defsSize = def.getSecurityConstraints().size();
            }
            int min = (xmlSize < defsSize) ? xmlSize : defsSize;
            List xmlConstraints = root.getChildren("security-constraint");
            List constraints = def.getSecurityConstraints();
            Element owner = root.getChild("owner");
            if (owner != null)
            {
            }
            for (int ix = 0; ix < min; ix++)
View Full Code Here

Examples of org.apache.jetspeed.om.page.SecurityConstraintsDef

        PageManager pageManager = ((AbstractAdminWebApplication) getApplication()).getServiceLocator().getPageManager();
        try
        {
            for (Object secConstDefObj : pageManager.getPageSecurity().getSecurityConstraintsDefs())
            {
                SecurityConstraintsDef secConstDef = (SecurityConstraintsDef) secConstDefObj;
                jetspeedSecurityContraintNames.add(secConstDef.getName());
            }
        }
        catch (Exception e)
        {
            logger.error("Failed to retrieve jetspeed security constraint defs from page manager.", e);
View Full Code Here

Examples of org.apache.jetspeed.om.page.SecurityConstraintsDef

        PageManager pageManager = ((AbstractAdminWebApplication) getApplication()).getServiceLocator().getPageManager();
        try
        {
            for (Object secConstDefObj : pageManager.getPageSecurity().getSecurityConstraintsDefs())
            {
                SecurityConstraintsDef secConstDef = (SecurityConstraintsDef) secConstDefObj;
                jetspeedSecurityContraintNames.add(secConstDef.getName());
            }
        }
        catch (Exception e)
        {
            logger.error("Failed to retrieve jetspeed security constraint defs from page manager.", e);
View Full Code Here

Examples of org.apache.jetspeed.om.page.SecurityConstraintsDef

    public boolean checkConstraint(String securityConstraintName, String actions)
    {
        try
        {
            PageSecurity security = this.getPageSecurity();
            SecurityConstraintsDef def = security.getSecurityConstraintsDef(securityConstraintName);
            if (def != null)
            {
                return PageManagerSecurityUtils.checkConstraint(def, actions);
            }           
        }
View Full Code Here

Examples of org.apache.jetspeed.om.page.SecurityConstraintsDef

        PageManager pageManager = ((AbstractAdminWebApplication) getApplication()).getServiceLocator().getPageManager();
        try
        {
            for (Object secConstDefObj : pageManager.getPageSecurity().getSecurityConstraintsDefs())
            {
                SecurityConstraintsDef secConstDef = (SecurityConstraintsDef) secConstDefObj;
                jetspeedSecurityContraintNames.add(secConstDef.getName());
            }
        }
        catch (Exception e)
        {
            logger.error("Failed to retrieve jetspeed security constraint defs from page manager.", e);
View Full Code Here

Examples of org.apache.jetspeed.om.page.SecurityConstraintsDef

                // dereference each security constraints definition
                Iterator constraintsRefsIter = constraintsRefs.iterator();
                while (constraintsRefsIter.hasNext())
                {
                    String constraintsRef = (String)constraintsRefsIter.next();
                    SecurityConstraintsDef securityConstraintsDef = pageSecurity.getSecurityConstraintsDef(constraintsRef);
                    if ((securityConstraintsDef != null) && (securityConstraintsDef.getSecurityConstraints() != null))
                    {
                        if (constraints == null)
                        {
                            constraints = new ArrayList(constraintsRefs.size());
                        }
                        constraints.addAll(securityConstraintsDef.getSecurityConstraints());
                    }
                    else
                    {
                        log.error("dereferenceSecurityConstraintsRefs(): Unable to dereference \"" + constraintsRef + "\" security constraints definition.");
                    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.