当前位置: 首页>>代码示例>>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;未经允许,请勿转载。