Package com.e1c.langtool.storage
Interface ITranslationStorageProvider
- All Known Implementing Classes:
AbstractFileStorageProvider,ContextDefStorageProvider,ContextFileStorageProvider,DbViewTermsStorageProvider,DefaultEditingStorageProvider,DictionaryFileStorageProvider
public interface ITranslationStorageProvider
The
ITranslationStorageProvider provides storage place for translations.
Provider must return at least one segment of storage.
Implementations must be contributed to com.e1c.langtool.translationStorageProvider extension point.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceThe Interface for context storage of translation strings.static interfaceThe Interface for dictionary storage of translation strings.static interfaceThe Interface Storage. -
Method Summary
Modifier and TypeMethodDescriptionGets the provider id.getStorage(org.eclipse.core.resources.IProject project, String segment) Gets the storage.getStorageDescription(org.eclipse.core.resources.IProject project, String segment) Gets the storage description.getStorageSegments(org.eclipse.core.resources.IProject project) At least one segment ID should be returned to use the provider.voidinitialize(org.eclipse.core.resources.IProject project, List<String> segments) Initialize.booleanisActive()Checks whether it active and can be used or not.
-
Method Details
-
getProviderId
String getProviderId()Gets the provider id.- Returns:
- the provider id
-
isActive
boolean isActive()Checks whether it active and can be used or not.- Returns:
- true, if is active
-
initialize
Initialize.- Parameters:
project- the projectsegments- the segments
-
getStorageSegments
At least one segment ID should be returned to use the provider. String cannot contains `:`, which used for separation provider_id and segment for global "Storage ID" in the project: com.e1c.langtool.storage:common com.e1c.langtool.storage:context- Parameters:
project- the project- Returns:
- the storage segments
-
getStorageDescription
Gets the storage description.- Parameters:
project- the projectsegment- the segment- Returns:
- the storage description
-
getStorage
ITranslationStorageProvider.Storage getStorage(org.eclipse.core.resources.IProject project, String segment) Gets the storage.- Parameters:
project- the projectsegment- the segment- Returns:
- the storage
-