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


Java View.getNextDocument方法代码示例

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


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

示例1: getAllNinjas

import lotus.domino.View; //导入方法依赖的package包/类
public List<Ninja> getAllNinjas(Session sesCurrent) {
	List<Ninja> lstNinja = new ArrayList<Ninja>();
	try {
		Database ndbCurrent = sesCurrent.getCurrentDatabase();
		View viwNinjas = ndbCurrent.getView("lupNinjasById");
		Document docNext = viwNinjas.getFirstDocument();
		while (docNext != null) {
			Document docProcess = docNext;
			docNext = viwNinjas.getNextDocument(docNext);
			Ninja ninNew = new Ninja();
			if (DominoStorageService.getInstance().getObjectWithDocument(
					ninNew, docProcess)) {
				lstNinja.add(ninNew);
			}
			docProcess.recycle();
		}
		viwNinjas.recycle();
		ndbCurrent.recycle();
	} catch (Exception e) {
		e.printStackTrace();
	}

	return lstNinja;
}
 
开发者ID:OpenNTF,项目名称:Nagios4DominoIntegration,代码行数:25,代码来源:NinjaStorageService.java

示例2: getAllCustomers

import lotus.domino.View; //导入方法依赖的package包/类
public List<Customer> getAllCustomers(Session sesCurrent) {
	List<Customer> lstCustomer = new ArrayList<Customer>();
	try {
		Database ndbCurrent = sesCurrent.getCurrentDatabase();
		View viwCustomer = ndbCurrent.getView("lupCustomersById");
		Document docNext = viwCustomer.getFirstDocument();
		while (docNext != null) {
			Document docProcess = docNext;
			docNext = viwCustomer.getNextDocument(docNext);
			Customer newCustomer = new Customer();
			if (DominoStorageService.getInstance().getObjectWithDocument(newCustomer, docProcess)) {
				lstCustomer.add(newCustomer);
			}
			docProcess.recycle();
		}
		viwCustomer.recycle();
		ndbCurrent.recycle();
	} catch (Exception e) {
		e.printStackTrace();
	}

	return lstCustomer;
}
 
开发者ID:OpenNTF,项目名称:myWebGate-Scrum,代码行数:24,代码来源:CustomerStorageService.java

示例3: searchInViewFrom

import lotus.domino.View; //导入方法依赖的package包/类
/**
 * Search for documents containing the search term in the view of the
 * database db, using the fulltext search capability.
 * 
 * @param search
 * @param viewName
 * @param db
 * @return
 */
public List<T> searchInViewFrom(String search, String viewName, Database db) {
	List<T> result = new ArrayList<T>();
	try {
		View view = db.getView(viewName);
		int count = view.FTSearch(search);
		if (count == 0) {
			view.recycle();
			return result;
		}
		result = new ArrayList<T>(count);
		Document docNext = view.getFirstDocument();
		while (docNext != null) {
			Document docProcess = docNext;
			docNext = view.getNextDocument(docNext);
			convertDocument2ObjectAndAdd2List(result, docProcess);
			docProcess.recycle();
		}
		view.recycle();
	} catch (NullPointerException ex) {
		throw ex;
	} catch (Exception e) {
		throw new XPTRuntimeException("Error during search of " + search + " in view " + viewName, e);
	}
	return result;
}
 
开发者ID:OpenNTF,项目名称:XPagesToolkit,代码行数:35,代码来源:AbstractStorageService.java

示例4: getAllBugs

import lotus.domino.View; //导入方法依赖的package包/类
public List<Bug> getAllBugs(Session sesCurrent, String statusFilter) {
	List<Bug> lstBug = new ArrayList<Bug>();
	try {
		Database ndbCurrent = sesCurrent.getCurrentDatabase();
		View viwBug = ndbCurrent.getView("lupBugsById");
		Document docNext = viwBug.getFirstDocument();
		while (docNext != null) {
			Document docProcess = docNext;
			docNext = viwBug.getNextDocument(docNext);
			Bug newBug = new Bug();
			if (DominoStorageService.getInstance().getObjectWithDocument(newBug, docProcess)) {
				if (!newBug.getIsDeleted().equals("true") && (statusFilter == null || statusFilter.equals("") || statusFilter.equals(newBug.getStatus()))) {
					lstBug.add(newBug);
				}
			}
			docProcess.recycle();
		}
		viwBug.recycle();
		ndbCurrent.recycle();
	} catch (Exception e) {
		e.printStackTrace();
	}

	return lstBug;
}
 
开发者ID:OpenNTF,项目名称:myWebGate-Scrum,代码行数:26,代码来源:BugStorageService.java

示例5: getAllTasks

import lotus.domino.View; //导入方法依赖的package包/类
public List<Task> getAllTasks(Session sesCurrent, String statusFilter) {
	List<Task> lstTask = new ArrayList<Task>();
	try {
		Database ndbCurrent = sesCurrent.getCurrentDatabase();
		View viwTask = ndbCurrent.getView("lupTasksById");
		Document docNext = viwTask.getFirstDocument();
		while (docNext != null) {
			Document docProcess = docNext;
			docNext = viwTask.getNextDocument(docNext);
			Task newTask = new Task();
			if (DominoStorageService.getInstance().getObjectWithDocument(newTask, docProcess)) {
				if (!newTask.getIsDeleted().equals("true") && (statusFilter == null || statusFilter.equals("") || statusFilter.equals(newTask.getStatus()))) {
					lstTask.add(newTask);
				}
			}
			docProcess.recycle();
		}
		viwTask.recycle();
		ndbCurrent.recycle();
	} catch (Exception e) {
		e.printStackTrace();
	}

	return lstTask;
}
 
开发者ID:OpenNTF,项目名称:myWebGate-Scrum,代码行数:26,代码来源:TaskStorageService.java

示例6: getAllIterations

import lotus.domino.View; //导入方法依赖的package包/类
public List<Iteration> getAllIterations(Session sesCurrent) {
	List<Iteration> lstIteration = new ArrayList<Iteration>();
	try {
		Database ndbCurrent = sesCurrent.getCurrentDatabase();
		View viwIteration = ndbCurrent.getView("lupIterationsById");
		Document docNext = viwIteration.getFirstDocument();
		while (docNext != null) {
			Document docProcess = docNext;
			docNext = viwIteration.getNextDocument(docNext);
			Iteration newIteration = new Iteration();
			if (DominoStorageService.getInstance().getObjectWithDocument(
					newIteration, docProcess)) {
				lstIteration.add(newIteration);
			}
			docProcess.recycle();
		}
		viwIteration.recycle();
		ndbCurrent.recycle();
	} catch (Exception e) {
		e.printStackTrace();
	}

	return lstIteration;
}
 
开发者ID:OpenNTF,项目名称:myWebGate-Scrum,代码行数:25,代码来源:IterationStorageService.java

示例7: getAllNagiosSetting

import lotus.domino.View; //导入方法依赖的package包/类
public List<NagiosSetting> getAllNagiosSetting(Session sesCurrent) {
	List<NagiosSetting> lstNagiosSetting = new ArrayList<NagiosSetting>();
	try {
		Database curDatabase = sesCurrent.getCurrentDatabase();
		View curView = curDatabase.getView("lupNagiosSettings");
		Document curDocument = curView.getFirstDocument();
		while (curDocument != null) {
			Document docNext = curDocument;
			curDocument = curView.getNextDocument(curDocument);
			NagiosSetting newSetting = new NagiosSetting();
			if (DominoStorageService.getInstance().getObjectWithDocument(
					newSetting, docNext)) {
				lstNagiosSetting.add(newSetting);
			}
			docNext.recycle();
		}
		curView.recycle();
		curDatabase.recycle();
	} catch (Exception e) {
		e.printStackTrace();
	}
	return lstNagiosSetting;
}
 
开发者ID:OpenNTF,项目名称:Nagios4DominoIntegration,代码行数:24,代码来源:NagiosStorageService.java

示例8: loadConfig

import lotus.domino.View; //导入方法依赖的package包/类
private synchronized HashMap<String, TokenConfiguration> loadConfig() {
	Database ndbNames = null;
	View viwSSO = null;
	HashMap<String, TokenConfiguration> configurations = new HashMap<String, TokenConfiguration>();
	try {
		ndbNames = ExtLibUtil.getCurrentSessionAsSigner().getDatabase(ExtLibUtil.getCurrentSession().getServerName(), "names.nsf");
		if (ndbNames != null) {
			viwSSO = ndbNames.getView("($WebSSOConfigs)");
			Document docNext = viwSSO.getFirstDocument();
			while (docNext != null) {
				Document docConfig = docNext;
				docNext = viwSSO.getNextDocument(docNext);
				TokenConfiguration tokenConfig = buildConfig(docConfig);
				if (tokenConfig != null) {
					configurations.put(tokenConfig.getDomain().toLowerCase(), tokenConfig);
				}
				docConfig.recycle();
			}
		}
	} catch (Exception e) {
		e.printStackTrace();
	}
	return configurations;
}
 
开发者ID:OpenNTF,项目名称:XPagesToolkit,代码行数:25,代码来源:TokenFactory.java

示例9: getAllFrom

import lotus.domino.View; //导入方法依赖的package包/类
/**
 * Loads all objects form a view from the source database
 * 
 * @param viewName
 * @param sourceDatabase
 * @return
 */
public List<T> getAllFrom(String viewName, Database sourceDatabase) {
	List<T> ret = new ArrayList<T>();
	try {
		View viwDabases = sourceDatabase.getView(viewName);
		viwDabases.setAutoUpdate(false);
		Document docNext = viwDabases.getFirstDocument();
		while (docNext != null) {
			Document docCurrent = docNext;
			docNext = viwDabases.getNextDocument(docNext);
			convertDocument2ObjectAndAdd2List(ret, docCurrent);
			docCurrent.recycle();

		}
		viwDabases.recycle();
	} catch (NullPointerException ex) {
		throw ex;
	} catch (Exception e) {
		LoggerFactory.logError(getClass(), GENERAL_ERROR, e);
		throw new XPTRuntimeException(GENERAL_ERROR, e);
	}
	return ret;
}
 
开发者ID:OpenNTF,项目名称:XPagesToolkit,代码行数:30,代码来源:AbstractStorageService.java

示例10: run

import lotus.domino.View; //导入方法依赖的package包/类
@Override
@Stopwatch
public void run() {

	if(TaskRunner.getInstance().isClosing()){
		return;
	}
	
	if(server.getWebSocketAndObserverCount() == 0)return;

	Session session = this.openSession();
	try {
		Database db = session.getDatabase(StringCache.EMPTY, Const.WEBSOCKET_PATH);
		View view = db.getView(Const.VIEW_MSG_QUEUE);
		if(view.getAllEntries().getCount() > 0){
			view.setAutoUpdate(false);
			Document doc = view.getFirstDocument();
			Document temp = null;
			while(doc!=null){
				if(doc.isValid() && !doc.hasItem(StringCache.FIELD_CONFLICT)){
					this.processDoc(doc);

				}else if(doc.isValid() && doc.hasItem(StringCache.FIELD_CONFLICT)){
					this.processConflict(doc);
				}
				temp = view.getNextDocument(doc);
				doc.recycle();
				doc = temp;	
			}

			view.setAutoUpdate(true);
		}
	} catch (NotesException e) {
		LOG.log(Level.SEVERE,null,e);

	}finally{
		this.closeSession(session);
	}
}
 
开发者ID:mwambler,项目名称:xockets.io,代码行数:40,代码来源:QueueProcessor.java

示例11: setClustermateUsersOffline

import lotus.domino.View; //导入方法依赖的package包/类
/**
 * Sets the clustermate users offline.
 *
 * @param db the db
 * @param clustermate the clustermate
 */
@Stopwatch
private void setClustermateUsersOffline(Database db, String clustermate) {

	try {
		View view = db.getView(Const.VIEW_USERS);
		view.setAutoUpdate(false);
		Document doc = view.getFirstDocument();
		Document temp = null;
		while(doc!=null){

			if(doc.isValid()){
				String host = doc.getItemValueString(Const.FIELD_HOST);

				//if hosts are the same
				if(host!=null && host.equals(clustermate)){
					doc.replaceItemValue(Const.FIELD_STATUS, Const.STATUS_OFFLINE);
					doc.save();
				}
			}

			temp = view.getNextDocument(doc);
			doc.recycle();
			doc = temp;
		}
		view.setAutoUpdate(true);

	} catch (NotesException e) {
		LOG.log(Level.SEVERE,null,e);
	}

}
 
开发者ID:mwambler,项目名称:xockets.io,代码行数:38,代码来源:ClustermateMonitor.java

示例12: run

import lotus.domino.View; //导入方法依赖的package包/类
@Override
@Stopwatch
public void run() {

	if(TaskRunner.getInstance().isClosing()){
		return;
	}


	Session session =  this.openSession();
	try {	
		Database db = session.getDatabase(StringCache.EMPTY, Const.WEBSOCKET_PATH);
		View view = db.getView(Const.VIEW_USERS);
		Document doc = view.getFirstDocument();
		Document temp = null;
		while(doc!=null){
			String host = doc.getItemValueString(Const.FIELD_HOST);
			if(ServerInfo.getInstance().isCurrentServer(host)){
				String currentStatus= doc.getItemValueString(Const.FIELD_STATUS);
				//only update if we need to.
				if(!this.getStatus().equals(currentStatus)){
					doc.replaceItemValue(Const.FIELD_STATUS, this.getStatus());
					doc.save();
				}
			}

			temp = view.getNextDocument(doc);
			doc.recycle();
			doc = temp;
		}

	} catch (NotesException e) {
		LOG.log(Level.SEVERE,null,e);

	}finally{
		SessionFactory.closeSession(session);
	}

}
 
开发者ID:mwambler,项目名称:xockets.io,代码行数:40,代码来源:StampAllUsers.java

示例13: getAllProjects

import lotus.domino.View; //导入方法依赖的package包/类
public List<Project> getAllProjects(Session sesCurrent) {
	List<Project> lstProject = new ArrayList<Project>();
	try {
		Database ndbCurrent = sesCurrent.getCurrentDatabase();
		View viwProject = ndbCurrent.getView("lupProjectsById");
		Document docNext = viwProject.getFirstDocument();
		while (docNext != null) {
			Document docProcess = docNext;
			docNext = viwProject.getNextDocument(docNext);
			Project newProject = new Project();
			if (DominoStorageService.getInstance().getObjectWithDocument(
					newProject, docProcess)) {
				if (newProject.getIsDeleted() == null) {
					lstProject.add(newProject);
				} else if (!newProject.getIsDeleted().equals("true")) {
					lstProject.add(newProject);
				}
			}
			docProcess.recycle();
		}
		viwProject.recycle();
		ndbCurrent.recycle();
	} catch (Exception e) {
		e.printStackTrace();
	}

	return lstProject;
}
 
开发者ID:OpenNTF,项目名称:myWebGate-Scrum,代码行数:29,代码来源:ProjectStorageService.java

示例14: getMyProjects

import lotus.domino.View; //导入方法依赖的package包/类
public List<Project> getMyProjects(Session sesCurrent) {
	List<Project> lstProject = new ArrayList<Project>();
	try {
		Database ndbCurrent = sesCurrent.getCurrentDatabase();
		View viwProject = ndbCurrent.getView("lupProjectsById");
		Document docNext = viwProject.getFirstDocument();
		while (docNext != null) {
			Document docProcess = docNext;
			docNext = viwProject.getNextDocument(docNext);
			Project newProject = new Project();
			if (DominoStorageService.getInstance().getObjectWithDocument(
					newProject, docProcess)) {
				if (newProject.getInvolved().contains(
						sesCurrent.getEffectiveUserName())
						|| newProject.getInvolved().contains(
								sesCurrent.createName(
										sesCurrent.getEffectiveUserName())
										.getAbbreviated())) {
					if (newProject.getIsDeleted() == null) {
						lstProject.add(newProject);
					} else if (!newProject.getIsDeleted().equals("true")) {
						lstProject.add(newProject);
					}
				}
			}
			docProcess.recycle();
		}
		viwProject.recycle();
		ndbCurrent.recycle();
	} catch (Exception e) {
		e.printStackTrace();
	}

	return lstProject;
}
 
开发者ID:OpenNTF,项目名称:myWebGate-Scrum,代码行数:36,代码来源:ProjectStorageService.java

示例15: run

import lotus.domino.View; //导入方法依赖的package包/类
@Override
public void run() {

	logger.log(Level.INFO,"running FeedbackMonitor");
	
	Session session = SessionFactory.openSession();
	try {
		Database db = session.getDatabase("", PushConstants.PUSH_NSF);
		View view = db.getView(PushConstants.VIEW_APP_CONFIG);
		Document docCfg = view.getFirstDocument();
		Document docTemp = null;
		TokenError tokenError = new TokenError(session);
		
		while(docCfg!=null){

			AppConfig cfg = cfgFactory.provideAppConfig(docCfg);
			
			logger.log(Level.INFO,"checking feedback for app " + cfg.getAppTitle());
			
			List<Feedback> list = this.getFeedback(cfg);
			
			for(Feedback feedback : list){
				String error = APNErrors.getError(APNConstants.ERROR_DEVICE_UNREGISTERED);
				tokenError.applyError(feedback.getToken(), error);
			}
			
			docTemp = view.getNextDocument(docCfg);
			docCfg.recycle();
			docCfg = docTemp;
		}

	} catch (NotesException e) {
		logger.log(Level.SEVERE,null, e);

	} finally{
		SessionFactory.closeSession(session);
	}
}
 
开发者ID:mwambler,项目名称:webshell-xpages-ext-lib,代码行数:39,代码来源:FeedbackMonitor.java


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