Package org.openengsb.core.services.internal.security.model

Examples of org.openengsb.core.services.internal.security.model.EntryValue


                    entryElement.setValue(LdapUtils.extractAttributeEmptyCheck(propertyValue.getEntry(),
                            SchemaConstants.STRING_ATTRIBUTE));
                    entryElements.add(entryElement);
                }
                String key = LdapUtils.extractAttributeEmptyCheck(property.getEntry(), SchemaConstants.CN_ATTRIBUTE);
                EntryValue entryValue = new EntryValue(key, entryElements);
                attributes.put(key, entryValue); // TODO why need key 2x?
            }
            String type = LdapUtils.extractAttributeEmptyCheck(permission.getEntry(),
                    SchemaConstants.JAVA_CLASS_NAME_ATTRIBUTE);
            PermissionData data = new PermissionData();
View Full Code Here


    }

    @Override
    public List<Object> getUserAttribute(String username, String attributename) throws UserNotFoundException {
        UserData user = doFindUser(username);
        EntryValue entryValue = user.getAttributes().get(attributename);
        if (entryValue == null) {
            return null;
        }
        List<EntryElement> value = entryValue.getValue();
        return EntryUtils.convertAllEntryElementsToObject(value);
    }
View Full Code Here

    }

    @Override
    public void setUserAttribute(String username, String attributename, Object... value) throws UserNotFoundException {
        UserData user = doFindUser(username);
        EntryValue entryValue = new EntryValue();
        entryValue.setKey(attributename);
        List<EntryElement> entryElementList = EntryUtils.makeEntryElementList(value);
        entryValue.setValue(entryElementList);
        user.getAttributes().put(attributename, entryValue);
        synchronized (entityManager) {
            entityManager.merge(user);
        }
    }
View Full Code Here

    }

    @Override
    public void removeUserAttribute(String username, String attributename) throws UserNotFoundException {
        UserData user = doFindUser(username);
        EntryValue entryValue = user.getAttributes().get(attributename);
        if (entryValue == null) {
            // silently fail if attribute is not present
            LOGGER.warn("user does not have attribute, " + attributename);
            return;
        }
View Full Code Here

        public EntryValue transformEntry(String key, Object value) {
            if (value == null) {
                return null;
            }
            if (value instanceof Collection) {
                return new EntryValue(key, convertAllObjectsToEntryElements((Collection<Object>) value));
            }
            if (value.getClass().isArray()) {
                return new EntryValue(key, convertAllObjectsToEntryElements((Object[]) value));
            }
            return new EntryValue(key, Arrays.asList(transformObjectToEntryElement(value)));
        }
View Full Code Here

TOP

Related Classes of org.openengsb.core.services.internal.security.model.EntryValue

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.