Package org.zanata.rest.dto

Examples of org.zanata.rest.dto.Person


        to.setState(mapContentState(apiVersion, from.getState()));
        to.setRevision(from.getVersionNum());
        to.setTextFlowRevision(from.getTextFlowRevision());
        HPerson translator = from.getLastModifiedBy();
        if (translator != null) {
            to.setTranslator(new Person(translator.getEmail(), translator
                    .getName()));
        }
    }
View Full Code Here


    public TranslationsResource getTestObject() {
        TranslationsResource entity = new TranslationsResource();
        TextFlowTarget target = new TextFlowTarget("rest1");
        target.setContents("hello world");
        target.setState(ContentState.Approved);
        target.setTranslator(new Person("root@localhost", "Administrator"));
        // for the convenience of test
        target.getExtensions(true);
        entity.getTextFlowTargets().add(target);
        entity.getExtensions(true);
        return entity;
View Full Code Here

    public TranslationsResource getTestObject2() {
        TranslationsResource entity = new TranslationsResource();
        TextFlowTarget target = new TextFlowTarget("rest1");
        target.setContents("hello world");
        target.setState(ContentState.Approved);
        target.setTranslator(new Person("root@localhost", "Administrator"));
        target.getExtensions(true);
        TextFlowTarget target2 = new TextFlowTarget("rest2");
        target2.setContents("greeting world");
        target2.setState(ContentState.Approved);
        target2.setTranslator(new Person("root@localhost", "Administrator"));
        target2.getExtensions(true);
        entity.getTextFlowTargets().add(target2);
        entity.getExtensions(true);
        log.debug(entity.toString());
        return entity;
View Full Code Here

        TranslationsResource entity = new TranslationsResource();
        TextFlowTarget target = new TextFlowTarget();
        target.setResId("tf1");
        target.setContents("hello world");
        target.setState(ContentState.Approved);
        target.setTranslator(new Person("root@localhost", "Admin user"));
        entity.getTextFlowTargets().add(target);

        LocaleId de_DE = new LocaleId("de");
        ClientResponse<String> response =
                transResource.putTranslations("my.txt", de_DE, entity, null);
View Full Code Here

        TranslationsResource entity = new TranslationsResource();
        TextFlowTarget target = new TextFlowTarget();
        target.setResId("tf1");
        target.setContents("hello world");
        target.setState(ContentState.Approved);
        target.setTranslator(new Person("root@localhost", "Admin user"));
        entity.getTextFlowTargets().add(target);

        // Future Date for the PO Revision Date Header
        Calendar poRevDate = Calendar.getInstance();
        poRevDate.add(Calendar.YEAR, 1); // 1 year in the future
View Full Code Here

        TranslationsResource entity = new TranslationsResource();
        TextFlowTarget target = new TextFlowTarget();
        target.setResId("tf1");
        target.setContents("hello world");
        target.setState(ContentState.Approved);
        target.setTranslator(new Person("root@localhost", "Admin user"));
        entity.getTextFlowTargets().add(target);

        ClientResponse<String> putResponse =
                transResource.putTranslations("my.txt", de_DE, entity, null);
        assertThat(putResponse.getResponseStatus(), is(Status.OK));
View Full Code Here

        TextFlowTarget target = new TextFlowTarget();
        target.setContents("hei verden");
        target.setDescription("translation of hello world");
        target.setResId("tf1");
        target.setState(ContentState.Approved);
        Person person = new Person("email@example.com", "Translator Name");
        target.setTranslator(person);
        trans.getTextFlowTargets().add(target);
        return trans;
    }
View Full Code Here

TOP

Related Classes of org.zanata.rest.dto.Person

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.