Examples of SecurityAttributes


Examples of org.apache.jetspeed.security.SecurityAttributes

                    }
                    portalUserExists = true;

                    // update portal user attributes
                    boolean portalUserAttributesUpdated = false;
                    SecurityAttributes portalUserAttributes = portalUser.getSecurityAttributes();
                    for (Map.Entry<String,String> attribute : userAttributes.entrySet())
                    {
                        String name = attribute.getKey();
                        String value = attribute.getValue();
                        SecurityAttribute userAttribute = portalUserAttributes.getAttribute(name, true);
                        if (!value.equals(userAttribute.getStringValue()))
                        {
                            userAttribute.setStringValue(value);
                            portalUserAttributesUpdated = true;
                        }
View Full Code Here

Examples of org.apache.jetspeed.security.SecurityAttributes

            }
           
            // assign user attributes to user
            if (userInfo != null)
            {
                SecurityAttributes userAttrs = user.getSecurityAttributes();
                Iterator info = userInfo.entrySet().iterator();
               
                while (info.hasNext())
                {          
                    Map.Entry entry = (Map.Entry) info.next();
                    userAttrs.getAttribute((String) entry.getKey(), true).setStringValue((String) entry.getValue());
                }
            }
           
            // assign profiling rules to user
            if (rules == null || rules.isEmpty())
View Full Code Here

Examples of org.apache.jetspeed.security.SecurityAttributes

                        }
                    }
                    JSUserAttributes attributes = jsuser.getUserInfo();
                    if (attributes != null)
                    {
                        SecurityAttributes userSecAttrs = user.getSecurityAttributes();
                       
                        for (JSNVPElement element : attributes.getValues())
                        {
                            // assume old-style user info comes from 2.1.X exports: convert
                            // user info keys into equivalent 2.2.X security attribute keys
                            String userInfoKey = element.getKey();
                            String securityAttributeKey = userInfoKey;
                            if (userInfoKey.equals(USER_INFO_SUBSITE))
                            {
                                securityAttributeKey = User.JETSPEED_USER_SUBSITE_ATTRIBUTE;
                            }
                            String securityAttributeValue = element.getValue();
                            // set security attribute
                            userSecAttrs.getAttribute(securityAttributeKey, true).setStringValue(securityAttributeValue);
                        }
                    }
                    JSNVPElements jsNVP = jsuser.getSecurityAttributes();
                    if ((jsNVP != null) && (jsNVP.getValues() != null))
                    {
                        SecurityAttributes userSecAttrs = user.getSecurityAttributes();
                       
                        for (JSNVPElement element : jsNVP.getValues())
                        {
                            userSecAttrs.getAttribute(element.getKey(), true).setStringValue(element.getValue());
                        }
                    }
                    refs.getPrincipalMap(JetspeedPrincipalType.USER).put(jsuser.getName(), user);
                    userManager.updateUser(user);
                }
View Full Code Here

Examples of org.openengsb.core.api.security.annotation.SecurityAttributes

            Class<? extends IRequestableComponent> componentClass) {
        SecurityAttribute annotation = componentClass.getAnnotation(SecurityAttribute.class);
        if (annotation != null) {
            return Arrays.asList(convertAnnotationToEntry(annotation));
        }
        SecurityAttributes annotation2 = componentClass.getAnnotation(SecurityAttributes.class);
        if (annotation2 != null) {
            Collection<SecurityAttributeEntry> result = Lists.newArrayList();
            for (SecurityAttribute a : annotation2.value()) {
                result.add(convertAnnotationToEntry(a));
            }
            return result;
        }
        return null;
View Full Code Here

Examples of org.openengsb.core.api.security.annotation.SecurityAttributes

    private SecurityAttribute[] findAllSecurityAttributeAnnotations(AnnotatedElement serviceClass) {
        SecurityAttribute annotation = serviceClass.getAnnotation(SecurityAttribute.class);
        if (annotation != null) {
            return new SecurityAttribute[]{ annotation };
        }
        SecurityAttributes annotations = serviceClass.getAnnotation(SecurityAttributes.class);
        if (annotations == null) {
            return new SecurityAttribute[0];
        }
        return annotations.value();
    }
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.