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


Java ProjectManager.getAllProjects方法代码示例

本文整理汇总了Java中net.sf.memoranda.ProjectManager.getAllProjects方法的典型用法代码示例。如果您正苦于以下问题:Java ProjectManager.getAllProjects方法的具体用法?Java ProjectManager.getAllProjects怎么用?Java ProjectManager.getAllProjects使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.sf.memoranda.ProjectManager的用法示例。


在下文中一共展示了ProjectManager.getAllProjects方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: init

import net.sf.memoranda.ProjectManager; //导入方法依赖的package包/类
public static void init() {
	tags = new HashSet<String>();
	
	try {
		Vector<Project> projects = ProjectManager.getAllProjects();
		for (int i = 0; i < projects.size(); i++) {
			Elements tagElements = projects.get(i).getTags();
			for (int j = 0; j < tagElements.size(); j++) {
				tags.add(tagElements.get(j).getAttributeValue("name").toLowerCase());
			}
		}
		tags.add(" ");
	} catch (Exception e) {
		Util.error(e);
	}
}
 
开发者ID:ser316asu,项目名称:Neukoelln_SER316,代码行数:17,代码来源:Tag.java

示例2: upgradeTaskList

import net.sf.memoranda.ProjectManager; //导入方法依赖的package包/类
public static boolean upgradeTaskList(String publicId) {
    int vid = getIndexOfVersion(publicId);
    
    if (vid == (VERSIONS.length - 1)) {
        Util.debug("Version " + publicId + " is the latest version, skipping upgrade");
        return false;
    }
    else {
        // get all projects
        Vector projects = ProjectManager.getAllProjects();
        String[] projectIds = new String[projects.size()];
        int c = 0;
        for (Iterator iter = projects.iterator(); iter.hasNext();) {
            Project prj = (Project) iter.next();
            projectIds[c++] = prj.getID();
        }
        
        // keep upgrading until it's the current version
        while (vid < (VERSIONS.length - 1)) {
            if(vid == 0) {
                upgrade1_1d1(projectIds);
            }            
            vid++;
        }
        return true;
    }
}
 
开发者ID:ser316asu,项目名称:SER316-Dresden,代码行数:28,代码来源:TaskListVersioning.java

示例3: testGetAll

import net.sf.memoranda.ProjectManager; //导入方法依赖的package包/类
@Test
public void testGetAll() {
	assertEquals(ProjectManager.getAllProjectsNumber(),projBeforeTest+5);
	Vector allProj = ProjectManager.getAllProjects();
	int countProj = 0;
	for(Object o: allProj){
		if(((Project)o).getTitle().equals("testProj1") || ((Project)o).getTitle().equals("testProj2") ||
	       ((Project)o).getTitle().equals("testProj3") || ((Project)o).getTitle().equals("testProj4") ||
	       ((Project)o).getTitle().equals("testProj5")) countProj++;
	}
	assertEquals(countProj,5);
}
 
开发者ID:ser316asu,项目名称:SER316-Dresden,代码行数:13,代码来源:ProjectManagerTest.java

示例4: testRemove

import net.sf.memoranda.ProjectManager; //导入方法依赖的package包/类
@Test
public void testRemove(){
	int totalBefore = ProjectManager.getAllProjectsNumber();
	ProjectManager.removeProject(tp1.getID());
	ProjectManager.removeProject(tp4.getID());
	assertEquals(totalBefore-2,ProjectManager.getAllProjectsNumber());
	Vector allProj = ProjectManager.getAllProjects();
	boolean correctProj = true;
	for(Object o: allProj){
		correctProj &= !((Project)o).getTitle().equals("testProj1") && !((Project)o).getTitle().equals("testProj4");
	}
	assertTrue(correctProj);
}
 
开发者ID:ser316asu,项目名称:SER316-Dresden,代码行数:14,代码来源:ProjectManagerTest.java


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