Class GitLabApiForm


  • public class GitLabApiForm
    extends jakarta.ws.rs.core.Form
    This class extends the standard JAX-RS Form class to make it fluent.
    • Constructor Summary

      Constructors 
      Constructor Description
      GitLabApiForm()  
      GitLabApiForm​(int page, int perPage)
      Create a GitLabApiForm instance with the "page", and "per_page" parameters preset.
      GitLabApiForm​(jakarta.ws.rs.core.MultivaluedHashMap<java.lang.String,​java.lang.String> map)  
      GitLabApiForm​(org.gitlab4j.models.GitLabForm form)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      GitLabApiForm withParam​(java.lang.String name, java.lang.Object value)
      Fluent method for adding query and form parameters to a get() or post() call.
      GitLabApiForm withParam​(java.lang.String name, java.lang.Object value, boolean required)
      Fluent method for adding query and form parameters to a get() or post() call.
      GitLabApiForm withParam​(java.lang.String name, java.util.Date date)
      Fluent method for adding Date query and form parameters to a get() or post() call.
      GitLabApiForm withParam​(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.
      GitLabApiForm withParam​(java.lang.String name, java.util.List<?> values)
      Fluent method for adding a List type query and form parameters to a get() or post() call.
      GitLabApiForm withParam​(java.lang.String name, java.util.List<?> values, boolean required)
      Fluent method for adding a List type query and form parameters to a get() or post() call.
      GitLabApiForm withParam​(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.
      GitLabApiForm withParam​(java.lang.String name, org.gitlab4j.api.models.AccessLevel level)
      Fluent method for adding AccessLevel query and form parameters to a get() or post() call.
      GitLabApiForm withParam​(java.lang.String name, org.gitlab4j.api.models.AccessLevel level, boolean required)
      Fluent method for adding AccessLevel query and form parameters to a get() or post() call.
      GitLabApiForm withParam​(java.util.List<org.gitlab4j.api.models.Variable> variables)
      Fluent method for adding a List<Variable> type query and form parameters to a get(), post(), or put() call.
      • Methods inherited from class jakarta.ws.rs.core.Form

        asMap, param
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GitLabApiForm

        public GitLabApiForm()
      • GitLabApiForm

        public GitLabApiForm​(jakarta.ws.rs.core.MultivaluedHashMap<java.lang.String,​java.lang.String> map)
      • GitLabApiForm

        public GitLabApiForm​(int page,
                             int perPage)
        Create a GitLabApiForm instance with the "page", and "per_page" parameters preset.
        Parameters:
        page - the value for the "page" parameter
        perPage - the value for the "per_page" parameter
      • GitLabApiForm

        public GitLabApiForm​(org.gitlab4j.models.GitLabForm form)
    • Method Detail

      • withParam

        public GitLabApiForm withParam​(java.lang.String name,
                                       java.lang.Object value)
        Fluent method for adding query and form parameters to a get() or post() call.
        Parameters:
        name - the name of the field/attribute to add
        value - the value of the field/attribute to add
        Returns:
        this GitLabAPiForm instance
      • withParam

        public GitLabApiForm withParam​(java.lang.String name,
                                       java.util.Date date)
        Fluent method for adding Date query and form parameters to a get() or post() call.
        Parameters:
        name - the name of the field/attribute to add
        date - the value of the field/attribute to add
        Returns:
        this GitLabAPiForm instance
      • withParam

        public GitLabApiForm withParam​(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.
        Parameters:
        name - the name of the field/attribute to add
        date - the value of the field/attribute to add
        required - the field is required flag
        Returns:
        this GitLabAPiForm instance
        Throws:
        java.lang.IllegalArgumentException - if a required parameter is null or empty
      • withParam

        public GitLabApiForm withParam​(java.lang.String name,
                                       org.gitlab4j.api.models.AccessLevel level)
        Fluent method for adding AccessLevel query and form parameters to a get() or post() call.
        Parameters:
        name - the name of the field/attribute to add
        level - the value of the field/attribute to add
        Returns:
        this GitLabAPiForm instance
      • withParam

        public GitLabApiForm withParam​(java.lang.String name,
                                       org.gitlab4j.api.models.AccessLevel level,
                                       boolean required)
        Fluent method for adding AccessLevel query and form parameters to a get() or post() call.
        Parameters:
        name - the name of the field/attribute to add
        level - the value of the field/attribute to add
        required - the field is required flag
        Returns:
        this GitLabAPiForm instance
        Throws:
        java.lang.IllegalArgumentException - if a required parameter is null or empty
      • withParam

        public GitLabApiForm withParam​(java.lang.String name,
                                       java.util.List<?> values)
        Fluent method for adding a List type query and form parameters to a get() or post() call.
        Parameters:
        name - the name of the field/attribute to add
        values - a List containing the values of the field/attribute to add
        Returns:
        this GitLabAPiForm instance
      • withParam

        public GitLabApiForm withParam​(java.lang.String name,
                                       java.util.List<?> values,
                                       boolean required)
        Fluent method for adding a List type query and form parameters to a get() or post() call.
        Parameters:
        name - the name of the field/attribute to add
        values - a List containing the values of the field/attribute to add
        required - the field is required flag
        Returns:
        this GitLabAPiForm instance
        Throws:
        java.lang.IllegalArgumentException - if a required parameter is null or empty
      • withParam

        public GitLabApiForm withParam​(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.
        Parameters:
        name - the name of the field/attribute to add
        variables - a Map containing array of hashes
        required - the field is required flag
        Returns:
        this GitLabAPiForm instance
        Throws:
        java.lang.IllegalArgumentException - if a required parameter is null or empty
      • withParam

        public GitLabApiForm withParam​(java.lang.String name,
                                       java.lang.Object value,
                                       boolean required)
        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 add
        value - the value of the field/attribute to add
        required - the field is required flag
        Returns:
        this GitLabAPiForm instance
        Throws:
        java.lang.IllegalArgumentException - if a required parameter is null or empty
      • withParam

        public GitLabApiForm withParam​(java.util.List<org.gitlab4j.api.models.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