本文整理汇总了Java中org.wso2.carbon.user.core.config.RealmConfigXMLProcessor类的典型用法代码示例。如果您正苦于以下问题:Java RealmConfigXMLProcessor类的具体用法?Java RealmConfigXMLProcessor怎么用?Java RealmConfigXMLProcessor使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
RealmConfigXMLProcessor类属于org.wso2.carbon.user.core.config包,在下文中一共展示了RealmConfigXMLProcessor类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setup
import org.wso2.carbon.user.core.config.RealmConfigXMLProcessor; //导入依赖的package包/类
public void setup() throws UserStoreException {
try {
RealmConfigXMLProcessor builder = new RealmConfigXMLProcessor();
InputStream inStream = this.getClass().getResourceAsStream("/users/user-mgt-users.xml");
try {
this.bootstrapRealmConfig = builder.buildRealmConfiguration(inStream);
} finally {
inStream.close();
}
} catch (Exception e) {
String msg = "Failed to initialize the user manager. ";
throw new UserStoreException(msg, e);
}
this.tenantManager = new InMemoryTenantManager();
}
示例2: buildRealmConfigWithJDBCConnectionUrl
import org.wso2.carbon.user.core.config.RealmConfigXMLProcessor; //导入依赖的package包/类
public static RealmConfiguration buildRealmConfigWithJDBCConnectionUrl(InputStream inStream,
String connectionUrl) throws UserStoreException {
RealmConfigXMLProcessor builder = new RealmConfigXMLProcessor();
RealmConfiguration realmConfig = builder.buildRealmConfiguration(inStream);
Map<String, String> map = realmConfig.getRealmProperties();
map.put(JDBC_URL_PROPERTY_NAME, connectionUrl);
return realmConfig;
}