Class GitLabRelease
- java.lang.Object
-
- com.mooltiverse.oss.nyx.services.gitlab.GitLabRelease
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description GitLabReleaseaddAsset(Attachment asset)Adds the given asset to the internal set of assets.GitLabReleaseaddAssets(Set<Attachment> assets)Adds the given assets to the internal set of assets.protected com.mooltiverse.oss.nyx.services.gitlab.APIgetAPI()Returns the internal API reference.Set<Attachment>getAssets()Returns the assets attached to the relese, otherwise returnsnull.Map<String,Object>getAttributes()Returns the map of attributes this object is built onStringgetTag()Returns the tag the release refers to.StringgetTitle()Returns the release title.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
-
addAsset
public GitLabRelease addAsset(Attachment asset)
Adds the given asset to the internal set of assets. The internal set of assets is initialized in case it was stillnull.- Parameters:
asset- the asset to add- Returns:
- this same object reference
-
addAssets
public GitLabRelease addAssets(Set<Attachment> assets)
Adds the given assets to the internal set of assets. The internal set of assets is initialized in case it was stillnull.- Parameters:
assets- the assets to add- Returns:
- this same object reference
-
getAssets
public Set<Attachment> getAssets()
Returns the assets attached to the relese, otherwise returnsnull.
-
getTitle
public String getTitle()
Returns the release title.
-
getTag
public String getTag()
Returns the tag the release refers to.
-
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.
-
-