Package org.wso2.carbon

Examples of org.wso2.carbon.CarbonException


            }

        } catch (Exception e) {
            String msg = "Failed to deploy sample: " + sampleName;
            log.error(msg, e);
            throw new CarbonException(msg, e);
        }

        return true;
    }
View Full Code Here


                }
            }
        } catch (RemoteException e) {
            String msg = "Failed to get sample information";
            log.error(msg, e);
            throw new CarbonException(msg, e);
        }
        return null;
    }
View Full Code Here

        try {
            for (FileItemData fieldData : fileItemsMap.get("marFilename")) {
                String fileName = getFileName(fieldData.getFileItem().getName());
                checkServiceFileExtensionValidity(fileName, ALLOWED_FILE_EXTENSIONS);
                if (!fileName.endsWith(".mar")) {
                    throw new CarbonException("File with extension " + fileName
                                              + " is not supported!");
                } else {
                    ModuleUploadData tempModuleData = new ModuleUploadData();
                    tempModuleData.setDataHandler(fieldData.getDataHandler());
                    tempModuleData.setFileName(fileName);
View Full Code Here

     * @throws CarbonException - Thrown in case validation fails
     */
    public static void validateName(String ncName, String name)
            throws CarbonException {
        if (ncName.length() == 0) {
            throw new CarbonException(
                    "A " + name + " cannot be empty. The " + name + " " + ncName + " was empty");
        }
        char ch = ncName.charAt(0);
        if (!XMLChar.isNCNameStart(ch) || ch == '\u212E') {
            throw new CarbonException(" A " + name + " cannot start with the character " + ch +
                    ". The " + name + " " +
                    ncName + " is not valid");
        }
        for (int i = 1; i < ncName.length(); i++) {
            ch = ncName.charAt(i);
            if (!XMLChar.isNCName(ch) || ch == '\u212E' || ch == '\u00B7' || ch == '\u0387' ||
                    ch == '\u06DD' ||
                    ch == '\u06DE'
                    || ch == '\u002D' || ch == '\u002E') {
                i++;
                throw new CarbonException("The character " + ch + " found at location " + i +
                        " cannot be used in a " + name
                        + ". " + ncName + " is not a valid " + name);
            }
        }
    }
View Full Code Here

        try {
            return stub.getMashupServiceContentAsString(serviceName);
        } catch (RemoteException e) {
            log.error("Error occured while trying to retrieve the contents of the JS Service " +
                      serviceName, e);
            throw new CarbonException(e);
        }
    }
View Full Code Here

            throws CarbonException {
        try {
            return stub.saveMashupServiceSource(serviceName, type, contents);
        } catch (RemoteException e) {
            log.error("Error occured while trying to save the the JS Service " + serviceName, e);
            throw new CarbonException(e);
        } catch (CarbonExceptionException e) {
            log.error("Error occured while trying to save the the JS Service " + serviceName, e);
            throw new CarbonException(e);
        }
    }
View Full Code Here

    public boolean doesServiceExists(String serviceName) throws CarbonException {
        try {
            return stub.doesServiceExists(serviceName);
        } catch (RemoteException e) {
            throw new CarbonException(e);
        } catch (CarbonExceptionException e) {
            throw new CarbonException(e);
        }
    }
View Full Code Here

    public String[] doesServicesExists(String[] serviceNames) throws CarbonException {
        try {
            return stub.doesServicesExists(serviceNames);
        } catch (RemoteException e) {
            throw new CarbonException(e);
        } catch (CarbonExceptionException e) {
            throw new CarbonException(e);
        }
    }
View Full Code Here

    public String getBackendHttpPort() throws CarbonException {
        try {
            return stub.getBackendHttpPort();
        } catch (RemoteException e) {
            throw new CarbonException(e);
        } catch (CarbonExceptionException e) {
            throw new CarbonException(e);
        }
    }
View Full Code Here

            String protocol = (String) args[0];
            im.protocol = protocol;
            try {
                im.imWrapper = IMWrapperFactory.createIMProtocolImpl(protocol);
            } catch (IMException e) {
                throw new CarbonException(e);
            }
        } else {
            throw new CarbonException("Invalid parameters. The name of the IM protocol to be used " +
                    "should be parsed in as a parameter.");
        }
        return im;
    }
View Full Code Here

TOP

Related Classes of org.wso2.carbon.CarbonException

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.