Package org.zanata.common

Examples of org.zanata.common.MergeType


                    extensions =
                            new StringSet(ExtensionType.GetText.toString());
                } else {
                    extensions = Collections.<String> emptySet();
                }
                MergeType mergeType =
                        Boolean.parseBoolean(params.get("merge").getString()) ? MergeType.AUTO
                                : MergeType.IMPORT;
                List<String> warnings =
                        translationServiceImpl.translateAllInDoc(projectSlug,
                                versionSlug, docId,
View Full Code Here


        identity.checkPermission("modify-translation", this.localeServiceImpl
                .getByLocaleId(locale),
                this.getSecuredIteration(projectSlug, iterationSlug)
                        .getProject());

        MergeType mergeType;
        try {
            mergeType = MergeType.valueOf(merge.toUpperCase());
        } catch (Exception e) {
            ProcessStatus status = new ProcessStatus();
            status.setStatusCode(ProcessStatusCode.Failed);
            status.getMessages().add("bad merge type " + merge);
            return status;
        }

        final String id = URIHelper.convertFromDocumentURIId(idNoSlash);
        final MergeType finalMergeType = mergeType;

        String name = "TranslatedDocCreationOrUpdate: "+projectSlug+"-"+iterationSlug+"-"+idNoSlash+"-"+locale;
        AsyncTaskHandle<HDocument> handle = new AsyncTaskHandle<HDocument>();
        Serializable taskId = asyncTaskHandleManager.registerTaskHandle(handle);
        translationServiceImpl.translateAllInDocAsync(projectSlug,
View Full Code Here

        // parameters)
        identity.checkPermission("modify-translation", this.localeServiceImpl
                .getByLocaleId(locale), this.getSecuredIteration().getProject());

        log.debug("start put translations");
        MergeType mergeType;
        try {
            mergeType = MergeType.valueOf(merge.toUpperCase());
        } catch (IllegalArgumentException e) {
            return Response.status(Status.BAD_REQUEST)
                    .entity("bad merge type " + merge).build();
View Full Code Here

TOP

Related Classes of org.zanata.common.MergeType

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.