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 SummaryFieldsFields inherited from class sonia.scm.repository.AbstractRepositoryHandlerbaseDirectory, config, storeFields inherited from interface sonia.scm.repository.RepositoryDirectoryHandlerREPOSITORIES_NATIVE_DIRECTORY
- 
Constructor SummaryConstructorsConstructorDescriptionAbstractSimpleRepositoryHandler(ConfigurationStoreFactory storeFactory, RepositoryLocationResolver repositoryLocationResolver, PluginLoader pluginLoader) 
- 
Method SummaryModifier 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.AbstractRepositoryHandlerclose, getConfig, getConfigClass, getImportHandler, init, isConfigured, setConfig, storeConfigMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface sonia.scm.HandlerisConfiguredMethods inherited from interface sonia.scm.repository.RepositoryHandlergetImportHandler, getType
- 
Field Details- 
DEFAULT_VERSION_INFORMATION- See Also:
 
 
- 
- 
Constructor Details- 
AbstractSimpleRepositoryHandlerpublic AbstractSimpleRepositoryHandler(ConfigurationStoreFactory storeFactory, RepositoryLocationResolver repositoryLocationResolver, PluginLoader pluginLoader) 
 
- 
- 
Method Details- 
createDescription copied from interface:HandlerBasePersists a new object.- Specified by:
- createin interface- HandlerBase<C extends RepositoryConfig>
 
- 
deleteDescription copied from interface:HandlerBaseRemoves a persistent object.- Specified by:
- deletein interface- HandlerBase<C extends RepositoryConfig>
 
- 
loadConfigpublic void loadConfig()- Overrides:
- loadConfigin class- AbstractRepositoryHandler<C extends RepositoryConfig>
 
- 
modifyDescription copied from interface:HandlerBaseModifies a persistent object.- Specified by:
- modifyin interface- HandlerBase<C extends RepositoryConfig>
 
- 
getDirectoryDescription copied from interface:RepositoryDirectoryHandlerGet the current directory of the repository for the given id.- Specified by:
- getDirectoryin interface- RepositoryDirectoryHandler
 
- 
getVersionInformationDescription copied from interface:RepositoryHandlerReturns information about the version of the RepositoryHandler.- Specified by:
- getVersionInformationin interface- RepositoryHandler
 
- 
buildCreateCommand
- 
create- Throws:
- IOException
 
- 
createInitialConfig
- 
postCreate- Throws:
- IOException
 
- 
getStringFromResourceReturns the content of a classpath resource or the given default content.- Parameters:
- resource- path of a classpath resource
- defaultContent- default content to return
- Returns:
- content of a classpath resource or defaultContent
 
 
-