Package com.day.cq.wcm.undo
Interface BinaryValueManager
public interface BinaryValueManager
Provides means to manage binary values for the CQ5 undo.
-
Method Summary
Modifier and TypeMethodDescriptionvoiddelete(ResourceResolver resolver, String undoPath) Deletes a binary value from the specified target path.voidDeletes a binary value from the specified target path.booleanChecks if the binary value (located at the specified sub-path of the specified paragraph) has changed in relation to the specified original undo data.voidRestores a binary value from the undo area to a specific content path.Saves the binary value at the specified repository path to the undo area.
-
Method Details
-
isChanged
Checks if the binary value (located at the specified sub-path of the specified paragraph) has changed in relation to the specified original undo data.
- Parameters:
par- The paragraphsubPath- The sub-path of the binary dataoriginalRef- The reference to the original binary data (as returned by a previous call tosave(org.apache.sling.api.resource.Resource, java.lang.String))- Returns:
trueif the binary data has changed- Throws:
BinaryHandlingException- if the check could not be executed
-
save
Saves the binary value at the specified repository path to the undo area.
- Parameters:
par- The paragraphsubPath- The sub-path of the binary data- Returns:
- The path of the binary value
- Throws:
BinaryHandlingException- if the binary resource could not be saved for undo purposes
-
restore
Restores a binary value from the undo area to a specific content path.
- Parameters:
undoData- The binary value used for restoring ("source")par- The paragraph to restore tosubPath- The sub-path the binary value will be restored to- Throws:
BinaryHandlingException- if the binary value could not be restored
-
delete
Deletes a binary value from the specified target path.
- Parameters:
par- The paragraphsubPath- The sub-path of the binarydeletePar-trueto delete the entire paragraph;falseto delete the BLOB node only- Throws:
BinaryHandlingException- if the binary value could not be removed
-
delete
Deletes a binary value from the specified target path.
- Parameters:
resolver- The resource resolver to be used for accessing the repositoryundoPath- The path to delete from (as, for example returned bysave(org.apache.sling.api.resource.Resource, java.lang.String))- Throws:
BinaryHandlingException- if the binary value could not be removed
-