Package com.claymus.site.module.block.gwt

Examples of com.claymus.site.module.block.gwt.BlockDTO


    User user = UserData.getUser();
    Block block = BlockData.getBlock(KeyFactory.stringToKey(encoded));

    int accessLevel = module.getAccessLevel(user.getRole());
    if(accessLevel >= ModuleHelper.ADD_EDIT || (accessLevel == ModuleHelper.ADD && block.getOwner().equals(user))) {
      BlockDTO blockDTO = block.getDTO();
      blockDTO.setLocations(getLocations());
      blockDTO.setRoles(getRoles());
      return blockDTO;
    } else {
      throw new UserException();
    }
  }
View Full Code Here


    return this.blockData.getHTML();
  }


  public BlockDTO getDTO() {
    BlockDTO blockDTO = this.blockData.getDTO();

    blockDTO.setLocation(getLocation());

    blockDTO.setVisibleTo(getVisibleTo());
    LinkedList<String> roleList = new LinkedList<String>();
    for(Key role : getRoleList())
      roleList.add(KeyFactory.keyToString(role));
    blockDTO.setRoleList(roleList);

    blockDTO.setVisibleAt(getVisibleAtList());
    blockDTO.setNotVisibleAt(getNotVisibleAtList());

    return blockDTO;
  }
View Full Code Here

TOP

Related Classes of com.claymus.site.module.block.gwt.BlockDTO

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.