Class: Zm::Client::Cos
Overview
Instance Attribute Summary
Attributes inherited from Base::Object
#id, #name, #parent, #token
Instance Method Summary
collapse
#soap_admin_connector
#clone, #initialize, #inspect, #instance_variables_map, #logger, #recorded?, #save!, #to_h, #to_s, #update_attribute
Instance Method Details
#accounts ⇒ Object
71
72
73
74
75
76
77
|
# File 'lib/zm/client/cos/cos.rb', line 71
def accounts
return if @id.nil?
return @accounts if defined? @accounts
@accounts = CosAccountsCollection.new(self)
end
|
#attrs_write ⇒ Object
79
80
81
|
# File 'lib/zm/client/cos/cos.rb', line 79
def attrs_write
@parent.zimbra_attributes.all_cos_attrs_writable_names
end
|
#build_clone(new_name) ⇒ Object
53
54
55
|
# File 'lib/zm/client/cos/cos.rb', line 53
def build_clone(new_name)
jsns_builder.to_copy(new_name)
end
|
#build_create ⇒ Object
36
37
38
|
# File 'lib/zm/client/cos/cos.rb', line 36
def build_create
jsns_builder.to_create
end
|
#build_delete ⇒ Object
44
45
46
|
# File 'lib/zm/client/cos/cos.rb', line 44
def build_delete
jsns_builder.to_delete
end
|
#build_modify ⇒ Object
14
15
16
|
# File 'lib/zm/client/cos/cos.rb', line 14
def build_modify
jsns_builder.to_update
end
|
#clone!(new_name) ⇒ Object
48
49
50
51
|
# File 'lib/zm/client/cos/cos.rb', line 48
def clone!(new_name)
resp = sac.invoke(build_clone(new_name))
resp[:CopyCosResponse][:cos].first[:id]
end
|
#create! ⇒ Object
30
31
32
33
34
|
# File 'lib/zm/client/cos/cos.rb', line 30
def create!
resp = sac.invoke(build_create)
@id = resp[:CreateCosResponse][:cos].first[:id]
end
|
#delete! ⇒ Object
40
41
42
|
# File 'lib/zm/client/cos/cos.rb', line 40
def delete!
sac.invoke(build_delete)
end
|
#domains ⇒ Object
63
64
65
66
67
68
69
|
# File 'lib/zm/client/cos/cos.rb', line 63
def domains
return if @id.nil?
return @domains if defined? @domains
@domains = CosDomainsCollection.new(self)
end
|
#jsns_builder ⇒ Object
83
84
85
86
87
|
# File 'lib/zm/client/cos/cos.rb', line 83
def jsns_builder
return @jsns_builder if defined? @jsns_builder
@jsns_builder = CosJsnsBuilder.new(self)
end
|
#modify! ⇒ Object
9
10
11
12
|
# File 'lib/zm/client/cos/cos.rb', line 9
def modify!
sac.invoke(build_modify)
true
end
|
#servers ⇒ Object
57
58
59
60
61
|
# File 'lib/zm/client/cos/cos.rb', line 57
def servers
return @servers if defined? @servers
@servers = CosServersCollection.new(self)
end
|
#update!(hash) ⇒ Object
18
19
20
21
22
23
24
25
26
27
28
|
# File 'lib/zm/client/cos/cos.rb', line 18
def update!(hash)
return false if hash.delete_if { |k, v| v.nil? || !respond_to?(k) }.empty?
do_update!(hash)
hash.each do |key, value|
update_attribute(key, value)
end
true
end
|