Package sonia.scm.repository
Class AbstractSimpleRepositoryHandler<C extends RepositoryConfig>
java.lang.Object
sonia.scm.repository.AbstractRepositoryHandler<C>
sonia.scm.repository.AbstractSimpleRepositoryHandler<C>
- All Implemented Interfaces:
Closeable,AutoCloseable,Handler<Repository>,HandlerBase<Repository>,Initable,RepositoryDirectoryHandler,RepositoryHandler
public abstract class AbstractSimpleRepositoryHandler<C extends RepositoryConfig>
extends AbstractRepositoryHandler<C>
implements RepositoryDirectoryHandler
-
Field Summary
FieldsFields inherited from class sonia.scm.repository.AbstractRepositoryHandler
baseDirectory, config, storeFields inherited from interface sonia.scm.repository.RepositoryDirectoryHandler
REPOSITORIES_NATIVE_DIRECTORY -
Constructor Summary
ConstructorsConstructorDescriptionAbstractSimpleRepositoryHandler(ConfigurationStoreFactory storeFactory, RepositoryLocationResolver repositoryLocationResolver, PluginLoader pluginLoader) -
Method Summary
Modifier and TypeMethodDescriptionprotected ExtendedCommandbuildCreateCommand(Repository repository, File directory) create(Repository repository) Persists a new object.protected voidcreate(Repository repository, File directory) protected Cvoiddelete(Repository repository) Removes a persistent object.getDirectory(String repositoryId) Get the current directory of the repository for the given id.protected StringgetStringFromResource(String resource, String defaultContent) Returns the content of a classpath resource or the given default content.Returns information about the version of the RepositoryHandler.voidvoidmodify(Repository repository) Modifies a persistent object.protected voidpostCreate(Repository repository, File directory) Methods inherited from class sonia.scm.repository.AbstractRepositoryHandler
close, getConfig, getConfigClass, getImportHandler, init, isConfigured, setConfig, storeConfigMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface sonia.scm.Handler
isConfiguredMethods inherited from interface sonia.scm.repository.RepositoryHandler
getImportHandler, getType
-
Field Details
-
DEFAULT_VERSION_INFORMATION
- See Also:
-
-
Constructor Details
-
AbstractSimpleRepositoryHandler
public AbstractSimpleRepositoryHandler(ConfigurationStoreFactory storeFactory, RepositoryLocationResolver repositoryLocationResolver, PluginLoader pluginLoader)
-
-
Method Details
-
create
Description copied from interface:HandlerBasePersists a new object.- Specified by:
createin interfaceHandlerBase<C extends RepositoryConfig>
-
delete
Description copied from interface:HandlerBaseRemoves a persistent object.- Specified by:
deletein interfaceHandlerBase<C extends RepositoryConfig>
-
loadConfig
public void loadConfig()- Overrides:
loadConfigin classAbstractRepositoryHandler<C extends RepositoryConfig>
-
modify
Description copied from interface:HandlerBaseModifies a persistent object.- Specified by:
modifyin interfaceHandlerBase<C extends RepositoryConfig>
-
getDirectory
Description copied from interface:RepositoryDirectoryHandlerGet the current directory of the repository for the given id.- Specified by:
getDirectoryin interfaceRepositoryDirectoryHandler
-
getVersionInformation
Description copied from interface:RepositoryHandlerReturns information about the version of the RepositoryHandler.- Specified by:
getVersionInformationin interfaceRepositoryHandler
-
buildCreateCommand
-
create
- Throws:
IOException
-
createInitialConfig
-
postCreate
- Throws:
IOException
-
getStringFromResource
Returns the content of a classpath resource or the given default content.- Parameters:
resource- path of a classpath resourcedefaultContent- default content to return- Returns:
- content of a classpath resource or defaultContent
-