Interface GitHostingService

All Superinterfaces:
Service
All Known Implementing Classes:
GitHub, GitLab

public interface GitHostingService extends Service
A service that supports the Service.Feature.GIT_HOSTING feature to manage hosted repositories.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface com.mooltiverse.oss.nyx.services.Service

    Service.Feature
  • Method Summary

    Modifier and Type
    Method
    Description
    createGitRepository(String name, String description, boolean restricted, boolean initialize)
    Creates a new Git repository for the currently authenticated user.
    void
    Deletes a Git repository for the currently authenticated user.

    Methods inherited from interface com.mooltiverse.oss.nyx.services.Service

    supports
  • Method Details

    • createGitRepository

      GitHostedRepository createGitRepository(String name, String description, boolean restricted, boolean initialize) throws SecurityException, TransportException
      Creates a new Git repository for the currently authenticated user.
      Please note that if the service has been configured with repository owner and name those attributes are ignored by this method as the owner is always the authenticated user (the one owning the configured credentials) and the name is always the name attribute.
      Parameters:
      name - the repository name. Cannot be null
      description - the repository description. It may be null
      restricted - when true the repository will have private visibility, otherwise it will be public
      initialize - when true the repository is also initialized (usually with a default README file)
      Returns:
      the object representing the newly created repository
      Throws:
      SecurityException - if authentication or authorization fails or there is no currently authenticated user
      TransportException - if communication to the remote endpoint fails
      UnsupportedOperationException - if the underlying implementation does not support the Service.Feature.GIT_HOSTING feature.
    • deleteGitRepository

      void deleteGitRepository(String name) throws SecurityException, TransportException
      Deletes a Git repository for the currently authenticated user.
      Please note that if the service has been configured with repository owner and name those attributes are ignored by this method as the owner is always the authenticated user (the one owning the configured credentials) and the name is always the name attribute.
      Parameters:
      name - the repository name. Cannot be null
      Throws:
      SecurityException - if authentication or authorization fails or there is no currently authenticated user
      TransportException - if communication to the remote endpoint fails
      UnsupportedOperationException - if the underlying implementation does not support the Service.Feature.GIT_HOSTING feature.