Projects >> zanata-server >>6fc8253bb48db3828320b1bbdfafe4c34c52af85

Chunk
Conflicting content
import org.zanata.common.ContentState;
import org.zanata.common.LocaleId;
import org.zanata.common.MergeType;
<<<<<<< HEAD
import org.zanata.exception.ConcurrentTranslationException;
=======
import org.zanata.model.HDocument;
import org.zanata.model.HTextFlow;
>>>>>>> a26273c5f7a31546620af5018dced5085184a467
import org.zanata.model.HTextFlowTarget;
import org.zanata.rest.dto.resource.Resource;
import org.zanata.rest.dto.resource.TextFlowTarget;
Solution content
import org.zanata.common.ContentState;
import org.zanata.common.LocaleId;
import org.zanata.common.MergeType;
import org.zanata.exception.ConcurrentTranslationException;
import org.zanata.model.HTextFlowTarget;
import org.zanata.rest.dto.resource.TextFlowTarget;
File
TranslationService.java
Developer's decision
Version 1
Kind of conflict
Import
Chunk
Conflicting content
 */
package org.zanata.service.impl;

<<<<<<< HEAD
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
import javax.annotation.Nullable;

import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils;
=======
import com.google.common.base.Predicate;
import com.google.common.base.Strings;
import com.google.common.collect.Collections2;
>>>>>>> a26273c5f7a31546620af5018dced5085184a467
import org.hibernate.Session;
import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.AutoCreate;
Solution content
 */
package org.zanata.service.impl;

import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
import javax.annotation.Nullable;

import com.google.common.base.Predicate;
import com.google.common.base.Strings;
import com.google.common.collect.Collections2;
import org.hibernate.Session;
import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.AutoCreate;
File
TranslationServiceImpl.java
Developer's decision
Combination
Kind of conflict
Import
Chunk
Conflicting content
import org.zanata.webtrans.shared.model.TransUnitUpdateRequest;

import org.zanata.service.LocaleService;
import org.zanata.service.TranslationService;
import org.zanata.webtrans.server.TranslationWorkspaceManager;
<<<<<<< HEAD
import com.google.common.base.Predicate;
import com.google.common.base.Strings;
import com.google.common.collect.Collections2;
=======

import javax.annotation.Nullable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
>>>>>>> a26273c5f7a31546620af5018dced5085184a467

import static org.zanata.util.StringUtil.allEmpty;
import static org.zanata.util.StringUtil.allNonEmpty;
Solution content
import org.zanata.service.LocaleService;
import org.zanata.service.TranslationService;
import org.zanata.webtrans.server.TranslationWorkspaceManager;
import org.zanata.webtrans.shared.model.TransUnitUpdateRequest;


import static org.zanata.util.StringUtil.allEmpty;
import static org.zanata.util.StringUtil.allNonEmpty;
File
TranslationServiceImpl.java
Developer's decision
Combination
Kind of conflict
Import
Chunk
Conflicting content
      WorkspaceId workspaceId = new WorkspaceId(new ProjectIterationId(projectSlug, iterationSlug), localeId);
      WorkspaceContext workspaceContext = new WorkspaceContext(workspaceId, "sample-workspace", localeId.getId(), false);
      
<<<<<<< HEAD
//      Credentials mockCredentials = new Credentials();
//      mockCredentials.setInitialized(true);
//      mockCredentials.setUsername( translator.getUsername() );
      
      // Set mock expectations
      expect( transWorkerManager.getOrRegisterWorkspace( anyObject(WorkspaceId.class) ) ).andReturn( transWorkspace ).anyTimes();
//      expect( mockIdentity.getCredentials() ).andReturn( mockCredentials ).anyTimes();
=======
      Credentials mockCredentials = new Credentials();
      mockCredentials.setInitialized(true);
      mockCredentials.setUsername( translator.getUsername() );


      // Set mock expectations
      expect(transWorkerManager.getOrRegisterWorkspace(anyObject(WorkspaceId.class))).andReturn( transWorkspace ).anyTimes();
      expect( mockIdentity.getCredentials() ).andReturn( mockCredentials );
>>>>>>> a26273c5f7a31546620af5018dced5085184a467
      expect( transWorkspace.getWorkspaceContext() ).andReturn( workspaceContext );
      mockIdentity.checkLoggedIn();
      expectLastCall();
Solution content
      WorkspaceId workspaceId = new WorkspaceId(new ProjectIterationId(projectSlug, iterationSlug), localeId);
      WorkspaceContext workspaceContext = new WorkspaceContext(workspaceId, "sample-workspace", localeId.getId(), false);
      
//      Credentials mockCredentials = new Credentials();
//      mockCredentials.setInitialized(true);
//      mockCredentials.setUsername( translator.getUsername() );

      // Set mock expectations
      expect(transWorkerManager.getOrRegisterWorkspace(anyObject(WorkspaceId.class))).andReturn( transWorkspace ).anyTimes();
//      expect( mockIdentity.getCredentials() ).andReturn( mockCredentials );
      expect( transWorkspace.getWorkspaceContext() ).andReturn( workspaceContext );
      mockIdentity.checkLoggedIn();
      expectLastCall();
File
TranslationResourceRestTest.java
Developer's decision
Manual
Kind of conflict
Comment
Method invocation
Variable
Chunk
Conflicting content
      // @formatter:off
      UpdateTransUnitHandler transUnitHandler = new UpdateTransUnitHandler(
            mockIdentity,
<<<<<<< HEAD
            projectDAO,
//            textFlowTargetHistoryDAO,
=======
            seam.autowire(ProjectDAO.class),
            seam.autowire(TextFlowTargetHistoryDAO.class),
>>>>>>> a26273c5f7a31546620af5018dced5085184a467
            transWorkerManager,
            seam.autowire(LocaleServiceImpl.class),
            translator,
Solution content
      // @formatter:off
      UpdateTransUnitHandler transUnitHandler = new UpdateTransUnitHandler(
            mockIdentity,
            seam.autowire(ProjectDAO.class),
//            seam.autowire(TextFlowTargetHistoryDAO.class),
            transWorkerManager,
            seam.autowire(LocaleServiceImpl.class),
            translator,
File
TranslationResourceRestTest.java
Developer's decision
Manual
Kind of conflict
Attribute
Comment
Method invocation