org.squashtest.csp.core.bugtracker.internal.mantis
Class MantisEntityConverter

java.lang.Object
  extended by org.squashtest.csp.core.bugtracker.internal.mantis.MantisEntityConverter

public final class MantisEntityConverter
extends Object


Method Summary
static List<org.squashtest.csp.core.bugtracker.domain.Severity> convertSeverities(ObjectRef[] mantisSeverities)
           
static List<org.squashtest.csp.core.bugtracker.domain.Category> mantis2SquashCategory(String[] mantisCategories)
          Note : Mantis never gives an id to its categories.
static String mantis2SquashId(BigInteger mantisId)
           
static org.squashtest.csp.core.bugtracker.domain.BTIssue mantis2squashIssue(IssueData mantisIssue)
          Returns a BTIssue with the following params : id, summary, project, severity (as Priority), version, reporter, category, assignee, description, comment, created on, status
static List<org.squashtest.csp.core.bugtracker.domain.Permission> mantis2SquashPermission(ObjectRef[] mantisPermissions)
           
static org.squashtest.csp.core.bugtracker.domain.Priority mantis2SquashPriority(ObjectRef data)
          Convert a mantis priority into Priority
static List<org.squashtest.csp.core.bugtracker.domain.Priority> mantis2SquashPriority(ObjectRef[] mantisSeverities)
           
static List<org.squashtest.csp.core.bugtracker.domain.BTProject> mantis2SquashProject(ProjectData[] mantisProjects)
           
static org.squashtest.csp.core.bugtracker.domain.BTProject mantis2SquashSingleProject(ObjectRef data)
          This method convert a mantis project into BTProject
static org.squashtest.csp.core.bugtracker.domain.User mantis2SquashSingleUser(AccountData data)
          Converts a mantis User into Squash User
static org.squashtest.csp.core.bugtracker.domain.Status mantis2SquashStatus(ObjectRef mantisStatus)
          Convert a mantis status into Status
static List<org.squashtest.csp.core.bugtracker.domain.User> mantis2SquashUser(AccountData[] mantisUsers)
           
static List<org.squashtest.csp.core.bugtracker.domain.Version> mantis2SquashVersion(ProjectVersionData[] mantisVersions)
           
static BigInteger squash2MantisId(String squashId)
           
static AccountData squash2MantisUser(org.squashtest.csp.core.bugtracker.domain.User squashUser)
           
static IssueData squashToMantisIssue(org.squashtest.csp.core.bugtracker.domain.BTIssue squashIssue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

convertSeverities

public static List<org.squashtest.csp.core.bugtracker.domain.Severity> convertSeverities(ObjectRef[] mantisSeverities)

mantis2SquashPriority

public static List<org.squashtest.csp.core.bugtracker.domain.Priority> mantis2SquashPriority(ObjectRef[] mantisSeverities)

mantis2SquashProject

public static List<org.squashtest.csp.core.bugtracker.domain.BTProject> mantis2SquashProject(ProjectData[] mantisProjects)

mantis2SquashSingleProject

public static org.squashtest.csp.core.bugtracker.domain.BTProject mantis2SquashSingleProject(ObjectRef data)
This method convert a mantis project into BTProject

Parameters:
data - the mantis project data
Returns:
the corresponding BTProject

mantis2SquashPriority

public static org.squashtest.csp.core.bugtracker.domain.Priority mantis2SquashPriority(ObjectRef data)
Convert a mantis priority into Priority

Parameters:
data - the mantis data
Returns:
a Priority

mantis2SquashStatus

public static org.squashtest.csp.core.bugtracker.domain.Status mantis2SquashStatus(ObjectRef mantisStatus)
Convert a mantis status into Status

Parameters:
mantisStatus -
Returns:
a Status

mantis2SquashVersion

public static List<org.squashtest.csp.core.bugtracker.domain.Version> mantis2SquashVersion(ProjectVersionData[] mantisVersions)
Returns:
the list of the Squash Version corresponding to the input, or a list containing only Version.NO_VERSION if the input is null or empty.

mantis2SquashCategory

public static List<org.squashtest.csp.core.bugtracker.domain.Category> mantis2SquashCategory(String[] mantisCategories)
Note : Mantis never gives an id to its categories. The ID provided to the corresponding Squash entity is purely artificial and practicaly never used. It exists only for the coherence of the code so do not rely on it for more than temporary use.

Parameters:
mantisCcategories -
Returns:
a list of Squahs Category corresponding to the input, or a list containing Category.NO_CATEGORY only if the input is null or empty.

mantis2SquashPermission

public static List<org.squashtest.csp.core.bugtracker.domain.Permission> mantis2SquashPermission(ObjectRef[] mantisPermissions)

mantis2SquashUser

public static List<org.squashtest.csp.core.bugtracker.domain.User> mantis2SquashUser(AccountData[] mantisUsers)

mantis2SquashSingleUser

public static org.squashtest.csp.core.bugtracker.domain.User mantis2SquashSingleUser(AccountData data)
Converts a mantis User into Squash User

Parameters:
data - the mantis User data
Returns:
the corresponding User

squash2MantisUser

public static AccountData squash2MantisUser(org.squashtest.csp.core.bugtracker.domain.User squashUser)

squash2MantisId

public static BigInteger squash2MantisId(String squashId)

mantis2SquashId

public static String mantis2SquashId(BigInteger mantisId)

squashToMantisIssue

public static IssueData squashToMantisIssue(org.squashtest.csp.core.bugtracker.domain.BTIssue squashIssue)

mantis2squashIssue

public static org.squashtest.csp.core.bugtracker.domain.BTIssue mantis2squashIssue(IssueData mantisIssue)
Returns a BTIssue with the following params : id, summary, project, severity (as Priority), version, reporter, category, assignee, description, comment, created on, status

Parameters:
mantisIssue - the raw mantis issue
Returns:
the corresponding BTIssue


Copyright © 2010-2013 Henix, henix.fr. All Rights Reserved.