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


Java RepositoryDirectoryInterface.getPath方法代码示例

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


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

示例1: makeDirs

import org.pentaho.di.repository.RepositoryDirectoryInterface; //导入方法依赖的package包/类
/**
*  <br/>
* @author jingma
* @param directoryName
* @return
* @throws KettleException
*/
public static RepositoryDirectoryInterface makeDirs(String directoryName) throws KettleException {
    if(StringUtil.isNotBlank(directoryName)){
        String parentDirectory = "";
        String[] dirArr = directoryName.replace("\\", "/").split("/");
        for(String dirStr:dirArr){
            try {
                if(StringUtil.isNotBlank(dirStr)){
                    RepositoryDirectoryInterface p = getOrMakeDirectory(parentDirectory, dirStr);
                    parentDirectory = p.getPath();
                }
            } catch (Exception e) {
                log.error("创建目录失败:"+directoryName+","+parentDirectory+","+dirStr, e);
            }
        }
        return getOrMakeDirectory(parentDirectory,null);
    }else{
        return null;
    }
}
 
开发者ID:majinju,项目名称:KettleEasyExpand,代码行数:27,代码来源:KettleUtils.java

示例2: getDirectory

import org.pentaho.di.repository.RepositoryDirectoryInterface; //导入方法依赖的package包/类
/**
 * 获取指定的job目录. <br/>
 * @author jingma
 * @param dirId
 * @return
 * @throws KettleException 
 * @since JDK 1.6
 */
public static String getDirectory(ObjectId dirId) throws KettleException {
    RepositoryDirectoryInterface dir = repository.findDirectory(dirId);
    if(dir==null){
        return null;
    }else{
        return dir.getPath();
    }
}
 
开发者ID:majinju,项目名称:KettleEasyExpand,代码行数:17,代码来源:KettleUtils.java

示例3: calcRelativeElementDirectory

import org.pentaho.di.repository.RepositoryDirectoryInterface; //导入方法依赖的package包/类
public String calcRelativeElementDirectory(RepositoryDirectoryInterface dir) {
	if (dir!=null) {
		return dir.getPath();
	} else {
		return "/";
	}
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:8,代码来源:KettleFileRepository.java

示例4: createDirectory

import org.pentaho.di.repository.RepositoryDirectoryInterface; //导入方法依赖的package包/类
public void createDirectory(TreeItem ti, RepositoryDirectoryInterface repdir)
{
	EnterStringDialog esd = new EnterStringDialog(shell, BaseMessages.getString(PKG, "RepositoryExplorerDialog.Directory.Create.AskName.Default"), BaseMessages.getString(PKG, "RepositoryExplorerDialog.Directory.Create.AskName.Title"), BaseMessages.getString(PKG, "RepositoryExplorerDialog.Directory.Create.AskName.Message")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
	String newdir = esd.open();
	if (newdir!=null)
	{
	  RepositoryDirectoryInterface rd = new RepositoryDirectory(repdir, newdir);
		String path[] = rd.getPathArray();
		
		RepositoryDirectoryInterface exists = directoryTree.findDirectory( path );
		if (exists==null)
		{
			try {
				rep.saveRepositoryDirectory(rd);
			} catch(Exception exception) {
				new ErrorDialog(shell, 
					BaseMessages.getString(PKG, "RepositoryExplorerDialog.Directory.Create.UnexpectedError.Message1")+newdir+BaseMessages.getString(PKG, "RepositoryExplorerDialog.Directory.Create.UnexpectedError.Message2")+repdir.getPath()+"]", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
					BaseMessages.getString(PKG, "RepositoryExplorerDialog.Directory.Create.UnexpectedError.Title"), //$NON-NLS-1$
					exception
				);
				
			}
		}
		else
		{
			MessageBox mb = new MessageBox(shell, SWT.ICON_ERROR | SWT.OK);
			mb.setMessage(BaseMessages.getString(PKG, "RepositoryExplorerDialog.Directory.Create.AlreadyExists.Message1")+newdir+BaseMessages.getString(PKG, "RepositoryExplorerDialog.Directory.Create.AlreadyExists.Message2")+repdir.getPath()+BaseMessages.getString(PKG, "RepositoryExplorerDialog.Directory.Create.AlreadyExists.Message3")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
			mb.setText(BaseMessages.getString(PKG, "RepositoryExplorerDialog.Directory.Create.AlreadyExists.Title")); //$NON-NLS-1$
			mb.open();
		}
	}
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:33,代码来源:RepositoryExplorerDialog.java


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