Examples of CAttr


Examples of org.apache.syncope.core.persistence.beans.conf.CAttr

        return binder.getConfTO(confDAO.get());
    }

    @PreAuthorize("hasRole('CONFIGURATION_READ')")
    public AttributeTO read(final String key) {
        CAttr conf = confDAO.find(key);
        if (conf == null) {
            throw new NotFoundException("Configuration key " + key);
        }

        return binder.getAttributeTO(conf);
View Full Code Here

Examples of org.apache.syncope.core.persistence.beans.conf.CAttr

                break;
            case MEMBERSHIP:
                result = (T) new MAttr();
                break;
            case CONFIGURATION:
                result = (T) new CAttr();
            default:
        }

        return result;
    }
View Full Code Here

Examples of org.apache.syncope.core.persistence.beans.conf.CAttr

            if (user != null) {
                if (user.isSuspended() != null && user.isSuspended()) {
                    throw new DisabledException("User " + user.getUsername() + " is suspended");
                }

                CAttr authStatuses = confDAO.find("authentication.statuses");
                if (authStatuses != null && !authStatuses.getValuesAsStrings().contains(user.getStatus())) {
                    throw new DisabledException("User " + user.getUsername() + " not allowed to authenticate");
                }

                authenticated = authenticate(user, authentication.getCredentials().toString());
View Full Code Here

Examples of org.apache.syncope.core.persistence.beans.conf.CAttr

            confSchema.setMultivalue(value.contains("|"));
            confSchema.setUniqueConstraint(false);
            confSchema.setReadonly(false);
            confSchema = schemaDAO.save(confSchema);
            // 2. create and save CAttr
            final CAttr confAttr = new CAttr();
            confAttr.setSchema(confSchema);
            confAttr.setOwner(confDAO.get());
            if (confSchema.isMultivalue()) {
                for (String singleValue : value.split("|")) {
                    confAttr.addValue(singleValue, AttributableUtil.getInstance(AttributableType.CONFIGURATION));
                }
            } else {
                confAttr.addValue(value, AttributableUtil.getInstance(AttributableType.CONFIGURATION));
            }
            confDAO.save(confAttr);
        }
    }
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.