com.trackstudio.securedkernel
Class SecuredSCMAdapterManager

java.lang.Object
  extended by com.trackstudio.securedkernel.SecuredSCMAdapterManager

public class SecuredSCMAdapterManager
extends java.lang.Object

This manager is used for accessing to SVN and CVS servises


Constructor Summary
SecuredSCMAdapterManager()
           
 
Method Summary
 java.util.List getCommitsForRepository(SessionContext sc, java.lang.String taskId)
          Get SCM commits, assigned to the current task's repository
 java.util.List getCommitsForTask(SessionContext sc, java.lang.String taskId)
          Get SCM commits, assigned to the current task
 java.lang.String getDiff(SessionContext sc, java.lang.String diffURI, java.lang.String revision, java.lang.String connectionName)
          Returns diff for task
protected  java.util.Set getSCMParents(java.lang.String taskId)
          Get id of SCM task.
protected  java.util.List getTaskReferences(java.lang.String comment)
          Parses comment string and returns list of task.
 boolean isSVN(SessionContext sc, java.lang.String taskId)
          Return type of scm for the task
 boolean isTaskWithSCM(SessionContext sc, java.lang.String taskId)
          Check if task has asigned SCM
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SecuredSCMAdapterManager

public SecuredSCMAdapterManager()
Method Detail

getSCMParents

protected java.util.Set getSCMParents(java.lang.String taskId)
                               throws GranException
Get id of SCM task. Non secured method

Parameters:
taskId - task's id
Returns:
id fo SCM task
Throws:
GranException

isTaskWithSCM

public boolean isTaskWithSCM(SessionContext sc,
                             java.lang.String taskId)
                      throws GranException
Check if task has asigned SCM

Parameters:
sc - session context
taskId - task's id
Returns:
true if yes
Throws:
GranException

getCommitsForTask

public java.util.List getCommitsForTask(SessionContext sc,
                                        java.lang.String taskId)
                                 throws GranException
Get SCM commits, assigned to the current task

Parameters:
sc - session context
taskId - task's id
Returns:
list of SecuredCommitBean
Throws:
GranException
See Also:
SecuredCommitBean

getCommitsForRepository

public java.util.List getCommitsForRepository(SessionContext sc,
                                              java.lang.String taskId)
                                       throws GranException
Get SCM commits, assigned to the current task's repository

Parameters:
sc - session context
taskId - task's id
Returns:
list of SecuredCommitBean
Throws:
GranException
See Also:
SecuredCommitBean

isSVN

public boolean isSVN(SessionContext sc,
                     java.lang.String taskId)
              throws GranException
Return type of scm for the task

Parameters:
sc - session context
taskId - task's id
Returns:
true if repository type is SVN, false if CVS
Throws:
GranException

getTaskReferences

protected java.util.List getTaskReferences(java.lang.String comment)
Parses comment string and returns list of task. Not secured.

Parameters:
comment - input stirng
Returns:
list of task ids

getDiff

public java.lang.String getDiff(SessionContext sc,
                                java.lang.String diffURI,
                                java.lang.String revision,
                                java.lang.String connectionName)
                         throws GranException
Returns diff for task

Parameters:
sc - session context
diffURI - uri of diff
revision - revirsion of dif
connectionName - SCM Connnection name
Returns:
String with diff
Throws:
GranException


Copyright © 2002-2008 TrackStudio, Ltd. All Rights Reserved.