如何重写Liferay 7.1核心语言接口以覆盖其方法

时间:2019-06-04 07:29:55

标签: liferay liferay-7.1

enter image description here我想覆盖LIferay 7.1语言界面,在这里我将编写代码以从我们的自定义表中获取属性并将其分配给键,而不是从liferay进行翻译或从属性文件中获取

public class CustomLanguageImpl implements Language {
this is my custom class trying to override language interface

public class CustomLanguageImpl implements Language {

    @Override
    public String format(HttpServletRequest request, String pattern, LanguageWrapper argument) {
        // TODO Auto-generated method stub

        return null;
    }

    @Override
    public String format(HttpServletRequest request, String pattern, LanguageWrapper argument,
            boolean translateArguments) {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public String format(HttpServletRequest request, String pattern, LanguageWrapper[] arguments) {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public String format(HttpServletRequest request, String pattern, LanguageWrapper[] arguments,
            boolean translateArguments) {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public String format(HttpServletRequest request, String pattern, Object argument) {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public String format(HttpServletRequest request, String pattern, Object argument, boolean translateArguments) {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public String format(HttpServletRequest request, String pattern, Object[] arguments) {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public String format(HttpServletRequest request, String pattern, Object[] arguments, boolean translateArguments) {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public String format(Locale locale, String pattern, List<Object> arguments) {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public String format(Locale locale, String pattern, Object argument) {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public String format(Locale locale, String pattern, Object argument, boolean translateArguments) {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public String format(Locale locale, String pattern, Object[] arguments) {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public String format(Locale locale, String pattern, Object[] arguments, boolean translateArguments) {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public String format(ResourceBundle resourceBundle, String pattern, Object argument) {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public String format(ResourceBundle resourceBundle, String pattern, Object argument, boolean translateArguments) {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public String format(ResourceBundle resourceBundle, String pattern, Object[] arguments) {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public String format(ResourceBundle resourceBundle, String pattern, Object[] arguments,
            boolean translateArguments) {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public String get(HttpServletRequest request, ResourceBundle resourceBundle, String key) {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public String get(HttpServletRequest request, ResourceBundle resourceBundle, String key, String defaultValue) {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public String get(HttpServletRequest request, String key) {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public String get(HttpServletRequest request, String key, String defaultValue) {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public String get(Locale locale, String key) {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public String get(Locale locale, String key, String defaultValue) {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public String get(ResourceBundle resourceBundle, String key) {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public String get(ResourceBundle resourceBundle, String key, String defaultValue) {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public Set<Locale> getAvailableLocales() {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public Set<Locale> getAvailableLocales(long groupId) {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public String getBCP47LanguageId(HttpServletRequest request) {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public String getBCP47LanguageId(Locale locale) {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public String getBCP47LanguageId(PortletRequest portletRequest) {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public Set<Locale> getCompanyAvailableLocales(long companyId) {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public String getLanguageId(HttpServletRequest request) {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public String getLanguageId(Locale locale) {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public String getLanguageId(PortletRequest portletRequest) {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public Locale getLocale(long groupId, String languageCode) {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public Locale getLocale(String languageCode) {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public ResourceBundleLoader getPortalResourceBundleLoader() {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public Set<Locale> getSupportedLocales() {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public String getTimeDescription(HttpServletRequest request, long milliseconds) {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public String getTimeDescription(HttpServletRequest request, long milliseconds, boolean approximate) {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public String getTimeDescription(HttpServletRequest request, Long milliseconds) {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public String getTimeDescription(Locale locale, long milliseconds) {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public String getTimeDescription(Locale locale, long milliseconds, boolean approximate) {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public String getTimeDescription(Locale locale, Long milliseconds) {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public void init() {
        // TODO Auto-generated method stub

    }

    @Override
    public boolean isAvailableLanguageCode(String languageCode) {
        // TODO Auto-generated method stub
        return false;
    }

    @Override
    public boolean isAvailableLocale(Locale locale) {
        // TODO Auto-generated method stub
        return false;
    }

    @Override
    public boolean isAvailableLocale(long groupId, Locale locale) {
        // TODO Auto-generated method stub
        return false;
    }

    @Override
    public boolean isAvailableLocale(long groupId, String languageId) {
        // TODO Auto-generated method stub
        return false;
    }

    @Override
    public boolean isAvailableLocale(String languageId) {
        // TODO Auto-generated method stub
        return false;
    }

    @Override
    public boolean isBetaLocale(Locale locale) {
        // TODO Auto-generated method stub
        return false;
    }

    @Override
    public boolean isDuplicateLanguageCode(String languageCode) {
        // TODO Auto-generated method stub
        return false;
    }

    @Override
    public boolean isInheritLocales(long groupId) throws PortalException {
        // TODO Auto-generated method stub
        return false;
    }

    @Override
    public boolean isSameLanguage(Locale locale1, Locale locale2) {
        // TODO Auto-generated method stub
        return false;
    }

    @Override
    public String process(ResourceBundle resourceBundle, Locale locale, String content) {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public void resetAvailableGroupLocales(long groupId) {
        // TODO Auto-generated method stub

    }

    @Override
    public void resetAvailableLocales(long companyId) {
        // TODO Auto-generated method stub

    }

    @Override
    public void updateCookie(HttpServletRequest request, HttpServletResponse response, Locale locale) {
        // TODO Auto-generated method stub

    }

}

获取导入包:com.liferay.portal.kernel.language; version =“ [7.2.0,7.3.0)” _ [已清除]     部署Portlet时出现org.eclipse.osgi.container.Module.start(Module.java:444)错误

0 个答案:

没有答案