Package io.lumify.core.user

Examples of io.lumify.core.user.User


        this.workspaceRepository = workspaceRepository;
    }

    @Override
    public void handle(HttpServletRequest request, HttpServletResponse response, HandlerChain chain) throws Exception {
        User authUser = getUser(request);
        User user = getUserRepository().findById(authUser.getUserId());

        String title = getOptionalParameter(request, "title");

        Workspace workspace = handle(title, user, authUser);
        respondWithClientApiObject(response, workspaceRepository.toClientApi(workspace, user, true));
View Full Code Here


    public void handle(HttpServletRequest request, HttpServletResponse response, HandlerChain chain) throws Exception {
        final String graphVertexId = getAttributeString(request, "graphVertexId");
        final String propertyName = getRequiredParameter(request, "propertyName");
        final String propertyKey = getRequiredParameter(request, "propertyKey");

        User user = getUser(request);
        Authorizations authorizations = getAuthorizations(request, user);
        String workspaceId = getActiveWorkspaceId(request);

        Vertex graphVertex = graph.getVertex(graphVertexId, authorizations);
        List<Property> properties = toList(graphVertex.getProperties(propertyKey, propertyName));
View Full Code Here

        this.artifactThumbnailRepository = artifactThumbnailRepository;
    }

    @Override
    public void handle(HttpServletRequest request, HttpServletResponse response, HandlerChain chain) throws Exception {
        User user = getUser(request);
        Authorizations authorizations = getAuthorizations(request, user);

        String graphVertexId = UrlUtils.urlDecode(getAttributeString(request, "graphVertexId"));

        Vertex artifactVertex = graph.getVertex(graphVertexId, authorizations);
View Full Code Here

    public void valueUnbound(HttpSessionBindingEvent event) {
        UserStatus status = UserStatus.OFFLINE;
        LOGGER.info("setting userId %s status to %s", userId, status);
        try {
            UserRepository userRepository = InjectHelper.getInstance(UserRepository.class);
            User user = userRepository.setStatus(userId, status);
            WorkQueueRepository workQueueRepository = InjectHelper.getInstance(WorkQueueRepository.class);
            workQueueRepository.pushUserStatusChange(user, status);
        } catch (Exception ex) {
            LOGGER.error("exception while setting userId %s status to %s", userId, status, ex);
        }
View Full Code Here

        }
    }

    private void switchWorkspace(String authUserId, String workspaceId) {
        if (!workspaceId.equals(userRepository.getCurrentWorkspaceId(authUserId))) {
            User authUser = userRepository.findById(authUserId);
            Workspace workspace = workspaceRepository.findById(workspaceId, authUser);
            userRepository.setCurrentWorkspace(authUserId, workspace.getWorkspaceId());
            workQueueRepository.pushUserCurrentWorkspaceChange(authUser, workspace.getWorkspaceId());

            LOGGER.debug("User %s switched current workspace to %s", authUserId, workspaceId);
View Full Code Here

        try {
            String authUserId = CurrentUser.get(resource.getRequest());
            if (authUserId == null) {
                throw new RuntimeException("Could not find user in session");
            }
            User authUser = userRepository.findById(authUserId);

            LOGGER.debug("Setting user %s status to %s", authUserId, status.toString());
            userRepository.setStatus(authUserId, status);

            this.workQueueRepository.pushUserStatusChange(authUser, status);
View Full Code Here

            documentIRIString = ontologyRepository.guessDocumentIRIFromPackage(tempFile);
        }

        IRI documentIRI = IRI.create(documentIRIString);

        User user = getUser(request);
        Authorizations authorizations = getAuthorizations(request, user);
        LOGGER.info("adding ontology: %s", documentIRI.toString());
        ontologyRepository.writePackage(tempFile, documentIRI, authorizations);
        ontologyRepository.clearCache();
View Full Code Here

            if (isInvalid(cert)) {
                respondWithAuthenticationFailure(response);
                return;
            }

            User user = getUser(request, cert);
            if (user == null) {
                respondWithAuthenticationFailure(response);
                return;
            }
            userRepository.recordLogin(user, request.getRemoteAddr());
            CurrentUser.set(request, user.getUserId(), user.getUsername());
        }
        chain.next(request, response);
    }
View Full Code Here

    }

    @Override
    public void handle(HttpServletRequest request, HttpServletResponse response, HandlerChain chain) throws Exception {
        final String longRunningProcessId = getRequiredParameter(request, "longRunningProcessId");
        final User authUser = getUser(request);

        LOGGER.info("deleting long running process: %s", longRunningProcessId);
        JSONObject longRunningProcess = longRunningProcessRepository.findById(longRunningProcessId, authUser);
        if (longRunningProcess == null) {
            LOGGER.warn("Could not find long running process: %s", longRunningProcessId);
View Full Code Here

        super(userRepository, workspaceRepository, configuration);
    }

    @Override
    public void handle(HttpServletRequest request, HttpServletResponse response, HandlerChain chain) throws Exception {
        User user = getUser(request);
        if (user == null || user.getUsername() == null) {
            respondWithNotFound(response);
            return;
        }

        ClientApiUser userMe = getUserRepository().toClientApiPrivate(user);
View Full Code Here

TOP

Related Classes of io.lumify.core.user.User

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.