Package io.lumify.core.exception

Examples of io.lumify.core.exception.LumifyException


        SqlUser sqlUser;
        try {
            transaction = session.beginTransaction();
            sqlUser = (SqlUser) findById(user.getUserId());
            if (sqlUser == null) {
                throw new LumifyException("User does not exist");
            }
            session.delete(sqlUser);
            transaction.commit();
        } catch (HibernateException e) {
            if (transaction != null) {
                transaction.rollback();
            }
            throw new LumifyException("HibernateException while deleting user", e);
        }
    }
View Full Code Here


        SqlUser sqlUser;
        try {
            transaction = session.beginTransaction();
            sqlUser = (SqlUser) findById(user.getUserId());
            if (sqlUser == null) {
                throw new LumifyException("User does not exist");
            }
            sqlUser.setPrivilegesString(Privilege.toString(privileges));
            session.update(sqlUser);
            transaction.commit();
        } catch (HibernateException e) {
            if (transaction != null) {
                transaction.rollback();
            }
            throw new LumifyException("HibernateException while setting privileges", e);
        }
    }
View Full Code Here

            this.collector = collector;
            this.channel.queueDeclare(queueName, true, false, false, null);
            this.consumer = new QueueingConsumer(channel);
            this.channel.basicConsume(this.queueName, false, consumer);
        } catch (IOException ex) {
            throw new LumifyException("Could not startup RabbitMQ", ex);
        }
    }
View Full Code Here

            checkNotNull(mediaPropertyValue, String.format("Could not find %s property on artifact %s", MediaLumifyProperties.MIME_TYPE_VIDEO_MP4, artifactVertex.getId()));
        } else if (MediaLumifyProperties.MIME_TYPE_VIDEO_WEBM.equals(type)) {
            mediaPropertyValue = MediaLumifyProperties.VIDEO_WEBM.getPropertyValue(artifactVertex);
            checkNotNull(mediaPropertyValue, String.format("Could not find %s property on artifact %s", MediaLumifyProperties.MIME_TYPE_VIDEO_WEBM, artifactVertex.getId()));
        } else {
            throw new LumifyException("Invalid video type: " + type);
        }
        return mediaPropertyValue;
    }
View Full Code Here

        new OntologyToOwl(baseIri, outFile).run(inDir);
    }

    private void run(File inDir) throws Exception {
        if (!inDir.exists()) {
            throw new LumifyException("inDir (" + inDir + ") does not exist");
        }

        xPathfactory = XPathFactory.newInstance();
        xPath = xPathfactory.newXPath();
        ns = new OwlNamespaceContext();
View Full Code Here

            path = path.substring(1);
        }

        File expectedFile = new File(outFile.getParent(), path);
        if (!expectedFile.exists()) {
            throw new LumifyException("Could not find file for uri " + uri + " with path " + expectedFile.getAbsolutePath());
        }

        List<OwlElement> owlElements = iconMapping.get(uri);
        if (owlElements == null) {
            LOGGER.warn("Could not find owl elements for icon mapping with uri: %s", uri);
View Full Code Here

        } else if (inXml.getDocumentElement().getNodeName().equals("link_relations")) {
            linkRelationsXml = inXml;
        } else if (inXml.getDocumentElement().getNodeName().equals("image_infos")) {
            imageInfoXml = inXml;
        } else {
            throw new LumifyException("Invalid xml root node name: " + inXml.getDocumentElement().getNodeName());
        }
    }
View Full Code Here

    protected void broadcastJson(JSONObject json) {
        try {
            LOGGER.debug("publishing message to broadcast exchange [%s]: %s", BROADCAST_EXCHANGE_NAME, json.toString());
            channel.basicPublish(BROADCAST_EXCHANGE_NAME, "", null, json.toString().getBytes());
        } catch (IOException ex) {
            throw new LumifyException("Could not broadcast json", ex);
        }
    }
View Full Code Here

            }

            return;
        }

        throw new LumifyException("Could not find a object property or data type property matching '" + linkUri + "' or '" + uri2 + "'");
    }
View Full Code Here

        try {
            ensureQueue(queueName);
            LOGGER.debug("enqueueing message to queue [%s]: %s", queueName, json.toString());
            channel.basicPublish("", queueName, null, json.toString().getBytes());
        } catch (Exception ex) {
            throw new LumifyException("Could not push on queue", ex);
        }
    }
View Full Code Here

TOP

Related Classes of io.lumify.core.exception.LumifyException

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.