mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-03-27 22:40:19 +01:00
change NamespaceStrategy signature to createNamespace(Repository)
This change allows us to implement NamespaceStrategies, such as by type (git, hg, svn) or manual defined. The DefaultNamespaceStrategy accepts now a predefined namespace and only if no namespace was set the username of the currently logged in user is used.
This commit is contained in:
@@ -2,7 +2,18 @@ package sonia.scm.repository;
|
||||
|
||||
import sonia.scm.plugin.ExtensionPoint;
|
||||
|
||||
/**
|
||||
* Strategy to create a namespace for the new repository. Namespaces are used to order and identify repositories.
|
||||
*/
|
||||
@ExtensionPoint
|
||||
public interface NamespaceStrategy {
|
||||
String getNamespace();
|
||||
|
||||
/**
|
||||
* Create new namespace for the given repository.
|
||||
*
|
||||
* @param repository repository
|
||||
*
|
||||
* @return namespace
|
||||
*/
|
||||
String createNamespace(Repository repository);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user