public class SnapshotAdapter extends Object implements TranslationSnapshotReadContract, TranslationSnapshotWriteContract
| Constructor and Description |
|---|
SnapshotAdapter(Snapshot snapshot) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsMessage(String msgKey,
String msgFile)
Check if translation snapshot contains message
msgKey for file msgFile. |
Snapshot |
getUnderlyingSnapshot()
Gives access to underlying
Snapshot, mainly for use in tests. |
boolean |
hasSameMessage(@NotNull String msgKey,
@NotNull String msgFile,
@Nullable String currentMsg) |
boolean |
includesMsgFile(String msgFile)
Check if message file
msgFile is part of translation snapshot. |
Collection<String> |
listMsgFiles()
Lists all message files included in the translation snapshot
|
Integer |
registerMsgFile(String msgFilePath)
Generated persistent id for [msgFilePath] and stores the path along the new id
|
void |
removeMsgFilePaths(Collection<String> msgFilePaths)
Removes message file paths from the translation snapshot.
|
public SnapshotAdapter(Snapshot snapshot)
public Snapshot getUnderlyingSnapshot()
TranslationSnapshotWriteContractSnapshot, mainly for use in tests.getUnderlyingSnapshot in interface TranslationSnapshotWriteContractpublic boolean includesMsgFile(String msgFile)
TranslationSnapshotReadContractmsgFile is part of translation snapshot.includesMsgFile in interface TranslationSnapshotReadContractmsgFile - message file path that is either included in the snapshot or it is notpublic Collection<String> listMsgFiles()
TranslationSnapshotReadContractlistMsgFiles in interface TranslationSnapshotReadContractpublic Integer registerMsgFile(String msgFilePath)
TranslationSnapshotWriteContractregisterMsgFile in interface TranslationSnapshotWriteContractmsgFilePath - message file path that will be registered in the snapshotpublic void removeMsgFilePaths(Collection<String> msgFilePaths)
TranslationSnapshotWriteContractremoveMsgFilePaths in interface TranslationSnapshotWriteContractmsgFilePaths - message file paths to removepublic boolean containsMessage(String msgKey, String msgFile)
TranslationSnapshotReadContractmsgKey for file msgFile.containsMessage in interface TranslationSnapshotReadContractmsgKey - key of message that might be contained in message file msgFilemsgFile - message file path that we assume is included in the snapshotpublic boolean hasSameMessage(@NotNull
@NotNull String msgKey,
@NotNull
@NotNull String msgFile,
@Nullable
@Nullable String currentMsg)
hasSameMessage in interface TranslationSnapshotReadContractCopyright © 2025 FG Forrest, a.s.. All rights reserved.