Module: StoreAgent::Node::PathValidator

Defined in:
lib/store_agent/node/prepend_module/path_validator.rb

Overview

オブジェクトの操作時に、パスが不正でないかをチェックするモジュール

Instance Method Summary collapse

Instance Method Details

#chownObject



84
85
86
87
88
# File 'lib/store_agent/node/prepend_module/path_validator.rb', line 84

def chown(*)
  be_present!
  be_not_reserved!
  super
end

#copy(dest_path = nil) ⇒ Object

TODO



58
59
60
61
62
# File 'lib/store_agent/node/prepend_module/path_validator.rb', line 58

def copy(dest_path = nil, *)
  be_present!
  be_not_reserved!
  super
end

#createObject



21
22
23
24
25
26
27
28
# File 'lib/store_agent/node/prepend_module/path_validator.rb', line 21

def create(*)
  if !root?
    parent_directory.be_present!
  end
  be_absent!
  be_not_reserved!
  super
end

#deleteObject



44
45
46
47
48
49
# File 'lib/store_agent/node/prepend_module/path_validator.rb', line 44

def delete(*)
  be_present!
  be_not_root!
  be_not_reserved!
  super
end

#get_metadataObject

:nodoc:



72
73
74
75
76
# File 'lib/store_agent/node/prepend_module/path_validator.rb', line 72

def (*) # :nodoc:
  be_present!
  be_not_reserved!
  super
end

#get_permissionsObject

:nodoc:



78
79
80
81
82
# File 'lib/store_agent/node/prepend_module/path_validator.rb', line 78

def get_permissions(*) # :nodoc:
  be_present!
  be_not_reserved!
  super
end

#move(dest_path = nil) ⇒ Object

TODO



65
66
67
68
69
70
# File 'lib/store_agent/node/prepend_module/path_validator.rb', line 65

def move(dest_path = nil, *)
  be_present!
  be_not_root!
  be_not_reserved!
  super
end

#read(revision: nil) ⇒ Object



30
31
32
33
34
35
36
# File 'lib/store_agent/node/prepend_module/path_validator.rb', line 30

def read(*, revision: nil)
  if revision.nil?
    be_present!
  end
  be_not_reserved!
  super
end

#set_permissionObject



90
91
92
93
94
# File 'lib/store_agent/node/prepend_module/path_validator.rb', line 90

def set_permission(*)
  be_present!
  be_not_reserved!
  super
end

#touchObject



51
52
53
54
55
# File 'lib/store_agent/node/prepend_module/path_validator.rb', line 51

def touch(*)
  be_present!
  be_not_reserved!
  super
end

#unset_permissionObject



96
97
98
99
100
# File 'lib/store_agent/node/prepend_module/path_validator.rb', line 96

def unset_permission(*)
  be_present!
  be_not_reserved!
  super
end

#updateObject



38
39
40
41
42
# File 'lib/store_agent/node/prepend_module/path_validator.rb', line 38

def update(*)
  be_present!
  be_not_reserved!
  super
end