本文整理汇总了Java中org.apache.kylin.metadata.project.ProjectInstance.getOverrideKylinProps方法的典型用法代码示例。如果您正苦于以下问题:Java ProjectInstance.getOverrideKylinProps方法的具体用法?Java ProjectInstance.getOverrideKylinProps怎么用?Java ProjectInstance.getOverrideKylinProps使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.kylin.metadata.project.ProjectInstance
的用法示例。
在下文中一共展示了ProjectInstance.getOverrideKylinProps方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createProject
import org.apache.kylin.metadata.project.ProjectInstance; //导入方法依赖的package包/类
@PreAuthorize(Constant.ACCESS_HAS_ROLE_ADMIN)
public ProjectInstance createProject(ProjectInstance newProject) throws IOException {
Message msg = MsgPicker.getMsg();
String projectName = newProject.getName();
String description = newProject.getDescription();
LinkedHashMap<String, String> overrideProps = newProject.getOverrideKylinProps();
ProjectInstance currentProject = getProjectManager().getProject(projectName);
if (currentProject != null) {
throw new BadRequestException(String.format(msg.getPROJECT_ALREADY_EXIST(), projectName));
}
String owner = SecurityContextHolder.getContext().getAuthentication().getName();
ProjectInstance createdProject = getProjectManager().createProject(projectName, owner, description,
overrideProps);
accessService.init(createdProject, AclPermission.ADMINISTRATION);
logger.debug("New project created.");
return createdProject;
}
示例2: hasPermission
import org.apache.kylin.metadata.project.ProjectInstance; //导入方法依赖的package包/类
@PreAuthorize(Constant.ACCESS_HAS_ROLE_ADMIN + " or hasPermission(#currentProject, 'ADMINISTRATION')")
public ProjectInstance updateProject(ProjectInstance newProject, ProjectInstance currentProject)
throws IOException {
String newProjectName = newProject.getName();
String newDescription = newProject.getDescription();
LinkedHashMap<String, String> overrideProps = newProject.getOverrideKylinProps();
ProjectInstance updatedProject = getProjectManager().updateProject(currentProject, newProjectName,
newDescription, overrideProps);
logger.debug("Project updated.");
return updatedProject;
}