当前位置: 首页>>代码示例>>Java>>正文


Java ProjectInstance.getOverrideKylinProps方法代码示例

本文整理汇总了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;
}
 
开发者ID:apache,项目名称:kylin,代码行数:22,代码来源:ProjectService.java

示例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;
}
 
开发者ID:apache,项目名称:kylin,代码行数:15,代码来源:ProjectService.java


注:本文中的org.apache.kylin.metadata.project.ProjectInstance.getOverrideKylinProps方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。