Browse Source
* commit 'b09cf5abd277f3a9a14838a088e122e0cfb886e7': REPORT-135233 调整VcsOperator REPORT-135233 调整AuthorityOperator REPORT-135233 调整DecisionOperator REPORT-135233 调整TplOperator REPORT-135233 调整DataBaseTypeOperator REPORT-135233 调整TemplateExportOperator REPORT-135233 调整OrganizationOperator REPORT-135233 调整TemplateChecker REPORT-135233 调整VcsAutoCleanOperator REPORT-135233 调整DataFetcher,CommitHelper REPORT-135233 调整LockInfoOperator REPORT-135233 调整ShareEmbeddedConverter REPORT-135233 调整TableDataOperator和ConnectionOperator REPORT-135233 调整FileNodesfbp/feature
superman
2 months ago
46 changed files with 242 additions and 400 deletions
@ -1 +1 @@
|
||||
package com.fr.design.roleAuthority;
import com.fr.base.FRContext;
import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode;
import com.fr.design.gui.itree.refreshabletree.loader.ChildrenNodesLoader;
import com.fr.log.FineLoggerFactory;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
/**
* 将权限细粒度的角色数据包装一下,区分报表平台管理角色和数据决策系统角色
* <p/>
* Author : daisy
* Date: 13-8-30
* Time: 下午3:42
*/
public class RoleDataWrapper implements ChildrenNodesLoader {
private List<String> rolelist = new ArrayList<String>();
private String roleTypename = null;
public RoleDataWrapper(String roleName) {
roleTypename = roleName;
}
/**
* 在此计算并获得与管理类型相对应的
*/
private void calculateRoleList() {
try {
Collections.addAll(rolelist, FRContext.getOrganizationOperator().getRoleGroup());
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
}
//加载所有的角色列表
public ExpandMutableTreeNode[] load() {
calculateRoleList();
return this.load(this.rolelist);
}
//从workbook中读取的角色列表
public ExpandMutableTreeNode[] load(List<String> rolelist) {
this.rolelist = rolelist;
ExpandMutableTreeNode[] res = new ExpandMutableTreeNode[rolelist.size()];
for (int i = 0; i < res.length; i++) {
res[i] = new ExpandMutableTreeNode(rolelist.get(i));
}
return res;
}
public String getRoleTypename(){
return roleTypename;
}
} |
||||
package com.fr.design.roleAuthority;
import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode;
import com.fr.design.gui.itree.refreshabletree.loader.ChildrenNodesLoader;
import com.fr.log.FineLoggerFactory;
import com.fr.workspace.server.repository.authority.RemoteAuthorityRepository;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
/**
* 将权限细粒度的角色数据包装一下,区分报表平台管理角色和数据决策系统角色
* <p/>
* Author : daisy
* Date: 13-8-30
* Time: 下午3:42
*/
public class RoleDataWrapper implements ChildrenNodesLoader {
private List<String> rolelist = new ArrayList<String>();
private String roleTypename = null;
public RoleDataWrapper(String roleName) {
roleTypename = roleName;
}
/**
* 在此计算并获得与管理类型相对应的
*/
private void calculateRoleList() {
try {
Collections.addAll(rolelist, RemoteAuthorityRepository.getInstance().getRoleGroup());
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
}
//加载所有的角色列表
public ExpandMutableTreeNode[] load() {
calculateRoleList();
return this.load(this.rolelist);
}
//从workbook中读取的角色列表
public ExpandMutableTreeNode[] load(List<String> rolelist) {
this.rolelist = rolelist;
ExpandMutableTreeNode[] res = new ExpandMutableTreeNode[rolelist.size()];
for (int i = 0; i < res.length; i++) {
res[i] = new ExpandMutableTreeNode(rolelist.get(i));
}
return res;
}
public String getRoleTypename(){
return roleTypename;
}
} |
Loading…
Reference in new issue