Package org.zanata.common

Examples of org.zanata.common.ProjectType


    }

    private void updateProjectType() {
        if (!StringUtils.isEmpty(selectedProjectType)
                && !selectedProjectType.equals("null")) {
            ProjectType projectType = ProjectType.valueOf(selectedProjectType);
            getInstance().setDefaultProjectType(projectType);
        } else {
            getInstance().setDefaultProjectType(null);
        }
    }
View Full Code Here


    @Override
    public boolean isPoDocument(String projectSlug, String iterationSlug,
            String docId) {
        HProjectIteration projectIteration =
                projectIterationDAO.getBySlug(projectSlug, iterationSlug);
        ProjectType projectType = projectIteration.getProjectType();
        if (projectType == null) {
            projectType = projectIteration.getProject().getDefaultProjectType();
        }
        if (projectType == ProjectType.Gettext
                || projectType == ProjectType.Podir) {
View Full Code Here

                .compare(hAccountRole1, hAccountRole1)).isEqualTo(0);
    }

    @Test
    public void ProjectTypeCompare() throws Exception {
        ProjectType projectType1 = ProjectType.File;
        ProjectType projectType2 = ProjectType.Gettext;
        ProjectType projectType3 = null;

        assertThat(ComparatorUtil.PROJECT_TYPE_COMPARATOR
                .compare(projectType1, projectType1)).isEqualTo(0);
        assertThat(ComparatorUtil.PROJECT_TYPE_COMPARATOR
                .compare(projectType1, projectType2)).isEqualTo(-1);
View Full Code Here

    }

    private boolean isPoProject(String projectSlug, String versionSlug) {
        HProjectIteration projectIteration =
                projectIterationDAO.getBySlug(projectSlug, versionSlug);
        ProjectType type = projectIteration.getProjectType();
        if (type == null) {
            type = projectIteration.getProject().getDefaultProjectType();
        }
        return type == Gettext || type == Podir;
    }
View Full Code Here

    }

    private boolean isPoProject(String projectSlug, String versionSlug) {
        HProjectIteration projectIteration =
                projectIterationDAO.getBySlug(projectSlug, versionSlug);
        ProjectType type = projectIteration.getProjectType();
        if (type == null) {
            type = projectIteration.getProject().getDefaultProjectType();
        }
        return type == Gettext || type == Podir;
    }
View Full Code Here

TOP

Related Classes of org.zanata.common.ProjectType

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.