/** * Returns true if the group has an attribute with the configured name and value. * * {@inheritDoc} */ public boolean matches(Object group) { if (!(group instanceof Group)) { return false; } try { return value.equals(((Group) group).getAttributeOrFieldValue(name, true, false)); } catch (AttributeNotFoundException e) { return false; } } }
/** * config url if set * @return the config url if set */ public String getMembershipConfigUrl() { if (this.hasMembershipConfigUrl == null) { if (this.group == null) { //sidestep return null; } //default to false this.hasMembershipConfigUrl = false; if (GrouperUiConfig.retrieveConfig().propertyValueBoolean("simpleMembershipUpdate.allowExternalUrlProperties", false)) { final GroupType groupType = GroupTypeFinder.find("grouperGroupMembershipSettings", false); if (groupType != null && GuiGroup.this.group.hasType(groupType)) { this.configUrl = GuiGroup.this.group.getAttributeOrFieldValue("grouperGroupMshipSettingsUrl", false, false); this.hasMembershipConfigUrl = !StringUtils.isBlank(this.configUrl); } } } return this.hasMembershipConfigUrl ? this.configUrl : null; }
/** * Return an attribute representing the {@link group}. * * @param member the member * @return the attribute */ protected BaseAttribute buildAttribute(Group group) { BaseAttribute attribute = new BasicAttribute(getId()); for (AttributeIdentifier attributeIdentifier : getAttributeIdentifiers()) { if (attributeIdentifier.getSource().equals(SubjectFinder.internal_getGSA().getId())) { attribute.getValues().add(group.getAttributeOrFieldValue(attributeIdentifier.getId(), false, false)); } } return attribute; }