本文整理了Java中org.xwiki.context.ExecutionContext.hasProperty()
方法的一些代码示例,展示了ExecutionContext.hasProperty()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ExecutionContext.hasProperty()
方法的具体详情如下:
包路径:org.xwiki.context.ExecutionContext
类名称:ExecutionContext
方法名:hasProperty
暂无
代码示例来源:origin: org.xwiki.platform/xwiki-platform-notifications-filters-api
@Override
public Map<String, Boolean> getToggeableFilterActivations(DocumentReference user) throws NotificationException
{
// We need to store the user reference in the cache's key, otherwise all users of the same context will share
// the same cache, which can happen when a notification email is triggered.
final String contextEntry = String.format(CONTEXT_KEY_FORMAT, USER_TOGGLEABLE_FILTER_PREFERENCES,
serializer.serialize(user));
ExecutionContext context = execution.getContext();
if (context.hasProperty(contextEntry)) {
return (Map<String, Boolean>) context.getProperty(contextEntry);
}
Map<String, Boolean> values = modelBridge.getToggeableFilterActivations(user);
context.setProperty(contextEntry, values);
return values;
}
代码示例来源:origin: phenotips/phenotips
public void clear()
{
this.execution.getContext().removeProperty(CONTEXT_KEY);
if (this.execution.getContext().hasProperty(MESSAGES_KEY)) {
this.execution.getContext().removeProperty(MESSAGES_KEY);
}
}
代码示例来源:origin: org.xwiki.platform/xwiki-platform-url-api
@Override
public void initialize(ExecutionContext context) throws ExecutionContextException
{
if (!context.hasProperty(DefaultURLContextManager.CONTEXT_KEY)) {
context.newProperty(DefaultURLContextManager.CONTEXT_KEY)
.inherited()
.initial(this.configuration.getURLFormatId())
.declare();
}
}
}
代码示例来源:origin: org.phenotips/patient-tools
public void clear()
{
this.execution.getContext().removeProperty(CONTEXT_KEY);
if (this.execution.getContext().hasProperty(MESSAGES_KEY)) {
this.execution.getContext().removeProperty(MESSAGES_KEY);
}
}
代码示例来源:origin: org.xwiki.commons/xwiki-commons-velocity
@Override
public void initialize(ExecutionContext executionContext) throws ExecutionContextException
{
try {
if (!executionContext.hasProperty(VELOCITY_CONTEXT_ID)) {
VelocityContext context = this.velocityContextFactory.createContext();
executionContext.newProperty(VELOCITY_CONTEXT_ID)
.cloneValue()
.inherited()
.initial(context)
.declare();
}
} catch (XWikiVelocityException e) {
throw new ExecutionContextException("Failed to initialize Velocity Context", e);
}
}
}
代码示例来源:origin: org.xwiki.platform/xwiki-platform-container-servlet
ExecutionContext ec = this.execution.getContext();
String key = "xwikicontext";
if (ec.hasProperty(key)) {
ec.setProperty(key, xwikiContext);
} else {
内容来源于网络,如有侵权,请联系作者删除!