Interface Merger
public interface Merger
A merger, which is responsible to handle UUID collision when encountered.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptiondefault booleanintGets the UUID Behavior for JCR import
SeeImportUUIDBehaviorandSession.importXML(String, java.io.InputStream, int)default voidjcrImportXml(javax.jcr.Session session, String parentAbsPath, InputStream in) Does a JCR import from the XML read from the givenInputStream
The save operation must be made by the caller.Merges the existing object with given idbooleanneedsMerge(String id) Returnstrueif the object with the given id needs to be merged
-
Method Details
-
deleteBeforePartialImport
- Returns:
trueif existing objects must be deleted
-
needsMerge
Returnstrueif the object with the given id needs to be merged- Parameters:
id- The id- Returns:
trueif the object with the given id needs to be merged
-
merge
Merges the existing object with given id- Parameters:
id- The id- Returns:
- What the caller must do after this method is finished.
- Throws:
MergeException- If the merge cannot be done. This exception must propagate and stop the global import process.
-
getImportUuidBehavior
int getImportUuidBehavior()Gets the UUID Behavior for JCR import
SeeImportUUIDBehaviorandSession.importXML(String, java.io.InputStream, int)- Returns:
- the UUID Behavior
-
jcrImportXml
default void jcrImportXml(javax.jcr.Session session, String parentAbsPath, InputStream in) throws javax.jcr.RepositoryException, IOException Does a JCR import from the XML read from the givenInputStream
The save operation must be made by the caller.
TheInputStreammust be closed by the caller.
Default implementation usesSession.importXML(java.lang.String, java.io.InputStream, int)- Parameters:
session- The JCRSessionparentAbsPath- the absolute path of the node below which the deserialized subgraph is added.in- TheInputStreamfrom which the XML to be deserialized is read.- Throws:
javax.jcr.RepositoryException- if another error occurs.IOException- if an error during an I/O operation occurs.
-