Examples of Role


Examples of com.woorea.openstack.keystone.model.Role

  }

  @Override
  public void execute(Keystone keystone, CommandLine cmd) {
   
    Role role = new Role();
    role.setName(cmd.getOptionValue("name"));
    role.setDescription(cmd.getOptionValue("description"));
    if(cmd.getOptionValue("enabled") != null) {
      role.setEnabled("True");
    }
   
    role = keystone.roles().create(role).execute();
   
    Table t = new Table(new TableModel<Role>(Arrays.asList(role)) {
View Full Code Here

Examples of de.timefinder.data.Role

                } else if ("eventsMap".equals(element.getName())) {
                    Map map = FastMap.newInstance();
                    for (Object evEl : element.elements()) {
                        Element evElement = (Element) evEl;
                        long ref = getRef(evElement);
                        Role role = Role.valueOf(evElement.attributeValue("role"));
                        map.put(getObject(ref, Event.class), role);
                    }
                    return (T) map;
                }
            } else if (Event.class.isAssignableFrom(obj.getClass())) {
View Full Code Here

Examples of domain.Role

      return new Response(ResponseStatus.FAIL, "No authorization");
    }
   
    try
     
      Role newRoleObject = (Role) databaseSession.createCriteria(Role.class).add(Restrictions.eq("id", this.role)).uniqueResult();
     
      if (null == newRoleObject) {
       
        return new Response(ResponseStatus.FAIL, "User role does not exist, database failure.");
      }
View Full Code Here

Examples of edu.bellevue.its.migration.entities.Role

        setEnabled(false);
       
       
        if (AppGlobals.getInstance().loggedInUser != null)
        {
            Role r = AppHelper.getRoleByName(role);
            User curUser = AppGlobals.getInstance().loggedInUser;
            this.setEnabled(curUser.getRoles().contains(r));
        }
    }
View Full Code Here

Examples of edu.uga.galileo.voci.bo.Role

  /**
   * @see edu.uga.galileo.voci.db.dao.RoleDAO#getRoleByRoleId(int roleId)
   */
  public Role getRoleByRoleId( int roleId ) throws NoSuchRoleException
  {
    Role role = new Role();
    StringBuffer sql = new StringBuffer();
    sql.append(" select * ");
    sql.append(" from roles ");
    sql.append(" where role_id=? ");

View Full Code Here

Examples of enterprise.web_jpa_war.entity.Role

  }
 
  private String getRolesString(Person person){
    StringBuffer rolesString = new StringBuffer();
    List<Role> roles = person.getRoles();
    Role role = null;
    for(int a = 0; a < roles.size(); a++){
      role = roles.get(a);
      if(a == 0){
        rolesString.append("'" + role.getName() + "'");
      } else{
        rolesString.append(", '" + role.getName() + "'");
      }
    }
    return rolesString.toString();
  }
View Full Code Here

Examples of er.erxtest.model.Role

 
  public void testSnapshot() {
    EOEditingContext ec = ERXEC.newEditingContext();
    Company company = Company.createCompany(ec, "Test Company");
    Employee employee = Employee.createEmployee(ec, "John", "Doe", Boolean.FALSE, company);
    Role role1 = Role.createRole(ec);
    employee.addToRoles(role1);
   
    NSDictionary<String, Object> snapshot = employee.snapshot();
    NSDictionary committedSnapshot = employee.committedSnapshot();
   
    /*
     * Snapshot should have same values as the eo and committed snapshot should be all
     * null values as eo has not yet been saved.
     */
    EOEntity entity = employee.entity();
    for (String key : (NSArray<String>) entity.classPropertyNames()) {
      Object snapshotValue = snapshot.valueForKey(key);
      assertEquals(employee.valueForKey(key), ERXValueUtilities.isNull(snapshotValue) ? null : snapshotValue);
      assertTrue(ERXValueUtilities.isNull(committedSnapshot.valueForKey(key)));
    }
   
    ec.saveChanges();
   
    Role role2 = Role.createRole(ec);
    employee.addToRoles(role2);
    employee.removeFromRoles(role1);
   
    NSDictionary changesFromCommittedSnapshot = employee.changesFromCommittedSnapshot();
   
View Full Code Here

Examples of eu.planets_project.ifr.core.security.api.model.Role

   
        int i = 0;
   
        if (userRoles.length > 0) {
            for (Iterator<Role> it = getRoles().iterator(); it.hasNext();) {
                Role role = it.next();
   
                userRoles[i] = role.getName();
                i++;
            }
        }
   
        if (userRoles.length == 0) {
View Full Code Here

Examples of eu.planets_project.pp.plato.model.Role

        user.setLastName(planetsUser.getLastName());
       
        Set<eu.planets_project.ifr.core.security.api.model.Role> planetsRoles = planetsUser.getRoles();
       
        for (eu.planets_project.ifr.core.security.api.model.Role r : planetsRoles) {
            Role role = new Role();
            role.setName(r.getName());
            user.getRoles().add(role);
        }
       
        return user;
    }
View Full Code Here

Examples of eu.scape_project.planning.model.Role

      user.setUsername("admin");
      user.setFirstName("admin");
      user.setLastName("admin");
     
      // set admin rights
      Role adminRole = new Role();
      adminRole.setName("admin");
      user.getRoles().add(adminRole);
      user.setUserGroup(userGroup);
     
      em.persist(user);
    }
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.