
# Various "create path" tests
# as "create path" does not modify existing nodes it is deprecated and "ensure nodes" should be used instead

# Nodetypes:
# A nodetype in brackets right after "create path", like
# sling:Folder below, sets the default type for all path
# segments of this statement.
# A nodetype in brackets at the end of a path segment, like
# nt:unstructured below, applies just to that path segment.
# If no specific nodetype is set, the repository uses its
# default based on node type definitions.

create path (sling:Folder) /var/discovery(nt:unstructured)/somefolder

# more tests and examples
create path /one/two/three
create path /three/four(nt:folk)/five(nt:jazz)/six
create path (nt:x) /seven/eight/nine
create path /one(mixin nt:art)/step(mixin nt:dance)/two/steps
create path (nt:foxtrot) /one/step(mixin nt:dance)/two/steps
create path /one/step(mixin nt:dance,nt:art)/two/steps
create path /one/step(nt:foxtrot mixin nt:dance)/two/steps
create path /one/step(nt:foxtrot mixin nt:dance,nt:art)/two/steps
create path /one:and/step/two:and/steps
create path /one@home/step/two@home/steps
create path /one+tap/step/two+tap/steps

# this is to cover an edge case: SLING-11384 (create root node with primary type)
create path /(nt:x)

# SLING-10740 - Repoinit create path statement with properties
create path (sling:Folder) /var/discovery(nt:unstructured)/somefolder2 with properties
  set sling:ResourceType{String} to /x/y/z
  set cq:allowedTemplates to /d/e/f/*, m/n/*
  default someInteger{Long} to 42
end
