Interface UpdateStrategy
public interface UpdateStrategy
-
Method Summary
Modifier and TypeMethodDescriptiongetItems(org.apache.sling.api.SlingHttpServletRequest request) This method is called on the remote instance when Content Sync requests the list of resources to syncgetMessage(CatalogItem remoteResource, org.apache.sling.api.resource.Resource localResource) booleanisModified(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
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 resourcelocalResource- local resource- Returns:
- whether the resource was modified
-
getMessage
- Parameters:
remoteResource- json representation of a remote resourcelocalResource- local resource- Returns:
- message to print in the UI
-