Examples of RestAPIException


Examples of org.apache.stratos.rest.endpoint.exception.RestAPIException

            } catch (RemoteException e) {
                String errorMsg = "Error while getting available deployment policies for cartridge type " +
                    cartridgeType+". Cause: "+e.getMessage();;
                log.error(errorMsg, e);
                throw new RestAPIException(errorMsg, e);
            }
        }
       
        if(deploymentPolicies.length == 0) {
          String errorMsg = "Cannot find any matching deployment policy for Cartridge [type] "+cartridgeType;
            log.error(errorMsg);
            throw new RestAPIException(errorMsg);
        }

        return PojoConverter.populateDeploymentPolicyPojos(deploymentPolicies);
    }
View Full Code Here

Examples of org.apache.stratos.rest.endpoint.exception.RestAPIException

            } catch (RemoteException e) {
                String errorMsg = "Error while getting deployment policy with id " +
                    deploymentPolicyId+". Cause: "+e.getMessage();
                log.error(errorMsg, e);
                throw new RestAPIException(errorMsg, e);
            }
        }
       
        if(deploymentPolicy == null) {
          String errorMsg = "Cannot find a matching deployment policy for [id] "+deploymentPolicyId;
            log.error(errorMsg);
            throw new RestAPIException(errorMsg);
        }

        return PojoConverter.populateDeploymentPolicyPojo(deploymentPolicy);
    }
View Full Code Here

Examples of org.apache.stratos.rest.endpoint.exception.RestAPIException

            } catch (RemoteException e) {
                String errorMsg = "Error getting available partition groups for deployment policy id "
                    + deploymentPolicyId+". Cause: "+e.getMessage();
                log.error(errorMsg, e);
                throw new RestAPIException(errorMsg, e);
            }
        }

        return PojoConverter.populatePartitionGroupPojos(partitionGroups);
    }
View Full Code Here

Examples of org.apache.stratos.rest.endpoint.exception.RestAPIException

                return cartridge;
            }
        }
        String msg = "Unavailable cartridge type: " + cartridgeType;
        log.error(msg);
        throw new RestAPIException(msg) ;
    }
View Full Code Here

Examples of org.apache.stratos.rest.endpoint.exception.RestAPIException

                }
            }
        } catch (Exception e) {
            String msg = "Error while getting available cartridges. Cause: "+e.getMessage();
            log.error(msg, e);
            throw new RestAPIException(msg, e);
        }

        Collections.sort(cartridges);

        if (log.isDebugEnabled()) {
View Full Code Here

Examples of org.apache.stratos.rest.endpoint.exception.RestAPIException

            services = serviceDeploymentManager.getServices();

        } catch (ADCException e) {
            String msg = "Unable to get deployed service information. Cause: "+e.getMessage();
            log.error(msg, e);
            throw new RestAPIException(msg, e);
        }

        if (services != null && !services.isEmpty()) {
            return PojoConverter.convertToServiceDefinitionBeans(services);
        }
View Full Code Here

Examples of org.apache.stratos.rest.endpoint.exception.RestAPIException

            service = serviceDeploymentManager.getService(type);

        } catch (ADCException e) {
            String msg = "Unable to get deployed service information for [type]: " + type+". Cause: "+e.getMessage();
            log.error(msg, e);
            throw new RestAPIException(msg, e);
        }

        if (service != null) {
            return PojoConverter.convertToServiceDefinitionBean(service);
        }
View Full Code Here

Examples of org.apache.stratos.rest.endpoint.exception.RestAPIException

            services = serviceDeploymentManager.getServices();

        } catch (ADCException e) {
            String msg = "Unable to get deployed service information. Cause: "+e.getMessage();
            log.error(msg, e);
            throw new RestAPIException(msg, e);
        }

        List<Cartridge> availableMultitenantCartridges = new ArrayList<Cartridge>();
        int tenantId = ApplicationManagementUtil.getTenantId(configurationContext);
        //getting the services for the tenantId
View Full Code Here

Examples of org.apache.stratos.rest.endpoint.exception.RestAPIException

                }
            }
        } catch (Exception e) {
            String msg = "Error while getting subscribed cartridges. Cause: "+e.getMessage();
            log.error(msg, e);
            throw new RestAPIException(msg, e);
        }

        Collections.sort(cartridges);

        if (log.isDebugEnabled()) {
View Full Code Here

Examples of org.apache.stratos.rest.endpoint.exception.RestAPIException

                    getTenantId(configurationContext), cartridgeAlias));
     
      if (cartridge == null) {
        String message = "Unregistered [alias]: "+cartridgeAlias+"! Please enter a valid alias.";
        log.error(message);
      throw new RestAPIException(Response.Status.NOT_FOUND, message);
      }
        Cluster cluster = TopologyClusterInformationModel.getInstance().getCluster(ApplicationManagementUtil.getTenantId(configurationContext)
                ,cartridge.getCartridgeType(), cartridge.getCartridgeAlias());
        String cartridgeStatus = "Inactive";
        int activeMemberCount = 0;
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.