Package org.jboss.errai.ui.shared.api.style

Examples of org.jboss.errai.ui.shared.api.style.AnnotationStyleBindingExecutor


    this.roleExtractor = roleExtractor;
  }

  @PostConstruct
  public void init() {
    StyleBindingsRegistry.get().addStyleBinding(this, RestrictedAccess.class, new AnnotationStyleBindingExecutor() {
      @Override
      public void invokeBinding(final Element element, final Annotation annotation) {
        final User user = userCache.getUser();
        final Set<Role> extractedRoles = roleExtractor.extractAllRoles((RestrictedAccess) annotation);
       
View Full Code Here


    this.roleExtractor = roleExtractor;
  }

  @PostConstruct
  public void init() {
    StyleBindingsRegistry.get().addStyleBinding(this, RestrictedAccess.class, new AnnotationStyleBindingExecutor() {
      @Override
      public void invokeBinding(final Element element, final Annotation annotation) {
        final User user = userCache.getUser();
        final Set<Role> extractedRoles = roleExtractor.extractAllRoles((RestrictedAccess) annotation);
View Full Code Here

    this.identity = identity;
  }

  @AfterInitialization
  public void init() {
    StyleBindingsRegistry.get().addStyleBinding(this, RequireRoles.class, new AnnotationStyleBindingExecutor() {
      @Override
      public void invokeBinding(final Element element, final Annotation annotation) {
        identity.hasPermission(new AsyncCallback<Boolean>() {

          @Override
View Full Code Here

    this.userCache = userProvider;
  }

  @PostConstruct
  public void init() {
    StyleBindingsRegistry.get().addStyleBinding(this, RestrictedAccess.class, new AnnotationStyleBindingExecutor() {
      @Override
      public void invokeBinding(final Element element, final Annotation annotation) {
        final User user = userCache.getUser();
        if (User.ANONYMOUS.equals(userCache.getUser()) || !user.hasAllRoles(((RestrictedAccess) annotation).roles())) {
          element.addClassName(RestrictedAccess.CSS_CLASS_NAME);
View Full Code Here

TOP

Related Classes of org.jboss.errai.ui.shared.api.style.AnnotationStyleBindingExecutor

Copyright © 2018 www.massapicom. 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.