Package org.jboss.resteasy.spi

Examples of org.jboss.resteasy.spi.NotFoundException


            throw new UnauthorizedException("Bearer");
        }

        ClientModel client = realm.findClient(token.getIssuedFor());
        if (client == null) {
            throw new NotFoundException("Could not find client for authorization");

        }

        return new AdminAuth(realm, authResult.getToken(), authResult.getUser(), client);
    }
View Full Code Here


     */
    @Path("{app-name}")
    public ApplicationResource getApplication(final @PathParam("app-name") String name) {
        ApplicationModel applicationModel = getApplicationByPathParam(name);
        if (applicationModel == null) {
            throw new NotFoundException("Could not find application: " + name);
        }
        ApplicationResource applicationResource = new ApplicationResource(realm, auth, applicationModel, session);
        ResteasyProviderFactory.getInstance().injectProperties(applicationResource);
        //resourceContext.initResource(applicationResource);
        return applicationResource;
View Full Code Here

        auth.requireManage();

        for (RoleRepresentation role : roles) {
            RoleModel roleModel = realm.getRoleById(role.getId());
            if (roleModel == null) {
                throw new NotFoundException("Role not found");
            }
            client.addScopeMapping(roleModel);
        }

View Full Code Here

        } else {
            for (RoleRepresentation role : roles) {
                RoleModel roleModel = realm.getRoleById(role.getId());
                if (roleModel == null) {
                    throw new NotFoundException("Application not found");
                }
                client.deleteScopeMapping(roleModel);
            }
        }
    }
View Full Code Here

    @Path("applications/{app}")
    public ScopeMappedApplicationResource getApplicationScopeMappings(@PathParam("app") String appName) {
        ApplicationModel app = realm.getApplicationByName(appName);

        if (app == null) {
            throw new NotFoundException("Role not found");
        }

        return new ScopeMappedApplicationResource(realm, auth, client, session, app);
    }
View Full Code Here

    @Path("applications-by-id/{appId}")
    public ScopeMappedApplicationResource getApplicationByIdScopeMappings(@PathParam("appId") String appId) {
        ApplicationModel app = realm.getApplicationById(appId);

        if (app == null) {
            throw new NotFoundException("Application not found");
        }

        return new ScopeMappedApplicationResource(realm, auth, client, session, app);
    }
View Full Code Here

        }
        String format = config.getFormat();
        String privatePem = client.getAttribute(privateAttribute);
        String certPem = client.getAttribute(certificateAttribute);
        if (privatePem == null && certPem == null) {
            throw new NotFoundException("keypair not generated for client");
        }
        if (privatePem != null && config.getKeyPassword() == null) {
            throw new BadRequestException("Need to specify a key password for jks download");
        }
        if (config.getStorePassword() == null) {
View Full Code Here

        for (TesterRoute route : testerRoutes) {
            if (route.matches(requestUri)) {
                return route.getHttpAppTester();
            }
        }
        throw new NotFoundException("Unknown Route: " + requestUri);
    }
View Full Code Here

    List<Place> result=null;
    PlaceList placelist = PlaceListResource.getInstance().getPlaces(user);
    if(placelist!=null){
      result=placelist.getPlaces();
    }else
      throw new NotFoundException("placelist"+user+" not found");
   
    return result;
    // TODO: Implement method
  }
View Full Code Here

  @Produces("application/json")
  @Path("/{user}")
  public PlaceList getPlaces(@PathParam("user")String user){
    PlaceList list = repository.get(user);
    if (list == null) {
      throw new NotFoundException("El "+user+" no ha sido encontrado");
    }
    return list;
  }
View Full Code Here

TOP

Related Classes of org.jboss.resteasy.spi.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.