Package org.sonar.api.server.ws
Class WebService.NewAction
- java.lang.Object
-
- org.sonar.api.server.ws.WebService.NewAction
-
- Enclosing interface:
- WebService
public static class WebService.NewAction extends java.lang.Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WebService.NewAction
addFieldsParam(java.util.Collection<?> possibleValues)
Creates the parameterWebService.Param.FIELDS
, which is used to restrict the number of fields returned in JSON response.WebService.NewAction
addPagingParams(int defaultPageSize)
Add predefined parameters related to pagination of results.WebService.NewAction
addPagingParams(int defaultPageSize, int maxPageSize)
Add predefined parameters related to pagination of results with a maximum page size.WebService.NewAction
addPagingParamsSince(int defaultPageSize, int maxPageSize, java.lang.String version)
Add predefined parameters related to pagination of results with a maximum page size.WebService.NewAction
addSearchQuery(java.lang.String exampleValue, java.lang.String... pluralFields)
Creates the parameterWebService.Param.TEXT_QUERY
, which is used to search for a subset of fields containing the supplied string.WebService.NewAction
addSelectionModeParam()
Add 'selected=(selected|deselected|all)' for select-list oriented WS.<V> WebService.NewAction
addSortParams(java.util.Collection<V> possibleValues, V defaultValue, boolean defaultAscending)
Add predefined parameters related to sorting of results.WebService.NewParam
createFieldsParam(java.util.Collection<?> possibleValues)
WebService.NewParam
createPageParam()
WebService.NewParam
createPageSize(int defaultPageSize, int maxPageSize)
WebService.NewParam
createParam(java.lang.String paramKey)
WebService.NewParam
createSearchQuery(java.lang.String exampleValue, java.lang.String... pluralFields)
Creates the parameterWebService.Param.TEXT_QUERY
, which is used to search for a subset of fields containing the supplied string.<V> WebService.NewParam
createSortParams(java.util.Collection<V> possibleValues, V defaultValue, boolean defaultAscending)
Add predefined parameters related to sorting of results.WebService.NewAction
setChangelog(Change... changes)
List of changes made to the contract or valuable insight.WebService.NewAction
setDeprecatedKey(java.lang.String s)
WebService.NewAction
setDeprecatedSince(java.lang.String deprecatedSince)
WebService.NewAction
setDescription(java.lang.String description)
Used in OrchestratorWebService.NewAction
setDescription(java.lang.String description, java.lang.Object... descriptionArgument)
WebService.NewAction
setHandler(RequestHandler h)
WebService.NewAction
setInternal(boolean b)
Internal actions are not displayed by default in the web api documentation.WebService.NewAction
setPost(boolean b)
WebService.NewAction
setResponseExample(java.net.URL url)
Link to the document containing an example of response.WebService.NewAction
setSince(java.lang.String s)
-
-
-
Method Detail
-
setDeprecatedKey
public WebService.NewAction setDeprecatedKey(@Nullable java.lang.String s)
-
setDescription
public WebService.NewAction setDescription(@Nullable java.lang.String description)
Used in Orchestrator
-
setDescription
public WebService.NewAction setDescription(@Nullable java.lang.String description, java.lang.Object... descriptionArgument)
- Since:
- 5.6
-
setSince
public WebService.NewAction setSince(@Nullable java.lang.String s)
-
setDeprecatedSince
public WebService.NewAction setDeprecatedSince(@Nullable java.lang.String deprecatedSince)
- Since:
- 5.3
-
setPost
public WebService.NewAction setPost(boolean b)
-
setInternal
public WebService.NewAction setInternal(boolean b)
Internal actions are not displayed by default in the web api documentation. They are displayed only when the check-box "Show Internal API" is selected. By default an action is not internal.
-
setHandler
public WebService.NewAction setHandler(RequestHandler h)
-
setResponseExample
public WebService.NewAction setResponseExample(@Nullable java.net.URL url)
Link to the document containing an example of response. Content must be UTF-8 encoded.
Example:newAction.setResponseExample(getClass().getResource("/org/sonar/my-ws-response-example.json"));
- Since:
- 4.4
-
setChangelog
public WebService.NewAction setChangelog(Change... changes)
List of changes made to the contract or valuable insight. Example: changes to the response format.- Since:
- 6.4
-
createParam
public WebService.NewParam createParam(java.lang.String paramKey)
-
addPagingParams
public WebService.NewAction addPagingParams(int defaultPageSize)
Add predefined parameters related to pagination of results.
-
addPagingParams
public WebService.NewAction addPagingParams(int defaultPageSize, int maxPageSize)
Add predefined parameters related to pagination of results with a maximum page size. Note the maximum is a documentation only feature. It does not check anything.
-
createPageParam
public WebService.NewParam createPageParam()
-
createPageSize
public WebService.NewParam createPageSize(int defaultPageSize, int maxPageSize)
-
addPagingParamsSince
public WebService.NewAction addPagingParamsSince(int defaultPageSize, int maxPageSize, java.lang.String version)
Add predefined parameters related to pagination of results with a maximum page size.- Since:
- 7.1
-
addFieldsParam
public WebService.NewAction addFieldsParam(java.util.Collection<?> possibleValues)
Creates the parameterWebService.Param.FIELDS
, which is used to restrict the number of fields returned in JSON response.
-
createFieldsParam
public WebService.NewParam createFieldsParam(java.util.Collection<?> possibleValues)
-
addSearchQuery
public WebService.NewAction addSearchQuery(java.lang.String exampleValue, java.lang.String... pluralFields)
Creates the parameterWebService.Param.TEXT_QUERY
, which is used to search for a subset of fields containing the supplied string.The fields must be in the plural form (ex: "names", "keys").
-
createSearchQuery
public WebService.NewParam createSearchQuery(java.lang.String exampleValue, java.lang.String... pluralFields)
Creates the parameterWebService.Param.TEXT_QUERY
, which is used to search for a subset of fields containing the supplied string.The fields must be in the plural form (ex: "names", "keys").
-
addSortParams
public <V> WebService.NewAction addSortParams(java.util.Collection<V> possibleValues, @Nullable V defaultValue, boolean defaultAscending)
Add predefined parameters related to sorting of results.
-
createSortParams
public <V> WebService.NewParam createSortParams(java.util.Collection<V> possibleValues, @Nullable V defaultValue, boolean defaultAscending)
Add predefined parameters related to sorting of results.
-
addSelectionModeParam
public WebService.NewAction addSelectionModeParam()
Add 'selected=(selected|deselected|all)' for select-list oriented WS.
-
-