Package org.gitlab4j.models
Class GitLabForm
- java.lang.Object
-
- org.gitlab4j.models.GitLabForm
-
public class GitLabForm extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description GitLabForm()GitLabForm(int page, int perPage)Create a GitLabApiForm instance with the "page", and "per_page" parameters preset.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.lang.String>getFormValues()GitLabFormwithParam(java.lang.String name, java.lang.Object value)Fluent method for adding query and form parameters to a get() or post() call.GitLabFormwithParam(java.lang.String name, java.lang.Object value, boolean required)Fluent method for adding query and form parameters to a get() or post() call.GitLabFormwithParam(java.lang.String name, java.util.Date date)Fluent method for adding Date query and form parameters to a get() or post() call.GitLabFormwithParam(java.lang.String name, java.util.Date date, boolean required)Fluent method for adding Date query and form parameters to a get() or post() call.<T> GitLabFormwithParam(java.lang.String name, java.util.List<T> values)Fluent method for adding a List type query and form parameters to a get() or post() call.<T> GitLabFormwithParam(java.lang.String name, java.util.List<T> values, boolean required)Fluent method for adding a List type query and form parameters to a get() or post() call.GitLabFormwithParam(java.lang.String name, java.util.Map<java.lang.String,?> variables, boolean required)Fluent method for adding an array of hash type query and form parameters to a get() or post() call.GitLabFormwithParam(java.lang.String name, AccessLevel level)Fluent method for adding AccessLevel query and form parameters to a get() or post() call.GitLabFormwithParam(java.lang.String name, AccessLevel level, boolean required)Fluent method for adding AccessLevel query and form parameters to a get() or post() call.GitLabFormwithParam(java.util.List<Variable> variables)Fluent method for adding a List<Variable> type query and form parameters to a get(), post(), or put() call.
-
-
-
Method Detail
-
withParam
public GitLabForm withParam(java.lang.String name, java.lang.Object value) throws java.lang.IllegalArgumentException
Fluent method for adding query and form parameters to a get() or post() call.- Parameters:
name- the name of the field/attribute to addvalue- the value of the field/attribute to add- Returns:
- this GitLabAPiForm instance
- Throws:
java.lang.IllegalArgumentException
-
withParam
public GitLabForm withParam(java.lang.String name, java.util.Date date) throws java.lang.IllegalArgumentException
Fluent method for adding Date query and form parameters to a get() or post() call.- Parameters:
name- the name of the field/attribute to adddate- the value of the field/attribute to add- Returns:
- this GitLabAPiForm instance
- Throws:
java.lang.IllegalArgumentException
-
withParam
public GitLabForm withParam(java.lang.String name, java.util.Date date, boolean required) throws java.lang.IllegalArgumentException
Fluent method for adding Date query and form parameters to a get() or post() call.- Parameters:
name- the name of the field/attribute to adddate- the value of the field/attribute to addrequired- the field is required flag- Returns:
- this GitLabAPiForm instance
- Throws:
java.lang.IllegalArgumentException- if a required parameter is null or empty
-
withParam
public GitLabForm withParam(java.lang.String name, AccessLevel level) throws java.lang.IllegalArgumentException
Fluent method for adding AccessLevel query and form parameters to a get() or post() call.- Parameters:
name- the name of the field/attribute to addlevel- the value of the field/attribute to add- Returns:
- this GitLabAPiForm instance
- Throws:
java.lang.IllegalArgumentException
-
withParam
public GitLabForm withParam(java.lang.String name, AccessLevel level, boolean required) throws java.lang.IllegalArgumentException
Fluent method for adding AccessLevel query and form parameters to a get() or post() call.- Parameters:
name- the name of the field/attribute to addlevel- the value of the field/attribute to addrequired- the field is required flag- Returns:
- this GitLabAPiForm instance
- Throws:
java.lang.IllegalArgumentException- if a required parameter is null or empty
-
withParam
public <T> GitLabForm withParam(java.lang.String name, java.util.List<T> values)
Fluent method for adding a List type query and form parameters to a get() or post() call.- Type Parameters:
T- the type contained by the List- Parameters:
name- the name of the field/attribute to addvalues- a List containing the values of the field/attribute to add- Returns:
- this GitLabAPiForm instance
-
withParam
public <T> GitLabForm withParam(java.lang.String name, java.util.List<T> values, boolean required) throws java.lang.IllegalArgumentException
Fluent method for adding a List type query and form parameters to a get() or post() call.- Type Parameters:
T- the type contained by the List- Parameters:
name- the name of the field/attribute to addvalues- a List containing the values of the field/attribute to addrequired- the field is required flag- Returns:
- this GitLabAPiForm instance
- Throws:
java.lang.IllegalArgumentException- if a required parameter is null or empty
-
withParam
public GitLabForm withParam(java.lang.String name, java.util.Map<java.lang.String,?> variables, boolean required) throws java.lang.IllegalArgumentException
Fluent method for adding an array of hash type query and form parameters to a get() or post() call.- Parameters:
name- the name of the field/attribute to addvariables- a Map containing array of hashesrequired- the field is required flag- Returns:
- this GitLabAPiForm instance
- Throws:
java.lang.IllegalArgumentException- if a required parameter is null or empty
-
withParam
public GitLabForm withParam(java.lang.String name, java.lang.Object value, boolean required) throws java.lang.IllegalArgumentException
Fluent method for adding query and form parameters to a get() or post() call. If required is true and value is null, will throw an IllegalArgumentException.- Parameters:
name- the name of the field/attribute to addvalue- the value of the field/attribute to addrequired- the field is required flag- Returns:
- this GitLabAPiForm instance
- Throws:
java.lang.IllegalArgumentException- if a required parameter is null or empty
-
withParam
public GitLabForm withParam(java.util.List<Variable> variables)
Fluent method for adding a List<Variable> type query and form parameters to a get(), post(), or put() call.- Parameters:
variables- the List of Variable to add- Returns:
- this GitLabAPiForm instance
-
getFormValues
public java.util.Map<java.lang.String,java.lang.String> getFormValues()
-
-