public void setSecurityAttributes(Map<String, SecurityAttribute> sa) { for (Map.Entry<String, SecurityAttribute> e : sa.entrySet()) { SecurityAttribute attrib = e.getValue(); JSNVPElement element = new JSNVPElement(attrib.getName(), attrib.getStringValue()); element.setReadOnly(attrib.isReadOnly()); element.setAttribute("datatype",attrib.getDataType().name()); element.setAttribute("registered",Boolean.toString(attrib.isRegistered())); element.setAttribute("required",Boolean.toString(attrib.isRequired())); element.setAttribute("category",attrib.getCategory()); secAttrs.add(element); } }
public Map<String, String> getInfoMap() { HashMap<String, String> map = new HashMap<String,String>(saMap.size()); for (SecurityAttribute sa : saMap.values()) { if (sa.getCategory().equals(SecurityAttributeType.INFO_CATEGORY)) { map.put(sa.getName(), sa.getStringValue()); } } return Collections.unmodifiableMap(map); }
public Set<String> getAttributeNames(String category) { HashSet<String> set = new HashSet<String>(saMap.size()); for (SecurityAttribute sa : saMap.values()) { if (sa.getCategory().equals(category)) { set.add(sa.getName()); } } return Collections.unmodifiableSet(set); }
if (principalAttr != null) feedbackLogger.debug("Removing attribute {} for principal {}", principalAttr.getName(), principal.getName()); principalAttrs.removeAttribute(principalAttr.getName()); updated = true; new String[] {principalAttr.getName(), principal.getName(), attr.getValue()}); principalAttr.setStringValue(attr.getValue()); updated = true; if (!StringUtils.equals(principalAttr.getStringValue(), attr.getValue())) new String[] {principalAttr.getName(), principal.getName(), (principalAttr.getStringValue()), attr.getValue()}); principalAttr.setStringValue(attr.getValue()); updated = true;
String value = attribute.getValue(); SecurityAttribute userAttribute = portalUserAttributes.getAttribute(name, true); if (!value.equals(userAttribute.getStringValue())) userAttribute.setStringValue(value); portalUserAttributesUpdated = true;
user.getSecurityAttributes().getAttribute("user.name.given", true).setStringValue(userNameGiven); user.getSecurityAttributes().getAttribute("user.name.family", true).setStringValue(userNameFamily); user.getSecurityAttributes().getAttribute("user.business-info.online.email", true).setStringValue(userEmail);
public void setSecurityAttributes(Map<String, SecurityAttribute> sa) { this.attributes = new JSSecurityAttributes(); for (Map.Entry<String, SecurityAttribute> e : sa.entrySet()) { SecurityAttribute attrib = e.getValue(); JSNVPElement element = new JSNVPElement(attrib.getName(), attrib.getStringValue()); this.attributes.add(element); } }
public Entity createEntity(JetspeedPrincipal principal) { Set<Attribute> ldapAttrValues = new HashSet<Attribute>(); SecurityAttributes sas = principal.getSecurityAttributes(); for (AttributeDef attrDef : searchConfiguration.getEntityAttributeDefinitionsMap().values()) { if (attrDef.isMapped()) { SecurityAttribute sa = sas.getAttribute(attrDef.getMappedName()); if (sa != null) { // currently only single-valued attributes are supported AttributeImpl attr = new AttributeImpl(attrDef); attr.setValue(sa.getStringValue()); ldapAttrValues.add(attr); } } } return internalCreateEntity(principal.getName(), null, ldapAttrValues); }
SecurityAttribute secAtttr = secAttrs.getAttribute(PortalReservedParameters.USER_HOMEPAGE_REFRESH_FLAG); if (secAtttr != null && Boolean.parseBoolean(secAtttr.getStringValue())) templateFolder = secAttrTemplatePath.getStringValue(); secAtttr.setStringValue("false"); userManager.updateUser(user);
user.getSecurityAttributes().getAttribute("user.name.given", true).setStringValue(userNameGiven); user.getSecurityAttributes().getAttribute("user.name.family", true).setStringValue(userNameFamily); user.getSecurityAttributes().getAttribute("user.business-info.online.email", true).setStringValue(userEmail);
public void setUserInfo(Map<String, SecurityAttribute> sa) { this.userInfo = new JSUserAttributes(); for (Map.Entry<String, SecurityAttribute> e : sa.entrySet()) { SecurityAttribute attrib = e.getValue(); JSNVPElement element = new JSNVPElement(attrib.getName(), attrib.getStringValue()); this.userInfo.add(element); } }
public Map<String, SecurityAttribute> getAttributeMap(String category) { HashMap<String, SecurityAttribute> map = new HashMap<String,SecurityAttribute>(saMap.size()); for (SecurityAttribute sa : saMap.values()) { if (sa.getCategory().equals(category)) { map.put(sa.getName(), sa); } } return Collections.unmodifiableMap(map); }
if (attrib != null) String localeString = attrib.getStringValue(); if (localeString != null)
SecurityAttributes userAttrs = user.getSecurityAttributes(); for (Map.Entry<String, String> entry : userInfo.entrySet()) { userAttrs.getAttribute(entry.getKey(), true).setStringValue(entry.getValue());
public Object run() { try { if (innerUserFolderPath != null) { innerUser.getSecurityAttributes().getAttribute(User.JETSPEED_USER_SUBSITE_ATTRIBUTE, true).setStringValue(innerUserFolderPath); userManager.updateUser(innerUser);
user.getSecurityAttributes().getAttribute(elem.getKey(), true).setStringValue(elem.getValue());
userSecAttrs.getAttribute(securityAttributeKey, true).setStringValue(securityAttributeValue); userSecAttrs.getAttribute(element.getKey(), true).setStringValue(element.getValue()); principal.getSecurityAttributes().getAttribute(elem.getKey(), true).setStringValue(elem.getValue());
innerUser.getSecurityAttributes().getAttribute(User.JETSPEED_USER_SUBSITE_ATTRIBUTE, true).setStringValue(innerSubsite); userManager.updateUser(innerUser);