本文整理了Java中com.evolveum.midpoint.prism.Item.setPrismContext()
方法的一些代码示例,展示了Item.setPrismContext()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Item.setPrismContext()
方法的具体详情如下:
包路径:com.evolveum.midpoint.prism.Item
类名称:Item
方法名:setPrismContext
暂无
代码示例来源:origin: Evolveum/midpoint
/**
* Adds an item to a property container.
*
* @param item item to add.
* @throws SchemaException
* @throws IllegalArgumentException an attempt to add value that already exists
*/
public <IV extends PrismValue,ID extends ItemDefinition> boolean add(Item<IV,ID> item, boolean checkUniqueness) throws SchemaException {
checkMutability();
if (item.getElementName() == null) {
throw new IllegalArgumentException("Cannot add item without a name to value of container "+getParent());
}
if (checkUniqueness && findItem(item.getElementName(), Item.class) != null) {
throw new IllegalArgumentException("Item " + item.getElementName() + " is already present in " + this.getClass().getSimpleName());
}
item.setParent(this);
PrismContext prismContext = getPrismContext();
if (prismContext != null) {
item.setPrismContext(prismContext);
}
if (getComplexTypeDefinition() != null && item.getDefinition() == null) {
item.applyDefinition((ID)determineItemDefinition(item.getElementName(), getComplexTypeDefinition()), false);
}
if (items == null) {
items = new ArrayList<>();
}
return items.add(item);
}
代码示例来源:origin: Evolveum/midpoint
((Item) originalValue).setPrismContext(prismContext); // TODO - or revive? Or make sure prismContext is set here?
内容来源于网络,如有侵权,请联系作者删除!