Package com.tll.model

Examples of com.tll.model.Authority


    // set the user as un-locked by default
    user.setLocked(false);

    // set the role as user by default
    Authority userAuth =
        dao.load(new NameKey<Authority>(Authority.class, AuthorityRoles.ROLE_USER.toString(),
            Authority.FIELDNAME_AUTHORITY));
    user.addAuthority(userAuth);

    persist(user);
View Full Code Here


    return StringUtil.enumStyleToPresentation(StringUtils.replace(text, "ROLE_", ""));
  }

  @Override
  public String getAsText() {
    final Authority a = (Authority) getValue();
    return a == null ? "" : formatText(a.getAuthority());
  }
View Full Code Here

  private void stubAuthorities() {
    final IEntityDao dao = getDao();
    getDbTrans().startTrans();
    try {
      for(final AuthorityRoles role : AuthorityRoles.values()) {
        final Authority a = getEntityBeanFactory().getEntityCopy(Authority.class);
        a.setAuthority(role.toString());
        dao.persist(a);
      }
      getDbTrans().setComplete();
    }
    finally {
View Full Code Here

    Asp account = create(Asp.class, true);
    account.setCurrency(currency);
    account = persist(account);
    pkA = account.getId();

    final Authority auth = createAndPersist(Authority.class, true);
    pkT = auth.getId();
  }
View Full Code Here

    final IEntityDao dao = getDao();
    getDbTrans().startTrans();
    getDbTrans().setComplete();
    try {
      for(final AuthorityRoles role : AuthorityRoles.values()) {
        final Authority a = getEntityBeanFactory().getEntityCopy(Authority.class, false);
        a.setAuthority(role.toString());
        dao.persist(a);
      }
    }
    finally {
      getDbTrans().endTrans();
View Full Code Here

  }

  @Override
  public void alterTestEntity(User e) {
    super.alterTestEntity(e);
    final Authority a = e.getAuthoritys().iterator().next();
    e.removeAuthority(a);
  }
View Full Code Here

TOP

Related Classes of com.tll.model.Authority

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.