Package com.alu.e3.prov

Examples of com.alu.e3.prov.ProvisionException


  {
    ServletContextHandler context = new ServletContextHandler(server, "/",
        ServletContextHandler.NO_SECURITY | ServletContextHandler.NO_SESSIONS);
    context.setConnectorNames(new String[] {connector.getName()});

    DispatchingContinuationServlet servlet = new DispatchingContinuationServlet();
    servlet.setDispatcher(new TreeDispatcher<HttpConsumer>());
    Long timeout = endpoint.getContinuationTimeout() != null ? endpoint
        .getContinuationTimeout() : getContinuationTimeout();
    if (timeout != null) {
      servlet.setContinuationTimeout(timeout);
    }

    ServletHolder holder = new ServletHolder();
    holder.setServlet(servlet);
    context.addServlet(holder, "/*");
 
View Full Code Here


    if (LOG.isDebugEnabled())
      LOG.debug("Update API ID: {}", apiId);

    // check API ID same in Pay-load/URL
    if (api == null || api.getId() == null)
      throw new WebApplicationException(new ProvisionException(ApplicationCodeConstants.API_ID_NOT_PROVIDED, "API ID missing in the body for Update operation"));

    if (!api.getId().equals(apiId))
      throw new WebApplicationException(new ProvisionException(ApplicationCodeConstants.API_ID_MISMATCH, "API ID not the same in URL vs Body for Update operation: +" + apiId + "/" + apiId));

    Action action = new Action() {
      protected Object doAction(Object... params) {
        try {
          apiService.update(api);
View Full Code Here

  }

  @Override
  public void delete(String apiId) throws ProvisionException {
    if (apiId == null) {
      throw new ProvisionException(ApplicationCodeConstants.API_ID_NOT_PROVIDED, "Missing API ID in the delete request");
    }

    com.alu.e3.data.model.Api api = dataManager.getApiById(apiId, true);

    dataManager.removeApi(apiId);
View Full Code Here

  @Override
  public Api get(String apiId) throws ProvisionException {

    if (apiId == null) {
      LOG.error("Missing API ID in the get request");
      throw new ProvisionException(ApplicationCodeConstants.API_ID_NOT_PROVIDED, "Missing API ID in the get request");
    }

    com.alu.e3.data.model.Api api = dataManager.getApiById(apiId, true);

    Api apiWs = BeanConverterUtil.fromDataModel(api);
View Full Code Here

  }

  private boolean checkCreate(Api api) throws ProvisionException {
    // check api ID does not already exist
    if (api.getId() != null && dataManager.isApiExist(api.getId())) {
      throw new ProvisionException(ApplicationCodeConstants.API_ID_ALREADY_EXIST, "An API with that ID already exist");
    }
   
    //call checkCreateUpdate to perform the common checks
    boolean canCreateJarFile = checkCreateUpdate(api);
   
View Full Code Here

   
    AuthIdsNoIdType authIds = request.getQuotaRLBucket();
   
    if (authIds.getId() != null) {
      if(!authIds.getId().equals(bucketID)){
        throw new WebApplicationException(new ProvisionException(ApplicationCodeConstants.INVALID_XML, "Bucket ID not the same in payload as in URL:" + authIds.getId() +" >> " + bucketID));
      }
     
    }
   
    Action appendBucket = new Action() {
View Full Code Here

   
    AuthIdsNoIdType authIds = request.getQuotaRLBucket();
   
    if (authIds.getId() != null) {
      if(!authIds.getId().equals(bucketID)){
        throw new WebApplicationException(new ProvisionException(ApplicationCodeConstants.INVALID_XML, "Bucket ID not the same in payload as in URL:" + authIds.getId() +" >> " + bucketID));
      }
    }
   
    Action removeAuths = new Action() {
      protected Object doAction(Object... params) {
View Full Code Here

 
  private boolean checkCreate(BulkPolicyQuotaRLBucketType request) throws ProvisionException {
    boolean result = check(request);
   
    if(request.getQuotaRLBucket() == null){
      throw new WebApplicationException(new ProvisionException(ApplicationCodeConstants.INVALID_XML, "Bulk validation failure: bucket of auths missing -> tag <quotaRLBucket>"));
    }
   
    return result;
  }
View Full Code Here

  private boolean check(BulkPolicyQuotaRLBucketType request) throws ProvisionException {
    boolean restult = (request != null);

    if (!restult) {
      throw new WebApplicationException(new ProvisionException(ApplicationCodeConstants.INVALID_XML, "Bulk validation failure: request empty"));
    }

    return restult;

  }
View Full Code Here

    Action action = new Action() {

      protected Object doAction(Object... params) {
        try {
          Api api = apiService.get(apiId);
          return new ApiResponse(ApiResponse.SUCCESS, api);

        } catch (ProvisionException e) {
          throw new WebApplicationException(e);
        }
View Full Code Here

TOP

Related Classes of com.alu.e3.prov.ProvisionException

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.