Interface LazyCreationService.CreationStrategy

  • Enclosing interface:
    LazyCreationService

    public static interface LazyCreationService.CreationStrategy
    Strategy to create the resource itself.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      org.apache.sling.api.resource.Resource create​(org.apache.sling.api.resource.ResourceResolver resolver, org.apache.sling.api.resource.Resource parent, String name)
      Create the resource with the given administrative resolver.
    • Method Detail

      • create

        org.apache.sling.api.resource.Resource create​(org.apache.sling.api.resource.ResourceResolver resolver,
                                                      org.apache.sling.api.resource.Resource parent,
                                                      String name)
                                               throws javax.jcr.RepositoryException,
                                                      org.apache.sling.api.resource.PersistenceException
        Create the resource with the given administrative resolver. A ResourceResolver.commit() is not necessary - that's performed in the LazyCreationService.
        Parameters:
        resolver - an administrative resolver
        parent - the parent of the resource at which to attach the resource
        name - the name of the resource to create.
        Returns:
        the created resource, which must be the child with the given name of the given parent.
        Throws:
        javax.jcr.RepositoryException
        org.apache.sling.api.resource.PersistenceException