I assume one dictionary of which there can be multiple versions. Of course the same principle can be applied to multiple dictionaries.
First implement some mechanism for storing the default version of the dictionary, and that will be retrieved every time before calling the rules repository. I use a properties file for that, because you can change a properties file dynamically. Then have some page from which the user can pick an available version from a list. Once a version has been chosen that differs from the default, that will be the version used for that user session.
Now how to get the versions of a dictionary from a repository? That can be done using the following Java code snippet, which is based on a WebDAV repository:
// repositoryURL is a String containing the URL to your repository
// rulesDictionaryName is a String containing the name of the dictionary
RepositoryType repositoryType =
RepositoryManager.getRegisteredRepositoryType("oracle.rules.sdk.store.webdav");
RuleRepository rulesRepository =
RepositoryManager.createRuleRepositoryInstance(repositoryType);
RepositoryContext repositoryContext = new RepositoryContext();
repositoryContext.setProperty("oracle.rules.sdk.store.webdav.url", repositoryURL);
rulesRepository.init(repositoryContext);
dictionaryVersions = rulesRepository.getMarkerNames(rulesDictionaryName);
for (int i=0; i < dictionaryVersions.size(); i++)
{
dictionaryVersions.set(i, ((String)dictionaryVersions.get(i)));
}
When the test was satisfactory, the chosen version can be stored in the properties file, making the default for every new user session.
4 comments:
牙醫,植牙,矯正,矯正牙齒,皮膚科,痘痘,中醫,飛梭雷射,毛孔粗大,醫學美容,痘痘,seo,關鍵字行銷,自然排序,網路行銷,自然排序,關鍵字行銷、seo,部落格行銷,網路行銷,seo,關鍵字行銷,自然排序,部落格行銷,網路行銷,牛舌餅,婚紗,台中婚紗,腳臭,腳臭,腳臭,腳臭,腳臭,腳臭,腳臭,腳臭,高雄婚紗,街舞。
小產,雞精,性感,辣妹,雷射溶脂,雙下巴,抽脂,瘦小腹,微晶瓷,電波拉皮,淨膚雷射,清潔公司,居家清潔,牙周病,牙齒矯正,植牙,牙周病,矯正,植牙。
牙醫,植牙,矯正,矯正牙齒,皮膚科,痘痘,中醫,飛梭雷射,毛孔粗大,醫學美容,痘痘,seo,關鍵字行銷,自然排序,網路行銷,自然排序,關鍵字行銷、seo,部落格行銷,網路行銷,seo,關鍵字行銷,自然排序,部落格行銷,網路行銷,牛舌餅,婚紗,台中婚紗,腳臭,腳臭,腳臭,腳臭,腳臭,腳臭,腳臭,腳臭,街舞,小產,雞精,性感,辣妹,雷射溶脂,雙下巴,抽脂,瘦小腹,微晶瓷,電波拉皮,淨膚雷射,清潔公司,居家清潔,牙周病,牙齒矯正,植牙,牙周病,矯正,植牙。
Switches, select the event, a very long time, if the notice ... Whatever the reason, if too long everyone will be uncontrollable. Statements do not spend too long for them I wrote, we all have seen one of these other peoples codes.
croatia flights
Post a Comment