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 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

      RepositoryContentInitializer.CreateFile createWithDefaultPath(String path, boolean useDefaultPath)
      create new file which will be included in initial repository commit.
      Parameters:
      path - full path of the file to be created
      useDefaultPath - Wether the default path of the repository should be prefixed to the specified path. For example "/trunk", if it is a SVN repository.
    • getEntry

      default <T> Optional<T> getEntry(String key, Class<T> type)
      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 object
      type - type of the context object
      Returns:
      context entry or empty optional
      Since:
      2.5.0