本文整理了Java中org.xwiki.context.ExecutionContext.removeProperty()
方法的一些代码示例,展示了ExecutionContext.removeProperty()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ExecutionContext.removeProperty()
方法的具体详情如下:
包路径:org.xwiki.context.ExecutionContext
类名称:ExecutionContext
方法名:removeProperty
暂无
代码示例来源: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: 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-icon-default
/**
* @param isonSet the icon set stored in the context
*/
public void setIconSet(IconSet isonSet)
{
ExecutionContext econtext = this.execution.getContext();
if (econtext != null) {
if (isonSet != null) {
econtext.setProperty(EPROPERTY_ICON, isonSet);
} else {
econtext.removeProperty(EPROPERTY_ICON);
}
}
}
}
代码示例来源:origin: org.xwiki.platform/xwiki-platform-notifications-filters-api
private void clearCache(DocumentReference user)
{
if (user == null) {
return;
}
String userId = serializer.serialize(user);
cache.remove(userId);
ExecutionContext context = execution.getContext();
for (String key: new ArrayList<>(context.getProperties().keySet())) {
if (key.startsWith(USER_TOGGLEABLE_FILTER_PREFERENCES)) {
context.removeProperty(key);
}
}
}
}
代码示例来源:origin: org.xwiki.platform/xwiki-platform-office-viewer
@Override
public String view(AttachmentReference attachmentReference, Map<String, String> parameters)
{
// Clear previous caught exception.
this.execution.getContext().removeProperty(OFFICE_VIEW_EXCEPTION);
try {
DocumentReference documentReference = attachmentReference.getDocumentReference();
// Check whether current user has view rights on the document containing the attachment.
if (!this.documentAccessBridge.isDocumentViewable(documentReference)) {
throw new RuntimeException("Inadequate privileges.");
}
// Create the view and render the result.
Syntax fromSyntax = this.documentAccessBridge.getTranslatedDocumentInstance(documentReference).getSyntax();
Syntax toSyntax = Syntax.XHTML_1_0;
return render(this.officeViewer.createView(attachmentReference, parameters), fromSyntax, toSyntax);
} catch (Exception e) {
// Save caught exception.
this.execution.getContext().setProperty(OFFICE_VIEW_EXCEPTION, e);
this.logger.error("Failed to view office document: " + attachmentReference, e);
return null;
}
}
代码示例来源:origin: org.xwiki.commons/xwiki-commons-extension-api
context.removeProperty(CONTEXTKEY_PLAN);
代码示例来源:origin: org.xwiki.commons/xwiki-commons-extension-api
context.removeProperty(CONTEXTKEY_PLAN);
内容来源于网络,如有侵权,请联系作者删除!