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


Java ExtLibUtil.getCurrentDatabase方法代码示例

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


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

示例1: loadAppstore

import com.ibm.xsp.extlib.util.ExtLibUtil; //导入方法依赖的package包/类
private void loadAppstore() {
	Database db=ExtLibUtil.getCurrentDatabase();
	View view=null;
	Document appstore=null;
	
	try {
		view=db.getView("apps");
		appstore=view.getDocumentByKey(DEFAULT_ENDPOINT_NAME, true);
		
		if(appstore==null) {
			System.out.println("No Application found for "+DEFAULT_ENDPOINT_NAME);
		} else {
			consumerKey=appstore.getItemValueString("ConsumerKey");
			consumerSecret=appstore.getItemValueString("ConsumerSecret");
		}
	} catch(NotesException ne) {
		ne.printStackTrace();
	} finally {
		DevelopiUtils.recycleObjects(appstore, view);
	}
}
 
开发者ID:sbasegmez,项目名称:Blogged,代码行数:22,代码来源:BoxService.java

示例2: get

import com.ibm.xsp.extlib.util.ExtLibUtil; //导入方法依赖的package包/类
public DominoDocument get(Object key) {
	if(!(key instanceof String)) {
		throw new IllegalArgumentException("key must be a String.");
	}

	try {
		Database database = ExtLibUtil.getCurrentDatabase();
		Document doc = database.getDocumentByUNID((String)key);
		return DominoDocument.wrap(
				database.getFilePath(),	// databaseName
				doc,				// Document
				null,				// computeWithForm
				null,				// concurrencyMode
				false,			// allowDeletedDocs
				null,				// saveLinksAs
				null				// webQuerySaveAgent
		);
	} catch(NotesException ne) {
		ne.printStackTrace();
	}
	return null;
}
 
开发者ID:jesse-gallagher,项目名称:Miscellany,代码行数:23,代码来源:DominoDocumentMap.java

示例3: run

import com.ibm.xsp.extlib.util.ExtLibUtil; //导入方法依赖的package包/类
public void run() throws NotesException, IOException {
	Database db = ExtLibUtil.getCurrentDatabase();
	if(deleteAllDoc) {
		deleteAllDocuments();
	}
	if(createUsers) {
		createUsers(db);
	}
	if(createStates) {
		createStates(db);
	}
	if(createDiscussionDocuments) {
		createDiscussionDocuments(db);
	}
	if(createAllTypes) {
		createAllTypes(db);
	}
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:19,代码来源:DataInitializer.java

示例4: getNoteCount

import com.ibm.xsp.extlib.util.ExtLibUtil; //导入方法依赖的package包/类
public int getNoteCount() throws NotesException {
	Database database = ExtLibUtil.getCurrentDatabase();
	View notes = database.getView("Notes by Parent");
	ViewNavigator nav = notes.createViewNavFromCategory(this.getDocumentId());
	int count = nav.getCount();
	nav.recycle();
	notes.recycle();
	return count;
}
 
开发者ID:jesse-gallagher,项目名称:Miscellany,代码行数:10,代码来源:BasicDocumentController.java

示例5: getStoreDoc

import com.ibm.xsp.extlib.util.ExtLibUtil; //导入方法依赖的package包/类
private Document getStoreDoc() {
	Database database=ExtLibUtil.getCurrentDatabase();
			
	Document doc=null;
	View view=null;

	try {
		view=database.getView("tokenstores");
		String serverName=database.getServer();
		
		doc=view.getDocumentByKey(serverName, true);
		
		if(doc==null) {
			doc=database.createDocument();
			doc.replaceItemValue("Form", "tokenstore");
			doc.replaceItemValue("ServerName", serverName);
			doc.computeWithForm(false, false);
			doc.save();
		}
		
	} catch (NotesException e) {
		e.printStackTrace();
	} finally {
		DevelopiUtils.recycleObject(view);
	}

	return doc;
}
 
开发者ID:sbasegmez,项目名称:ic14demos,代码行数:29,代码来源:MemoryStore.java

示例6: getFirstContactID

import com.ibm.xsp.extlib.util.ExtLibUtil; //导入方法依赖的package包/类
public String getFirstContactID() throws NotesException {
	if(!firstContactIDRead) {
		Database db = ExtLibUtil.getCurrentDatabase();
		View view = db.getView("AllContacts");
		Document doc = view.getFirstDocument();
		if(doc!=null) {
			firstContactID = doc.getNoteID();
		}
	}
	return firstContactID;
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:12,代码来源:DataAccessor.java

示例7: loadList

import com.ibm.xsp.extlib.util.ExtLibUtil; //导入方法依赖的package包/类
private void loadList(String eventCode) {
	Database db=ExtLibUtil.getCurrentDatabase();

	View view=null;
	ViewEntryCollection entries=null;

	try {
		view=db.getView("ParticipantsByEventCode");
		entries=view.getAllEntriesByKey(eventCode, true);

		ViewEntry ve=entries.getFirstEntry();

		while(ve!=null) {

			Document pDoc=null;
			try {
				pDoc=ve.getDocument();

				_list.add(new Participant(pDoc));
			} finally {
				Utils.recycleObject(pDoc);
			}

			ViewEntry tmpEntry=ve;
			ve=entries.getNextEntry(tmpEntry);
			Utils.recycleObject(tmpEntry);
		}

	} catch (NotesException e) {
		// Use OpenNTF Domino API to get rid of this.
		e.printStackTrace();
	} finally {
		Utils.recycleObjects(view, entries);
	}
}
 
开发者ID:sbasegmez,项目名称:Blogged,代码行数:36,代码来源:ParticipantList.java

示例8: getCurrentDatabase

import com.ibm.xsp.extlib.util.ExtLibUtil; //导入方法依赖的package包/类
private static Database getCurrentDatabase() {
    return ExtLibUtil.getCurrentDatabase();
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:4,代码来源:NotesFunctionsEx.java

示例9: deleteAllDocuments

import com.ibm.xsp.extlib.util.ExtLibUtil; //导入方法依赖的package包/类
void deleteAllDocuments() throws NotesException {
	Database db = ExtLibUtil.getCurrentDatabase();
	db.getAllDocuments().removeAll(true);
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:5,代码来源:DataInitializer.java

示例10: getCommonServerName

import com.ibm.xsp.extlib.util.ExtLibUtil; //导入方法依赖的package包/类
public static String getCommonServerName() {
	Session session=ExtLibUtil.getCurrentSession();
	Database db=ExtLibUtil.getCurrentDatabase();
	
	String serverName="";

	try {
		serverName = db.getServer();
	} catch (NotesException e) { }
	
	return toCommon(session, serverName);
	
}
 
开发者ID:sbasegmez,项目名称:ic14demos,代码行数:14,代码来源:DevelopiUtils.java


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