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

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


                                HandlerLifecycleManager.USER_DEFINED_HANDLER_PHASE);
                        configSystemRegistry.commitTransaction();
                        return status;
                    } catch (Exception e) {
                        configSystemRegistry.rollbackTransaction();
                        throw new RegistryException("Unable to add handler", e);
                    }
                }
            }
        }
        return false;
View Full Code Here


                if (e instanceof RegistryException) {
                    throw (RegistryException)e;
                } else if (e instanceof XMLStreamException) {
                    throw (XMLStreamException)e;
                }
                throw new RegistryException("Unable to build handler configuration", e);
            }
        }
        return false;
    }
View Full Code Here

            Resource handlerRoot = configSystemRegistry.get(getContextRoot());
            if (!(handlerRoot instanceof Collection)) {
                String msg = "Failed to continue as the handler configuration root: " +
                        getContextRoot() + " is not a collection.";
                log.error(msg);
                throw new RegistryException(msg);
            }
            Collection handlerRootCol = (Collection)handlerRoot;
            String[] handlerConfigPaths = handlerRootCol.getChildren();
            if (handlerConfigPaths != null) {
                for (String handlerConfigPath: handlerConfigPaths) {
View Full Code Here

            } else*/ if (requestContext.getSourceURL() != null) {
                return validateWSI(requestContext.getSourceURL());
            }
            return null;
        } catch (Exception e) {
            throw new RegistryException(e.getMessage(), e);
        }
    }
View Full Code Here

            } else*/ if (requestContext.getSourceURL() != null) {
                return validaWSDLFromURI(requestContext.getSourceURL());
            }
            return null;
        } catch (Exception e) {
            throw new RegistryException(e.getMessage());
        }
    }
View Full Code Here

                inputStream = new ByteArrayInputStream((byte[]) resourceContent);
            } else {
                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);
                }
                inputStream = new URL(sourceURL).openStream();
            }
            ResourceBundle rb = ResourceBundle.getBundle("validatewsdl");
            MessageGenerator messagegenerator = new MessageGenerator(rb);
View Full Code Here

        } catch (Exception e) {

            String msg = "Failed to add resource " + path + ". " + e.getMessage();
            log.error(msg, e);
            throw new RegistryException(msg, e);
        }
    }
View Full Code Here

        int i;
        byte[] buff = new byte[1024];
        try {
            zipentry = zis.getNextEntry();
            if (zipentry == null) {
                throw new RegistryException("Theme bundle should be a zip file");
            }
        } catch (IOException e) {
            log.error(e);
        }

        sysRegistry.beginTransaction();
        while (zipentry != null) {
            String entryName = zipentry.getName();
            ByteArrayOutputStream byteOut = new ByteArrayOutputStream();

            if (zipentry.isDirectory()) {
                //if the entry is a directory creating a collection
                Collection col = sysRegistry.newCollection();
                sysRegistry.put(DashboardConstants.USER_DASHBOARD_REGISTRY_ROOT +
                        CurrentSession.getUser() +
                        DashboardConstants.THEME_USER_PATH +
                        "/" + entryName, col);
            } else {
                if (!(entryName.indexOf("/") > 0)) {
                    sysRegistry.rollbackTransaction();
                    throw new RegistryException("Theme bundle is not in the correct format : {<Theme-Name>/style.css}");
                }
                //if a file creating a resource
                Resource res = sysRegistry.newResource();
                try {
                    while ((i = zis.read(buff, 0, buff.length)) > 0) {
View Full Code Here

        } catch (IOException e) {
            log.error(e);
        } catch (UserStoreException e) {
            log.error(e);
        } catch (Exception e) {
            throw new RegistryException("Resource does not contain a valid XML configuration: " + e.toString());
        }

//        currentLifeCycleExecutionState = scxml.getInitial();

View Full Code Here

                        OMElement itemEl = (OMElement)checkListIterator.next();
                        if (itemEl.getQName().equals(new QName("checkitem"))) {
                            List<String> items = new ArrayList<String>();
                            String itemName = itemEl.getText();
                            if (itemName == null)
                                throw new RegistryException("Checklist items should have a name!");
                            items.add("status:" + stateName);
                            items.add("name:" + itemName);
                            items.add("value:false");

                            if (itemEl.getAttribute(new QName("order")) != null) {
                                items.add("order:" + itemEl.getAttributeValue(new QName("order")));
                            }
                            else {
                                items.add("order:" + checklistItemOrder);
                            }

                            String resourcePropertyNameForItem
                                    = "registry.custom_lifecycle.checklist.option" + propertyOrder + ".item";

                            resource.setProperty(resourcePropertyNameForItem, items);
                            checklistItemOrder++;
                            propertyOrder++;
                        }
                    }
                }
            }
        } catch (XMLStreamException e) {
            throw new RegistryException("Resource does not contain valid XML configuration: " + e.toString());
        catch (MalformedURLException e) {
            throw new RegistryException("Invalid URL in aspect configuration: " + e.toString());
        }

        resource.setProperty(stateProperty, states.get(0));
    }
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.