Package com.dottydingo.hyperion.exception

Examples of com.dottydingo.hyperion.exception.ValidationException


        ID oldId = existing.getId();

        translator.copyClient(item, existing,context);

        if(oldId != null && !oldId.equals(existing.getId()))
            throw new ValidationException("Id in URI does not match the Id in the payload.");

        return translator.convertPersistent(jpaRepository.save(existing), context);

    }
View Full Code Here


        ID oldId = existing.getId();

        translator.copyClient(item, existing,context);

        if(oldId != null && !oldId.equals(existing.getId()))
            throw new ValidationException("Id in URI does not match the Id in the payload.");

        context.setWriteContext(WriteContext.update);
        return translator.convertPersistent(dao.update(existing), context);

    }
View Full Code Here

        ID oldId = existing.getId();

        boolean dirty = translator.copyClient(item, existing,context);

        if(oldId != null && !oldId.equals(existing.getId()))
            throw new ValidationException("Id in URI does not match the Id in the payload.");

        context.setWriteContext(WriteContext.update);
        if(dirty)
        {
            P persistent = doUpdate(context, existing);
View Full Code Here

            throw new ConflictException(buildErrorMessage(persistenceContext,CONFLICT,persistenceContext.getHttpMethod(),persistenceContext.getEntity()),
                    buildErrorDetails(errorContext,persistenceContext));

        validateCreate(clientObject,errorContext,persistenceContext);
        if(errorContext.hasErrors())
            throw new ValidationException(buildValidationErrorMessage(errorContext, persistenceContext),
                    buildErrorDetails(errorContext,persistenceContext));
    }
View Full Code Here

            throw new ConflictException(buildErrorMessage(persistenceContext,CONFLICT,persistenceContext.getHttpMethod(),persistenceContext.getEntity()),
                    buildErrorDetails(errorContext,persistenceContext));

        validateUpdate(clientObject,persistentObject,errorContext,persistenceContext);
        if(errorContext.hasErrors())
            throw new ValidationException(buildValidationErrorMessage(errorContext, persistenceContext),
                    buildErrorDetails(errorContext,persistenceContext));
    }
View Full Code Here

            throw new ConflictException(buildErrorMessage(persistenceContext,CONFLICT,persistenceContext.getHttpMethod(),persistenceContext.getEntity()),
                    buildErrorDetails(errorContext,persistenceContext));

        validateDelete(persistentObject, errorContext,persistenceContext);
        if(errorContext.hasErrors())
            throw new ValidationException(buildValidationErrorMessage(errorContext, persistenceContext),
                    buildErrorDetails(errorContext,persistenceContext));
    }
View Full Code Here

    public void validateCreate(C clientObject, PersistenceContext persistenceContext)
    {
        ValidationErrorContext errorContext = new ValidationErrorContext();
        validateCreate(clientObject,errorContext,persistenceContext);
        if(errorContext.hasErrors())
            throw new ValidationException(buildValidationErrorMessage(errorContext));
    }
View Full Code Here

    public void validateUpdate(C clientObject, P persistentObject, PersistenceContext persistenceContext)
    {
        ValidationErrorContext errorContext = new ValidationErrorContext();
        validateUpdate(clientObject,persistentObject,errorContext,persistenceContext);
        if(errorContext.hasErrors())
            throw new ValidationException(buildValidationErrorMessage(errorContext));
    }
View Full Code Here

    public void validateDelete(P persistentObject, PersistenceContext persistenceContext)
    {
        ValidationErrorContext errorContext = new ValidationErrorContext();
        validateDelete(persistentObject, errorContext,persistenceContext);
        if(errorContext.hasErrors())
            throw new ValidationException(buildValidationErrorMessage(errorContext));
    }
View Full Code Here

        ID oldId = existing.getId();

        boolean dirty = translator.copyClient(item, existing,context);

        if(oldId != null && !oldId.equals(existing.getId()))
            throw new ValidationException("Id in URI does not match the Id in the payload.");

        context.setWriteContext(WriteContext.update);
        if(dirty)
        {
            P persistent = dao.update(existing);
View Full Code Here

TOP

Related Classes of com.dottydingo.hyperion.exception.ValidationException

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.