Package org.apache.syncope.core.util

Examples of org.apache.syncope.core.util.AttributableUtil.schemaClass()


    }

    @RequestMapping(method = RequestMethod.GET, value = "/{kind}/list")
    public List<SchemaTO> list(@PathVariable("kind") final String kind) {
        AttributableUtil attributableUtil = getAttributableUtil(kind);
        List<AbstractSchema> schemas = schemaDAO.findAll(attributableUtil.schemaClass());

        List<SchemaTO> schemaTOs = new ArrayList<SchemaTO>(schemas.size());
        for (AbstractSchema schema : schemas) {
            schemaTOs.add(binder.getSchemaTO(schema));
        }
View Full Code Here


    @RequestMapping(method = RequestMethod.GET, value = "/{kind}/read/{schema}")
    public SchemaTO read(@PathVariable("kind") final String kind, @PathVariable("schema") final String schemaName)
            throws NotFoundException {

        AttributableUtil attributableUtil = getAttributableUtil(kind);
        AbstractSchema schema = schemaDAO.find(schemaName, attributableUtil.schemaClass());
        if (schema == null) {
            throw new NotFoundException("Schema '" + schemaName + "'");
        }

        return binder.getSchemaTO(schema);
View Full Code Here

    }

    @RequestMapping(method = RequestMethod.GET, value = "/{kind}/list")
    public List<SchemaTO> list(@PathVariable("kind") final String kind) {
        AttributableUtil attributableUtil = getAttributableUtil(kind);
        List<AbstractSchema> schemas = schemaDAO.findAll(attributableUtil.schemaClass());

        List<SchemaTO> schemaTOs = new ArrayList<SchemaTO>(schemas.size());
        for (AbstractSchema schema : schemas) {
            schemaTOs.add(schemaDataBinder.getSchemaTO(schema, attributableUtil));
        }
View Full Code Here

    @RequestMapping(method = RequestMethod.GET, value = "/{kind}/read/{schema}")
    public SchemaTO read(@PathVariable("kind") final String kind, @PathVariable("schema") final String schemaName)
            throws NotFoundException {

        AttributableUtil attributableUtil = getAttributableUtil(kind);
        AbstractSchema schema = schemaDAO.find(schemaName, attributableUtil.schemaClass());
        if (schema == null) {
            throw new NotFoundException("Schema '" + schemaName + "'");
        }

        auditManager.audit(Category.schema, SchemaSubCategory.read, Result.success,
View Full Code Here

    @RequestMapping(method = RequestMethod.POST, value = "/{kind}/update")
    public SchemaTO update(@RequestBody final SchemaTO schemaTO, @PathVariable("kind") final String kind)
            throws NotFoundException {

        AttributableUtil attributableUtil = getAttributableUtil(kind);
        AbstractSchema schema = schemaDAO.find(schemaTO.getName(), attributableUtil.schemaClass());
        if (schema == null) {
            throw new NotFoundException("Schema '" + schemaTO.getName() + "'");
        }

        schemaDataBinder.update(schemaTO, schema, attributableUtil);
View Full Code Here

                }
                break;

            case NORMAL:
            default:
                List<AbstractNormalSchema> schemas = schemaDAO.findAll(attrUtil.schemaClass());
                result = (List<T>) new ArrayList<SchemaTO>(schemas.size());
                for (AbstractNormalSchema schema : schemas) {
                    result.add((T) binder.getSchemaTO(schema, attrUtil));
                }
        }
View Full Code Here

                read = (T) binder.getDerSchemaTO(derSchema);
                break;

            case NORMAL:
            default:
                AbstractNormalSchema schema = schemaDAO.find(schemaName, attrUtil.schemaClass());
                if (schema == null) {
                    throw new NotFoundException("Schema '" + schemaName + "'");
                }

                read = (T) binder.getSchemaTO(schema, attrUtil);
View Full Code Here

                derSchemaDAO.save(derSchema);
                break;

            case NORMAL:
            default:
                AbstractNormalSchema schema = schemaDAO.find(schemaTO.getName(), attrUtil.schemaClass());
                if (schema == null) {
                    throw new NotFoundException("Schema '" + schemaTO.getName() + "'");
                }

                binder.update((SchemaTO) schemaTO, schema, attrUtil);
View Full Code Here

        }

        if (name != null) {
            try {
                final AttributableUtil attrUtil = AttributableUtil.valueOf(kind);
                return binder.getSchemaTO(schemaDAO.find(name, attrUtil.schemaClass()), attrUtil);
            } catch (Throwable ignore) {
                LOG.debug("Unresolved reference", ignore);
                throw new UnresolvedReferenceException(ignore);
            }
        }
View Full Code Here

        for (OrderByClause clause : orderByClauses) {
            OrderBySupport.Item obs = new OrderBySupport.Item();

            Field subjectField = ReflectionUtils.findField(attrUtil.attributableClass(), clause.getField());
            if (subjectField == null) {
                AbstractNormalSchema schema = schemaDAO.find(clause.getField(), attrUtil.schemaClass());
                if (schema != null) {
                    if (schema.isUniqueConstraint()) {
                        orderBySupport.views.add(svs.uniqueAttr());

                        obs.select = new StringBuilder().
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.