package component.rpc;

import java.util.List;

import component.model.TreeItemDto;
import component.service.TreeItemService;

import ru.cg.webbpm.modules.webkit.annotations.RpcCall;
import ru.cg.webbpm.modules.webkit.annotations.RpcService;
import ru.cg.webbpm.modules.webkit.beans.Behavior;

/**
 * @author r.latypov
 */
@RpcService
public class TreeItemRpcService extends Behavior {
  public TreeItemService treeItemService;

  @RpcCall
  public List<TreeItemDto> loadTreeData() {
    return treeItemService.loadTreeData();
  }

  @RpcCall
  public List<TreeItemDto> loadTreeDataByDomainId(String token, String[] roles) {
    return treeItemService.loadTreeDataByDomainId(token, roles);
  }
}
