Package org.apache.stratos.rest.endpoint.exception

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


            } 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

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

                }
            }
        } 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

            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

            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

            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

                }
            }
        } 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

                    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

                ,cartridgeType , cartridgeAlias);
       
        if(cluster == null) {
          String message = "No Cluster found for cartridge [type] "+cartridgeType+", [alias] "+cartridgeAlias;
      log.error(message);
      throw new RestAPIException(message);
        }
       
        for(Member member : cluster.getMembers()) {
            if(member.getStatus().toString().equals(MemberStatus.Activated)) {
                noOfActiveInstances ++;
View Full Code Here

TOP

Related Classes of org.apache.stratos.rest.endpoint.exception.RestAPIException

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.