-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathLocations.yml
326 lines (321 loc) · 22.1 KB
/
Locations.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
-
# Create new location for an existing content
type: location
mode: create
match: # The contents to which you want to add new locations
# Possible values for matching. only one of them is allowed at a time. All of them can be single or array
content_id: # the content id(s) of the content we want to add a location to
content_remote_id: # the remote content id(s) of the content we want to add a location to
location_id: # the location id(s) of the content we want to add a location to
location_remote_id: # the location remote id(s) of the content we want to add a location to
parent_location_id: # the location id(s) of the parent(s) of contents we want to add a location to
parent_location_remote_id: # the remote location id(s) of the parent(s) of contents we want to add a location to
match_offset: 0 # optional
match_limit: 0 # optional
match_sort: # optional. If set, it has to be an array
- { sort_field: content_id|content_name|modified|published|section_identifier|section_name, sort_order: ASC|DESC }
parent_location: y # The Location ID of the parent where the new location(s) should be placed. When a non numeric string is used, it is assumed to be a location remote id
is_hidden: true|false # Optional
is_main: true # Optional: make this the main location. NB: will *not* unset this location from being main if set to false
priority: x # Optional
sort_field: x # Optional. Possible values for sort_field are:
# - published
# - priority
# - path
# - modified
# - section
# - depth
# - class_identifier
# - class_name
# - name
# - location_id
# - content_id
# - modified_subnode
sort_order: ASC|DESC # Optional
# The list in references tells the manager to store specific values for later use by other steps in the current migration.
# NB: these are NEW VARIABLES THAT YOU ARE CREATING. They are not used in the current migration step!
references: # Optional
# short syntax:
referenceId: attributeId # (possible values and meaning are explained for the 'long syntax')
# long syntax:
-
identifier: referenceId # A string used to identify the reference
attribute: attributeId # An attribute to get the value of for the reference.
# Supports: location_id, location_remote_id,
# always_available, content_id, content_type_id, content_type_identifier, current_version_no,
# depth, is_hidden, main_language_code, main_location_id, main_language_code,
# modification_date, name, owner_id, parent_location_id, path, priority,
# publication_date, section_id, sort_field, sort_order)
overwrite: true|false # Optional, default false. If not set, and the reference already exists, an exception is thrown
expect: one|any|many # Optional. If set, the number of _created locations_ will be validated, and the type of values set to created references will change
# 'one': only one element should be matched; reference values will be scalars
# 'any': zero or more element should be matched; reference values will be arrays
# 'many': one or more element should be matched; reference values will be arrays
if: # Optional. If set, the migration step will be skipped unless the condition is matched
"reference:_ref_name": # name of a reference to be used for the test
_operator_: value # allowed operators: eq, gt, gte, lt, lte, ne, count, length, regexp, satisfies
-
type: location
mode: create
match: ... # See above
match_offset: ... # See above
match_limit: ... # See above
match_sort: ... # See above
parent_location: [x, y, z] # Multiple locations can be added in a single step using an array
is_hidden: ... # See above
priority: x # Optional
sort_field: ... # See above
sort_order: ... # See above
references: ... # See above
expect: ... # See above
if: ... # See above
-
type: location
mode: update
match: # The locations to update
# Possible values for matching. only one of them is allowed at a time. All of them can be single or array.
# NB: matching by location_id or location_remote_id will make the migration fail in case of a miss. However,
# matching by any other criterion will _not_ make the migration fail even when there are no matches.
# If you want to make sure that the migration aborts in case of a miss, use `expect: one` or `expect: many`
# as described below
content_id: # the content id(s) of the locations we want to update
content_remote_id: # the remote content id(s) of the the locations we want to update
location_id: # the location id(s) of the the locations we want to update
location_remote_id: # the location remote id(s) of the the locations we want to update
attribute:
_attr_name_:
_operator_: value # _operator_: eq, gt, gte, lt, lte, in, between, like; value: depending on the attribute type
content_type_identifier: yyy # string|string[] a content type identifier
content_type_id: yyy # int|int[] a content type id
creation_date:
_operator_: value # _operator_: eq, gt, gte, lt, lte, value: unix timestamp
depth:
_operator_: value # _operator_: eq, gt, gte, lt, lte, value: int
is_main_location: true # bool
group: xxx # int|int[] a user group id or remote id
modification_date:
_operator_: value # _operator_: eq, gt, gte, lt, lte, value: unix timestamp
object_state: zzz # int|int[]|string|string[] object state(s) either as id or using 'group/identifier'
owner: xxx # user id, login or email if unique
parent_location_id: # the location id(s) of the parent(s) of the locations we want to update
parent_location_remote_id: # the remote location id(s) of the parent(s) of the locations we want to update
priority:
_operator_: value # _operator_: eq, gt, gte, lt, lte, value: int
query_type: # match using a user-defined QueryType. NB: this can not be used together with AND/OR/OT clauses
name: string
parameters: [a, b, c]
section: xx # int|int[]|string|string[] section id(s) or identifier(s)
subtree: /1/2/2345 # string|string[]
visibility: true # bool
or: # match any of the conditions below
-
_condition_: value # where _condition_ can be any of ones specified above, including 'and' and 'or'
-
_condition_: value # where _condition can be any of ones specified above, including 'and' and 'or'
and: # match all of the conditions below
-
_condition_: value # where _condition_ can be any of ones specified above, including 'and' and 'or'
-
_condition_: value # where _condition_ can be any of ones specified above, including 'and' and 'or'
not: # matches elements NOT satisfying the wrapped condition
_condition_: value # where _condition_ can be any of ones specified above, including 'and' and 'or'
match_offset: 0 # optional
match_limit: 0 # optional
match_sort: # optional. If set, it has to be an array
- { sort_field: depth|is_main|node_id|path|ptiority|visibility, sort_order: ASC|DESC }
match_tolerate_misses: false # optional. Do not fail the execution if there is no location matching, when matching by id or identifier
parent_location: x # Optional The parent location to move the subtree to. Cannot be set at the same time than swap_with_location
# When a non numeric string is used, it is assumed to be a location remote id
is_hidden: true|false # Optional, Set the visibility of the location
is_main: true # Optional: make this the main location. NB: will *not* unset this location from being main if set to false
priority: x # Optional, will be updated if set
sort_field: x # Optional
sort_order: ASC|DESC # Optional
swap_with_location: y # Optional, The ID of the location to swap the location with. Cannot be set at the same time than parent_location
# When a non numeric string is used, it is assumed to be a location remote id
remote_id: # Optional, Set the remote_id of the location
# The list in references tells the manager to store specific values for later use by other steps in the current migration.
# NB: these are NEW VARIABLES THAT YOU ARE CREATING. They are not used in the current migration step!
references: # Optional
# short syntax:
referenceId: attributeId # (possible values and meaning are explained for the 'long syntax')
# long syntax:
-
identifier: referenceId # A string used to identify the reference
attribute: attributeId # The attribute to get the value of for the reference.
# Supports: location_id, location_remote_id,
# always_available, content_id, content_type_id, content_type_identifier, current_version_no,
# depth, is_hidden, main_language_code, main_location_id, main_language_code,
# modification_date, name, owner_id, parent_location_id, path, priority,
# publication_date, section_id, sort_field, sort_order)
# 'count' can be used to set a reference to the number of items matched
overwrite: true|false # Optional, default false. If not set, and the reference already exists, an exception is thrown
expect: one|any|many # Optional. If set, the number of matched items will be validated, and the type of values set to created references will change
# 'one': only one element should be matched; reference values will be scalars
# 'any': zero or more element should be matched; reference values will be arrays
# 'many': one or more element should be matched; reference values will be arrays
if: # Optional. If set, the migration step will be skipped unless the condition is matched
"reference:_ref_name": # name of a reference to be used for the test
_operator_: value # allowed operators: eq, gt, gte, lt, lte, ne, count, length, regexp, satisfies
-
type: location
mode: delete
match: # The locations to delete
# Possible values for matching. only one of them is allowed at a time. All of them can be single or array.
# NB: matching by location_id or location_remote_id will make the migration fail in case of a miss. However,
# matching by any other criterion will _not_ make the migration fail even when there are no matches.
# If you want to make sure that the migration aborts in case of a miss, use `expect: one` or `expect: many`
# as described below
content_id: # the content id(s) of the content we want to delete
content_remote_id: # the remote content id(s) of the content we want to delete
location_id: # the location id(s) we want to delete
location_remote_id: # the location remote id(s) we want to delete
attribute:
_attr_name_:
_operator_: value # _operator_: eq, gt, gte, lt, lte, in, between, like; value: depending on the attribute type
content_type_identifier: yyy # string|string[] a content type identifier
content_type_id: yyy # int|int[] a content type id
creation_date:
_operator_: value # _operator_: eq, gt, gte, lt, lte, value: unix timestamp
depth:
_operator_: value # _operator_: eq, gt, gte, lt, lte, value: int
group: xxx # int|int[] a user group id or remote id
is_main_location: true # bool
modification_date:
_operator_: value # _operator_: eq, gt, gte, lt, lte, value: unix timestamp
object_state: zzz # int|int[]|string|string[] object state(s) either as id or using 'group/identifier'
owner: xxx # user id, login or email if unique
parent_location_id: # the location id(s) of the parent(s) of locations we want to delete
parent_location_remote_id: # the remote location id(s) of the parent(s) of locations we want to delete
priority:
_operator_: value # _operator_: eq, gt, gte, lt, lte, value: int
query_type: # match using a user-defined QueryType. NB: this can not be used together with AND/OR/OT clauses
name: string
parameters: [a, b, c]
section: xx # int|int[]|string|string[] section id(s) or identifier(s)
subtree: /1/2/2345 # string|string[]
visibility: true # bool
or: # match any of the conditions below
-
_condition_: value # where _condition_ can be any of ones specified above, including 'and' and 'or'
-
_condition_: value # where _condition can be any of ones specified above, including 'and' and 'or'
and: # match all of the conditions below
-
_condition_: value # where _condition_ can be any of ones specified above, including 'and' and 'or'
-
_condition_: value # where _condition_ can be any of ones specified above, including 'and' and 'or'
not: # matches elements NOT satisfying the wrapped condition
_condition_: value # where _condition_ can be any of ones specified above, including 'and' and 'or'
match_offset: 0 # optional
match_limit: 0 # optional
match_sort: # optional. If set, it has to be an array
- { sort_field: depth|is_main|node_id|path|ptiority|visibility, sort_order: ASC|DESC }
match_tolerate_misses: false # optional. Do not fail the execution if there is no location matching, when matching by id or identifier
# The list in references tells the manager to store specific values for later use by other steps in the current migration.
# NB: these are NEW VARIABLES THAT YOU ARE CREATING. They are not used in the current migration step!
references: # Optional
# short syntax:
referenceId: attributeId # (possible values and meaning are explained for the 'long syntax')
# long syntax:
-
identifier: referenceId # A string used to identify the reference
attribute: attributeId # The attribute to get the value of for the reference (supports: location_id, location_remote_id,
# always_available, content_id, content_type_id, content_type_identifier, current_version_no,
# depth, is_hidden, main_language_code, main_location_id, main_language_code,
# modification_date, name, owner_id, parent_location_id, path, priority,
# publication_date, section_id, sort_field, sort_order)
# 'count' can be used to set a reference to the number of items matched
overwrite: true|false # Optional, default false. If not set, and the reference already exists, an exception is thrown
expect: one|any|many # Optional. If set, the number of matched items will be validated, and the type of values set to created references will change
# 'one': only one element should be matched; reference values will be scalars
# 'any': zero or more element should be matched; reference values will be arrays
# 'many': one or more element should be matched; reference values will be arrays
if: # Optional. If set, the migration step will be skipped unless the condition is matched
"reference:_ref_name": # name of a reference to be used for the test
_operator_: value # allowed operators: eq, gt, gte, lt, lte, ne, count, length, regexp, satisfies
# Same as location delete, but send to the trash instead
-
type: location
mode: trash
match: ... # The locations to delete. See location/delete for the description
references: ... # Optional. See location/delete for the description
expect: ... # Optional. See location/delete for the description
if: ... # Optional. See location/delete for the description
-
type: location
mode: load
match: # The locations to load
# Possible values for matching. only one of them is allowed at a time. All of them can be single or array.
# NB: matching by location_id or location_remote_id will make the migration fail in case of a miss. However,
# matching by any other criterion will _not_ make the migration fail even when there are no matches.
# If you want to make sure that the migration aborts in case of a miss, use `expect: one` or `expect: many`
# as described below
content_id: # the content id(s) of the locations we want to load
content_remote_id: # the remote content id(s) of the locations we want to load
attribute:
_attr_name_:
_operator_: value # _operator_: eq, gt, gte, lt, lte, in, between, like; value: depending on the attribute type
location_id: # the location id(s) of the locations we want to load
location_remote_id: # the location remote id(s) of the location we want to load
content_type_identifier: yyy # string|string[] a content type identifier
content_type_id: yyy # int|int[] a content type id
creation_date:
_operator_: value # _operator_: eq, gt, gte, lt, lte, value: unix timestamp
depth:
_operator_: value # _operator_: eq, gt, gte, lt, lte, value: int
group: xxx # int|int[] a user group id or remote id
is_main_location: true # bool
modification_date:
_operator_: value # _operator_: eq, gt, gte, lt, lte, value: unix timestamp
object_state: zzz # int|int[]|string|string[] object state(s) either as id or using 'group/identifier'
owner: xxx # user id, login or email if unique
parent_location_id: # the location id(s) of the parent(s) of locations we want to load
parent_location_remote_id: # the remote location id(s) of the parent(s) of locations we want to load
priority:
_operator_: value # _operator_: eq, gt, gte, lt, lte, value: int
query_type: # match using a user-defined QueryType. NB: this can not be used together with AND/OR/OT clauses
name: string
parameters: [a, b, c]
section: xx # int|int[]|string|string[] section id(s) or identifier(s)
subtree: /1/2/2345 # string|string[]
visibility: true # bool
or: # match any of the conditions below
-
_condition_: value # where _condition_ can be any of ones specified above, including 'and' and 'or'
-
_condition_: value # where _condition can be any of ones specified above, including 'and' and 'or'
and: # match all of the conditions below
-
_condition_: value # where _condition_ can be any of ones specified above, including 'and' and 'or'
-
_condition_: value # where _condition_ can be any of ones specified above, including 'and' and 'or'
not: # matches elements NOT satisfying the wrapped condition
_condition_: value # where _condition_ can be any of ones specified above, including 'and' and 'or'
match_offset: 0 # optional
match_limit: 0 # optional
match_sort: # optional. If set, it has to be an array
- { sort_field: depth|is_main|node_id|path|ptiority|visibility, sort_order: ASC|DESC }
match_tolerate_misses: false # optional. Do not fail the execution if there is no location matching, when matching by id or identifier
# The list in references tells the manager to store specific values for later use by other steps in the current migration.
# NB: these are NEW VARIABLES THAT YOU ARE CREATING. They are not used in the current migration step!
references: # Optional
# short syntax:
referenceId: attributeId # (possible values and meaning are explained for the 'long syntax')
# long syntax:
-
identifier: referenceId # A string used to identify the reference
attribute: attributeId # The attribute to get the value of for the reference (supports: location_id, location_remote_id,
# always_available, content_id, content_type_id, content_type_identifier, current_version_no,
# depth, is_hidden, main_language_code, main_location_id, main_language_code,
# modification_date, name, owner_id, parent_location_id, path, priority,
# publication_date, section_id, sort_field, sort_order)
# 'count' can be used to set a reference to the number of items matched
overwrite: true|false # Optional, default false. If not set, and the reference already exists, an exception is thrown
expect: one|any|many # Optional. If set, the number of matched items will be validated, and the type of values set to created references will change
# 'one': only one element should be matched; reference values will be scalars
# 'any': zero or more element should be matched; reference values will be arrays
# 'many': one or more element should be matched; reference values will be arrays
if: # Optional. If set, the migration step will be skipped unless the condition is matched
"reference:_ref_name": # name of a reference to be used for the test
_operator_: value # allowed operators: eq, gt, gte, lt, lte, ne, count, length, regexp, satisfies