本文整理汇总了Java中org.apache.commons.collections.Factory类的典型用法代码示例。如果您正苦于以下问题:Java Factory类的具体用法?Java Factory怎么用?Java Factory使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Factory类属于org.apache.commons.collections包,在下文中一共展示了Factory类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: prepareGroupSearchBases
import org.apache.commons.collections.Factory; //导入依赖的package包/类
/**
* Prepares the list of the group search base for a dynamic binding in Spring MVC.
*/
@SuppressWarnings("unchecked")
private void prepareGroupSearchBases() {
List<LdapSearchBaseDefinition> searchBases = ListUtils.lazyList(
new ArrayList<LdapSearchBaseDefinition>(), new Factory() {
@Override
public Object create() {
return LdapSearchBaseDefinition.Factory.newInstance();
}
});
if (groupSyncConfig.getGroupSearch().getSearchBases().isEmpty()) {
searchBases.add(LdapSearchBaseDefinition.Factory.newInstance());
} else {
searchBases.addAll(groupSyncConfig.getGroupSearch().getSearchBases());
}
groupSyncConfig.getGroupSearch().setSearchBases(searchBases);
}
开发者ID:Communote,项目名称:communote-server,代码行数:22,代码来源:LdapConfigurationForm.java
示例2: prepareUserSearchBases
import org.apache.commons.collections.Factory; //导入依赖的package包/类
/**
* Prepares the list of the user search base for a dynamic binding in Spring MVC.
*/
@SuppressWarnings("unchecked")
private void prepareUserSearchBases() {
List<LdapSearchBaseDefinition> searchBases = ListUtils.lazyList(
new ArrayList<LdapSearchBaseDefinition>(), new Factory() {
@Override
public Object create() {
return LdapSearchBaseDefinition.Factory.newInstance();
}
});
if (config.getUserSearch().getSearchBases().isEmpty()) {
searchBases.add(LdapSearchBaseDefinition.Factory.newInstance());
} else {
searchBases.addAll(config.getUserSearch().getSearchBases());
}
config.getUserSearch().setSearchBases(searchBases);
}
开发者ID:Communote,项目名称:communote-server,代码行数:22,代码来源:LdapConfigurationForm.java
示例3: setConfig
import org.apache.commons.collections.Factory; //导入依赖的package包/类
/**
* Sets the config.
*
* @param configuration
* the new config (optional)
*/
private void setConfig(LdapConfiguration configuration) {
Assert.notNull(configuration, "ldap config must be set");
config = configuration;
prepareUserSearchBases();
prepareUserPropertyMapping();
initAuthenticationMode(config.getSaslMode());
// in case of a saved config with inactive groupSync
if (config.getGroupSyncConfig() == null) {
groupSyncConfig = LdapGroupSyncConfiguration.Factory.newInstance();
groupSyncConfig.setGroupSearch(LdapSearchConfiguration.Factory.newInstance());
} else {
groupSyncConfig = config.getGroupSyncConfig();
}
prepareGroupSearchBases();
prepareGroupPropertyMapping();
}
开发者ID:Communote,项目名称:communote-server,代码行数:26,代码来源:LdapConfigurationForm.java
示例4: getSourcePlateTypesForEachAssayPlate
import org.apache.commons.collections.Factory; //导入依赖的package包/类
private MultiMap getSourcePlateTypesForEachAssayPlate(CherryPickRequest cherryPickRequest)
{
MultiMap assayPlateName2PlateTypes = MultiValueMap.decorate(new HashMap(),
new Factory()
{
public Object create() { return new HashSet(); }
});
for (LabCherryPick cherryPick : cherryPickRequest.getLabCherryPicks()) {
if (cherryPick.isAllocated() && cherryPick.isMapped()) {
assayPlateName2PlateTypes.put(cherryPick.getAssayPlate().getName(),
cherryPick.getSourceCopy().findPlate(cherryPick.getSourceWell().getPlateNumber()).getPlateType());
}
}
return assayPlateName2PlateTypes;
}
开发者ID:hmsiccbl,项目名称:screensaver,代码行数:17,代码来源:CherryPickRequestPlateMapFilesBuilder.java
示例5: reset
import org.apache.commons.collections.Factory; //导入依赖的package包/类
@Override
@SuppressWarnings("unchecked")
public void reset(ActionMapping mapping, HttpServletRequest request) {
super.reset(mapping, request);
this.drugs = ListUtils.lazyList(new ArrayList<BpmhDrug>(), new Factory() {
public BpmhDrug create() {
return new BpmhDrug();
}
});
setConfirm(false);
}
开发者ID:williamgrosset,项目名称:OSCAR-ConCert,代码行数:14,代码来源:BpmhFormBean.java
示例6: LdapConfigurationForm
import org.apache.commons.collections.Factory; //导入依赖的package包/类
/**
* Instantiates a new ldap configuration form.
*
* @param config
* the config
*/
public LdapConfigurationForm(LdapConfiguration config) {
if (config == null) {
config = LdapConfiguration.Factory.newInstance();
config.setUserSearch(LdapSearchConfiguration.Factory.newInstance());
configurationExists = false;
passwordChanged = true;
}
this.setConfig(config);
}
开发者ID:Communote,项目名称:communote-server,代码行数:16,代码来源:LdapConfigurationForm.java
示例7: factory
import org.apache.commons.collections.Factory; //导入依赖的package包/类
public static Factory factory() {
return LegCommand::new;
}
开发者ID:citerus,项目名称:dddsample-core,代码行数:4,代码来源:RouteAssignmentCommand.java
示例8: buildCherryPickFiles
import org.apache.commons.collections.Factory; //导入依赖的package包/类
@SuppressWarnings("unchecked")
/**
* Normally, we create 1 file per assay plate. However, in the case where an
* assay plate is comprised of wells from library copy plates that have
* different plate types, we need to generate a separate file for each source
* plate type (i.e., the assay plate will be defined over multiple files).
* @return a MultiMap that partitions the cherry picks by file,
* ordering both the file names and cherry picks for each file.
*/
private MultiMap/*<String,SortedSet<CherryPick>>*/ buildCherryPickFiles(CherryPickRequest cherryPickRequest,
Set<CherryPickAssayPlate> forPlates)
{
MultiMap assayPlate2SourcePlateTypes = getSourcePlateTypesForEachAssayPlate(cherryPickRequest);
MultiMap result = MultiValueMap.decorate(new TreeMap<String,SortedSet<LabCherryPick>>(),
new Factory()
{
public Object create() { return new TreeSet<LabCherryPick>(PlateMappingCherryPickComparator.getInstance()); }
});
// HACK: transform set of CPAP into a set of IDs, for purpose of checking
// set membership; we can't rely upon CPAP.equals(), since we're comparing
// non-managed entities with managed entities, and therefore we do not have
// the guarantee of instance equality for entities with the same ID
Set<Serializable> forPlateIds = new HashSet<Serializable>( forPlates .size());
for (CherryPickAssayPlate cpap : forPlates) {
if (cpap.getEntityId() == null) {
throw new IllegalArgumentException("all members of 'forPlates' must already be persisted and have a database identifier");
}
forPlateIds.add(cpap.getEntityId());
}
for (LabCherryPick cherryPick : cherryPickRequest.getLabCherryPicks()) {
if (cherryPick.isAllocated()) {
CherryPickAssayPlate assayPlate = cherryPick.getAssayPlate();
if (forPlates == null || (assayPlate != null && forPlateIds.contains(assayPlate.getEntityId()))) {
Set<PlateType> sourcePlateTypes = (Set<PlateType>) assayPlate2SourcePlateTypes.get(assayPlate.getName());
String fileName = makeFilename(cherryPick, sourcePlateTypes.size());
result.put(fileName, cherryPick);
}
}
}
return result;
}
开发者ID:hmsiccbl,项目名称:screensaver,代码行数:45,代码来源:CherryPickRequestPlateMapFilesBuilder.java
注:本文中的org.apache.commons.collections.Factory类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论