Package sonia.scm.repository
Class RepositoryManagerDecorator
- All Implemented Interfaces:
Closeable
,AutoCloseable
,HandlerBase<Repository>
,Initable
,LastModifiedAware
,Manager<Repository>
,RepositoryManager
,TypeManager<Repository,
RepositoryHandler>
public class RepositoryManagerDecorator
extends ManagerDecorator<Repository>
implements RepositoryManager
Decorator for
RepositoryManager
.- Since:
- 1.23
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
archive
(Repository repository) Archives the given repository.void
fireHookEvent
(RepositoryHookEvent event) FireRepositoryHookEvent
to the event bus.get
(NamespaceAndName namespaceAndName) Returns aRepository
by its namespace and name or null if theRepository
could not be found.Returns all namespaces.Returns all configured repository types.Returns the decoratedRepositoryManager
.getHandler
(String type) Returns aRepositoryHandler
by the given type (hg, git, svn ...).getTypes()
Returns aCollection
of all available and configured types.void
importRepository
(Repository repository) Imports an existingRepository
.rename
(Repository repository, String newNamespace, String newName) void
unarchive
(Repository repository) Un-archives the given repository.Methods inherited from class sonia.scm.ManagerDecorator
close, create, delete, get, getAll, getAll, getAll, getAll, getLastModified, init, modify, refresh
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface sonia.scm.HandlerBase
create, delete, modify
Methods inherited from interface sonia.scm.LastModifiedAware
getLastModified
Methods inherited from interface sonia.scm.Manager
get, getAll, getAll, getAll, getAll, getAll, getPage, refresh
Methods inherited from interface sonia.scm.repository.RepositoryManager
create
-
Constructor Details
-
RepositoryManagerDecorator
-
-
Method Details
-
fireHookEvent
Description copied from interface:RepositoryManager
FireRepositoryHookEvent
to the event bus.- Specified by:
fireHookEvent
in interfaceRepositoryManager
- Parameters:
event
- hook event
-
importRepository
Description copied from interface:RepositoryManager
Imports an existingRepository
. Note: This method should only be called from aRepositoryHandler
.- Specified by:
importRepository
in interfaceRepositoryManager
- Parameters:
repository
-Repository
to import- Throws:
IOException
-
get
Description copied from interface:RepositoryManager
Returns aRepository
by its namespace and name or null if theRepository
could not be found.- Specified by:
get
in interfaceRepositoryManager
- Parameters:
namespaceAndName
- namespace and name of theRepository
- Returns:
Repository
by its namespace and name or null if theRepository
could not be found
-
getConfiguredTypes
Description copied from interface:RepositoryManager
Returns all configured repository types.- Specified by:
getConfiguredTypes
in interfaceRepositoryManager
-
getDecorated
Returns the decoratedRepositoryManager
.- Returns:
- decorated
RepositoryManager
- Since:
- 1.34
-
getHandler
Description copied from interface:RepositoryManager
Returns aRepositoryHandler
by the given type (hg, git, svn ...).- Specified by:
getHandler
in interfaceRepositoryManager
- Specified by:
getHandler
in interfaceTypeManager<Repository,
RepositoryHandler> - Parameters:
type
- the type of theRepositoryHandler
- Returns:
RepositoryHandler
by the given type
-
getTypes
Description copied from interface:TypeManager
Returns aCollection
of all available and configured types.- Specified by:
getTypes
in interfaceTypeManager<Repository,
RepositoryHandler>
-
rename
- Specified by:
rename
in interfaceRepositoryManager
- Parameters:
repository
- the repositoryRepository
newNamespace
- the new repository namespacenewName
- the new repository name- Returns:
Repository
the renamed repository
-
getAllNamespaces
Description copied from interface:RepositoryManager
Returns all namespaces.- Specified by:
getAllNamespaces
in interfaceRepositoryManager
-
archive
Description copied from interface:RepositoryManager
Archives the given repository.- Specified by:
archive
in interfaceRepositoryManager
-
unarchive
Description copied from interface:RepositoryManager
Un-archives the given repository.- Specified by:
unarchive
in interfaceRepositoryManager
-