Examples of WorkspaceContext


Examples of org.zanata.webtrans.shared.model.WorkspaceContext

                project.getName() + " (" + projectIteration.getSlug() + ")";
        String localeDisplayName =
                ULocale.getDisplayName(workspaceId.getLocaleId().toJavaName(),
                        ULocale.ENGLISH);

        return new WorkspaceContext(workspaceId, workspaceName,
                localeDisplayName);
    }
View Full Code Here

Examples of org.zanata.webtrans.shared.model.WorkspaceContext

                localeDisplayName);
    }

    protected TranslationWorkspace createWorkspace(WorkspaceId workspaceId)
            throws NoSuchWorkspaceException {
        WorkspaceContext workspaceContext =
                validateAndGetWorkspaceContext(workspaceId);
        return new TranslationWorkspaceImpl(workspaceContext);
    }
View Full Code Here

Examples of org.zanata.webtrans.shared.model.WorkspaceContext

    }

    @Override
    public void execute() {
        Log.info("ENTER DummyActivateWorkspaceCommand.execute()");
        WorkspaceContext context =
                new WorkspaceContext(action.getWorkspaceId(),
                        "Dummy Workspace", "Mock Sweedish");
        WorkspaceRestrictions workspaceRestrictions =
                new WorkspaceRestrictions(true, true, true, true, true);
        UserWorkspaceContext userWorkspaceContext =
                new UserWorkspaceContext(context, workspaceRestrictions);
View Full Code Here

Examples of org.zanata.webtrans.shared.model.WorkspaceContext

        ProjectIterationId projectIterationId =
                new ProjectIterationId(projectSlug, iterationSlug, projectType);
        WorkspaceRestrictions workspaceRestrictions =
                new WorkspaceRestrictions(projectActive, hasWriteAccess, true,
                        true, true);
        return new UserWorkspaceContext(new WorkspaceContext(new WorkspaceId(
                projectIterationId, LocaleId.EN_US), "workspaceName",
                LocaleId.EN_US.getId()), workspaceRestrictions);
    }
View Full Code Here

Examples of org.zanata.webtrans.shared.model.WorkspaceContext

    public static UserWorkspaceContext userWorkspaceContext(
            boolean projectActive, boolean hasWriteAccess) {
        WorkspaceRestrictions workspaceRestrictions =
                new WorkspaceRestrictions(projectActive, hasWriteAccess, true,
                        true, true);
        return new UserWorkspaceContext(new WorkspaceContext(workspaceId(),
                "workspaceName", LocaleId.EN_US.getId()), workspaceRestrictions);
    }
View Full Code Here

Examples of org.zanata.webtrans.shared.model.WorkspaceContext

        presenter.setStatesForTesting(null, submittedRequest);
        LocaleId localeId = new LocaleId("zh");
        ProjectIterationId projectIterationId =
                new ProjectIterationId("project", "master", ProjectType.Podir);
        when(userWorkspaceContext.getWorkspaceContext()).thenReturn(
                new WorkspaceContext(new WorkspaceId(projectIterationId,
                        localeId), "workspaceName", localeId.getId()));
        when(userWorkspaceContext.getSelectedDoc()).thenReturn(
                new DocumentInfo(new DocumentId(new Long(1), ""), "doc.txt",
                        "/pot", new LocaleId("en-US"),
                        new ContainerTranslationStatistics(), new AuditInfo(
View Full Code Here

Examples of org.zanata.webtrans.shared.model.WorkspaceContext

        // Given:
        LocaleId targetLocale = new LocaleId("zh");
        ProjectIterationId projectIterationId =
                new ProjectIterationId("project", "master", ProjectType.Podir);
        when(userWorkspaceContext.getWorkspaceContext()).thenReturn(
                new WorkspaceContext(new WorkspaceId(projectIterationId,
                        targetLocale), "workspaceName", targetLocale.getId()));
        LocaleId sourceLocale = new LocaleId("en-US");
        when(userWorkspaceContext.getSelectedDoc()).thenReturn(
                new DocumentInfo(new DocumentId(new Long(1), ""), "doc.txt",
                        "/pot", sourceLocale,
View Full Code Here

Examples of org.zanata.webtrans.shared.model.WorkspaceContext

        // Given:
        LocaleId localeId = new LocaleId("zh");
        ProjectIterationId projectIterationId =
                new ProjectIterationId("project", "master", ProjectType.Podir);
        when(userWorkspaceContext.getWorkspaceContext()).thenReturn(
                new WorkspaceContext(new WorkspaceId(projectIterationId,
                        localeId), "workspaceName", localeId.getId()));
        when(userWorkspaceContext.getSelectedDoc()).thenReturn(
                new DocumentInfo(new DocumentId(new Long(1), ""), "doc.txt",
                        "/pot", new LocaleId("en-US"),
                        new ContainerTranslationStatistics(), new AuditInfo(
View Full Code Here

Examples of org.zanata.webtrans.shared.model.WorkspaceContext

        // Given:
        LocaleId localeId = new LocaleId("zh");
        ProjectIterationId projectIterationId =
                new ProjectIterationId("project", "master", ProjectType.Podir);
        when(userWorkspaceContext.getWorkspaceContext()).thenReturn(
                new WorkspaceContext(new WorkspaceId(projectIterationId,
                        localeId), "workspaceName", localeId.getId()));
        when(userWorkspaceContext.getSelectedDoc()).thenReturn(
                new DocumentInfo(new DocumentId(new Long(1), ""), "doc.txt",
                        "/pot", new LocaleId("en-US"),
                        new ContainerTranslationStatistics(), new AuditInfo(
View Full Code Here

Examples of org.zanata.webtrans.shared.model.WorkspaceContext

        // Given:
        LocaleId localeId = new LocaleId("zh");
        ProjectIterationId projectIterationId =
                new ProjectIterationId("project", "master", ProjectType.Podir);
        when(userWorkspaceContext.getWorkspaceContext()).thenReturn(
                new WorkspaceContext(new WorkspaceId(projectIterationId,
                        localeId), "workspaceName", localeId.getId()));
        when(userWorkspaceContext.getSelectedDoc()).thenReturn(
                new DocumentInfo(new DocumentId(new Long(1), ""), "doc.txt",
                        "/pot", new LocaleId("en-US"),
                        new ContainerTranslationStatistics(), new AuditInfo(
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.