Class MessageKeyIndex
- java.lang.Object
-
- de.codecamp.messages.shared.model.AbstractPersistableData
-
- de.codecamp.messages.shared.model.MessageKeyIndex
-
- All Implemented Interfaces:
MessageModule
public class MessageKeyIndex extends AbstractPersistableData implements MessageModule
The message key index file contains the information which message keys this project / module declares and where they are declared in the source.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class de.codecamp.messages.shared.model.AbstractPersistableData
AbstractPersistableData.PersistableDataException
-
-
Constructor Summary
Constructors Constructor Description MessageKeyIndex()
-
Method Summary
-
Methods inherited from class de.codecamp.messages.shared.model.AbstractPersistableData
readFrom, readFrom, writeTo, writeTo
-
-
-
-
Method Detail
-
getModuleName
public String getModuleName()
- Specified by:
getModuleNamein interfaceMessageModule
-
setModuleName
public void setModuleName(String moduleName)
-
getTargetLocales
public List<Locale> getTargetLocales()
- Specified by:
getTargetLocalesin interfaceMessageModule
-
getBundleMappings
public List<BundleMapping> getBundleMappings()
- Specified by:
getBundleMappingsin interfaceMessageModule
-
setBundleMappings
public void setBundleMappings(List<BundleMapping> bundleMappings)
-
getImportedModules
public List<String> getImportedModules()
- Specified by:
getImportedModulesin interfaceMessageModule
-
getMessageFormat
public String getMessageFormat()
- Specified by:
getMessageFormatin interfaceMessageModule
-
setMessageFormat
public void setMessageFormat(String messageFormat)
-
containsKey
public boolean containsKey(String key)
-
hasSourceType
public boolean hasSourceType(String sourceType)
-
countSourceTypes
public int countSourceTypes()
-
getKeysForType
public Stream<MessageKeyWithSourceLocation> getKeysForType(String sourceType)
-
getKey
public MessageKeyWithSourceLocation getKey(String code)
-
countKeys
public int countKeys(String sourceType)
-
getKeys
public Stream<MessageKeyWithSourceLocation> getKeys()
-
countKeys
public int countKeys()
-
updateWith
public void updateWith(String typeName, Set<MessageKeyWithSourceLocation> messageKeys)
-
getSize
public int getSize()
-
getPreferredFilePath
public String getPreferredFilePath()
-
isIndexFile
public static boolean isIndexFile(String filename)
-
readFrom
public static MessageKeyIndex readFrom(InputStream inputStream) throws AbstractPersistableData.PersistableDataException
-
readFrom
public static MessageKeyIndex readFrom(Path path) throws AbstractPersistableData.PersistableDataException
-
copyOf
public static MessageKeyIndex copyOf(MessageKeyIndex index)
-
-