本文整理了Java中org.vertexium.Element.getHiddenVisibilities()
方法的一些代码示例,展示了Element.getHiddenVisibilities()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Element.getHiddenVisibilities()
方法的具体详情如下:
包路径:org.vertexium.Element
类名称:Element
方法名:getHiddenVisibilities
[英]Gets the list of hidden visibilities
[中]获取隐藏可见性的列表
代码示例来源:origin: org.vertexium/vertexium-core
/**
* Given the supplied authorizations is this element hidden?
*
* @param authorizations the authorizations to check against.
* @return true, if it would be hidden from those authorizations.
*/
default boolean isHidden(Authorizations authorizations) {
for (Visibility visibility : getHiddenVisibilities()) {
if (authorizations.canRead(visibility)) {
return true;
}
}
return false;
}
代码示例来源:origin: visallo/vertexium
/**
* Given the supplied authorizations is this element hidden?
*
* @param authorizations the authorizations to check against.
* @return true, if it would be hidden from those authorizations.
*/
default boolean isHidden(Authorizations authorizations) {
for (Visibility visibility : getHiddenVisibilities()) {
if (authorizations.canRead(visibility)) {
return true;
}
}
return false;
}
代码示例来源:origin: org.vertexium/vertexium-core
@Override
protected boolean isMatch(Element element) {
for (String authorization : authorizations) {
if (element.getVisibility().hasAuthorization(authorization)) {
return true;
}
boolean hiddenVisibilityMatches = StreamUtils.stream(element.getHiddenVisibilities())
.anyMatch(visibility -> visibility.hasAuthorization(authorization));
if (hiddenVisibilityMatches) {
return true;
}
boolean propertyMatches = StreamUtils.stream(element.getProperties())
.anyMatch(property -> {
if (property.getVisibility().hasAuthorization(authorization)) {
return true;
}
return StreamUtils.stream(property.getHiddenVisibilities())
.anyMatch(visibility -> visibility.hasAuthorization(authorization));
});
if (propertyMatches) {
return true;
}
}
return false;
}
代码示例来源:origin: visallo/vertexium
@Override
protected boolean isMatch(Element element) {
for (String authorization : authorizations) {
if (element.getVisibility().hasAuthorization(authorization)) {
return true;
}
boolean hiddenVisibilityMatches = StreamUtils.stream(element.getHiddenVisibilities())
.anyMatch(visibility -> visibility.hasAuthorization(authorization));
if (hiddenVisibilityMatches) {
return true;
}
boolean propertyMatches = StreamUtils.stream(element.getProperties())
.anyMatch(property -> {
if (property.getVisibility().hasAuthorization(authorization)) {
return true;
}
return StreamUtils.stream(property.getHiddenVisibilities())
.anyMatch(visibility -> visibility.hasAuthorization(authorization));
});
if (propertyMatches) {
return true;
}
}
return false;
}
代码示例来源:origin: visallo/vertexium
for (Visibility hiddenVisibility : element.getHiddenVisibilities()) {
String hiddenVisibilityPropertyName = addVisibilityToPropertyName(graph, HIDDEN_VERTEX_FIELD_NAME, hiddenVisibility);
if (!isPropertyInIndex(graph, HIDDEN_VERTEX_FIELD_NAME, hiddenVisibility)) {
代码示例来源:origin: org.vertexium/vertexium-elasticsearch5
for (Visibility hiddenVisibility : element.getHiddenVisibilities()) {
String hiddenVisibilityPropertyName = addVisibilityToPropertyName(graph, HIDDEN_VERTEX_FIELD_NAME, hiddenVisibility);
if (!isPropertyInIndex(graph, HIDDEN_VERTEX_FIELD_NAME, hiddenVisibility)) {
代码示例来源:origin: org.vertexium/vertexium-elasticsearch-singledocument
for (Visibility hiddenVisibility : element.getHiddenVisibilities()) {
String hiddenVisibilityPropertyName = addVisibilityToPropertyName(graph, HIDDEN_VERTEX_FIELD_NAME, hiddenVisibility);
if (!isPropertyInIndex(graph, hiddenVisibilityPropertyName)) {
内容来源于网络,如有侵权,请联系作者删除!