use of javax.annotation.Nonnull in project jackrabbit-oak by apache.
the class PrincipalRestrictionProvider method getSupportedRestrictions.
@Nonnull
@Override
public Set<RestrictionDefinition> getSupportedRestrictions(@Nullable String oakPath) {
Set<RestrictionDefinition> definitions = new HashSet<RestrictionDefinition>(base.getSupportedRestrictions(oakPath));
definitions.add(new RestrictionDefinitionImpl(REP_NODE_PATH, Type.PATH, true));
return definitions;
}
use of javax.annotation.Nonnull in project jackrabbit-oak by apache.
the class PrincipalProviderImpl method getPrincipals.
@Nonnull
@Override
public Set<? extends Principal> getPrincipals(@Nonnull String userID) {
Set<Principal> principals = new HashSet<Principal>();
try {
Authorizable authorizable = userManager.getAuthorizable(userID);
if (authorizable != null && !authorizable.isGroup()) {
principals.add(authorizable.getPrincipal());
principals.addAll(getGroupMembership(authorizable));
}
} catch (RepositoryException e) {
log.debug(e.getMessage());
}
return principals;
}
use of javax.annotation.Nonnull in project jackrabbit-oak by apache.
the class PrivilegeDefinitionWriter method next.
@Nonnull
private PrivilegeBits next() {
PrivilegeBits bits = next;
next = bits.nextBits();
return bits;
}
use of javax.annotation.Nonnull in project jackrabbit-oak by apache.
the class AbstractTokenTest method createTokenTree.
@Nonnull
Tree createTokenTree(@Nonnull TokenInfo base, @Nonnull NodeUtil parent, @Nonnull String ntName) throws AccessDeniedException {
Tree tokenTree = getTokenTree(base);
Tree tree = parent.addChild("token", ntName).getTree();
tree.setProperty(tokenTree.getProperty(JcrConstants.JCR_UUID));
tree.setProperty(tokenTree.getProperty(TOKEN_ATTRIBUTE_KEY));
tree.setProperty(tokenTree.getProperty(TOKEN_ATTRIBUTE_EXPIRY));
return tree;
}
use of javax.annotation.Nonnull in project jackrabbit-oak by apache.
the class SystemUserImplTest method getSecurityConfigParameters.
@Override
protected ConfigurationParameters getSecurityConfigParameters() {
return ConfigurationParameters.of(UserConfiguration.NAME, ConfigurationParameters.of(UserConstants.PARAM_AUTHORIZABLE_ACTION_PROVIDER, new AuthorizableActionProvider() {
@Nonnull
@Override
public List<? extends AuthorizableAction> getAuthorizableActions(@Nonnull SecurityProvider securityProvider) {
AuthorizableAction action = new AccessControlAction();
action.init(securityProvider, ConfigurationParameters.of(AccessControlAction.USER_PRIVILEGE_NAMES, new String[] { PrivilegeConstants.JCR_ALL }));
return ImmutableList.of(action);
}
}));
}
Aggregations