com.atlassian.jira.vcs
Class DefaultRepositoryManager

java.lang.Object
  extended by com.atlassian.jira.vcs.DefaultRepositoryManager
All Implemented Interfaces:
RepositoryManager
Direct Known Subclasses:
EnterpriseRepositoryManager

public class DefaultRepositoryManager
extends java.lang.Object
implements RepositoryManager


Field Summary
 
Fields inherited from interface com.atlassian.jira.vcs.RepositoryManager
CVS_TYPE, VCS_SERVICE_DELAY, VCS_SERVICE_NAME, VCS_TYPES
 
Constructor Summary
DefaultRepositoryManager()
           
DefaultRepositoryManager(com.atlassian.core.ofbiz.association.AssociationManager associationManager, org.ofbiz.core.entity.GenericDelegator genericDelegator, ServiceManager serviceManager)
           
 
Method Summary
 Repository createRepository(java.lang.String type, java.lang.String name, java.lang.String description, java.util.Properties properties)
           
protected  com.atlassian.core.ofbiz.association.AssociationManager getAssociationManager()
           
protected  org.ofbiz.core.entity.GenericDelegator getGenericDelegator()
           
 java.util.Collection getProjectsForRepository(Repository repository)
           
 com.opensymphony.module.propertyset.PropertySet getPropertySet(org.ofbiz.core.entity.GenericValue versionControlGV)
          Retrieves a proeprty set for a repository given repository's GenericValue
 java.util.Collection getRepositories()
           
 java.util.Collection getRepositoriesForProject(org.ofbiz.core.entity.GenericValue project)
           
 Repository getRepository(java.lang.Long id)
           
 Repository getRepository(java.lang.String name)
          Retrieves the repository by name
protected  ServiceManager getServiceManager()
           
 boolean isValidType(java.lang.String type)
           
 void refresh()
           
 void removeRepository(java.lang.Long id)
           
 void setProjectRepositories(org.ofbiz.core.entity.GenericValue project, java.util.Collection repositoryIds)
          Given a project and a collection of repository ids, associates the project with the repositories that have the given ids NOTE: the old associations are removed
 boolean updateRepositories()
          Tries to update (e.g.
 void updateRepository(java.lang.Long id, java.lang.String type, java.lang.String name, java.lang.String description, java.util.Properties properties)
          Updates the repository with the given id.
protected  boolean updateRepository(Repository repository)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultRepositoryManager

public DefaultRepositoryManager(com.atlassian.core.ofbiz.association.AssociationManager associationManager,
                                org.ofbiz.core.entity.GenericDelegator genericDelegator,
                                ServiceManager serviceManager)
                         throws org.ofbiz.core.entity.GenericEntityException
Throws:
org.ofbiz.core.entity.GenericEntityException

DefaultRepositoryManager

public DefaultRepositoryManager()
                         throws org.ofbiz.core.entity.GenericEntityException
Throws:
org.ofbiz.core.entity.GenericEntityException
Method Detail

getRepositoriesForProject

public java.util.Collection getRepositoriesForProject(org.ofbiz.core.entity.GenericValue project)
                                               throws org.ofbiz.core.entity.GenericEntityException
Specified by:
getRepositoriesForProject in interface RepositoryManager
Throws:
org.ofbiz.core.entity.GenericEntityException

getProjectsForRepository

public java.util.Collection getProjectsForRepository(Repository repository)
                                              throws org.ofbiz.core.entity.GenericEntityException
Specified by:
getProjectsForRepository in interface RepositoryManager
Throws:
org.ofbiz.core.entity.GenericEntityException

getRepository

public Repository getRepository(java.lang.String name)
Retrieves the repository by name

Specified by:
getRepository in interface RepositoryManager
Parameters:
name - name of the repository
Returns:
the repository with the given name if one is found, null otherwise

getRepository

public Repository getRepository(java.lang.Long id)
                         throws org.ofbiz.core.entity.GenericEntityException
Specified by:
getRepository in interface RepositoryManager
Throws:
org.ofbiz.core.entity.GenericEntityException

getPropertySet

public com.opensymphony.module.propertyset.PropertySet getPropertySet(org.ofbiz.core.entity.GenericValue versionControlGV)
Description copied from interface: RepositoryManager
Retrieves a proeprty set for a repository given repository's GenericValue

Specified by:
getPropertySet in interface RepositoryManager
Parameters:
versionControlGV - the generic value of the repository
Returns:
the proeprty set for the repository

isValidType

public boolean isValidType(java.lang.String type)
Specified by:
isValidType in interface RepositoryManager

createRepository

public Repository createRepository(java.lang.String type,
                                   java.lang.String name,
                                   java.lang.String description,
                                   java.util.Properties properties)
                            throws java.lang.Exception
Specified by:
createRepository in interface RepositoryManager
Throws:
java.lang.Exception

updateRepository

public void updateRepository(java.lang.Long id,
                             java.lang.String type,
                             java.lang.String name,
                             java.lang.String description,
                             java.util.Properties properties)
                      throws org.ofbiz.core.entity.GenericEntityException
Updates the repository with the given id. The values are updated based on the properties

Specified by:
updateRepository in interface RepositoryManager
Parameters:
id -
properties -
Throws:
org.ofbiz.core.entity.GenericEntityException

removeRepository

public void removeRepository(java.lang.Long id)
                      throws java.lang.Exception
Specified by:
removeRepository in interface RepositoryManager
Throws:
java.lang.Exception

setProjectRepositories

public void setProjectRepositories(org.ofbiz.core.entity.GenericValue project,
                                   java.util.Collection repositoryIds)
                            throws org.ofbiz.core.entity.GenericEntityException
Given a project and a collection of repository ids, associates the project with the repositories that have the given ids NOTE: the old associations are removed

Specified by:
setProjectRepositories in interface RepositoryManager
Parameters:
project -
repositoryIds -
Throws:
org.ofbiz.core.entity.GenericEntityException - if at least one repository with the given id does not exist

getRepositories

public java.util.Collection getRepositories()
Specified by:
getRepositories in interface RepositoryManager
Returns:
A List of all Repository objects in the system.

updateRepositories

public boolean updateRepositories()
                           throws org.ofbiz.core.entity.GenericEntityException
Description copied from interface: RepositoryManager
Tries to update (e.g. cvs up)all the repositories in the system. This method returns true if ALL repositories were potentially updated without a problem, or false if exception occurred.

Specified by:
updateRepositories in interface RepositoryManager
Returns:
Throws:
org.ofbiz.core.entity.GenericEntityException

updateRepository

protected boolean updateRepository(Repository repository)
                            throws org.netbeans.lib.cvsclient.command.CommandException,
                                   org.netbeans.lib.cvsclient.connection.AuthenticationException,
                                   java.io.IOException,
                                   net.sf.statcvs.input.LogSyntaxException,
                                   LockException
Throws:
org.netbeans.lib.cvsclient.command.CommandException
org.netbeans.lib.cvsclient.connection.AuthenticationException
java.io.IOException
net.sf.statcvs.input.LogSyntaxException
LockException

refresh

public void refresh()
             throws org.ofbiz.core.entity.GenericEntityException
Specified by:
refresh in interface RepositoryManager
Throws:
org.ofbiz.core.entity.GenericEntityException

getGenericDelegator

protected org.ofbiz.core.entity.GenericDelegator getGenericDelegator()

getAssociationManager

protected com.atlassian.core.ofbiz.association.AssociationManager getAssociationManager()

getServiceManager

protected ServiceManager getServiceManager()


Copyright © 2002-2006 Atlassian. All Rights Reserved.