@Mojo(name="list") public class ListReleasesMojo extends AbstractReleaseMojo
Constructor and Description |
---|
ListReleasesMojo()
Creates a new
ListReleasesMojo . |
Modifier and Type | Method and Description |
---|---|
void |
addReleaseDiscoveryListener(ReleaseDiscoveryListener listener)
Adds a
ReleaseDiscoveryListener that will be notified when a release is retrieved |
protected void |
execute(Callable<ReleaseManager> releaseManagerCallable)
|
String |
getFilter()
Returns the regular expression by which releases will be
filtered.
|
long |
getLimit()
Returns the maximum number of releases to retrieve.
|
String |
getNamespace()
Returns the namespace
to which releases that are retrieved must belong.
|
String |
getOffset()
Returns the next release name from which listing should begin.
|
ReleaseDiscoveryListener[] |
getReleaseDiscoveryListeners()
Invokes the
getReleaseDiscoveryListenersList() method and
converts its return
value to an array. |
List<ReleaseDiscoveryListener> |
getReleaseDiscoveryListenersList()
Returns the
List of ReleaseDiscoveryListener s whose
elements will be notified when a release is retrieved. |
Tiller.ListSort.SortBy |
getSortBy()
Returns a
Tiller.ListSort.SortBy indicating how the result list should be
sorted. |
Tiller.ListSort.SortOrder |
getSortOrder()
Returns the
Tiller.ListSort.SortOrder describing the order of the sorted
result list. |
List<StatusOuterClass.Status.Code> |
getStatusCodes()
Returns the
List of Status.Code instances that
describes the possible status codes a release must have in order
to be considered for further listing. |
void |
removeReleaseDiscoveryListener(ReleaseDiscoveryListener listener)
Removes a
ReleaseDiscoveryListener from this GetHistoryMojo . |
void |
setFilter(String filter)
Sets the regular expression by which releases will be filtered.
|
void |
setLimit(long limit)
Sets the maximum number of releases to retrieve.
|
void |
setNamespace(String namespace)
Sets the namespace
to which releases that are retrieved must belong.
|
void |
setOffset(String offset)
Sets the next release name from which listing should begin.
|
void |
setReleaseDiscoveryListenersList(List<ReleaseDiscoveryListener> releaseDiscoveryListeners)
Installs the
List of ReleaseDiscoveryListener s
whose elements will be notified when a release is retrieved. |
void |
setSortBy(Tiller.ListSort.SortBy sortBy)
Sets the
Tiller.ListSort.SortBy indicating how the result list should be
sorted. |
void |
setSortOrder(Tiller.ListSort.SortOrder sortOrder)
Sets the
Tiller.ListSort.SortOrder describing the order of the sorted
result list. |
void |
setStatusCodes(List<StatusOuterClass.Status.Code> statusCodes)
Sets the
List of Status.Code instances that
describes the possible status codes a release must have in order
to be considered for further listing. |
createClient, createReleaseManager, createTiller, execute, getClientConfiguration, getSkip, getTillerLabels, getTillerNamespace, getTillerPort, setClientConfiguration, setSkip, setTillerLabels, setTillerNamespace, setTillerPort, validateNamespace
getLog, getPluginContext, setLog, setPluginContext
public ListReleasesMojo()
ListReleasesMojo
.protected void execute(Callable<ReleaseManager> releaseManagerCallable) throws Exception
ReleaseManager
available from the supplied Callable
.
This implementation retrieves information about releases and
notifies registered ReleaseDiscoveryListener
s.
execute
in class AbstractReleaseMojo
releaseManagerCallable
- the Callable
that will
provide a ReleaseManager
; must not be null
Exception
- if an error occurspublic String getFilter()
This method may return null
.
Overrides of this method may return null
.
null
setFilter(String)
public void setFilter(String filter)
filter
- the regular expression by which releases will be
filtered; may be null
getFilter()
public long getLimit()
setLimit(long)
public void setLimit(long limit)
limit
- the maximum number of releases to retrievegetLimit()
public String getNamespace()
This method may return null
.
Overrides of this method are permitted to return null
.
null
setNamespace(String)
public void setNamespace(String namespace)
namespace
- the namespace
to which releases that are retrieved must belong; may be null
getNamespace()
public String getOffset()
This method may return null
.
Overrides of this method are permitted to return null
.
null
setOffset(String)
public void setOffset(String offset)
offset
- the next release name from which listing should
begin; may be null
getOffset()
public Tiller.ListSort.SortBy getSortBy()
Tiller.ListSort.SortBy
indicating how the result list should be
sorted.
This method may return null
.
Overrides of this method may return null
.
Tiller.ListSort.SortBy
indicating how the result list should be
sorted, or null
setSortBy(Tiller.ListSort.SortBy)
public void setSortBy(Tiller.ListSort.SortBy sortBy)
Tiller.ListSort.SortBy
indicating how the result list should be
sorted.sortBy
- the Tiller.ListSort.SortBy
indicating how the result list
should be sorted; may be null
getSortBy()
public Tiller.ListSort.SortOrder getSortOrder()
Tiller.ListSort.SortOrder
describing the order of the sorted
result list.
This method may return null
.
Overrides of this method are permitted to return null
.
Tiller.ListSort.SortOrder
describing the order of the sorted
result list, or null
setSortOrder(Tiller.ListSort.SortOrder)
public void setSortOrder(Tiller.ListSort.SortOrder sortOrder)
Tiller.ListSort.SortOrder
describing the order of the sorted
result list.sortOrder
- the Tiller.ListSort.SortOrder
describing the order of
the sorted result list; may be null
getSortOrder()
public List<StatusOuterClass.Status.Code> getStatusCodes()
List
of Status.Code
instances that
describes the possible status codes a release must have in order
to be considered for further listing.
This method may return null
.
Overrides of this method are permitted to return null
.
List
of Status.Code
instances that
describes the possible status codes a release must have in order
to be considered for further listing, or null
setStatusCodes(List)
public void setStatusCodes(List<StatusOuterClass.Status.Code> statusCodes)
List
of Status.Code
instances that
describes the possible status codes a release must have in order
to be considered for further listing.statusCodes
- a List
of Status.Code
instances that describes the possible status codes a release must
have in order to be considered for further listing; may be null
getStatusCodes()
public void addReleaseDiscoveryListener(ReleaseDiscoveryListener listener)
ReleaseDiscoveryListener
that will be notified when a release is retrievedlistener
- the ReleaseDiscoveryListener
to add; may be
null
in which case no action will be takenremoveReleaseDiscoveryListener(ReleaseDiscoveryListener)
,
getReleaseDiscoveryListenersList()
public void removeReleaseDiscoveryListener(ReleaseDiscoveryListener listener)
ReleaseDiscoveryListener
from this GetHistoryMojo
.listener
- the ReleaseDiscoveryListener
to remove; may
be null
in which case no action will be takenaddReleaseDiscoveryListener(ReleaseDiscoveryListener)
,
getReleaseDiscoveryListenersList()
public ReleaseDiscoveryListener[] getReleaseDiscoveryListeners()
getReleaseDiscoveryListenersList()
method and
converts its return
value to an array.
This method never returns null
.
Overrides of this method must not return null
.
null
array of ReleaseDiscoveryListener
sgetReleaseDiscoveryListenersList()
public List<ReleaseDiscoveryListener> getReleaseDiscoveryListenersList()
List
of ReleaseDiscoveryListener
s whose
elements will be notified when a release is retrieved.
This method may return null
.
Overrides of this method are permitted to return null
.
public void setReleaseDiscoveryListenersList(List<ReleaseDiscoveryListener> releaseDiscoveryListeners)
List
of ReleaseDiscoveryListener
s
whose elements will be notified when a release is retrieved.releaseDiscoveryListeners
- the List
of ReleaseDiscoveryListener
s whose elements will be notified when a release is retrieved; may be null
getReleaseDiscoveryListenersList()
,
addReleaseDiscoveryListener(ReleaseDiscoveryListener)
,
removeReleaseDiscoveryListener(ReleaseDiscoveryListener)
Copyright © 2017–2018, microBean. All rights reserved.