Class GitLabRepository
- java.lang.Object
-
- com.mooltiverse.oss.nyx.services.gitlab.GitLabRepository
-
- All Implemented Interfaces:
GitHostedRepository
public class GitLabRepository extends Object implements GitHostedRepository
A Git repository hosted on GitLab.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected com.mooltiverse.oss.nyx.services.gitlab.APIgetAPI()Returns the internal API reference.Map<String,Object>getAttributes()Returns the map of attributes this object is built onStringgetDefaultBranch()Returns the repository default branch.StringgetDescription()Returns the repository description.StringgetFullName()Returns the repository full name.StringgetHTTPURL()Returns the repository HTTP URL.StringgetID()Returns the repository ID.StringgetName()Returns the repository name.protected static Map<String,Object>toAttributeMap(com.fasterxml.jackson.databind.JsonNode node)Reads all the attributes of the given object and puts them in the resulting map.protected static List<Map<String,Object>>toAttributeMaps(com.fasterxml.jackson.databind.JsonNode node)Reads all the attributes of the given object immediate children and puts them in the resulting maps, one map for each child.
-
-
-
Method Detail
-
getDefaultBranch
public String getDefaultBranch()
Returns the repository default branch.- Specified by:
getDefaultBranchin interfaceGitHostedRepository- Returns:
- the repository default branch.
-
getDescription
public String getDescription()
Returns the repository description.- Specified by:
getDescriptionin interfaceGitHostedRepository- Returns:
- the repository description.
-
getFullName
public String getFullName()
Returns the repository full name.- Specified by:
getFullNamein interfaceGitHostedRepository- Returns:
- the repository full name.
-
getHTTPURL
public String getHTTPURL()
Returns the repository HTTP URL.- Specified by:
getHTTPURLin interfaceGitHostedRepository- Returns:
- the repository HTTP URL.
-
getID
public String getID()
Returns the repository ID.- Specified by:
getIDin interfaceGitHostedRepository- Returns:
- the repository ID.
-
getName
public String getName()
Returns the repository name.- Specified by:
getNamein interfaceGitHostedRepository- Returns:
- the repository name.
-
toAttributeMap
protected static Map<String,Object> toAttributeMap(com.fasterxml.jackson.databind.JsonNode node)
Reads all the attributes of the given object and puts them in the resulting map.- Parameters:
node- the node to read the attributes from- Returns:
- the map with all the attributes from the given node
- Throws:
NullPointerException- if the given node isnull
-
toAttributeMaps
protected static List<Map<String,Object>> toAttributeMaps(com.fasterxml.jackson.databind.JsonNode node)
Reads all the attributes of the given object immediate children and puts them in the resulting maps, one map for each child.- Parameters:
node- the node to read the attributes from- Returns:
- the maps with all the attributes from the immediate children of the given node
- Throws:
NullPointerException- if the given node isnull
-
getAPI
protected com.mooltiverse.oss.nyx.services.gitlab.API getAPI()
Returns the internal API reference.- Returns:
- the internal API reference.
-
-