本文整理了Java中org.ff4j.utils.Util.assertParamHasLength()
方法的一些代码示例,展示了Util.assertParamHasLength()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.assertParamHasLength()
方法的具体详情如下:
包路径:org.ff4j.utils.Util
类名称:Util
方法名:assertParamHasLength
[英]Parameter validation.
[中]参数验证。
代码示例来源:origin: ff4j/ff4j
/** {@inheritDoc} */
@Override
public boolean existProperty(String name) {
Util.assertParamHasLength(name, "Property name");
return wrapper.getCacheProperties().get(name) != null;
}
代码示例来源:origin: ff4j/ff4j
/** {@inheritDoc} */
@Override
public boolean exist(String uid) {
Util.assertParamHasLength(uid, "Feature identifier");
return getCache().get(uid) != null;
}
代码示例来源:origin: ff4j/ff4j
/** {@inheritDoc} */
@Override
public boolean exist(String uid) {
Util.assertParamHasLength(uid, "Feature identifier");
return getCacheManager().getFeature(uid) != null;
}
代码示例来源:origin: ff4j/ff4j
/** {@inheritDoc} */
@Override
public boolean existProperty(String name) {
Util.assertParamHasLength(name, "Property name");
return getCacheManager().getProperty(name) != null;
}
代码示例来源:origin: ff4j/ff4j
/** {@inheritDoc} */
@Override
public void grantRoleOnFeature(String flipId, String roleName) {
Util.assertParamHasLength(roleName, "roleName (#2)");
// retrieve
Feature f = read(flipId);
// modify
f.getPermissions().add(roleName);
// persist modification
update(f);
}
代码示例来源:origin: ff4j/ff4j
/** {@inheritDoc} */
@Override
public void removeRoleFromFeature(String flipId, String roleName) {
Util.assertParamHasLength(roleName, "roleName (#2)");
// retrieve
Feature f = read(flipId);
f.getPermissions().remove(roleName);
// persist modification
update(f);
}
代码示例来源:origin: ff4j/ff4j
/** {@inheritDoc} */
@Override
public void removeRoleFromFeature(String flipId, String roleName) {
Util.assertParamHasLength(roleName, "roleName (#2)");
// retrieve
Feature f = read(flipId);
f.getPermissions().remove(roleName);
// persist modification
update(f);
}
代码示例来源:origin: ff4j/ff4j
/** {@inheritDoc} */
@Override
public void removeRoleFromFeature(String flipId, String roleName) {
Util.assertParamHasLength(roleName, "roleName (#2)");
// retrieve
Feature f = read(flipId);
f.getPermissions().remove(roleName);
// persist modification
update(f);
}
代码示例来源:origin: ff4j/ff4j
/** {@inheritDoc} */
@Override
public void grantRoleOnFeature(String flipId, String roleName) {
Util.assertParamHasLength(roleName, "roleName (#2)");
// retrieve
Feature f = read(flipId);
// modify
f.getPermissions().add(roleName);
// persist modification
update(f);
}
代码示例来源:origin: ff4j/ff4j
/** {@inheritDoc} */
@Override
public void grantRoleOnFeature(String flipId, String roleName) {
Util.assertParamHasLength(roleName, "roleName (#2)");
// retrieve
Feature f = read(flipId);
// modify
f.getPermissions().add(roleName);
// persist modification
update(f);
}
代码示例来源:origin: ff4j/ff4j
/** {@inheritDoc} */
@Override
public void grantRoleOnFeature(String flipId, String roleName) {
Util.assertParamHasLength(roleName, "roleName (#2)");
// retrieve
Feature f = read(flipId);
// modify
f.getPermissions().add(roleName);
// persist modification
update(f);
}
代码示例来源:origin: ff4j/ff4j
/** {@inheritDoc} */
@Override
public void removeRoleFromFeature(String flipId, String roleName) {
Util.assertParamHasLength(roleName, "roleName (#2)");
// retrieve
Feature f = read(flipId);
f.getPermissions().remove(roleName);
// persist modification
update(f);
}
代码示例来源:origin: ff4j/ff4j
/** {@inheritDoc} */
@Override
public void addToGroup(String featureId, String groupName) {
Util.assertParamHasLength(groupName, "groupName (#2)");
// retrieve
Feature f = read(featureId);
f.setGroup(groupName);
// persist modification
update(f);
}
代码示例来源:origin: ff4j/ff4j
/** {@inheritDoc} */
@Override
public void addToGroup(String featureId, String groupName) {
Util.assertParamHasLength(groupName, "groupName (#2)");
// retrieve
Feature f = read(featureId);
f.setGroup(groupName);
// persist modification
update(f);
}
代码示例来源:origin: ff4j/ff4j
/** {@inheritDoc} */
@Override
public void addToGroup(String featureId, String groupName) {
Util.assertParamHasLength(groupName, "groupName (#2)");
// retrieve
Feature f = read(featureId);
f.setGroup(groupName);
// persist modification
update(f);
}
代码示例来源:origin: ff4j/ff4j
/** {@inheritDoc} */
@Override
public void addToGroup(String featureId, String groupName) {
Util.assertParamHasLength(groupName, "groupName (#2)");
// retrieve
Feature f = read(featureId);
f.setGroup(groupName);
// persist modification
update(f);
}
代码示例来源:origin: ff4j/ff4j
/** {@inheritDoc} */
@Override
public boolean existProperty(String name) {
Util.assertParamHasLength(name, "Property name");
return getDriver().existKey(getDriver().getPropertyKey(name));
}
代码示例来源:origin: ff4j/ff4j
/** {@inheritDoc} */
@Override
public boolean exist(String uid) {
Util.assertParamHasLength(uid, "Feature identifier");
// or : getDriver().getFeatureList().contains(uid)
return getDriver().existKey(getDriver().getFeatureKey(uid));
}
代码示例来源:origin: ff4j/ff4j
/** {@inheritDoc} */
@Override
public void removeFromGroup(String featureId, String groupName) {
Util.assertParamHasLength(groupName, "groupName (#2)");
if (!existGroup(groupName)) {
throw new GroupNotFoundException(groupName);
}
// retrieve
Feature f = read(featureId);
f.setGroup(null);
// persist modification
update(f);
}
代码示例来源:origin: ff4j/ff4j
/** {@inheritDoc} */
@Override
public boolean existGroup(String groupName) {
Util.assertParamHasLength(groupName, "groupName");
SearchResult result = getConnection().search(getBuilder().getGroupByGroupName(groupName), true);
return (result.getTotal() != null) && (result.getTotal() >= 1);
}
内容来源于网络,如有侵权,请联系作者删除!