當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。