當前位置: 首頁>>代碼示例>>Java>>正文


Java NotesAPIException類代碼示例

本文整理匯總了Java中com.ibm.designer.domino.napi.NotesAPIException的典型用法代碼示例。如果您正苦於以下問題:Java NotesAPIException類的具體用法?Java NotesAPIException怎麽用?Java NotesAPIException使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


NotesAPIException類屬於com.ibm.designer.domino.napi包,在下文中一共展示了NotesAPIException類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getNotesDataDir

import com.ibm.designer.domino.napi.NotesAPIException; //導入依賴的package包/類
public static String getNotesDataDir() throws Throwable {
    final String[] result = new String[1];
    Display.getDefault().syncExec(new Runnable(){
        public void run() {          
            NotesSession session = null;
            try {
                session = new NotesSession();
                result[0] = session.getDataDirectory();
            } finally {
                if(session != null){
                    try {
                        session.recycle();
                    } catch (NotesAPIException e) {
                        if (BluemixLogger.BLUEMIX_LOGGER.isErrorEnabled()) {
                            BluemixLogger.BLUEMIX_LOGGER.errorp(BluemixUtil.class, "getNotesDataDir", e, "Failed to recycle session"); // $NON-NLS-1$ $NLE-BluemixUtil.Failedtorecyclesession-2$
                        }
                    }
                }
            }
        }
    });
    return result[0];
}
 
開發者ID:OpenNTF,項目名稱:XPagesExtensionLibrary,代碼行數:24,代碼來源:BluemixUtil.java

示例2: getFile

import com.ibm.designer.domino.napi.NotesAPIException; //導入依賴的package包/類
public InputStream getFile(String strDatabase, String strFileName) {
	try {
		NotesSession nSession = new NotesSession();
		NotesDatabase nDatabase = nSession.getDatabaseByPath(strDatabase);
		nDatabase.open();
		NotesNote nFile = FileAccess.getFileByPath(nDatabase, strFileName);
		InputStream is = FileAccess.readFileContentAsInputStream(nFile);
		nFile.recycle();
		nDatabase.recycle();
		nSession.recycle();
		return is;
	} catch (NotesAPIException e1) {
		e1.printStackTrace();
	} catch (Exception e) {
		e.printStackTrace();
	}
	return null;
}
 
開發者ID:OpenNTF,項目名稱:XPagesToolkit,代碼行數:19,代碼來源:StorageService.java

示例3: run

import com.ibm.designer.domino.napi.NotesAPIException; //導入依賴的package包/類
protected IStatus run(IProgressMonitor paramIProgressMonitor) {

		IStatus status = Status.OK_STATUS;

		try {

			if (StringUtil.isEmpty(this.nsfName)) {
				String msg = StringUtil.format("No name specified for new NSF [server:(1)]",
						new Object[] { this.nsfName, this.serverName });
				return new Status(4, "com.ibm.designer.domino", CommandLineJobManager.STATUSCODE_ERROR, msg, null);
			}

			status = createNSFIfNotExists();

			if (!status.isOK()) {
				return status;
			}

			String nsf = this.nsfName;

			int i = nsf.lastIndexOf("!!");
			String server = this.serverName;

			if (i != -1) {
				server = NotesUtils.DNAbbreviate(nsf.substring(0, i));
				nsf = nsf.substring(i + 2);
			}
			if ((server == null) || (server.length() == 0)) {
				server = "Local";
			}

			this._designerProject = ((IDominoDesignerProject) DesignerResource.openDesignerProject(server, nsf));

			// CommandLineJobManager.instance().projectCreated(this._designerProject.getProject());
			// CommandLineJobManager.instance().nsfCreated(new
			// NSFPath(this.serverName, this.nsfName,
			// this._designerProject.getProject()));
			if (logger.isLoggable(Level.FINEST)) {
				logger.finest("CreateNSFJob project created: " + nsf + ":" + server);
			}

		} catch (DesignerException localDesignerException) {
			logger.log(Level.SEVERE, "Designer error project creation for " + this.nsfName, localDesignerException);
		} catch (NotesAPIException localNotesAPIException) {
			logger.log(Level.SEVERE, "Notes API error project creation for " + this.nsfName, localNotesAPIException);
		}
		System.out.println(status);

		return status;
	}
 
開發者ID:camac,項目名稱:BuildXPages,代碼行數:51,代碼來源:CreateNSFJob.java


注:本文中的com.ibm.designer.domino.napi.NotesAPIException類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。