Examples of RoleImpl


Examples of org.apache.jetspeed.security.impl.RoleImpl

   
    public void testSubsiteRules()
    {
        RequestContext request = new MockRequestContext("/");
        Set principals = new PrincipalsSet();
        principals.add(new RoleImpl("role"));
        request.setSubject(JetspeedSubjectFactory.createSubject(new UserImpl("user"), null, null, principals));
        request.setLocale(new Locale("en", "US"));
        MockHttpServletRequest servletRequest = new MockHttpServletRequest();
        servletRequest.setServerName("www.domain.com");
        request.setRequest(servletRequest);
View Full Code Here

Examples of org.infoglue.cms.entities.management.impl.simple.RoleImpl

        return getAllVOObjects(RoleImpl.class, "roleName", db);
    }

    public RoleVO create(RoleVO roleVO) throws ConstraintException, SystemException
    {
        Role role = new RoleImpl();
        role.setValueObject(roleVO);
        role = (Role) createEntity(role);
        return role.getValueObject();
    }    
View Full Code Here

Examples of org.infoglue.cms.entities.management.impl.simple.RoleImpl

        return role.getValueObject();
    }    

    public Role create(RoleVO roleVO, Database db) throws ConstraintException, SystemException, Exception
    {
        Role role = new RoleImpl();
        role.setValueObject(roleVO);
        role = (Role) createEntity(role, db);
        return role;
    }    
View Full Code Here

Examples of org.internna.iwebmvc.model.security.RoleImpl

    @Transactional(propagation = Propagation.REQUIRED)
    public void createAuthority(String authority) {
        Assert.hasText(authority);
        if (!isAuthority(authority)) {
            entityManager.persist(new RoleImpl(authority));
            entityManager.flush();
        }
    }
View Full Code Here

Examples of org.internna.iwebmvc.model.security.RoleImpl

            }
        } catch (ClassNotFoundException cne) {
          logger.warn("Could not generate authority information for: " + cne.getMessage());
        }
        for (String role : authorities) {
            if (!mainRoles.contains(new RoleImpl(role))) {
                if (logger.isInfoEnabled()) logger.info("Creating application security role [" + role + "]");
                dao.createAuthority(role);
            }
        }
        if (createRootUser) {
View Full Code Here

Examples of org.jamwiki.authentication.RoleImpl

      try {
        // once created a role name cannot be modified, so the text field
        // will be disabled in the form.
        boolean update = StringUtils.isBlank(request.getParameter("roleName"));
        String roleName = (update) ? updateRole : request.getParameter("roleName");
        role = new RoleImpl(roleName);
        role.setDescription(request.getParameter("roleDescription"));
        WikiUtil.validateRole(role);
        WikiBase.getDataHandler().writeRole(role, update);
        if (!StringUtils.isBlank(updateRole) && updateRole.equals(role.getAuthority())) {
          next.addObject("message", new WikiMessage("roles.message.roleupdated", role.getAuthority()));
View Full Code Here

Examples of org.jamwiki.authentication.RoleImpl

  @Override
  public List<Role> getRoleMapGroup(String groupName) throws DataAccessException {
    QueryResultIterable<GroupAuthorityEntity> list = GroupAuthorityService.getByGroupname(groupName);
    if (list != null) {
      List<Role> roles = new ArrayList<Role>();
      RoleImpl role;
      for (GroupAuthorityEntity entity : list) {
        role = new RoleImpl(entity.getAuthority());
        role.setDescription(entity.getGroupName());
        roles.add(role);
      }
      return roles;
    }
    return null;
View Full Code Here

Examples of org.jamwiki.authentication.RoleImpl

  @Override
  public List<Role> getRoleMapUser(String login) throws DataAccessException {
    // TODO Auto-generated method stub
    QueryResultIterable<AuthorityEntity> list = AuthorityService.findByName(login);
    RoleImpl roleImpl;
    List<Role> roles = new ArrayList<Role>();
    for (AuthorityEntity authorityEntity : list) {
      roleImpl = new RoleImpl(authorityEntity.getAuthority());
      roleImpl.setDescription(roleImpl.getDescription());
    }
    return roles;
  }
View Full Code Here

Examples of org.jamwiki.authentication.RoleImpl

    throw new NotImplementedException("getWatchlist");
    // return null;
  }

  private Role initRole(RoleEntity rs) {
    Role role = new RoleImpl(rs.getName());
    role.setDescription(rs.getDescription());
    return role;
  }
View Full Code Here

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

  public Set<Role> extractAllRoles(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
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.