Class: VertxWebCommon::FormDataPart

Inherits:
Object
  • Object
show all
Defined in:
/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-common/form_data_part.rb

Overview

A form data part of a MultipartForm.

Constant Summary

@@j_api_type =
Object.new

Class Method Summary (collapse)

Instance Method Summary (collapse)

Class Method Details

+ (Boolean) accept?(obj)

Returns:

  • (Boolean)


17
18
19
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-common/form_data_part.rb', line 17

def @@j_api_type.accept?(obj)
  obj.class == FormDataPart
end

+ (Object) j_api_type



26
27
28
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-common/form_data_part.rb', line 26

def self.j_api_type
  @@j_api_type
end

+ (Object) j_class



29
30
31
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-common/form_data_part.rb', line 29

def self.j_class
  Java::IoVertxExtWebMultipart::FormDataPart.java_class
end

+ (Object) unwrap(obj)



23
24
25
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-common/form_data_part.rb', line 23

def @@j_api_type.unwrap(obj)
  obj.j_del
end

+ (Object) wrap(obj)



20
21
22
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-common/form_data_part.rb', line 20

def @@j_api_type.wrap(obj)
  FormDataPart.new(obj)
end

Instance Method Details

- (true, false) attribute?

Returns true when this part is an attribute

Returns:

  • (true, false)
    true when this part is an attribute

Raises:

  • (ArgumentError)


43
44
45
46
47
48
49
50
51
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-common/form_data_part.rb', line 43

def attribute?
  if !block_given?
    if @cached_is_attribute != nil
      return @cached_is_attribute
    end
    return @cached_is_attribute = @j_del.java_method(:isAttribute, []).call()
  end
  raise ArgumentError, "Invalid arguments when calling attribute?()"
end

- (true, false) file_upload?

Returns true when this part is a file upload

Returns:

  • (true, false)
    true when this part is a file upload

Raises:

  • (ArgumentError)


53
54
55
56
57
58
59
60
61
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-common/form_data_part.rb', line 53

def file_upload?
  if !block_given?
    if @cached_is_file_upload != nil
      return @cached_is_file_upload
    end
    return @cached_is_file_upload = @j_del.java_method(:isFileUpload, []).call()
  end
  raise ArgumentError, "Invalid arguments when calling file_upload?()"
end

- (String) filename

Returns the filename when this part is a file upload otherwise null

Returns:

  • (String)
    the filename when this part is a file upload otherwise null

Raises:

  • (ArgumentError)


73
74
75
76
77
78
79
80
81
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-common/form_data_part.rb', line 73

def filename
  if !block_given?
    if @cached_filename != nil
      return @cached_filename
    end
    return @cached_filename = @j_del.java_method(:filename, []).call()
  end
  raise ArgumentError, "Invalid arguments when calling filename()"
end

- (String) media_type

Returns the media type when this part is a file upload otherwise null

Returns:

  • (String)
    the media type when this part is a file upload otherwise null

Raises:

  • (ArgumentError)


93
94
95
96
97
98
99
100
101
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-common/form_data_part.rb', line 93

def media_type
  if !block_given?
    if @cached_media_type != nil
      return @cached_media_type
    end
    return @cached_media_type = @j_del.java_method(:mediaType, []).call()
  end
  raise ArgumentError, "Invalid arguments when calling media_type()"
end

- (String) name

Returns the name

Returns:

  • (String)
    the name

Raises:

  • (ArgumentError)


33
34
35
36
37
38
39
40
41
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-common/form_data_part.rb', line 33

def name
  if !block_given?
    if @cached_name != nil
      return @cached_name
    end
    return @cached_name = @j_del.java_method(:name, []).call()
  end
  raise ArgumentError, "Invalid arguments when calling name()"
end

- (String) pathname

Returns the pathname when this part is a file upload otherwise null

Returns:

  • (String)
    the pathname when this part is a file upload otherwise null

Raises:

  • (ArgumentError)


83
84
85
86
87
88
89
90
91
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-common/form_data_part.rb', line 83

def pathname
  if !block_given?
    if @cached_pathname != nil
      return @cached_pathname
    end
    return @cached_pathname = @j_del.java_method(:pathname, []).call()
  end
  raise ArgumentError, "Invalid arguments when calling pathname()"
end

- (true, false) text?

Returns whether the file upload is text or binary when this part is a file upload otherwise null

Returns:

  • (true, false)
    whether the file upload is text or binary when this part is a file upload otherwise null

Raises:

  • (ArgumentError)


103
104
105
106
107
108
109
110
111
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-common/form_data_part.rb', line 103

def text?
  if !block_given?
    if @cached_is_text != nil
      return @cached_is_text
    end
    return @cached_is_text = @j_del.java_method(:isText, []).call()
  end
  raise ArgumentError, "Invalid arguments when calling text?()"
end

- (String) value

Returns the value when the part for a form attribute otherwise null

Returns:

  • (String)
    the value when the part for a form attribute otherwise null

Raises:

  • (ArgumentError)


63
64
65
66
67
68
69
70
71
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-common/form_data_part.rb', line 63

def value
  if !block_given?
    if @cached_value != nil
      return @cached_value
    end
    return @cached_value = @j_del.java_method(:value, []).call()
  end
  raise ArgumentError, "Invalid arguments when calling value()"
end