Search in sources :

Example 71 with Nonnull

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;
}
Also used : RestrictionDefinitionImpl(org.apache.jackrabbit.oak.spi.security.authorization.restriction.RestrictionDefinitionImpl) RestrictionDefinition(org.apache.jackrabbit.oak.spi.security.authorization.restriction.RestrictionDefinition) HashSet(java.util.HashSet) Nonnull(javax.annotation.Nonnull)

Example 72 with Nonnull

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;
}
Also used : Authorizable(org.apache.jackrabbit.api.security.user.Authorizable) RepositoryException(javax.jcr.RepositoryException) EveryonePrincipal(org.apache.jackrabbit.oak.spi.security.principal.EveryonePrincipal) Principal(java.security.Principal) HashSet(java.util.HashSet) Nonnull(javax.annotation.Nonnull)

Example 73 with Nonnull

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;
}
Also used : PrivilegeBits(org.apache.jackrabbit.oak.spi.security.privilege.PrivilegeBits) Nonnull(javax.annotation.Nonnull)

Example 74 with Nonnull

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;
}
Also used : Tree(org.apache.jackrabbit.oak.api.Tree) Nonnull(javax.annotation.Nonnull)

Example 75 with Nonnull

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);
        }
    }));
}
Also used : AccessControlAction(org.apache.jackrabbit.oak.spi.security.user.action.AccessControlAction) Nonnull(javax.annotation.Nonnull) SecurityProvider(org.apache.jackrabbit.oak.spi.security.SecurityProvider) AuthorizableAction(org.apache.jackrabbit.oak.spi.security.user.action.AuthorizableAction) AuthorizableActionProvider(org.apache.jackrabbit.oak.spi.security.user.action.AuthorizableActionProvider)

Aggregations

Nonnull (javax.annotation.Nonnull)2624 Nullable (javax.annotation.Nullable)338 ArrayList (java.util.ArrayList)336 ItemStack (net.minecraft.item.ItemStack)327 List (java.util.List)305 Map (java.util.Map)229 Layer (com.simiacryptus.mindseye.lang.Layer)188 Tensor (com.simiacryptus.mindseye.lang.Tensor)185 Arrays (java.util.Arrays)182 Collectors (java.util.stream.Collectors)169 IOException (java.io.IOException)165 JsonObject (com.google.gson.JsonObject)156 HashMap (java.util.HashMap)145 IntStream (java.util.stream.IntStream)145 Test (org.junit.Test)143 LoggerFactory (org.slf4j.LoggerFactory)138 Logger (org.slf4j.Logger)137 Result (com.simiacryptus.mindseye.lang.Result)130 TensorList (com.simiacryptus.mindseye.lang.TensorList)123 DeltaSet (com.simiacryptus.mindseye.lang.DeltaSet)111