Class DefaultSaveStrategy
java.lang.Object
ro.sync.ecss.extensions.api.webapp.ce.DefaultSaveStrategy
- All Implemented Interfaces:
GroupChangesForMultiplePeersStrategy
,SaveStrategy
@API(type=NOT_EXTENDABLE,
src=PUBLIC)
public final class DefaultSaveStrategy
extends Object
implements GroupChangesForMultiplePeersStrategy
Default save strategy used when no save strategy is explicitly specified when creating a room.
Saves all changes at once, as the user who triggered the save.
- Since:
- 23.1.1
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionopenConnection
(URL documentUrl, PeerContext committer, List<PeerContext> authors) This method will be called whenever a peer within a concurrent editing session triggers either a save or a auto-save.
-
Constructor Details
-
DefaultSaveStrategy
public DefaultSaveStrategy()
-
-
Method Details
-
openConnection
public URLConnection openConnection(URL documentUrl, PeerContext committer, List<PeerContext> authors) throws IOException Description copied from interface:GroupChangesForMultiplePeersStrategy
This method will be called whenever a peer within a concurrent editing session triggers either a save or a auto-save. Called a single time for each document, allowing a minimum number of writes to the file server. It facilitates storing a revision for all peers together, writing only once per save to the file server.- Specified by:
openConnection
in interfaceGroupChangesForMultiplePeersStrategy
- Parameters:
documentUrl
- The document URL. May be used to directly open a connection to the CMS on behalf of the committer. Note that it has the UserInfo of the committer.committer
- The context of the peer that triggered either a save or a auto-save.authors
- The context of peers whose changes are about to be saved onto the URL connection. Note that committer may or may not be an author.- Returns:
- A connection where to write the new revision.
- Throws:
IOException
- If fails to open the connect.- See Also:
-