Examples of ProjectData


Examples of io.fathom.cloud.protobuf.IdentityModel.ProjectData

        return BaseEncoding.base16().encode(publicKeySha1.toByteArray());
    }

    private AuthenticatedUser buildDomainToken(DomainData domain, UserWithSecret userWithSecret) throws CloudException {
        TokenScope scope = null;
        ProjectData project = null;
        ProjectRoles projectRoles = null;

        scope = TokenScope.Domain;

        return new AuthenticatedUser(scope, userWithSecret, project, projectRoles, domain);
View Full Code Here

Examples of io.fathom.cloud.protobuf.IdentityModel.ProjectData

        ProjectRoles projectRoles = Users.findProjectRoles(user, projectId);
        if (projectRoles == null) {
            return null;
        }

        ProjectData project = authRepository.getProjects().find(projectRoles.getProject());
        if (project == null) {
            log.warn("Cannot find project {}", projectRoles.getProject());
            return null;
        }
View Full Code Here

Examples of io.fathom.cloud.protobuf.IdentityModel.ProjectData

        // Auth.Domain domain = findDomainWithAdminRole();
        // if (domain == null) {
        // throw new WebApplicationException(Status.FORBIDDEN);
        // }

        ProjectData created = authRepository.getProjects().create(b);

        SecretToken secretToken = SecretToken.create(SecretTokenType.PROJECT_SECRET);

        AuthenticatedProject authenticatedProject = new AuthenticatedProject(created, secretToken);
View Full Code Here

Examples of io.fathom.cloud.protobuf.IdentityModel.ProjectData

        }
    }

    @Override
    public ProjectData findProject(AuthenticatedUser user, long projectId) throws CloudException {
        ProjectData project = authRepository.getProjects().find(projectId);
        boolean authorized = false;

        if (project != null) {
            ProjectRoles projectRoles = Users.findProjectRoles(user.getUserData(), project.getId());
            if (projectRoles != null && projectRoles.getRoleCount() != 0) {
                authorized = true;
            }

            if (!authorized) {
                if (user.isDomainAdmin(project.getDomainId())) {
                    authorized = true;
                }
            }
        }
View Full Code Here

Examples of io.fathom.cloud.protobuf.IdentityModel.ProjectData

        return authRepository.getRoles().list();
    }

    @Override
    public void fixupProject(AuthenticatedUser user, long projectId) throws CloudException {
        ProjectData project = findProject(user, projectId);
        if (project == null) {
            log.warn("Could not find project");
            return;
        }

        ProjectRoles projectRoles = Users.findProjectRoles(user.getUserData(), project.getId());
        if (projectRoles == null) {
            log.warn("Could not find role on project");
            // TODO: We probably need another path for domain admins
            return;
        }
View Full Code Here

Examples of io.fathom.cloud.protobuf.IdentityModel.ProjectData

        }
    }

    @Override
    public AuthenticatedProject authenticateToProject(AuthenticatedUser user, long projectId) throws CloudException {
        ProjectData project = findProject(user, projectId);
        if (project == null) {
            return null;
        }

        AuthenticatedProject authenticatedProject = secretService.authenticate(project, user);
View Full Code Here

Examples of net.sourceforge.cobertura.coveragedata.ProjectData

        this.dataFile = dataFile;
        if (forInstrumenting) {
            if (dataFile.exists()) {
                projectData = CoverageDataFileHandler.loadCoverageData(dataFile);
            } else {
                projectData = new ProjectData();
            }
        }
    }
View Full Code Here

Examples of net.sourceforge.cobertura.coveragedata.ProjectData

        cacheDir.mkdir();
        coverageDirectoryReader = cdr;
        calculator = new PackageCoverageCalculator(cdr.getIndexedPackageData()
                .values(), cacheDir );

        ProjectData projectData = getGlobalData();

        if (projectData == null) {
            throw new RuntimeException(
                    "Unable to read coverage data from file "
                            + coverageDataFile.getCanonicalPath());
View Full Code Here

Examples of net.sourceforge.cobertura.coveragedata.ProjectData

        return result;
    }

    ProjectData diffProjects(ProjectData larger, ProjectData smaller) {
        ProjectData result = new ProjectData();
        for (Object o : larger.getClasses()) {
            ClassData lcd = (ClassData) o;
            ClassData scd = (ClassData) smaller.getClassData(lcd.getName());
            result.addClassData(diffClasses(lcd, scd));
        }
        Set<String> largerNames = classNames(larger);
        Set<String> smallerNames = classNames(smaller);
        smallerNames.removeAll(largerNames);
        if (smallerNames.size() > 0) {
View Full Code Here

Examples of net.sourceforge.cobertura.coveragedata.ProjectData

        ClassData cd = data.getClassData(className);
        cd.touchSwitch(lineNumber, 0, switchNumber, 1);
    }

    ProjectData buildBaseProjectData() {
        ProjectData data = new ProjectData();
        addSomeStuff(data, "foo", 3);
        addSomeStuff(data, "bar", 3);
        touchAJump(data, "foo", 1, true);
        touchASwitch(data, "bar", 2, 1);
        touchASwitch(data, "bar", 2, -1);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.