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


Java Document.getItemValueString方法代码示例

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


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

示例1: run

import org.openntf.domino.Document; //导入方法依赖的package包/类
@Override
public void run() {
	Session sess = Factory.getSession(SessionType.NATIVE);
	Database extLib = sess.getDatabase("odademo/oda_1.nsf");
	Database extLib2 = sess.getDatabase("odademo/oda_2.nsf");
	View states = extLib.getView("AllStates");
	Document stateDoc = states.getFirstDocument();
	DatabaseTransaction txn = extLib.startTransaction();
	extLib2.setTransaction(txn);
	boolean successOrFail = false;
	String state = stateDoc.getItemValueString("Key");
	System.out.println("Processing state " + state);
	queueTransaction(extLib, state);	// Update some documents
	queueTransaction(extLib2, state);	// Update some documents
	if (successOrFail) {
		txn.commit();
		System.out.println("...Committed");
	} else {
		txn.rollback();
		System.out.println("rolled back");
	}
}
 
开发者ID:OpenNTF,项目名称:org.openntf.domino,代码行数:23,代码来源:Connect17Transaction.java

示例2: getXPageSharedDesignTemplate

import org.openntf.domino.Document; //导入方法依赖的package包/类
@Override
public org.openntf.domino.Database getXPageSharedDesignTemplate() throws FileNotFoundException {
	IconNote icon = getDesign().getIconNote();
	if (icon == null) {
		return null;
	}
	Document iconDoc = icon.getDocument();
	if ("1".equals(iconDoc.getItemValueString("$XpageSharedDesign"))) {
		String templatePath = iconDoc.getItemValueString("$XpageSharedDesignTemplate");
		org.openntf.domino.Database template = getAncestorSession().getDatabase(templatePath);
		if (template == null || !template.isOpen()) {
			throw new FileNotFoundException("Could not open the XPage shared Design Template: " + templatePath);
		}
		return template;
	}
	return null;
}
 
开发者ID:OpenNTF,项目名称:org.openntf.domino,代码行数:18,代码来源:Database.java

示例3: getLocale

import org.openntf.domino.Document; //导入方法依赖的package包/类
@Override
public Locale getLocale() {
	if (getLocaleCalled) {
		return dbLocale;
	}
	getLocaleCalled = true;

	Document doc = getDesign().getIconNote().getDocument();
	if (doc == null) {
		return null;
	}
	String lStr = doc.getItemValueString("$DefaultLanguage");
	if (lStr == null || lStr.length() < 2) {
		return null;
	}
	String language = lStr.substring(0, 2).toLowerCase();
	String country = (lStr.length() >= 5 && lStr.charAt(2) == '-') ? lStr.substring(3, 5).toUpperCase() : "";
	return dbLocale = new Locale(language, country);
}
 
开发者ID:OpenNTF,项目名称:org.openntf.domino,代码行数:20,代码来源:Database.java

示例4: validateDocument

import org.openntf.domino.Document; //导入方法依赖的package包/类
@Override
public boolean validateDocument(final Document doc) {
	String doctype = doc.getItemValueString("$$SchemaType");
	DocumentDefinition def = getDocumentDefinitions().get(doctype);
	if (def == null)
		return true;

	boolean result = true;
	Map<String, IItemDefinition> itemDefs = def.getItemDefinitions();
	for (String key : itemDefs.keySet()) {
		@SuppressWarnings("unused")
		IItemDefinition itemDef = itemDefs.get(key);
		// TODO NTF
	}

	return result;
}
 
开发者ID:OpenNTF,项目名称:org.openntf.domino,代码行数:18,代码来源:DatabaseSchema.java

示例5: getQueryStringParameters

import org.openntf.domino.Document; //导入方法依赖的package包/类
@Override
public Map<String, List<String>> getQueryStringParameters() {
	Map<String, List<String>> result = new TreeMap<String, List<String>>(String.CASE_INSENSITIVE_ORDER);

	Document doc = getDocumentContext();
	String queryString = doc.getItemValueString("QUERY_STRING");

	for (String pair : queryString.split("&")) {
		if (!pair.isEmpty()) {
			String[] bits = pair.split("=");
			try {
				String left = java.net.URLDecoder.decode(bits[0], "UTF-8");
				String right = bits.length > 1 ? java.net.URLDecoder.decode(bits[1], "UTF-8") : "";

				if (!result.containsKey(left)) {
					result.put(left, new ArrayList<String>());
				}
				result.get(left).add(right);
			} catch (UnsupportedEncodingException uee) {
				// I can't imagine how we'd get here, so we're free to fail entirely
				DominoUtils.handleException(uee);
				return null;
			}
		}
	}

	return result;
}
 
开发者ID:OpenNTF,项目名称:org.openntf.domino,代码行数:29,代码来源:AgentContext.java

示例6: next

import org.openntf.domino.Document; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public T next() {
	String noteId = iterator_.next();
	Document doc = collection_.getAncestorDatabase().getDocumentByID(noteId);
	DesignBase ret = DesignFactory.fromDocument(doc);
	if (clazz_ != null && !clazz_.isAssignableFrom(ret.getClass()))
		throw new ClassCastException("Cannot cast " + ret.getClass().getName() + //
				" ($TITLE=" + doc.getItemValueString("$TITLE") + //
				", $Flags=" + doc.getItemValueString("$FLAGS") + //
				", NoteID=" + doc.getNoteID() + ") to " + clazz_.getName());
	return (T) ret;
}
 
开发者ID:OpenNTF,项目名称:org.openntf.domino,代码行数:14,代码来源:DesignCollection.java


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