Package org.apache.syncope.types

Examples of org.apache.syncope.types.SchemaType


        final Entry<AbstractSchema, List<AbstractAttrValue>> entry =
                SchemaMappingUtil.getIntValues(mapping, attributables, password, schemaDAO);

        final List<AbstractAttrValue> values = entry.getValue();
        final AbstractSchema schema = entry.getKey();
        final SchemaType schemaType = schema == null ? SchemaType.String : schema.getType();

        final String extAttrName = SchemaMappingUtil.getExtAttrName(mapping);

        LOG.debug("Define mapping for: "
                + "\n* ExtAttrName " + extAttrName
                + "\n* is accountId " + mapping.isAccountid()
                + "\n* is password " + (mapping.isPassword() || mapping.getIntMappingType().equals(
                IntMappingType.Password))
                + "\n* mandatory condition " + mapping.getMandatoryCondition()
                + "\n* Schema " + mapping.getIntAttrName()
                + "\n* IntMappingType " + mapping.getIntMappingType().toString()
                + "\n* ClassType " + schemaType.getClassName()
                + "\n* Values " + values);

        List<Object> objValues = new ArrayList<Object>();

        for (AbstractAttrValue value : values) {
            if (FrameworkUtil.isSupportedAttributeType(Class.forName(schemaType.getClassName()))) {
                objValues.add(value.getValue());
            } else {
                objValues.add(value.getValueAsString());
            }
        }
View Full Code Here


        final List<AbstractAttrValue> values =
                SchemaMappingUtil.getIntValues(mapping, attributables, password, vAttrsToBeRemoved, vAttrsToBeUpdated);

        AbstractSchema schema = null;
        final SchemaType schemaType;
        switch (mapping.getIntMappingType()) {
            case UserSchema:
            case RoleSchema:
            case MembershipSchema:
                schema = schemaDAO.find(mapping.getIntAttrName(),
                        SchemaMappingUtil.getIntMappingTypeClass(mapping.getIntMappingType()));
                schemaType = schema == null ? SchemaType.String : schema.getType();
                break;

            case UserVirtualSchema:
                LOG.debug("Expire entry cache {}-{}", user.getId(), mapping.getIntAttrName());
                virAttrCache.expire(AttributableType.USER, user.getId(), mapping.getIntAttrName());
            // no break ....
            default:
                schemaType = SchemaType.String;
        }

        final String extAttrName = SchemaMappingUtil.getExtAttrName(mapping);

        LOG.debug("Define mapping for: "
                + "\n* ExtAttrName " + extAttrName
                + "\n* is accountId " + mapping.isAccountid()
                + "\n* is password " + (mapping.isPassword() || mapping.getIntMappingType() == IntMappingType.Password)
                + "\n* mandatory condition " + mapping.getMandatoryCondition()
                + "\n* Schema " + mapping.getIntAttrName()
                + "\n* IntMappingType " + mapping.getIntMappingType().toString()
                + "\n* ClassType " + schemaType.getClassName()
                + "\n* Values " + values);

        List<Object> objValues = new ArrayList<Object>();

        for (AbstractAttrValue value : values) {
            if (FrameworkUtil.isSupportedAttributeType(Class.forName(schemaType.getClassName()))) {
                objValues.add(value.getValue());
            } else {
                objValues.add(value.getValueAsString());
            }
        }
View Full Code Here

        final Entry<AbstractSchema, List<AbstractAttrValue>> entry =
                SchemaMappingUtil.getIntValues(mapping, attributables, password, schemaDAO);

        final List<AbstractAttrValue> values = entry.getValue();
        final AbstractSchema schema = entry.getKey();
        final SchemaType schemaType = schema == null ? SchemaType.String : schema.getType();

        final String extAttrName = SchemaMappingUtil.getExtAttrName(mapping);

        LOG.debug("Define mapping for: "
                + "\n* ExtAttrName " + extAttrName
                + "\n* is accountId " + mapping.isAccountid()
                + "\n* is password " + (mapping.isPassword() || mapping.getIntMappingType().equals(
                IntMappingType.Password))
                + "\n* mandatory condition " + mapping.getMandatoryCondition()
                + "\n* Schema " + mapping.getIntAttrName()
                + "\n* IntMappingType " + mapping.getIntMappingType().toString()
                + "\n* ClassType " + schemaType.getClassName()
                + "\n* Values " + values);

        List<Object> objValues = new ArrayList<Object>();

        for (AbstractAttrValue value : values) {
            if (FrameworkUtil.isSupportedAttributeType(Class.forName(schemaType.getClassName()))) {
                objValues.add(value.getValue());
            } else {
                objValues.add(value.getValueAsString());
            }
        }
View Full Code Here

        final List<AbstractAttrValue> values =
                SchemaMappingUtil.getIntValues(mapping, attributables, password, vAttrsToBeRemoved, vAttrsToBeUpdated);

        AbstractSchema schema = null;
        final SchemaType schemaType;
        switch (mapping.getIntMappingType()) {
            case UserSchema:
            case RoleSchema:
            case MembershipSchema:
                schema = schemaDAO.find(mapping.getIntAttrName(),
                        SchemaMappingUtil.getIntMappingTypeClass(mapping.getIntMappingType()));
                schemaType = schema == null ? SchemaType.String : schema.getType();
                break;

            case UserVirtualSchema:
                LOG.debug("Expire entry cache {}-{}", user.getId(), mapping.getIntAttrName());
                virAttrCache.expire(AttributableType.USER, user.getId(), mapping.getIntAttrName());
            // no break ....
            default:
                schemaType = SchemaType.String;
        }

        final String extAttrName = SchemaMappingUtil.getExtAttrName(mapping);

        LOG.debug("Define mapping for: "
                + "\n* ExtAttrName " + extAttrName
                + "\n* is accountId " + mapping.isAccountid()
                + "\n* is password " + (mapping.isPassword() || mapping.getIntMappingType() == IntMappingType.Password)
                + "\n* mandatory condition " + mapping.getMandatoryCondition()
                + "\n* Schema " + mapping.getIntAttrName()
                + "\n* IntMappingType " + mapping.getIntMappingType().toString()
                + "\n* ClassType " + schemaType.getClassName()
                + "\n* Values " + values);

        List<Object> objValues = new ArrayList<Object>();

        for (AbstractAttrValue value : values) {
            if (FrameworkUtil.isSupportedAttributeType(Class.forName(schemaType.getClassName()))) {
                objValues.add(value.getValue());
            } else {
                objValues.add(value.getValueAsString());
            }
        }
View Full Code Here

    }

    public String getValueAsString() {
        String result = null;

        final SchemaType type = getAttribute() == null || getAttribute().getSchema() == null
                || getAttribute().getSchema().getType() == null
                ? SchemaType.String
                : getAttribute().getSchema().getType();

        switch (type) {
View Full Code Here

        final Entry<AbstractSchema, List<AbstractAttrValue>> entry = SchemaMappingUtil.getIntValues(mapping,
                attributables, password, schemaDAO);

        final List<AbstractAttrValue> values = entry.getValue();
        final AbstractSchema schema = entry.getKey();
        final SchemaType schemaType = schema == null
                ? SchemaType.String
                : schema.getType();

        final String extAttrName = SchemaMappingUtil.getExtAttrName(mapping);

        LOG.debug("Define mapping for: " + "\n* ExtAttrName " + extAttrName + "\n* is accountId "
                + mapping.isAccountid() + "\n* is password "
                + (mapping.isPassword() || mapping.getIntMappingType().equals(IntMappingType.Password))
                + "\n* mandatory condition " + mapping.getMandatoryCondition() + "\n* Schema "
                + mapping.getIntAttrName() + "\n* IntMappingType " + mapping.getIntMappingType().toString()
                + "\n* ClassType " + schemaType.getClassName() + "\n* Values " + values);

        List<Object> objValues = new ArrayList<Object>();

        for (AbstractAttrValue value : values) {
            if (FrameworkUtil.isSupportedAttributeType(Class.forName(schemaType.getClassName()))) {
                objValues.add(value.getValue());
            } else {
                objValues.add(value.getValueAsString());
            }
        }
View Full Code Here

        final boolean required = templateMode ? false : schemaTO.getMandatoryCondition().equalsIgnoreCase("true");

        final boolean readOnly = templateMode ? false : schemaTO.isReadonly();

        final SchemaType type = templateMode ? SchemaType.String : schemaTO.getType();

        switch (type) {
            case Boolean:
                panel = new AjaxCheckBoxPanel("panel", schemaTO.getName(), new Model());
                panel.setRequired(required);
View Full Code Here

        final Entry<AbstractSchema, List<AbstractAttrValue>> entry =
                SchemaMappingUtil.getIntValues(mapping, attributables, password, schemaDAO);

        final List<AbstractAttrValue> values = entry.getValue();
        final AbstractSchema schema = entry.getKey();
        final SchemaType schemaType = schema == null ? SchemaType.String : schema.getType();

        final String extAttrName = SchemaMappingUtil.getExtAttrName(mapping);

        LOG.debug("Define mapping for: " + "\n* ExtAttrName " + extAttrName + "\n* is accountId "
                + mapping.isAccountid() + "\n* is password "
                + (mapping.isPassword() || mapping.getIntMappingType().equals(IntMappingType.Password))
                + "\n* mandatory condition " + mapping.getMandatoryCondition() + "\n* Schema "
                + mapping.getIntAttrName() + "\n* IntMappingType " + mapping.getIntMappingType().toString()
                + "\n* ClassType " + schemaType.getClassName() + "\n* Values " + values);

        List<Object> objValues = new ArrayList<Object>();

        for (AbstractAttrValue value : values) {
            if (FrameworkUtil.isSupportedAttributeType(Class.forName(schemaType.getClassName()))) {
                objValues.add(value.getValue());
            } else {
                objValues.add(value.getValueAsString());
            }
        }
View Full Code Here

        final List<AbstractAttrValue> values =
                SchemaMappingUtil.getIntValues(mapping, attributables, password, vAttrsToBeRemoved, vAttrsToBeUpdated);

        AbstractSchema schema = null;
        final SchemaType schemaType;
        switch (mapping.getIntMappingType()) {
            case UserSchema:
            case RoleSchema:
            case MembershipSchema:
                schema = schemaDAO.find(mapping.getIntAttrName(),
                        SchemaMappingUtil.getIntMappingTypeClass(mapping.getIntMappingType()));
                schemaType = schema == null ? SchemaType.String : schema.getType();
                break;

            default:
                schemaType = SchemaType.String;
        }

        final String extAttrName = SchemaMappingUtil.getExtAttrName(mapping);

        LOG.debug("Define mapping for: "
                + "\n* ExtAttrName " + extAttrName
                + "\n* is accountId " + mapping.isAccountid()
                + "\n* is password " + (mapping.isPassword() || mapping.getIntMappingType() == IntMappingType.Password)
                + "\n* mandatory condition " + mapping.getMandatoryCondition()
                + "\n* Schema " + mapping.getIntAttrName()
                + "\n* IntMappingType " + mapping.getIntMappingType().toString()
                + "\n* ClassType " + schemaType.getClassName()
                + "\n* Values " + values);

        List<Object> objValues = new ArrayList<Object>();

        for (AbstractAttrValue value : values) {
            if (FrameworkUtil.isSupportedAttributeType(Class.forName(schemaType.getClassName()))) {
                objValues.add(value.getValue());
            } else {
                objValues.add(value.getValueAsString());
            }
        }
View Full Code Here

TOP

Related Classes of org.apache.syncope.types.SchemaType

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.