Package org.apache.jetspeed.om.portlet

Examples of org.apache.jetspeed.om.portlet.SecurityConstraint


        }
        if (!isValid)
        {
            throw new IllegalArgumentException("Security Constraint with name: " + transportGuarantee + " is not a valid transport name");           
        }
        SecurityConstraint sc = new SecurityConstraintImpl();
        sc.getUserDataConstraint().setTransportGuarantee(transportGuarantee);
        getSecurityConstraints().add(sc);
        return sc;       
    }
View Full Code Here


        }
        if (!isValid)
        {
            throw new IllegalArgumentException("Security Constraint with name: " + transportGuarantee + " is not a valid transport name");           
        }
        SecurityConstraint sc = new SecurityConstraintImpl();
        sc.getUserDataConstraint().setTransportGuarantee(transportGuarantee);
        getSecurityConstraints().add(sc);
        return sc;       
    }
View Full Code Here

        DisplayName dn7 = listener2.addDisplayName("en");
        dn7.setDisplayName("Listen!");
        DisplayName dn8 = listener2.addDisplayName("fr");
        dn8.setDisplayName("�coutez!");
       
        SecurityConstraint sc = app.addSecurityConstraint(UserDataConstraint.INTEGRAL);
        DisplayName scdn1 = sc.addDisplayName("en");
        scdn1.setDisplayName("Integral Security Transport");
        DisplayName scdn2 = sc.addDisplayName("fr");
        scdn2.setDisplayName("Transport Int�gral de S�curit�");
        sc.addPortletName("PortletOne");
        sc.addPortletName("PortletTwo");
        sc.addPortletName("PortletThree");
        Description des1 = sc.getUserDataConstraint().addDescription("en");
        des1.setDescription("This is the Integral Security Transport");
        Description des2 = sc.getUserDataConstraint().addDescription("fr");
        des2.setDescription("Ceci est le Transport Int�gral de S�curit�");
        SecurityConstraint sc2 = app.addSecurityConstraint(UserDataConstraint.CONFIDENTIAL);
        scdn1 = sc2.addDisplayName("en");
        scdn1.setDisplayName("Confidential Security Transport");
        scdn2 = sc2.addDisplayName("fr");
        scdn2.setDisplayName("Transport Confidentiel de S�curit�");
        sc2.addPortletName("PortletA");
        sc2.addPortletName("PortletB");
        des1 = sc2.getUserDataConstraint().addDescription("en");
        des1.setDescription("This is the Confidential Security Transport");
        des2 = sc2.getUserDataConstraint().addDescription("fr");
        des2.setDescription("Ceci est le Transport Confidentiel de S�curit�");
    }
View Full Code Here

        assertEquals(dn6.getLang(), "fr");
        assertEquals(dn6.getDisplayName(), "�coutez!");
       
        List<SecurityConstraint> scs = app.getSecurityConstraints();
        assertEquals(scs.size(), 2);
        SecurityConstraint sc1 = scs.get(0);
        assertEquals(sc1.getUserDataConstraint().getTransportGuarantee(), UserDataConstraint.INTEGRAL);
        DisplayName scdn1 = sc1.getDisplayName(new Locale("en"));
        assertEquals(scdn1.getLang(), "en");
        assertEquals(scdn1.getDisplayName(), "Integral Security Transport");
        DisplayName scdn2 = sc1.getDisplayName(new Locale("fr"));
        assertEquals(scdn2.getDisplayName(), "Transport Int�gral de S�curit�");
        assertEquals(sc1.getPortletNames().get(0), "PortletOne");
        assertEquals(sc1.getPortletNames().get(1), "PortletTwo");
        assertEquals(sc1.getPortletNames().get(2), "PortletThree");
        Description des1 = sc1.getUserDataConstraint().getDescription(new Locale("en"));
        assertEquals(des1.getLang(), "en");
        assertEquals(des1.getDescription(), "This is the Integral Security Transport");
        Description des2 = sc1.getUserDataConstraint().getDescription(new Locale("fr"));
        assertEquals(des2.getLang(), "fr");
        assertEquals(des2.getDescription(), "Ceci est le Transport Int�gral de S�curit�");

        SecurityConstraint sc2 = scs.get(1);
        assertEquals(sc2.getUserDataConstraint().getTransportGuarantee(), UserDataConstraint.CONFIDENTIAL);
        scdn1 = sc2.getDisplayName(new Locale("en"));
        assertEquals(scdn1.getLang(), "en");
        assertEquals(scdn1.getDisplayName(), "Confidential Security Transport");
        scdn2 = sc2.getDisplayName(new Locale("fr"));
        assertEquals(scdn2.getDisplayName(), "Transport Confidentiel de S�curit�");
        assertEquals(sc2.getPortletNames().get(0), "PortletA");
        assertEquals(sc2.getPortletNames().get(1), "PortletB");
        des1 = sc2.getUserDataConstraint().getDescription(new Locale("en"));
        assertEquals(des1.getLang(), "en");
        assertEquals(des1.getDescription(), "This is the Confidential Security Transport");
        des2 = sc2.getUserDataConstraint().getDescription(new Locale("fr"));
        assertEquals(des2.getLang(), "fr");
        assertEquals(des2.getDescription(), "Ceci est le Transport Confidentiel de S�curit�");       
    }
View Full Code Here

                jdesc.setDescription(desc.getDescription());
            }
        }
        for (org.apache.pluto.container.om.portlet.SecurityConstraint sc :  pa.getSecurityConstraints())
        {
            SecurityConstraint jsc = jpa.addSecurityConstraint(sc.getUserDataConstraint().getTransportGuarantee());
            for (org.apache.pluto.container.om.portlet.DisplayName dn : sc.getDisplayNames())
            {
                DisplayName jdn = jsc.addDisplayName(dn.getLang());
                jdn.setDisplayName(dn.getDisplayName());
            }
            for (String portletName : sc.getPortletNames())
            {
                jsc.addPortletName(portletName);
            }           
        }
        for (org.apache.pluto.container.om.portlet.UserAttribute ua : pa.getUserAttributes())
        {
            UserAttribute jua = jpa.addUserAttribute(ua.getName());
View Full Code Here

        }
        if (!isValid)
        {
            throw new IllegalArgumentException("Security Constraint with name: " + transportGuarantee + " is not a valid transport name");           
        }
        SecurityConstraint sc = new SecurityConstraintImpl();
        sc.getUserDataConstraint().setTransportGuarantee(transportGuarantee);
        getSecurityConstraints().add(sc);
        return sc;       
    }
View Full Code Here

        DisplayName dn7 = listener2.addDisplayName("en");
        dn7.setDisplayName("Listen!");
        DisplayName dn8 = listener2.addDisplayName("fr");
        dn8.setDisplayName("�coutez!");
       
        SecurityConstraint sc = app.addSecurityConstraint(UserDataConstraint.INTEGRAL);
        DisplayName scdn1 = sc.addDisplayName("en");
        scdn1.setDisplayName("Integral Security Transport");
        DisplayName scdn2 = sc.addDisplayName("fr");
        scdn2.setDisplayName("Transport Int�gral de S�curit�");
        sc.addPortletName("PortletOne");
        sc.addPortletName("PortletTwo");
        sc.addPortletName("PortletThree");
        Description des1 = sc.getUserDataConstraint().addDescription("en");
        des1.setDescription("This is the Integral Security Transport");
        Description des2 = sc.getUserDataConstraint().addDescription("fr");
        des2.setDescription("Ceci est le Transport Int�gral de S�curit�");
        SecurityConstraint sc2 = app.addSecurityConstraint(UserDataConstraint.CONFIDENTIAL);
        scdn1 = sc2.addDisplayName("en");
        scdn1.setDisplayName("Confidential Security Transport");
        scdn2 = sc2.addDisplayName("fr");
        scdn2.setDisplayName("Transport Confidentiel de S�curit�");
        sc2.addPortletName("PortletA");
        sc2.addPortletName("PortletB");
        des1 = sc2.getUserDataConstraint().addDescription("en");
        des1.setDescription("This is the Confidential Security Transport");
        des2 = sc2.getUserDataConstraint().addDescription("fr");
        des2.setDescription("Ceci est le Transport Confidentiel de S�curit�");
    }
View Full Code Here

        assertEquals(dn6.getLang(), "fr");
        assertEquals(dn6.getDisplayName(), "�coutez!");
       
        List<SecurityConstraint> scs = app.getSecurityConstraints();
        assertEquals(scs.size(), 2);
        SecurityConstraint sc1 = scs.get(0);
        assertEquals(sc1.getUserDataConstraint().getTransportGuarantee(), UserDataConstraint.INTEGRAL);
        DisplayName scdn1 = sc1.getDisplayName(new Locale("en"));
        assertEquals(scdn1.getLang(), "en");
        assertEquals(scdn1.getDisplayName(), "Integral Security Transport");
        DisplayName scdn2 = sc1.getDisplayName(new Locale("fr"));
        assertEquals(scdn2.getDisplayName(), "Transport Int�gral de S�curit�");
        assertEquals(sc1.getPortletNames().get(0), "PortletOne");
        assertEquals(sc1.getPortletNames().get(1), "PortletTwo");
        assertEquals(sc1.getPortletNames().get(2), "PortletThree");
        Description des1 = sc1.getUserDataConstraint().getDescription(new Locale("en"));
        assertEquals(des1.getLang(), "en");
        assertEquals(des1.getDescription(), "This is the Integral Security Transport");
        Description des2 = sc1.getUserDataConstraint().getDescription(new Locale("fr"));
        assertEquals(des2.getLang(), "fr");
        assertEquals(des2.getDescription(), "Ceci est le Transport Int�gral de S�curit�");

        SecurityConstraint sc2 = scs.get(1);
        assertEquals(sc2.getUserDataConstraint().getTransportGuarantee(), UserDataConstraint.CONFIDENTIAL);
        scdn1 = sc2.getDisplayName(new Locale("en"));
        assertEquals(scdn1.getLang(), "en");
        assertEquals(scdn1.getDisplayName(), "Confidential Security Transport");
        scdn2 = sc2.getDisplayName(new Locale("fr"));
        assertEquals(scdn2.getDisplayName(), "Transport Confidentiel de S�curit�");
        assertEquals(sc2.getPortletNames().get(0), "PortletA");
        assertEquals(sc2.getPortletNames().get(1), "PortletB");
        des1 = sc2.getUserDataConstraint().getDescription(new Locale("en"));
        assertEquals(des1.getLang(), "en");
        assertEquals(des1.getDescription(), "This is the Confidential Security Transport");
        des2 = sc2.getUserDataConstraint().getDescription(new Locale("fr"));
        assertEquals(des2.getLang(), "fr");
        assertEquals(des2.getDescription(), "Ceci est le Transport Confidentiel de S�curit�");       
    }
View Full Code Here

                jdesc.setDescription(desc.getDescription());
            }
        }
        for (org.apache.pluto.container.om.portlet.SecurityConstraint sc :  pa.getSecurityConstraints())
        {
            SecurityConstraint jsc = jpa.addSecurityConstraint(sc.getUserDataConstraint().getTransportGuarantee());
            for (org.apache.pluto.container.om.portlet.DisplayName dn : sc.getDisplayNames())
            {
                DisplayName jdn = jsc.addDisplayName(dn.getLang());
                jdn.setDisplayName(dn.getDisplayName());
            }
            for (String portletName : sc.getPortletNames())
            {
                jsc.addPortletName(portletName);
            }           
        }
        for (org.apache.pluto.container.om.portlet.UserAttribute ua : pa.getUserAttributes())
        {
            UserAttribute jua = jpa.addUserAttribute(ua.getName());
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.om.portlet.SecurityConstraint

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.