Package com.dottydingo.hyperion.exception

Examples of com.dottydingo.hyperion.exception.NotFoundException


    private EntityPlugin<C,?,ID> getEntityPlugin(String entity)
    {
        EntityPlugin<C,?,ID> plugin = serviceRegistry.getPluginForName(entity);
        if(plugin == null)
            throw new NotFoundException(String.format("%s is not a valid entity.",entity));

        return plugin;
    }
View Full Code Here


        Translator<C,P> translator = apiVersionPlugin.getTranslator();

        P existing = jpaRepository.findOne(ids.get(0));

        if(existing == null)
            throw new NotFoundException(
                    String.format("%s with id %s was not found.",context.getEntity(),ids.get(0)));

        apiVersionPlugin.getValidator().validateUpdate(item,existing);

        if(!persistenceFilter.canUpdate(existing,context))
View Full Code Here

    private EntityPlugin<C,?,ID> getEntityPlugin(String entity)
    {
        EntityPlugin<C,?,ID> plugin = serviceRegistry.getPluginForName(entity);
        if(plugin == null)
            throw new NotFoundException(String.format("%s is not a valid entity.",entity));

        return plugin;
    }
View Full Code Here

        Translator<C,P> translator = apiVersionPlugin.getTranslator();

        P existing = dao.find(context.getEntityPlugin().getEntityClass(),ids.get(0));

        if(existing == null)
            throw new NotFoundException(
                    String.format("%s with id %s was not found.",context.getEntity(),ids.get(0)));

        apiVersionPlugin.getValidator().validateUpdate(item,existing);

        if(!persistenceFilter.canUpdate(existing,context))
View Full Code Here

        Dao<P,ID> dao = context.getEntityPlugin().getDao();
        P existing = dao.find(context.getEntityPlugin().getEntityClass(),ids.get(0));

        if(existing == null)
            throw new NotFoundException(
                    String.format("%s with id %s was not found.",context.getEntity(),ids.get(0)));

        apiVersionPlugin.getValidator().validateUpdate(item,existing, context);

        if(!context.getEntityPlugin().getPersistenceFilter().canUpdate(existing,context))
View Full Code Here

        HyperionResponse response = phaseContext.getEndpointResponse();

        UriRequestResult uriRequestResult = uriParser.parseRequestUri(request.getResourceUri());

        if(uriRequestResult == null)
            throw new NotFoundException(String.format("%s is not recognized.",request.getResourceUri()));

        String entityName = uriRequestResult.getEndpoint();

        EntityPlugin plugin = serviceRegistry.getPluginForName(entityName);
        if(plugin == null)
            throw new NotFoundException(String.format("%s is not a valid entity.",entityName));

        phaseContext.setEntityPlugin(plugin);

        phaseContext.setRequestMethod(getHttpMethod(request.getRequestMethod()));
        String requestMethod = getEffectiveMethod(request);
View Full Code Here

        Dao<P,ID> dao = context.getEntityPlugin().getDao();
        P existing = dao.find(context.getEntityPlugin().getEntityClass(),ids.get(0));

        if(existing == null)
            throw new NotFoundException(
                    String.format("%s with id %s was not found.",context.getEntity(),ids.get(0)));

        apiVersionPlugin.getValidator().validateUpdate(item,existing, context);

        if(!context.getEntityPlugin().getPersistenceFilter().canUpdate(existing,context))
View Full Code Here

TOP

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

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.