Interface UpdateStrategy


public interface UpdateStrategy
  • Method Summary

    Modifier and Type
    Method
    Description
    getItems(org.apache.sling.api.SlingHttpServletRequest request)
    This method is called on the remote instance when Content Sync requests the list of resources to sync
    getMessage(CatalogItem remoteResource, org.apache.sling.api.resource.Resource localResource)
     
    boolean
    isModified(CatalogItem remoteResource, org.apache.sling.api.resource.Resource localResource)
    Compare local and remote resources and decided whether the resource was modified and need to be sync-ed
  • Method Details

    • getItems

      List<CatalogItem> getItems(org.apache.sling.api.SlingHttpServletRequest request)
      This method is called on the remote instance when Content Sync requests the list of resources to sync
      Parameters:
      request - the request from the Content Sync UI
      Returns:
      the list of resources to sync
    • isModified

      boolean isModified(CatalogItem remoteResource, org.apache.sling.api.resource.Resource localResource)
      Compare local and remote resources and decided whether the resource was modified and need to be sync-ed
      Parameters:
      remoteResource - json representation of a remote resource
      localResource - local resource
      Returns:
      whether the resource was modified
    • getMessage

      String getMessage(CatalogItem remoteResource, org.apache.sling.api.resource.Resource localResource)
      Parameters:
      remoteResource - json representation of a remote resource
      localResource - local resource
      Returns:
      message to print in the UI