Class: Zimbra::DomainService::Builder
- Inherits:
-
Object
- Object
- Zimbra::DomainService::Builder
- Defined in:
- lib/zimbra/domain.rb
Class Method Summary collapse
- .create(message, name) ⇒ Object
- .delete(message, id) ⇒ Object
- .get_by_id(message, id) ⇒ Object
- .get_by_name(message, name) ⇒ Object
- .modify(message, domain) ⇒ Object
- .modify_attributes(message, domain) ⇒ Object
Class Method Details
.create(message, name) ⇒ Object
86 87 88 |
# File 'lib/zimbra/domain.rb', line 86 def create(, name) .add 'name', name end |
.delete(message, id) ⇒ Object
116 117 118 |
# File 'lib/zimbra/domain.rb', line 116 def delete(, id) .add 'id', id end |
.get_by_id(message, id) ⇒ Object
90 91 92 93 94 |
# File 'lib/zimbra/domain.rb', line 90 def get_by_id(, id) .add 'domain', id do |c| c.set_attr 'by', 'id' end end |
.get_by_name(message, name) ⇒ Object
96 97 98 99 100 |
# File 'lib/zimbra/domain.rb', line 96 def get_by_name(, name) .add 'domain', name do |c| c.set_attr 'by', 'name' end end |
.modify(message, domain) ⇒ Object
102 103 104 105 |
# File 'lib/zimbra/domain.rb', line 102 def modify(, domain) .add 'id', domain.id modify_attributes(, domain) end |
.modify_attributes(message, domain) ⇒ Object
106 107 108 109 110 111 112 113 114 |
# File 'lib/zimbra/domain.rb', line 106 def modify_attributes(, domain) if domain.acls.empty? ACL.delete_all() else domain.acls.each do |acl| acl.apply() end end end |