Package org.wso2.carbon.registry.core.exceptions

Examples of org.wso2.carbon.registry.core.exceptions.RegistryException


                        if (requestContext.isSimulation()) {
                            return;
                        }
                        // We will be concatenating the incoming exception's message so that it will
                        // be carried forward, and displayed at the client-side.
                        throw new RegistryException(
                                "An exception occurred while executing handler chain. " +
                                        e.getMessage(), e);
                    }
                    if (isProcessingComplete(requestContext)) {
                        break;
View Full Code Here


                        if (requestContext.isSimulation()) {
                            return;
                        }
                        // We will be concatenating the incoming exception's message so that it will
                        // be carried forward, and displayed at the client-side.
                        throw new RegistryException(
                                "An exception occurred while executing handler chain. " +
                                        e.getMessage(), e);
                    }
                    if (isProcessingComplete(requestContext)) {
                        break;
View Full Code Here

                        if (requestContext.isSimulation()) {
                            return;
                        }
                        // We will be concatenating the incoming exception's message so that it will
                        // be carried forward, and displayed at the client-side.
                        throw new RegistryException(
                                "An exception occurred while executing handler chain. " +
                                        e.getMessage(), e);
                    }
                    if (isProcessingComplete(requestContext)) {
                        break;
View Full Code Here

     */
    public void put(String path, Resource resource) throws RegistryException {

        // Refer org.wso2.carbon.registry.core.test.jdbc.JDBCRegistryTest
        if (illegalCharactersPattern.matcher(path).matches()) {  //"[~!@#$;%^*()+={}[]|\\<>\"\',]"
            throw new RegistryException("The path '" + path + "' contains one or more illegal " +
                    "characters (~!@#$;%^*()+={}|\\<>\"\',)");
        } else if (RegistryConstants.CHECK_IN_META_DIR.equals(path)) {
            throw new RegistryException(RegistryConstants.CHECK_IN_META_DIR + " is an illegal " +
                    "name for a resource.");
        }

        String purePath = RegistryUtils.getPureResourcePath(path);

View Full Code Here

                        if (requestContext.isSimulation()) {
                            return;
                        }
                        // We will be concatenating the incoming exception's message so that it will
                        // be carried forward, and displayed at the client-side.
                        throw new RegistryException(
                                "An exception occurred while executing handler chain. " +
                                        e.getMessage(), e);
                    }
                    if (isProcessingComplete(requestContext)) {
                        break;
View Full Code Here

        URL url;
        try {
            if (sourceURL != null && sourceURL.toLowerCase().startsWith("file:")) {
                String msg = "The source URL must not be file in the server's local file system";
                throw new RegistryException(msg);
            }
            url = new URL(sourceURL);
        } catch (MalformedURLException e) {
            String msg = "Given source URL is not valid.";
            throw new RegistryException(msg, e);
        }

        try {
            URLConnection uc = url.openConnection();
            InputStream in = uc.getInputStream();
            String mediaType = metaResource.getMediaType();
            if (mediaType == null) {
                mediaType = uc.getContentType();
            }
            metaResource.setMediaType(mediaType);
            metaResource.setDescription(metaResource.getDescription());
            metaResource.setContentStream(in);
            put(purePath, metaResource);

        } catch (IOException e) {

            String msg = "Could not read from the given URL: " + sourceURL;
            throw new RegistryException(msg, e);
        }

        return purePath;
    }
View Full Code Here

                        if (requestContext.isSimulation()) {
                            return;
                        }
                        // We will be concatenating the incoming exception's message so that it will
                        // be carried forward, and displayed at the client-side.
                        throw new RegistryException(
                                "An exception occurred while executing handler chain. " +
                                        e.getMessage(), e);
                    }
                    if (isProcessingComplete(requestContext)) {
                        break;
View Full Code Here

                }
            }
            if (resourceDO == null) {
                String msg = "Failed to delete resource " + path + ". Resource does not exist.";
                log.error(msg);
                throw new RegistryException(msg);
            }
        }

        if (!AuthorizationUtils.authorize(path, ActionConstants.DELETE)) {
            String msg = "User " + CurrentSession.getUser() + " is not authorized to " +
View Full Code Here

                        if (requestContext.isSimulation()) {
                            return;
                        }
                        // We will be concatenating the incoming exception's message so that it will
                        // be carried forward, and displayed at the client-side.
                        throw new RegistryException(
                                "An exception occurred while executing handler chain. " +
                                        e.getMessage(), e);
                    }
                    if (isProcessingComplete(requestContext)) {
                        break;
View Full Code Here

                        if (requestContext.isSimulation()) {
                            return;
                        }
                        // We will be concatenating the incoming exception's message so that it will
                        // be carried forward, and displayed at the client-side.
                        throw new RegistryException(
                                "An exception occurred while executing handler chain. " +
                                        e.getMessage(), e);
                    }
                    if (isProcessingComplete(requestContext)) {
                        break;
View Full Code Here

TOP

Related Classes of org.wso2.carbon.registry.core.exceptions.RegistryException

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.