org.squashtest.tm.service.internal.bugtracker
Class BugTrackersLocalServiceImpl

java.lang.Object
  extended by org.squashtest.tm.service.internal.bugtracker.BugTrackersLocalServiceImpl
All Implemented Interfaces:
BugTrackersLocalService

@Service(value="squashtest.tm.service.BugTrackersLocalService")
public class BugTrackersLocalServiceImpl
extends Object
implements BugTrackersLocalService


Constructor Summary
BugTrackersLocalServiceImpl()
           
 
Method Summary
 void attachIssue(org.squashtest.tm.domain.bugtracker.IssueDetector bugged, String remoteIssueKey)
          Will attach an existing issue to the issue detector
 org.squashtest.tm.domain.bugtracker.BugTrackerStatus checkBugTrackerStatus(Long projectId)
          same as BugTrackersLocalService.checkBugTrackerStatus(Project), using the id of the project instead.
 org.squashtest.tm.domain.bugtracker.BugTrackerStatus checkBugTrackerStatus(org.squashtest.tm.domain.project.Project project)
          tests if the bugtracker is ready for use
 org.squashtest.tm.bugtracker.definition.RemoteIssue createIssue(org.squashtest.tm.domain.bugtracker.IssueDetector entity, org.squashtest.tm.bugtracker.definition.RemoteIssue btIssue)
          adds a new Issue to the entity.
 org.squashtest.tm.bugtracker.definition.RemoteIssue createReportIssueTemplate(String projectName, org.squashtest.csp.core.bugtracker.domain.BugTracker bugTracker)
          Must return ready-to-fill issue, ie with empty fields and its project configured with as many metadata as possible related to issue creation.
 void detachIssue(long id)
          Will detach an existing issue from an issue detector
 List<org.squashtest.tm.domain.bugtracker.IssueOwnership<org.squashtest.tm.domain.bugtracker.RemoteIssueDecorator>> findIssueOwnershipForTestCase(long tcId)
          Given a TestCase, returns a list of linked BTIssue (not Issue).
 int findNumberOfIssueForExecutionStep(Long testStepId)
          self-explanatory
 int findNumberOfIssueForItemTestPlanLastExecution(Long itemTestPlanId)
          self-explanatory
 int findNumberOfIssueForTestCase(Long tcId)
           
 org.squashtest.tm.bugtracker.definition.RemoteProject findRemoteProject(String name, org.squashtest.csp.core.bugtracker.domain.BugTracker bugTracker)
          returns an instance of the remote project.
 org.squashtest.tm.core.foundation.collection.PagedCollectionHolder<List<org.squashtest.tm.domain.bugtracker.IssueOwnership<org.squashtest.tm.domain.bugtracker.RemoteIssueDecorator>>> findSortedIssueOwnershipForIteration(Long iterId, org.squashtest.tm.core.foundation.collection.PagingAndSorting sorter)
          Given an Iteration, returns a list of linked BTIssue (not Issue).
 org.squashtest.tm.core.foundation.collection.PagedCollectionHolder<List<org.squashtest.tm.domain.bugtracker.IssueOwnership<org.squashtest.tm.domain.bugtracker.RemoteIssueDecorator>>> findSortedIssueOwnershipForTestCase(Long tcId, org.squashtest.tm.core.foundation.collection.PagingAndSorting sorter)
          Given a TestCase, returns a list of linked BTIssue (not Issue).
 org.squashtest.tm.core.foundation.collection.PagedCollectionHolder<List<org.squashtest.tm.domain.bugtracker.IssueOwnership<org.squashtest.tm.domain.bugtracker.RemoteIssueDecorator>>> findSortedIssueOwnershipsForCampaigns(Long campId, org.squashtest.tm.core.foundation.collection.PagingAndSorting sorter)
          Given an Campaign, returns a list of linked BTIssue (not Issue)

To keep track of which IssueDetector owns which issue, the data are wrapped in a IssueOwnership (that just pair the informations together).
 org.squashtest.tm.core.foundation.collection.PagedCollectionHolder<List<org.squashtest.tm.domain.bugtracker.IssueOwnership<org.squashtest.tm.domain.bugtracker.RemoteIssueDecorator>>> findSortedIssueOwnershipsforExecution(Long execId, org.squashtest.tm.core.foundation.collection.PagingAndSorting sorter)
          Given an Execution, returns a list of linked BTIssue (not Issue).
 org.squashtest.tm.core.foundation.collection.PagedCollectionHolder<List<org.squashtest.tm.domain.bugtracker.IssueOwnership<org.squashtest.tm.domain.bugtracker.RemoteIssueDecorator>>> findSortedIssueOwnerShipsForExecutionStep(Long stepId, org.squashtest.tm.core.foundation.collection.PagingAndSorting sorter)
          Given an ExecutionStep, returns a list of linked BTIssue (not Issue).
 org.squashtest.tm.core.foundation.collection.PagedCollectionHolder<List<org.squashtest.tm.domain.bugtracker.IssueOwnership<org.squashtest.tm.domain.bugtracker.RemoteIssueDecorator>>> findSortedIssueOwnershipsForTestSuite(Long testSuiteId, org.squashtest.tm.core.foundation.collection.PagingAndSorting sorter)
          Given a TestSuite, returns a list of linked BTIssue (not Issue).
 org.squashtest.tm.domain.testcase.TestCase findTestCaseRelatedToIssue(Long issueId)
           
 void forwardAttachments(String remoteIssueKey, String bugtrackerName, List<org.squashtest.tm.bugtracker.definition.Attachment> attachments)
          Given a remote issue key, will ask the bugtracker to attach the attachments to that issue.
 Object forwardDelegateCommand(org.squashtest.tm.bugtracker.advanceddomain.DelegateCommand command, String bugtrackerName)
          forwards a DelegateCommand to a connector
 org.squashtest.csp.core.bugtracker.spi.BugTrackerInterfaceDescriptor getInterfaceDescriptor(org.squashtest.csp.core.bugtracker.domain.BugTracker bugTracker)
          An InterfaceDescriptor contains informations relevant to the generation of a view/GUI.
 org.squashtest.tm.bugtracker.definition.RemoteIssue getIssue(String issueKey, org.squashtest.csp.core.bugtracker.domain.BugTracker bugTracker)
          returns a remote issue using its key
 List<org.squashtest.tm.bugtracker.definition.RemoteIssue> getIssues(List<String> issueKeyList, org.squashtest.csp.core.bugtracker.domain.BugTracker bugTracker)
          returns a list of BTIssu corresponding to the given string keys
 URL getIssueUrl(String btIssueId, org.squashtest.csp.core.bugtracker.domain.BugTracker bugTracker)
          Gets the url of a remote Issue given its Id
 Set<String> getProviderKinds()
           
 void setCredentials(String username, String password, org.squashtest.csp.core.bugtracker.domain.BugTracker bugTracker)
          sets the credentials of an user for authentication bugtracker-side.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BugTrackersLocalServiceImpl

public BugTrackersLocalServiceImpl()
Method Detail

getInterfaceDescriptor

public org.squashtest.csp.core.bugtracker.spi.BugTrackerInterfaceDescriptor getInterfaceDescriptor(org.squashtest.csp.core.bugtracker.domain.BugTracker bugTracker)
Description copied from interface: BugTrackersLocalService
An InterfaceDescriptor contains informations relevant to the generation of a view/GUI. See the class for more details.

Specified by:
getInterfaceDescriptor in interface BugTrackersLocalService
Parameters:
bugTracker - the concerned BugTracker
Returns:
an InterfaceDescriptor.

checkBugTrackerStatus

@PreAuthorize(value="hasPermission(#entity, \'EXECUTE\') or hasRole(\'ROLE_ADMIN\')")
public org.squashtest.tm.domain.bugtracker.BugTrackerStatus checkBugTrackerStatus(org.squashtest.tm.domain.project.Project project)
Description copied from interface: BugTrackersLocalService
tests if the bugtracker is ready for use

Specified by:
checkBugTrackerStatus in interface BugTrackersLocalService
Parameters:
project - : the concerned Project
Returns:
the status of the bugtracker

checkBugTrackerStatus

public org.squashtest.tm.domain.bugtracker.BugTrackerStatus checkBugTrackerStatus(Long projectId)
Description copied from interface: BugTrackersLocalService
same as BugTrackersLocalService.checkBugTrackerStatus(Project), using the id of the project instead.

Specified by:
checkBugTrackerStatus in interface BugTrackersLocalService
Returns:

createIssue

public org.squashtest.tm.bugtracker.definition.RemoteIssue createIssue(org.squashtest.tm.domain.bugtracker.IssueDetector entity,
                                                                       org.squashtest.tm.bugtracker.definition.RemoteIssue btIssue)
Description copied from interface: BugTrackersLocalService
adds a new Issue to the entity. The entity must implement IssueDetector.

Specified by:
createIssue in interface BugTrackersLocalService
btIssue - : the issue to add
Returns:
the BTIssue corresponding to the bug remotely created

getIssue

public org.squashtest.tm.bugtracker.definition.RemoteIssue getIssue(String issueKey,
                                                                    org.squashtest.csp.core.bugtracker.domain.BugTracker bugTracker)
Description copied from interface: BugTrackersLocalService
returns a remote issue using its key

Specified by:
getIssue in interface BugTrackersLocalService
bugTracker - : the concerned BugTracker
Returns:
a remote issue

getIssues

public List<org.squashtest.tm.bugtracker.definition.RemoteIssue> getIssues(List<String> issueKeyList,
                                                                           org.squashtest.csp.core.bugtracker.domain.BugTracker bugTracker)
Description copied from interface: BugTrackersLocalService
returns a list of BTIssu corresponding to the given string keys

Specified by:
getIssues in interface BugTrackersLocalService
Parameters:
issueKeyList - the remote issue key list
bugTracker - : the concerned BugTracker
Returns:
a BTIssue list

findRemoteProject

public org.squashtest.tm.bugtracker.definition.RemoteProject findRemoteProject(String name,
                                                                               org.squashtest.csp.core.bugtracker.domain.BugTracker bugTracker)
Description copied from interface: BugTrackersLocalService
returns an instance of the remote project.

Specified by:
findRemoteProject in interface BugTrackersLocalService
Parameters:
name - : the name of the project.
bugTracker - : the concerned BugTracker
Returns:
the project filled with users and versions if found.

createReportIssueTemplate

public org.squashtest.tm.bugtracker.definition.RemoteIssue createReportIssueTemplate(String projectName,
                                                                                     org.squashtest.csp.core.bugtracker.domain.BugTracker bugTracker)
Description copied from interface: BugTrackersLocalService
Must return ready-to-fill issue, ie with empty fields and its project configured with as many metadata as possible related to issue creation.

Specified by:
createReportIssueTemplate in interface BugTrackersLocalService
Returns:

setCredentials

public void setCredentials(String username,
                           String password,
                           org.squashtest.csp.core.bugtracker.domain.BugTracker bugTracker)
Description copied from interface: BugTrackersLocalService
sets the credentials of an user for authentication bugtracker-side.

Specified by:
setCredentials in interface BugTrackersLocalService
bugTracker - : the concerned BugTracker

getIssueUrl

public URL getIssueUrl(String btIssueId,
                       org.squashtest.csp.core.bugtracker.domain.BugTracker bugTracker)
Description copied from interface: BugTrackersLocalService
Gets the url of a remote Issue given its Id

Specified by:
getIssueUrl in interface BugTrackersLocalService
Parameters:
btIssueId - the id of that issue
bugTracker - : the concerned BugTracker
Returns:
the URL where you may find that issue.

forwardAttachments

public void forwardAttachments(String remoteIssueKey,
                               String bugtrackerName,
                               List<org.squashtest.tm.bugtracker.definition.Attachment> attachments)
Description copied from interface: BugTrackersLocalService
Given a remote issue key, will ask the bugtracker to attach the attachments to that issue. In order to prevent possible conflicts (multiple issue may have the same id if defined on different bugtrackers) the bugtracker name is required too.

Specified by:
forwardAttachments in interface BugTrackersLocalService

forwardDelegateCommand

public Object forwardDelegateCommand(org.squashtest.tm.bugtracker.advanceddomain.DelegateCommand command,
                                     String bugtrackerName)
Description copied from interface: BugTrackersLocalService
forwards a DelegateCommand to a connector

Specified by:
forwardDelegateCommand in interface BugTrackersLocalService
Returns:

attachIssue

@PreAuthorize(value="hasPermission(#bugged, \'EXECUTE\') or hasRole(\'ROLE_ADMIN\')")
public void attachIssue(org.squashtest.tm.domain.bugtracker.IssueDetector bugged,
                                     String remoteIssueKey)
Description copied from interface: BugTrackersLocalService
Will attach an existing issue to the issue detector

Specified by:
attachIssue in interface BugTrackersLocalService
Parameters:
bugged - : the future issue holder
remoteIssueKey - : the identificator of the issue in the BT

detachIssue

public void detachIssue(long id)
Description copied from interface: BugTrackersLocalService
Will detach an existing issue from an issue detector

Specified by:
detachIssue in interface BugTrackersLocalService

findSortedIssueOwnerShipsForExecutionStep

@PreAuthorize(value="hasPermission(#stepId, \'org.squashtest.tm.domain.execution.ExecutionStep\', \'READ\') or hasRole(\'ROLE_ADMIN\')")
public org.squashtest.tm.core.foundation.collection.PagedCollectionHolder<List<org.squashtest.tm.domain.bugtracker.IssueOwnership<org.squashtest.tm.domain.bugtracker.RemoteIssueDecorator>>> findSortedIssueOwnerShipsForExecutionStep(Long stepId,
                                                                                                                                                                                                                                                     org.squashtest.tm.core.foundation.collection.PagingAndSorting sorter)
Description copied from interface: BugTrackersLocalService
Given an ExecutionStep, returns a list of linked BTIssue (not Issue).

To keep track of which IssueDetector owns which issue, the data are wrapped in a IssueOwnership (that just pair the informations together).

Specified by:
findSortedIssueOwnerShipsForExecutionStep in interface BugTrackersLocalService
Parameters:
stepId - of which we need to get the issues,
sorter - that tells us how we should sort and filter the data
Returns:
a PagedCollectionHolder containing a non-null but possibly empty list of IssueOwnership, sorted and filtered according to the PagingAndSorting.

findSortedIssueOwnershipsforExecution

@PreAuthorize(value="hasPermission(#execId, \'org.squashtest.tm.domain.execution.Execution\', \'READ\') or hasRole(\'ROLE_ADMIN\')")
public org.squashtest.tm.core.foundation.collection.PagedCollectionHolder<List<org.squashtest.tm.domain.bugtracker.IssueOwnership<org.squashtest.tm.domain.bugtracker.RemoteIssueDecorator>>> findSortedIssueOwnershipsforExecution(Long execId,
                                                                                                                                                                                                                                                 org.squashtest.tm.core.foundation.collection.PagingAndSorting sorter)
Description copied from interface: BugTrackersLocalService
Given an Execution, returns a list of linked BTIssue (not Issue).

To keep track of which IssueDetector owns which issue, the data are wrapped in a IssueOwnership (that just pair the informations together).

Specified by:
findSortedIssueOwnershipsforExecution in interface BugTrackersLocalService
Parameters:
execId - of which we need to get the issues,
sorter - that tells us how we should sort and filter the data
Returns:
a PagedCollectionHolder containing a non-null but possibly empty list of IssueOwnership, sorted and filtered according to the PagingAndSorting.

findSortedIssueOwnershipForIteration

@PreAuthorize(value="hasPermission(#iterId, \'org.squashtest.tm.domain.campaign.Iteration\', \'READ\') or hasRole(\'ROLE_ADMIN\')")
public org.squashtest.tm.core.foundation.collection.PagedCollectionHolder<List<org.squashtest.tm.domain.bugtracker.IssueOwnership<org.squashtest.tm.domain.bugtracker.RemoteIssueDecorator>>> findSortedIssueOwnershipForIteration(Long iterId,
                                                                                                                                                                                                                                                org.squashtest.tm.core.foundation.collection.PagingAndSorting sorter)
Description copied from interface: BugTrackersLocalService
Given an Iteration, returns a list of linked BTIssue (not Issue).

To keep track of which IssueDetector owns which issue, the data are wrapped in a IssueOwnership (that just pair the informations together).

Specified by:
findSortedIssueOwnershipForIteration in interface BugTrackersLocalService
Parameters:
iterId - of which we need to get the issues,
sorter - that tells us how we should sort and filter the data
Returns:
a PagedCollectionHolder containing a non-null but possibly empty list of IssueOwnership, sorted and filtered according to the PagingAndSorting.

findSortedIssueOwnershipsForCampaigns

@PreAuthorize(value="hasPermission(#campId, \'org.squashtest.tm.domain.campaign.Campaign\' ,\'READ\') or hasRole(\'ROLE_ADMIN\')")
public org.squashtest.tm.core.foundation.collection.PagedCollectionHolder<List<org.squashtest.tm.domain.bugtracker.IssueOwnership<org.squashtest.tm.domain.bugtracker.RemoteIssueDecorator>>> findSortedIssueOwnershipsForCampaigns(Long campId,
                                                                                                                                                                                                                                                 org.squashtest.tm.core.foundation.collection.PagingAndSorting sorter)
Description copied from interface: BugTrackersLocalService
Given an Campaign, returns a list of linked BTIssue (not Issue)

To keep track of which IssueDetector owns which issue, the data are wrapped in a IssueOwnership (that just pair the informations together).

Specified by:
findSortedIssueOwnershipsForCampaigns in interface BugTrackersLocalService
Parameters:
campId - of which we need to get the issues,
sorter - that tells us how we should sort and filter the data
Returns:
a PagedCollectionHolder containing a non-null but possibly empty list of IssueOwnership, sorted and filtered according to the PagingAndSorting.

findSortedIssueOwnershipsForTestSuite

@PreAuthorize(value="hasPermission(#testSuiteId, \'org.squashtest.tm.domain.campaign.TestSuite\', \'READ\') or hasRole(\'ROLE_ADMIN\')")
public org.squashtest.tm.core.foundation.collection.PagedCollectionHolder<List<org.squashtest.tm.domain.bugtracker.IssueOwnership<org.squashtest.tm.domain.bugtracker.RemoteIssueDecorator>>> findSortedIssueOwnershipsForTestSuite(Long testSuiteId,
                                                                                                                                                                                                                                                 org.squashtest.tm.core.foundation.collection.PagingAndSorting sorter)
Description copied from interface: BugTrackersLocalService
Given a TestSuite, returns a list of linked BTIssue (not Issue).

To keep track of which IssueDetector owns which issue, the data are wrapped in a IssueOwnership (that just pair the informations together).

Specified by:
findSortedIssueOwnershipsForTestSuite in interface BugTrackersLocalService
Parameters:
testSuiteId - for which we need to get the issues,
sorter - that tells us how we should sort and filter the data
Returns:
a PagedCollectionHolder containing a non-null but possibly empty list of IssueOwnership, sorted and filtered according to the PagingAndSorting.

findSortedIssueOwnershipForTestCase

@PreAuthorize(value="hasPermission(#tcId, \'org.squashtest.tm.domain.testcase.TestCase\', \'READ\') or hasRole(\'ROLE_ADMIN\')")
public org.squashtest.tm.core.foundation.collection.PagedCollectionHolder<List<org.squashtest.tm.domain.bugtracker.IssueOwnership<org.squashtest.tm.domain.bugtracker.RemoteIssueDecorator>>> findSortedIssueOwnershipForTestCase(Long tcId,
                                                                                                                                                                                                                                               org.squashtest.tm.core.foundation.collection.PagingAndSorting sorter)
Description copied from interface: BugTrackersLocalService
Given a TestCase, returns a list of linked BTIssue (not Issue).

To keep track of which IssueDetector owns which issue, the data are wrapped in a IssueOwnership (that just pair the informations together).

Specified by:
findSortedIssueOwnershipForTestCase in interface BugTrackersLocalService
sorter - that tells us how we should sort and filter the data
Returns:
a PagedCollectionHolder containing a non-null but possibly empty list of IssueOwnership, sorted and filtered according to the PagingAndSorting.

findIssueOwnershipForTestCase

@PreAuthorize(value="hasPermission(#tcId, \'org.squashtest.tm.domain.testcase.TestCase\', \'READ\') or hasRole(\'ROLE_ADMIN\')")
public List<org.squashtest.tm.domain.bugtracker.IssueOwnership<org.squashtest.tm.domain.bugtracker.RemoteIssueDecorator>> findIssueOwnershipForTestCase(long tcId)
Description copied from interface: BugTrackersLocalService
Given a TestCase, returns a list of linked BTIssue (not Issue).

To keep track of which IssueDetector owns which issue, the data are wrapped in a IssueOwnership (that just pair the informations together).

Specified by:
findIssueOwnershipForTestCase in interface BugTrackersLocalService
Returns:
a non-null but possibly empty list of IssueOwnership,

getProviderKinds

public Set<String> getProviderKinds()
Specified by:
getProviderKinds in interface BugTrackersLocalService
Returns:
the list of all bugtracker kinds available

findNumberOfIssueForTestCase

public int findNumberOfIssueForTestCase(Long tcId)
Specified by:
findNumberOfIssueForTestCase in interface BugTrackersLocalService

findNumberOfIssueForItemTestPlanLastExecution

public int findNumberOfIssueForItemTestPlanLastExecution(Long itemTestPlanId)
Description copied from interface: BugTrackersLocalService
self-explanatory

Specified by:
findNumberOfIssueForItemTestPlanLastExecution in interface BugTrackersLocalService

findNumberOfIssueForExecutionStep

public int findNumberOfIssueForExecutionStep(Long testStepId)
Description copied from interface: BugTrackersLocalService
self-explanatory

Specified by:
findNumberOfIssueForExecutionStep in interface BugTrackersLocalService

findTestCaseRelatedToIssue

public org.squashtest.tm.domain.testcase.TestCase findTestCaseRelatedToIssue(Long issueId)
Specified by:
findTestCaseRelatedToIssue in interface BugTrackersLocalService


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