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)


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

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

+ (Object) j_api_type



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

def self.j_api_type
  @@j_api_type
end

+ (Object) j_class



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

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

+ (Object) unwrap(obj)



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

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

+ (Object) wrap(obj)



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

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

Instance Method Details

- (true, false) isAttribute

Returns true when this part is an attribute

Returns:

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


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

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
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling attribute?()"
  end
end

- (true, false) isFileUpload

Returns true when this part is a file upload

Returns:

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


95
96
97
98
99
100
101
102
103
104
105
106
107
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-common/form_data_part.rb', line 95

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
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling file_upload?()"
  end
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


35
36
37
38
39
40
41
42
43
44
45
46
47
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-common/form_data_part.rb', line 35

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

- (String) mediaType

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


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

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
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling media_type()"
  end
end

- (String) name

Returns the name

Returns:

  • (String)
    the name


65
66
67
68
69
70
71
72
73
74
75
76
77
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-common/form_data_part.rb', line 65

def name
  if !block_given?
    if @cached_name != nil
      return @cached_name
    end
    return @cached_name = @j_del.java_method(:name, []).call()
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling name()"
  end
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


140
141
142
143
144
145
146
147
148
149
150
151
152
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-common/form_data_part.rb', line 140

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

- (true, false) isText

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


125
126
127
128
129
130
131
132
133
134
135
136
137
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-common/form_data_part.rb', line 125

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
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling text?()"
  end
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


110
111
112
113
114
115
116
117
118
119
120
121
122
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-common/form_data_part.rb', line 110

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