Package sonia.scm.repository
Interface RepositoryContentInitializer.InitializerContext
- Enclosing interface:
- RepositoryContentInitializer
public static interface RepositoryContentInitializer.InitializerContext
Use this
RepositoryContentInitializer.InitializerContext
to create new files on repository initialization
which will be included in the first commit-
Method Summary
Modifier and TypeMethodDescriptioncreate new file which will be included in initial repository commitcreateWithDefaultPath
(String path, boolean useDefaultPath) create new file which will be included in initial repository commit.default <T> Optional<T>
Returns the context entry with the given key and unmarshalls it to the given type.
-
Method Details
-
getRepository
Repository getRepository()- Returns:
- repository to which this initializerContext belongs to
-
create
create new file which will be included in initial repository commit -
createWithDefaultPath
create new file which will be included in initial repository commit.- Parameters:
path
- full path of the file to be createduseDefaultPath
- Wether the default path of the repository should be prefixed to the specified path. For example "/trunk", if it is a SVN repository.
-
getEntry
Returns the context entry with the given key and unmarshalls it to the given type. It no entry with the given key is available an empty optional is returned.- Parameters:
key
- key of the context objecttype
- type of the context object- Returns:
- context entry or empty optional
- Since:
- 2.5.0
-