Package gwtappcontainer.shared.apis.admin

Examples of gwtappcontainer.shared.apis.admin.RoleProp


  private RoleProp getRole(long id) {
    NamespaceManager.set(NAMESPACE);
   
    RoleEntity entity = ofy().load().type(RoleEntity.class).id(id).get();
   
    RoleProp prop = null;
    if (null != entity)
      prop = entity.toProp();
   
    return prop;
  }
View Full Code Here


class RoleEntity {
  @Id Long id;
  String name;
 
  RoleProp toProp() {
    RoleProp prop = new RoleProp();
    prop.id = id;
    prop.name = name;
   
    return prop;
  }
View Full Code Here

      //only allowed for developers
      ensureRole(user, Role.DEVELOPER);
                                 
      RoleRepository repository = new RoleRepository();
     
      RoleProp prop = repository.addRole(role);
     
      APIResponse resp = new APIResponse();
      resp.statusCode = Status.SUCCESS;
      resp.object = prop;     
      return resp;
View Full Code Here

   
      //only allowed for developers
      ensureRole(user, Role.DEVELOPER);     
                     
      RoleRepository repository = new RoleRepository();
      RoleProp prop = repository.updateRole(existingName, newName);
     
      APIResponse resp = new APIResponse();
      resp.statusCode = Status.SUCCESS;
      resp.object = prop;
      return resp;
View Full Code Here

public class UtilTest {
 
  @Test
  public void testIsRolePresent() {
    RoleProp prop1 = new RoleProp();
    prop1.name = "role1";
   
    RoleProp prop2 = new RoleProp();
    prop2.name = "role2";
   
    RoleProp prop3 = new RoleProp();
    prop3.name = "role3";
   
    RoleProp prop4 = new RoleProp();
    prop4.name = "role4";
   
    List<RoleProp> roleProps = new ArrayList<RoleProp>();
    roleProps.add(prop1);
    roleProps.add(prop2);
View Full Code Here

  HashMap<String, UserProp> userProps = new HashMap<String, UserProp>();
   
  public void allowRoleToUser(String email, Role role) {
    email = email.toLowerCase();
   
    RoleProp roleProp = new RoleProp();
    roleProp.name = role.toString()
   
    UserProp userProp;
    if (userProps.containsKey(email)) {
      userProp = userProps.get(email);           
View Full Code Here

TOP

Related Classes of gwtappcontainer.shared.apis.admin.RoleProp

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.