com.vmware.l10n.source.dao.SourceDao Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of singleton-manager-l10n Show documentation
Show all versions of singleton-manager-l10n Show documentation
A service that provides support for Software Internationalization and Localization
/*
* Copyright 2019-2022 VMware, Inc.
* SPDX-License-Identifier: EPL-2.0
*/
package com.vmware.l10n.source.dao;
import java.util.List;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.vmware.l10n.record.model.RecordModel;
import com.vmware.vip.common.i18n.dto.SingleComponentDTO;
import com.vmware.vip.common.l10n.exception.L10nAPIException;
import com.vmware.vip.common.l10n.source.dto.ComponentMessagesDTO;
/**
* This class handles the source strings, write to local resource file or send
* them to GRM. The former maybe droped in the future. GRM is a internal tool of
* VMware which manages products' resource files.
*/
public interface SourceDao {
/**
* Get a component's source strings by reading from english resource file.
*
* @param singleComponentDTO
* the object which wraps the base information of a component
* @param filePath
* the location where the resource file is placed, can be
* configed in spring config file
* @return the content of the resource file
*/
public String getFromBundle(SingleComponentDTO singleComponentDTO);
/**
* Write source strings to local resource file.
*
* @param singleComponentDTO
* the object which wraps the content of a component
* @param basepath
* the location where the resource file is placed, can be
* configed in spring config file
* @return update result, true represents success, false represents failure.
* @throws JsonProcessingException
*/
public boolean updateToBundle(ComponentMessagesDTO componentMessagesDTO) throws JsonProcessingException;
/**
* get the update records from bundle
*/
public List getUpdateRecords(String productName, String version, long lastModifyTime)throws L10nAPIException;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy