本文整理汇总了Java中azkaban.project.Project.getId方法的典型用法代码示例。如果您正苦于以下问题:Java Project.getId方法的具体用法?Java Project.getId怎么用?Java Project.getId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类azkaban.project.Project
的用法示例。
在下文中一共展示了Project.getId方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ajaxFetchFlowInfo
import azkaban.project.Project; //导入方法依赖的package包/类
private void ajaxFetchFlowInfo(HttpServletRequest req,
HttpServletResponse resp, HashMap<String, Object> ret, User user,
String projectName, String flowId) throws ServletException {
Project project =
getProjectAjaxByPermission(ret, projectName, user, Type.READ);
if (project == null) {
ret.put("erro", "Project " + projectName + " doesn't exist.");
return;
}
Flow flow = project.getFlow(flowId);
if (flow == null) {
ret.put("error", "Error loading flow. Flow " + flowId
+ " doesn't exist in " + projectName);
return;
}
ret.put("successEmails", flow.getSuccessEmails());
ret.put("failureEmails", flow.getFailureEmails());
Schedule sflow = null;
try {
for (Schedule sched : scheduleManager.getSchedules()) {
if (sched.getProjectId() == project.getId()
&& sched.getFlowName().equals(flowId)) {
sflow = sched;
break;
}
}
} catch (ScheduleManagerException e) {
// TODO Auto-generated catch block
throw new ServletException(e);
}
if (sflow != null) {
ret.put("scheduled", sflow.getNextExecTime());
}
}
示例2: toSimplifiedProjects
import azkaban.project.Project; //导入方法依赖的package包/类
/**
* A simple helper method that converts a List<Project> to List<SimplifiedProject>
*
* @param projects
* @return
*/
private List<SimplifiedProject> toSimplifiedProjects(List<Project> projects) {
List<SimplifiedProject> simplifiedProjects = new ArrayList<>();
for (Project p : projects) {
SimplifiedProject sp =
new SimplifiedProject(p.getId(), p.getName(),
p.getLastModifiedUser(), p.getCreateTimestamp(),
p.getUserPermissions(), p.getGroupPermissions());
simplifiedProjects.add(sp);
}
return simplifiedProjects;
}
示例3: ExecutableFlow
import azkaban.project.Project; //导入方法依赖的package包/类
public ExecutableFlow(Project project, Flow flow) {
this.projectId = project.getId();
this.projectName = project.getName();
this.version = project.getVersion();
this.scheduleId = -1;
this.lastModifiedTimestamp = project.getLastModifiedTimestamp();
this.lastModifiedUser = project.getLastModifiedUser();
this.setFlow(project, flow);
}
示例4: ajaxFetchFlowInfo
import azkaban.project.Project; //导入方法依赖的package包/类
private void ajaxFetchFlowInfo(HttpServletRequest req, HttpServletResponse resp, HashMap<String, Object> ret, User user, String projectName, String flowId) throws ServletException {
Project project = getProjectAjaxByPermission(ret, projectName, user, Type.READ);
if (project == null) {
return;
}
Flow flow = project.getFlow(flowId);
if (flow == null) {
ret.put("error", "Error loading flow. Flow " + flowId + " doesn't exist in " + projectName);
return;
}
ret.put("successEmails", flow.getSuccessEmails());
ret.put("failureEmails", flow.getFailureEmails());
Schedule sflow = null;
try {
for (Schedule sched: scheduleManager.getSchedules()) {
if (sched.getProjectId() == project.getId() && sched.getFlowName().equals(flowId)) {
sflow = sched;
break;
}
}
} catch (ScheduleManagerException e) {
// TODO Auto-generated catch block
throw new ServletException(e);
}
if (sflow != null) {
ret.put("scheduled", sflow.getNextExecTime());
}
}
示例5: ExecutableFlow
import azkaban.project.Project; //导入方法依赖的package包/类
public ExecutableFlow(Project project, Flow flow) {
this.projectId = project.getId();
this.version = project.getVersion();
this.scheduleId = -1;
this.setFlow(project, flow);
}