Class: VertxAuthCommon::AndAuthorization

Inherits:
Authorization show all
Defined in:
/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-common/and_authorization.rb

Overview

Allows to perform a logical 'and' between several authorizations

Constant Summary

@@j_api_type =
Object.new

Class Method Summary (collapse)

Instance Method Summary (collapse)

Methods inherited from Authorization

#match?, #verify?

Class Method Details

+ (Boolean) accept?(obj)

Returns:

  • (Boolean)


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

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

+ (::VertxAuthCommon::AndAuthorization) create



49
50
51
52
53
54
55
56
57
58
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-common/and_authorization.rb', line 49

def self.create
  if !block_given?
    return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthAuthorization::AndAuthorization.java_method(:create, []).call(),::VertxAuthCommon::AndAuthorization)
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling create()"
  end
end

+ (Object) j_api_type



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

def self.j_api_type
  @@j_api_type
end

+ (Object) j_class



32
33
34
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-common/and_authorization.rb', line 32

def self.j_class
  Java::IoVertxExtAuthAuthorization::AndAuthorization.java_class
end

+ (Object) unwrap(obj)



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

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

+ (Object) wrap(obj)



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

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

Instance Method Details

- (::VertxAuthCommon::AndAuthorization) addAuthorization(authorization)



62
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-auth-common/and_authorization.rb', line 62

def add_authorization(*args)
  if args[0].class.method_defined?(:j_del) && !block_given?
    return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:addAuthorization, [Java::IoVertxExtAuthAuthorization::Authorization.java_class]).call(args[0].j_del),::VertxAuthCommon::AndAuthorization)
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling add_authorization(#{args[0]})"
  end
end

- (Array<::VertxAuthCommon::Authorization>) getAuthorizations



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

def get_authorizations
  if !block_given?
    return @j_del.java_method(:getAuthorizations, []).call().to_a.map { |elt| ::Vertx::Util::Utils.safe_create(elt,::VertxAuthCommon::Authorization) }
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling get_authorizations()"
  end
end