Class: Zm::Client::MountPoint

Inherits:
Base::Object show all
Includes:
BelongsToFolder
Defined in:
lib/zm/client/mountpoint/mountpoint.rb

Overview

class for account mountpoint

Instance Attribute Summary collapse

Attributes inherited from Base::Object

#parent, #token

Instance Method Summary collapse

Methods included from BelongsToFolder

#folder, #folder!, #folder=, #folder_id, #move!, #trash!

Methods inherited from Base::Object

#clone, #inspect, #instance_variables_map, #logger, #recorded?, #save!, #to_h, #to_s, #update_attribute

Constructor Details

#initialize(parent) ⇒ MountPoint

define_changed_attributes :name, :color, :rgb, :l



16
17
18
19
# File 'lib/zm/client/mountpoint/mountpoint.rb', line 16

def initialize(parent)
  @l = FolderDefault::ROOT[:id]
  super(parent)
end

Instance Attribute Details

#absFolderPathObject

include Zm::Model::AttributeChangeObserver



10
11
12
# File 'lib/zm/client/mountpoint/mountpoint.rb', line 10

def absFolderPath
  @absFolderPath
end

#activesyncdisabledObject

include Zm::Model::AttributeChangeObserver



10
11
12
# File 'lib/zm/client/mountpoint/mountpoint.rb', line 10

def activesyncdisabled
  @activesyncdisabled
end

#brokenObject

include Zm::Model::AttributeChangeObserver



10
11
12
# File 'lib/zm/client/mountpoint/mountpoint.rb', line 10

def broken
  @broken
end

#colorObject

include Zm::Model::AttributeChangeObserver



10
11
12
# File 'lib/zm/client/mountpoint/mountpoint.rb', line 10

def color
  @color
end

#deletableObject

include Zm::Model::AttributeChangeObserver



10
11
12
# File 'lib/zm/client/mountpoint/mountpoint.rb', line 10

def deletable
  @deletable
end

#fObject

include Zm::Model::AttributeChangeObserver



10
11
12
# File 'lib/zm/client/mountpoint/mountpoint.rb', line 10

def f
  @f
end

#idObject

include Zm::Model::AttributeChangeObserver



10
11
12
# File 'lib/zm/client/mountpoint/mountpoint.rb', line 10

def id
  @id
end

#lObject

include Zm::Model::AttributeChangeObserver



10
11
12
# File 'lib/zm/client/mountpoint/mountpoint.rb', line 10

def l
  @l
end

#luuidObject

include Zm::Model::AttributeChangeObserver



10
11
12
# File 'lib/zm/client/mountpoint/mountpoint.rb', line 10

def luuid
  @luuid
end

#msObject

include Zm::Model::AttributeChangeObserver



10
11
12
# File 'lib/zm/client/mountpoint/mountpoint.rb', line 10

def ms
  @ms
end

#nameObject

include Zm::Model::AttributeChangeObserver



10
11
12
# File 'lib/zm/client/mountpoint/mountpoint.rb', line 10

def name
  @name
end

#ownerObject

include Zm::Model::AttributeChangeObserver



10
11
12
# File 'lib/zm/client/mountpoint/mountpoint.rb', line 10

def owner
  @owner
end

#reminderObject

include Zm::Model::AttributeChangeObserver



10
11
12
# File 'lib/zm/client/mountpoint/mountpoint.rb', line 10

def reminder
  @reminder
end

#revObject

include Zm::Model::AttributeChangeObserver



10
11
12
# File 'lib/zm/client/mountpoint/mountpoint.rb', line 10

def rev
  @rev
end

#rgbObject

include Zm::Model::AttributeChangeObserver



10
11
12
# File 'lib/zm/client/mountpoint/mountpoint.rb', line 10

def rgb
  @rgb
end

#ridObject

include Zm::Model::AttributeChangeObserver



10
11
12
# File 'lib/zm/client/mountpoint/mountpoint.rb', line 10

def rid
  @rid
end

#ruuidObject

include Zm::Model::AttributeChangeObserver



10
11
12
# File 'lib/zm/client/mountpoint/mountpoint.rb', line 10

def ruuid
  @ruuid
end

#urlObject

include Zm::Model::AttributeChangeObserver



10
11
12
# File 'lib/zm/client/mountpoint/mountpoint.rb', line 10

def url
  @url
end

#uuidObject

include Zm::Model::AttributeChangeObserver



10
11
12
# File 'lib/zm/client/mountpoint/mountpoint.rb', line 10

def uuid
  @uuid
end

#viewObject

include Zm::Model::AttributeChangeObserver



10
11
12
# File 'lib/zm/client/mountpoint/mountpoint.rb', line 10

def view
  @view
end

#webOfflineSyncDaysObject

include Zm::Model::AttributeChangeObserver



10
11
12
# File 'lib/zm/client/mountpoint/mountpoint.rb', line 10

def webOfflineSyncDays
  @webOfflineSyncDays
end

#zidObject

include Zm::Model::AttributeChangeObserver



10
11
12
# File 'lib/zm/client/mountpoint/mountpoint.rb', line 10

def zid
  @zid
end

Instance Method Details

#color!Object



37
38
39
40
41
42
# File 'lib/zm/client/mountpoint/mountpoint.rb', line 37

def color!
  # @parent.sacc.invoke(jsns_builder.to_color) if color_changed? || rgb_changed?
  @parent.sacc.invoke(jsns_builder.to_color)

  true
end

#create!Object



21
22
23
24
25
26
27
# File 'lib/zm/client/mountpoint/mountpoint.rb', line 21

def create!
  rep = @parent.sacc.invoke(jsns_builder.to_jsns)
  json = rep[:CreateMountpointResponse][:link].first

  MountpointJsnsInitializer.update(self, json)
  @id
end

#delete!Object



55
56
57
58
59
60
# File 'lib/zm/client/mountpoint/mountpoint.rb', line 55

def delete!
  return false if @id.nil?

  @parent.sacc.invoke(jsns_builder.to_delete)
  @id = nil
end

#modify!Object

Raises:

  • (NotImplementedError)


29
30
31
# File 'lib/zm/client/mountpoint/mountpoint.rb', line 29

def modify!
  raise NotImplementedError
end

#reload!Object

Raises:

  • (NotImplementedError)


51
52
53
# File 'lib/zm/client/mountpoint/mountpoint.rb', line 51

def reload!
  raise NotImplementedError
end

#rename!(new_name) ⇒ Object



44
45
46
47
48
49
# File 'lib/zm/client/mountpoint/mountpoint.rb', line 44

def rename!(new_name)
  return false if new_name == @name

  @parent.sacc.invoke(jsns_builder.to_rename(new_name))
  @name = new_name
end

#update!(*args) ⇒ Object

Raises:

  • (NotImplementedError)


33
34
35
# File 'lib/zm/client/mountpoint/mountpoint.rb', line 33

def update!(*args)
  raise NotImplementedError
end