本文整理汇总了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");
}
}
示例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;
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}