當前位置: 首頁>>代碼示例>>Java>>正文


Java ComponentConfig.getKeystoreInfo方法代碼示例

本文整理匯總了Java中org.ofbiz.base.component.ComponentConfig.getKeystoreInfo方法的典型用法代碼示例。如果您正苦於以下問題:Java ComponentConfig.getKeystoreInfo方法的具體用法?Java ComponentConfig.getKeystoreInfo怎麽用?Java ComponentConfig.getKeystoreInfo使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.ofbiz.base.component.ComponentConfig的用法示例。


在下文中一共展示了ComponentConfig.getKeystoreInfo方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: storeComponentKeyStore

import org.ofbiz.base.component.ComponentConfig; //導入方法依賴的package包/類
public static void storeComponentKeyStore(String componentName, String keyStoreName, KeyStore store) throws IOException, GenericConfigException, NoSuchAlgorithmException, CertificateException, KeyStoreException {
    ComponentConfig.KeystoreInfo ks = ComponentConfig.getKeystoreInfo(componentName, keyStoreName);
    File file = FileUtil.getFile(ks.createResourceHandler().getFullLocation());
    FileOutputStream out = new FileOutputStream(file);
    try {
        store.store(out, ks.getPassword().toCharArray());
    } finally {
        out.close();
    }
}
 
開發者ID:ilscipio,項目名稱:scipio-erp,代碼行數:11,代碼來源:KeyStoreUtil.java

示例2: getComponentKeyStore

import org.ofbiz.base.component.ComponentConfig; //導入方法依賴的package包/類
public static KeyStore getComponentKeyStore(String componentName, String keyStoreName) throws IOException, GeneralSecurityException, GenericConfigException {
    ComponentConfig.KeystoreInfo ks = ComponentConfig.getKeystoreInfo(componentName, keyStoreName);
    // SCIPIO: Prevent confusing NPE
    if (ks == null) {
        throw new IOException("Could not get keystore info for given keystore; not found");
    }
    return getStore(ks.createResourceHandler().getURL(), ks.getPassword(), ks.getType());
}
 
開發者ID:ilscipio,項目名稱:scipio-erp,代碼行數:9,代碼來源:KeyStoreUtil.java

示例3: getClientTransportFactory

import org.ofbiz.base.component.ComponentConfig; //導入方法依賴的package包/類
public XmlRpcTransportFactory getClientTransportFactory() {
    if (keyStoreComponent == null || keyStoreName == null || keyAlias == null) {
        return this.getTransportFactory();
    }

    ComponentConfig.KeystoreInfo ks = ComponentConfig.getKeystoreInfo(keyStoreComponent, keyStoreName);
    KeyStore keyStore = null;
    try {
        keyStore = KeyStoreUtil.getStore(ks.createResourceHandler().getURL(), ks.getPassword(), ks.getType());
    } catch (Exception e) {
        Debug.logError(e, "Unable to load keystore: " + keyStoreName, module);
    }

    return new AliasSupportedTransportFactory(this, keyStore, ks.getPassword(), keyAlias);
}
 
開發者ID:ilscipio,項目名稱:scipio-erp,代碼行數:16,代碼來源:XmlRpcClient.java

示例4: getComponentKeyStore

import org.ofbiz.base.component.ComponentConfig; //導入方法依賴的package包/類
public static KeyStore getComponentKeyStore(String componentName, String keyStoreName) throws IOException, GeneralSecurityException, GenericConfigException {
    ComponentConfig.KeystoreInfo ks = ComponentConfig.getKeystoreInfo(componentName, keyStoreName);
    return getStore(ks.createResourceHandler().getURL(), ks.getPassword(), ks.getType());
}
 
開發者ID:gildaslemoal,項目名稱:elpi,代碼行數:5,代碼來源:KeyStoreUtil.java


注:本文中的org.ofbiz.base.component.ComponentConfig.getKeystoreInfo方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。