Examples of RoleImpl


Examples of org.jboss.errai.security.shared.api.RoleImpl

    if (identity.isLoggedIn()) {
      RelationshipQuery<Grant> query =
              relationshipManager.createRelationshipQuery(Grant.class);
      query.setParameter(Grant.ASSIGNEE, identity.getAccount());
      for (final Grant grant : query.getResultList()) {
        roles.add(new RoleImpl(grant.getRole().getName()));
      }
    }

    return roles;
  }
View Full Code Here

Examples of org.jboss.errai.security.shared.api.RoleImpl

  public Set<Role> extractSimpleRoles(final RestrictedAccess annotation) {
    final Set<Role> simpleRoles = new HashSet<Role>(annotation.roles().length);

    for (final String roleName : annotation.roles()) {
      //XXX Maybe we should cache and reuse RoleImpls?
      simpleRoles.add(new RoleImpl(roleName));
    }

    return simpleRoles;
  }
View Full Code Here

Examples of org.jboss.errai.security.shared.api.RoleImpl

@Dependent
public class AdminRoleProvider implements RequiredRolesProvider {

  @Override
  public Set<Role> getRoles() {
    return new HashSet<Role>(Arrays.asList(new RoleImpl("admin")));
  }
View Full Code Here

Examples of org.jboss.errai.security.shared.api.RoleImpl

  private Collection<? extends Role> createRoles(final Set<String> roleNames) {
    final List<Role> roles = new ArrayList<Role>(roleNames.size());

    for (final String roleName : roleNames) {
      roles.add(new RoleImpl(roleName));
    }

    return roles;
  }
View Full Code Here

Examples of org.knapper.core.roles.impl.RoleImpl

    String roleGuid = DomUtil.getChildNodeTextByName(
        getHeadNode(),
        IMessageTagNames.DESTINATION_TAG_NAME);
   
    if (roleGuid != null) {
      return new RoleImpl(roleGuid);
    }
   
    return null;
  }
View Full Code Here

Examples of org.knapper.core.roles.impl.RoleImpl

    String roleGuid = DomUtil.getChildNodeTextByName(
        getHeadNode(),
        IMessageTagNames.SENDER_TAG_NAME);
   
    if (roleGuid != null) {
      return new RoleImpl(roleGuid);
    }
   
    return null;   
  }
View Full Code Here

Examples of org.knapper.core.roles.impl.RoleImpl

    String roleGuid = DomUtil.getChildNodeTextByName(
        getHeadNode(),
        IMessageTagNames.DESTINATION_TAG_NAME);
   
    if (roleGuid != null) {
      return new RoleImpl(roleGuid);
    }
   
    return null;
  }
View Full Code Here

Examples of org.knapper.core.roles.impl.RoleImpl

    String roleGuid = DomUtil.getChildNodeTextByName(
        getHeadNode(),
        IMessageTagNames.SENDER_TAG_NAME);
   
    if (roleGuid != null) {
      return new RoleImpl(roleGuid);
    }
   
    return null;   
  }
View Full Code Here

Examples of org.uberfire.security.impl.RoleImpl

                    final List<Role> roles;
                    if ( access != null ) {
                        final String[] textRoles = access.split( "," );
                        roles = new ArrayList<Role>( textRoles.length );
                        for ( final String textRole : textRoles ) {
                            roles.add( new RoleImpl( textRole ) );
                        }
                        mandatoryFilteredResources.put( pattern, roles );
                    } else {
                        roles = emptyList();
                    }
View Full Code Here

Examples of org.uberfire.security.impl.RoleImpl

    /**
     * Registers given <code>role</code> into the registry
     * @param role
     */
    public void registerRole( String role ) {
        this.roles.add( new RoleImpl( role ) );
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.