Class: Dcm4chee::Service::ContentEditService

Inherits:
MBean
  • Object
show all
Defined in:
lib/dcm4chee/services/content_edit_service.rb

Constant Summary collapse

MBEAN_NAME =
'dcm4chee.archive:service=ContentEditService'

Instance Attribute Summary

Attributes inherited from MBean

#jolokia

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from MBean

#initialize

Constructor Details

This class inherits a constructor from Dcm4chee::Service::MBean

Class Method Details

.define_component(name) ⇒ Object



12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/dcm4chee/services/content_edit_service.rb', line 12

def define_component(name)
  name = name.to_s

  define_method("undelete_#{name}".to_sym) do |id|
    jolokia.execute(MBEAN_NAME,
                    "undelete#{name.camelize}(long)", id)
  end

  define_method("delete_#{name}".to_sym) do |id|
    jolokia.execute(MBEAN_NAME,
                    "delete#{name.camelize}(long)", id)
  end
  define_method("move_#{name}_to_trash".to_sym) do |id|
    jolokia.execute(MBEAN_NAME,
                    "move#{name.camelize}ToTrash(long)", id)
  end
end

Instance Method Details

#empty_trashObject



7
8
9
# File 'lib/dcm4chee/services/content_edit_service.rb', line 7

def empty_trash
  jolokia.execute(MBEAN_NAME, 'emptyTrash')
end