Package io.lumify.core.exception

Examples of io.lumify.core.exception.LumifyResourceNotFoundException


        }

        Authorizations authorizations = userRepository.getAuthorizations(user, VISIBILITY_STRING, workspace.getWorkspaceId());
        Vertex otherVertex = getGraph().getVertex(vertexId, authorizations);
        if (otherVertex == null) {
            throw new LumifyResourceNotFoundException("Could not find vertex: " + vertexId, vertexId);
        }
        Vertex workspaceVertex = getVertexFromWorkspace(workspace, authorizations);
        List<Edge> edges = toList(workspaceVertex.getEdges(otherVertex, Direction.BOTH, authorizations));
        for (Edge edge : edges) {
            WorkspaceLumifyProperties.WORKSPACE_TO_ENTITY_VISIBLE.setProperty(edge, false, VISIBILITY.getVisibility(), authorizations);
View Full Code Here


            public void run() {
                Authorizations authorizations = userRepository.getAuthorizations(user, VISIBILITY_STRING, workspace.getWorkspaceId());

                Vertex workspaceVertex = getVertexFromWorkspace(workspace, authorizations);
                if (workspaceVertex == null) {
                    throw new LumifyResourceNotFoundException("Could not find workspace vertex: " + workspace.getWorkspaceId(), workspace.getWorkspaceId());
                }

                Iterable<String> vertexIds = new ConvertingIterable<Update, String>(updates) {
                    @Override
                    protected String convert(Update o) {
View Full Code Here

            @Override
            public void run() {
                Authorizations authorizations = userRepository.getAuthorizations(user, UserRepository.VISIBILITY_STRING, VISIBILITY_STRING, workspace.getWorkspaceId());
                Vertex userVertex = getGraph().getVertex(userId, authorizations);
                if (userVertex == null) {
                    throw new LumifyResourceNotFoundException("Could not find user: " + userId, userId);
                }
                Vertex workspaceVertex = getVertexFromWorkspace(workspace, authorizations);
                List<Edge> edges = toList(workspaceVertex.getEdges(userVertex, Direction.BOTH, workspaceToUserRelationshipId, authorizations));
                for (Edge edge : edges) {
                    getGraph().removeEdge(edge, authorizations);
View Full Code Here

                    otherUserVertex = ((SecureGraphUserRepository) userRepository).findByIdUserVertex(userId);
                } else {
                    otherUserVertex = getGraph().getVertex(userId, authorizations);
                }
                if (otherUserVertex == null) {
                    throw new LumifyResourceNotFoundException("Could not find user: " + userId, userId);
                }

                Vertex workspaceVertex = getVertexFromWorkspace(workspace, authorizations);
                if (workspaceVertex == null) {
                    throw new LumifyResourceNotFoundException("Could not find workspace vertex: " + workspace.getWorkspaceId(), workspace.getWorkspaceId());
                }

                List<Edge> existingEdges = toList(workspaceVertex.getEdges(otherUserVertex, Direction.OUT, workspaceToUserRelationshipId, authorizations));
                if (existingEdges.size() > 0) {
                    for (Edge existingEdge : existingEdges) {
View Full Code Here

            if (spv == null) {
                return null;
            }
            return IOUtil.toByteArray(spv.getInputStream());
        } catch (IOException e) {
            throw new LumifyResourceNotFoundException("Could not retrieve glyph icon");
        }
    }
View Full Code Here

            if (spv == null) {
                return null;
            }
            return IOUtil.toByteArray(spv.getInputStream());
        } catch (IOException e) {
            throw new LumifyResourceNotFoundException("Could not retrieve map glyph icon");
        }
    }
View Full Code Here

                if (iri != null) {
                    if (dir != null) {
                        File owlFile = findOwlFile(new File(dir));
                        if (owlFile == null) {
                            throw new LumifyResourceNotFoundException("could not find owl file in directory " + new File(dir).getAbsolutePath());
                        }
                        importFile(owlFile, IRI.create(iri), authorizations);
                    } else if (file != null) {
                        writePackage(new File(file), IRI.create(iri), authorizations);
                    } else {
                        throw new LumifyResourceNotFoundException("iri " + iri + " without matching dir or file");
                    }
                }
            }
        }
    }
View Full Code Here

            g.dispose();

            //Write the bufferedImage to a file.
            ImageIO.write(resizedImage, format, out);
        } catch (IOException e) {
            throw new LumifyResourceNotFoundException("Error reading inputstream");
        }
        return new ArtifactThumbnail(out.toByteArray(), type, format);
    }
View Full Code Here

TOP

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

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.