Sling provides a way to automatically create a resource name. If you send a POST request to an URL ending with a /*
, Sling will generate the resource name, using a number of rules described in the documentation.
If you intercept the request sent to the /*
resource in servlet or filter and invoke the request.getResource()
method, you'll get a StarResource
object. It extends the SyntheticResource
type, representing resources that doesn't have appropriate node in the JCR. Its resource type is sling:syntheticStarResource
, you can call its getParent()
method, but generally it isn't very useful. An attempt to adapting it to ValueMap
will fail. Sling provides a helper method that checks if the given Resource
is a StarResource
.
In case of the paragraph system implementation mentioned in the question, the author of the code probably wanted to display the Drop component using a synthetic resource and providing *
as the path is the easiest way to do it. You can also be sure that the resource will always be synthetic, as it's impossible to create a node with this name.