distributesservicepropertyhandler.java

来自「intra_mart是日本NDD公司开发的著名企业应用解决方案中间件。集成了J2」· Java 代码 · 共 1,534 行 · 第 1/5 页

JAVA
1,534
字号
            DefaultServicePropertyHandler handler = (DefaultServicePropertyHandler) obj;
            ret = handler.getSystemErrorPagePath(application, service, key,
                    locale);

        } else if (obj instanceof TextFileServicePropertyHandler) {

            TextFileServicePropertyHandler handler = (TextFileServicePropertyHandler) obj;
            ret = handler.getSystemErrorPagePath(application, service, key,
                    locale);

        } else if (obj instanceof XmlServicePropertyHandler) {

            XmlServicePropertyHandler handler = (XmlServicePropertyHandler) obj;
            ret = handler.getSystemErrorPagePath(application, service, key,
                    locale);

        }

        return ret;
    }

    /**
     * 僔僗僥儉椺奜帪偺儁乕僕偺僷僗傪庢摼偟傑偡丅 奩摉偡傞儁乕僕偺僷僗偑庢摼偱偒側偄応崌丄
     * {@link #getSystemErrorPagePath(String)}偱庢摼偝傟傞儁乕僕傪曉偟傑偡丅 偙偺儊僜僢僪偼
     * {@link #getSystemErrorPagePath(String, String, Locale) getSystemErrorPagePath(application, service, (java.util.Locale)null)}
     * 傪屇傫偩偲偒偲摨偠寢壥偵側傝傑偡丅
     * 
     * @param application 傾僾儕働乕僔儑儞ID
     * @param service 僒乕價僗ID
     * @return 慗堏愭偺儁乕僕偺僷僗
     * @throws ServicePropertyException 慗堏愭偺儁乕僕偺僷僗偺庢摼帪偵椺奜偑敪惗
     * @deprecated 偙偺儊僜僢僪偱偼側偔
     *             {@link #getSystemErrorPagePath(String, String, Locale)}
     *             傪巊梡偟偰偔偩偝偄丅
     */
    public String getSystemErrorPagePath(String application, String service)
            throws ServicePropertyException {

        return getSystemErrorPagePath(application, service, (Locale) null);
    }

    /**
     * 僔僗僥儉椺奜帪偺儁乕僕偺僷僗傪庢摼偟傑偡丅 奩摉偡傞儁乕僕偺僷僗偑庢摼偱偒側偄応崌丄
     * {@link #getSystemErrorPagePath(String)}偱庢摼偝傟傞儁乕僕傪曉偟傑偡丅
     * 
     * @param application 傾僾儕働乕僔儑儞ID
     * @param service 僒乕價僗ID
     * @param locale 儘働乕儖
     * @return 慗堏愭偺儁乕僕偺僷僗
     * @throws ServicePropertyException 慗堏愭偺儁乕僕偺僷僗偺庢摼帪偵椺奜偑敪惗
     */
    public String getSystemErrorPagePath(String application, String service,
            Locale locale) throws ServicePropertyException {

        String ret = new String();

        Object obj = getApplicationBundle(application);

        if (obj instanceof DefaultServicePropertyHandler) {

            DefaultServicePropertyHandler handler = (DefaultServicePropertyHandler) obj;
            ret = handler.getSystemErrorPagePath(application, service, locale);

        } else if (obj instanceof TextFileServicePropertyHandler) {

            TextFileServicePropertyHandler handler = (TextFileServicePropertyHandler) obj;
            ret = handler.getSystemErrorPagePath(application, service, locale);

        } else if (obj instanceof XmlServicePropertyHandler) {

            XmlServicePropertyHandler handler = (XmlServicePropertyHandler) obj;
            ret = handler.getSystemErrorPagePath(application, service, locale);

        }

        return ret;
    }

    /**
     * 僔僗僥儉椺奜帪偺儁乕僕偺僷僗傪庢摼偟傑偡丅 奩摉偡傞儁乕僕偺僷僗偑庢摼偱偒側偄応崌丄
     * {@link #getSystemErrorPagePath()}偱庢摼偝傟傞儁乕僕傪曉偟傑偡丅 偙偺儊僜僢僪偼
     * {@link #getSystemErrorPagePath(String, Locale) getSystemErrorPagePath(application, (java.util.Locale)null)}
     * 傪屇傫偩偲偒偲摨偠寢壥偵側傝傑偡丅
     * 
     * @param application 傾僾儕働乕僔儑儞ID
     * @return 慗堏愭偺儁乕僕偺僷僗
     * @throws ServicePropertyException 慗堏愭偺儁乕僕偺僷僗偺庢摼帪偵椺奜偑敪惗
     * @deprecated 偙偺儊僜僢僪偱偼側偔 {@link #getSystemErrorPagePath(String, Locale)}
     *             傪巊梡偟偰偔偩偝偄丅
     */
    public String getSystemErrorPagePath(String application)
            throws ServicePropertyException {

        return getSystemErrorPagePath(application, (Locale) null);
    }

    /**
     * 僔僗僥儉椺奜帪偺儁乕僕偺僷僗傪庢摼偟傑偡丅 奩摉偡傞儁乕僕偺僷僗偑庢摼偱偒側偄応崌丄
     * {@link #getSystemErrorPagePath()}偱庢摼偝傟傞儁乕僕傪曉偟傑偡丅
     * 
     * @param application 傾僾儕働乕僔儑儞ID
     * @param locale 儘働乕儖
     * @return 慗堏愭偺儁乕僕偺僷僗
     * @throws ServicePropertyException 慗堏愭偺儁乕僕偺僷僗偺庢摼帪偵椺奜偑敪惗
     */
    public String getSystemErrorPagePath(String application, Locale locale)
            throws ServicePropertyException {

        String ret = new String();

        Object obj = getApplicationBundle(application);

        if (obj instanceof DefaultServicePropertyHandler) {

            DefaultServicePropertyHandler handler = (DefaultServicePropertyHandler) obj;
            ret = handler.getSystemErrorPagePath(application, locale);

        } else if (obj instanceof TextFileServicePropertyHandler) {

            TextFileServicePropertyHandler handler = (TextFileServicePropertyHandler) obj;
            ret = handler.getSystemErrorPagePath(application, locale);

        } else if (obj instanceof XmlServicePropertyHandler) {

            XmlServicePropertyHandler handler = (XmlServicePropertyHandler) obj;
            ret = handler.getSystemErrorPagePath(application, locale);

        }

        return ret;
    }

    /**
     * 僔僗僥儉椺奜帪偺儁乕僕偺僷僗傪庢摼偟傑偡丅 偙偺儊僜僢僪偼
     * {@link #getSystemErrorPagePath(Locale) getSystemErrorPagePath((java.util.Locale)null)}
     * 傪屇傫偩偲偒偲摨偠寢壥偵側傝傑偡丅
     * 
     * @return 慗堏愭偺儁乕僕偺僷僗
     * @throws ServicePropertyException 慗堏愭偺儁乕僕偺僷僗偺庢摼帪偵椺奜偑敪惗
     * @deprecated 偙偺儊僜僢僪偱偼側偔 {@link #getSystemErrorPagePath(Locale)}傪巊梡偟偰偔偩偝偄丅
     */
    public String getSystemErrorPagePath() throws ServicePropertyException {
        return getSystemErrorPagePath((Locale) null);
    }

    /**
     * 僔僗僥儉椺奜帪偺儁乕僕偺僷僗傪庢摼偟傑偡丅
     * 
     * @param locale 儘働乕儖
     * @return 慗堏愭偺儁乕僕偺僷僗
     * @throws ServicePropertyException 慗堏愭偺儁乕僕偺僷僗偺庢摼帪偵椺奜偑敪惗
     */
    public String getSystemErrorPagePath(Locale locale)
            throws ServicePropertyException {

        return ResourceBundleServicePropertyHandlerUtil
                .getSystemErrorPagePath(getCommonBundle(locale));
    }

    /**
     * 僩儔儞僕僔儑儞偺僋儔僗柤傪庢摼偟傑偡丅 巜掕偝傟偨傾僾儕働乕僔儑儞ID偲僒乕價僗ID偵懳墳偡傞僩儔儞僕僔儑儞柤傪庢摼偟傑偡丅
     * 摿偵愝掕偝傟偰偄側偄応崌丄null偑曉傝傑偡丅 偙偺儊僜僢僪偼
     * {@link #getTransitionName(String, String, Locale) getTransitionName(application, service, (java.util.Locale)null)}
     * 傪屇傫偩偲偒偲摨偠寢壥偵側傝傑偡丅
     * 
     * @param application 傾僾儕働乕僔儑儞ID
     * @param service 僒乕價僗ID
     * @return 僩儔儞僕僔儑儞偺僋儔僗柤丄愝掕偝傟偰偄側偄応崌偼null
     * @throws ServicePropertyException 僩儔儞僕僔儑儞偺僋儔僗柤偺庢摼帪偵椺奜偑敪惗
     * @deprecated 偙偺儊僜僢僪偱偼側偔 {@link #getTransitionName(String, String, Locale)}
     *             傪巊梡偟偰偔偩偝偄丅
     */
    public String getTransitionName(String application, String service)
            throws ServicePropertyException {

        return getTransitionName(application, service, (Locale) null);
    }

    /**
     * 僩儔儞僕僔儑儞偺僋儔僗柤傪庢摼偟傑偡丅 巜掕偝傟偨傾僾儕働乕僔儑儞ID偲僒乕價僗ID偵懳墳偡傞僩儔儞僕僔儑儞柤傪庢摼偟傑偡丅
     * 摿偵愝掕偝傟偰偄側偄応崌丄null偑曉傝傑偡丅
     * 
     * @param application 傾僾儕働乕僔儑儞ID
     * @param service 僒乕價僗ID
     * @param locale 儘働乕儖
     * @return 僩儔儞僕僔儑儞偺僋儔僗柤丄愝掕偝傟偰偄側偄応崌偼null
     * @throws ServicePropertyException 僩儔儞僕僔儑儞偺僋儔僗柤偺庢摼帪偵椺奜偑敪惗
     */
    public String getTransitionName(String application, String service,
            Locale locale) throws ServicePropertyException {

        String ret = new String();

        Object obj = getApplicationBundle(application);

        if (obj instanceof DefaultServicePropertyHandler) {

            DefaultServicePropertyHandler handler = (DefaultServicePropertyHandler) obj;
            ret = handler.getTransitionName(application, service, locale);

        } else if (obj instanceof TextFileServicePropertyHandler) {

            TextFileServicePropertyHandler handler = (TextFileServicePropertyHandler) obj;
            ret = handler.getTransitionName(application, service, locale);

        } else if (obj instanceof XmlServicePropertyHandler) {

            XmlServicePropertyHandler handler = (XmlServicePropertyHandler) obj;
            ret = handler.getTransitionName(application, service, locale);

        }

        return ret;
    }

    /**
     * 僒乕價僗僒乕僽儗僢僩偺僷僗傪庢摼偟傑偡丅
     * 
     * @return 僒乕價僗僒乕僽儗僢僩偺僷僗
     * @throws ServicePropertyException 僒乕價僗僒乕僽儗僢僩偺僷僗偺庢摼帪偵椺奜偑敪惗
     */
    public String getServiceServletPath() throws ServicePropertyException {
        return ResourceBundleServicePropertyHandlerUtil
                .getServiceServletPath(getCommonBundle(new Locale("", "")));
    }

    /**
     * 僐儞僥僉僗僩僷僗傪庢摼偟傑偡丅
     * 
     * @return 僐儞僥僉僗僩僷僗
     * @throws ServicePropertyException 僐儞僥僉僗僩僷僗偺庢摼帪偵椺奜偑敪惗
     * @deprecated 偙偺儊僜僢僪偱偼側偔丄javax.servlet.http.HttpRequest偺getContextPath傪巊梡偡傞傛偆偵偟偰偔偩偝偄丅
     */
    public String getContextPath() throws ServicePropertyException {
        return ResourceBundleServicePropertyHandlerUtil
                .getContextPath(getCommonBundle(new Locale("", "")));
    }

    /**
     * 傾僾儕働乕僔儑儞ID偵奩摉偡傞僷儔儊乕僞柤傪庢摼偟傑偡丅 愝掕偝傟偰偄側偄応崌丄
     * {@link ServicePropertyHandler#DEFAULT_APPLICATION_PARAMETER}
     * 偱掕媊偝傟偰偄傞抣傪曉偟傑偡丅
     * 
     * @return 傾僾儕働乕僔儑儞ID偵奩摉偡傞僷儔儊乕僞柤
     * @throws ServicePropertyException 傾僾儕働乕僔儑儞ID偵奩摉偡傞僷儔儊乕僞柤偺庢摼帪偵椺奜偑敪惗
     */
    public String getApplicationParamName() throws ServicePropertyException {
        return ResourceBundleServicePropertyHandlerUtil
                .getApplicationParamName(getCommonBundle(new Locale("", "")));
    }

    /**
     * 僒乕價僗ID偵奩摉偡傞僷儔儊乕僞柤傪庢摼偟傑偡丅 愝掕偝傟偰偄側偄応崌丄
     * {@link ServicePropertyHandler#DEFAULT_SERVICE_PARAMETER}偱掕媊偝傟偰偄傞抣傪曉偟傑偡丅
     * 
     * @return 僒乕價僗ID偵奩摉偡傞僷儔儊乕僞柤
     * @throws ServicePropertyException 僒乕價僗ID偵奩摉偡傞僷儔儊乕僞柤偺庢摼帪偵椺奜偑敪惗
     */
    public String getServiceParamName() throws ServicePropertyException {
        return ResourceBundleServicePropertyHandlerUtil
                .getServiceParamName(getCommonBundle(new Locale("", "")));
    }

    /**
     * 椺奜儁乕僕偵慗堏偡傞偲偒偵javax.servlet.http.HttpServletRequest偵椺奜忣曬傪懏惈偲偟偰捛壛偡傞応崌偺懏惈柤傪庢摼偟傑偡丅
     * 愝掕偝傟偰偄側偄応崌丄 {@link ServicePropertyHandler#DEFAULT_EXCEPTION_ATTRIBUTE}
     * 偱掕媊偝傟偰偄傞抣傪曉偟傑偡丅
     * 
     * @return 椺奜偺懏惈柤
     * @throws ServicePropertyException 懏惈柤偺庢摼帪偵椺奜偑敪惗
     */
    public String getExceptionAttributeName() throws ServicePropertyException {
        try {
            return ResourceBundleServicePropertyHandlerUtil
                    .getExceptionAttributeName(getCommonBundle(new Locale("",
                            "")));
        } catch (MissingResourceException e) {
            return DEFAULT_EXCEPTION_ATTRIBUTE;
        }
    }

    /**
     * 儘僌僀儞儐乕僓偑巊梡偡傞僄儞僐乕僪傪曐懚偟偰偍偔偲偒偺懏惈柤傪庢摼偟傑偡丅 愝掕偝傟偰偄側偄応崌丄
     * {@link #DEFAULT_ENCODING_ATTRIBUTE}偱掕媊偝傟偰偄傞抣傪曉偟傑偡丅
     * 
     * @return 僄儞僐乕僪偺懏惈柤
     * @throws ServicePropertyException 懏惈柤偺庢摼帪偵椺奜偑敪惗
     */
    public String getEncodingAttributeName() throws ServicePropertyException {
        return ResourceBundleServicePropertyHandlerUtil
                .getEncodingAttributeName(getCommonBundle(new Locale("", "")));
    }

    /**
     * 儘僌僀儞儐乕僓偑巊梡偡傞儘働乕儖傪曐懚偟偰偍偔偲偒偺懏惈柤傪庢摼偟傑偡丅 愝掕偝傟偰偄側偄応崌丄
     * {@link #DEFAULT_LOCALE_ATTRIBUTE }偱掕媊偝傟偰偄傞抣傪曉偟傑偡 丅
     * 
     * @return 儘働乕儖偺懏惈柤
     * @throws ServicePropertyException 懏惈柤偺庢摼帪偵椺奜偑敪惗
     */
    public String getLocaleAttributeName() throws ServicePropertyException {
        return ResourceBundleServicePropertyHandlerUtil
                .getLocaleAttributeName(getCommonBundle(new Locale("", "")));
    }

}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?