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


Java PseudoFileList類代碼示例

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


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

示例1: ContentSearchContext

import org.alfresco.jlan.server.filesys.pseudo.PseudoFileList; //導入依賴的package包/類
/**
   * Class constructor
   * 
   * @param cifsHelper Filesystem helper class
   * @param results List of file/folder nodes that match the search pattern
   * @param searchStr Search path
   * @param pseudoList List of pseudo files to be blended into the returned list of files
   * @param relPath Relative path being searched
   */
  protected ContentSearchContext(
          CifsHelper cifsHelper,
          List<NodeRef> results,
          String searchStr,
          PseudoFileList pseudoList,
          String relPath,
          boolean lockedFilesAsOffline)
  {
      super();
      super.setSearchString(searchStr);
      this.cifsHelper = cifsHelper;
      this.results    = results;
      this.pseudoList = pseudoList;
      this.lockedFilesAsOffline = lockedFilesAsOffline;

m_relPath = relPath;
if ( m_relPath != null && m_relPath.endsWith( FileName.DOS_SEPERATOR_STR) == false)
	m_relPath = m_relPath + FileName.DOS_SEPERATOR_STR;
  }
 
開發者ID:Alfresco,項目名稱:alfresco-repository,代碼行數:29,代碼來源:ContentSearchContext.java

示例2: findPseudoFile

import org.alfresco.jlan.server.filesys.pseudo.PseudoFileList; //導入依賴的package包/類
private PseudoFile findPseudoFile(final String path) {
    if (path == null) {
        return null; // No path specified
    }
    final String folder;
    final int folderpart = path.lastIndexOf("\\");
    if (folderpart >= 0) {
        folder = path.substring(0, folderpart + 1);
    }
    else {
        folder = "\\";
    }

    final PseudoFileList pseudoFileList = _pseudoFileLists.get(folder);
    if (pseudoFileList == null) {
        return null; // No pseudo files for this folder
    }

    final String filename = path.substring(folder.length());
    return pseudoFileList.findFile(filename, false);
}
 
開發者ID:raqet,項目名稱:acquisition-server,代碼行數:22,代碼來源:RaqetDiskDriver.java

示例3: CacheLookupSearchContext

import org.alfresco.jlan.server.filesys.pseudo.PseudoFileList; //導入依賴的package包/類
/**
 * Class constructor
 * 
 * @param cifsHelper Filesystem helper class
 * @param results List of file/folder nodes that match the search pattern
 * @param searchStr Search path
 * @param pseudoList List of pseudo files to be blended into the returned list of files
 * @param relPath Relative path being searched
 * @param stateCache File state cache
 */
protected CacheLookupSearchContext(
        CifsHelper cifsHelper,
        List<NodeRef> results,
        String searchStr,
        PseudoFileList pseudoList,
        String relPath,
        FileStateCache stateCache,
        boolean lockedFilesAsOffline)
{
    super(cifsHelper, results, searchStr, pseudoList, relPath, lockedFilesAsOffline);
    super.setSearchString(searchStr);
    
    m_stateCache = stateCache;
}
 
開發者ID:Alfresco,項目名稱:alfresco-repository,代碼行數:25,代碼來源:CacheLookupSearchContext.java

示例4: DotDotContentSearchContext

import org.alfresco.jlan.server.filesys.pseudo.PseudoFileList; //導入依賴的package包/類
/**
 * Class constructor
 * 
 * @param cifsHelper Filesystem helper class
 * @param results List of file/folder nodes that match the search pattern
 * @param searchStr Search path
 * @param pseudoList List of pseudo files to be blended into the returned list of files
 * @param relPath Relative path being searched
 * @param lockedFilesAsOffline set state
 */
protected DotDotContentSearchContext(
        CifsHelper cifsHelper,
        List<NodeRef> results,
        String searchStr,
        PseudoFileList pseudoList,
        String relPath,
        boolean lockedFilesAsOffline)
       
{
    super(cifsHelper, results, searchStr, pseudoList, relPath, lockedFilesAsOffline);
    super.setSearchString(searchStr);
}
 
開發者ID:Alfresco,項目名稱:alfresco-repository,代碼行數:23,代碼來源:DotDotContentSearchContext.java

示例5: existingPseudoFileList

import org.alfresco.jlan.server.filesys.pseudo.PseudoFileList; //導入依賴的package包/類
private PseudoFileList existingPseudoFileList(final String path) {
    final PseudoFileList pseudoFileList = _pseudoFileLists.get(path);
    if (pseudoFileList != null) {
        return pseudoFileList;
    }

    final PseudoFileList newPseudoFileList = new PseudoFileList();
    _pseudoFileLists.put(path, newPseudoFileList);

    // TODO: (see RAQET-36) Remove hack for bug in PseudoFileList when reimplementing the disk driver.
    newPseudoFileList.addFile(new MemoryPseudoFile("123.txt", new byte[]{1, 2, 3}));

    return newPseudoFileList;
}
 
開發者ID:raqet,項目名稱:acquisition-server,代碼行數:15,代碼來源:RaqetDiskDriver.java

示例6: addRemoteDevice

import org.alfresco.jlan.server.filesys.pseudo.PseudoFileList; //導入依賴的package包/類
public void addRemoteDevice(final RemoteDeviceManager remoteDeviceManager, final String folder, final RemoteDeviceInfo remoteDevice) {
    final PseudoFileList pseudoFileList = existingPseudoFileList(folder);
    pseudoFileList.addFile(new RemotePseudoFile(remoteDeviceManager, remoteDevice));
}
 
開發者ID:raqet,項目名稱:acquisition-server,代碼行數:5,代碼來源:RaqetDiskDriver.java

示例7: startSearch

import org.alfresco.jlan.server.filesys.pseudo.PseudoFileList; //導入依賴的package包/類
@Override
public SearchContext startSearch(final SrvSession sess, final TreeConnection tree, final String searchPath, final int attrib) throws FileNotFoundException {
	SearchContext searchContext;
	try {
		searchContext = super.startSearch(sess, tree, searchPath, attrib);
	} catch (FileNotFoundException exception) {
		searchContext = null;
	}
    
    int lastSlash = searchPath.lastIndexOf("\\");
    if (lastSlash < 1) {
    	return searchContext;
    }
    final String path = searchPath.substring(0, lastSlash+1);
    final String pattern = searchPath.substring(lastSlash+1);
    final RaqetSearchContext raqetSearchContext = new RaqetSearchContext(searchContext, path);
    
    final PseudoFileList pseudoFileList = _pseudoFileLists.get(path);
    if (pseudoFileList == null) {
    	return searchContext;
    }
    
    if (pattern.equals("*")) {
        raqetSearchContext.setPseudoFileList(pseudoFileList);
    } else {
        final PseudoFileList newPseudoFileList = new PseudoFileList();
        newPseudoFileList.addFile(new MemoryPseudoFile("123.txt", new byte[]{1, 2, 3}));
    	for (int i=0; i < pseudoFileList.numberOfFiles(); i++) {
    		PseudoFile pseudoFile = pseudoFileList.getFileAt(i);
    		if (pseudoFile.getFileName().equals(pattern)) {
    			newPseudoFileList.addFile(pseudoFile);
    		} else {
    		}
    	}
    	if ((searchContext == null) && 
    		(newPseudoFileList.numberOfFiles() == 1)) {
    		throw new FileNotFoundException();
    	}
        raqetSearchContext.setPseudoFileList(newPseudoFileList);
    }
    

    return raqetSearchContext;
}
 
開發者ID:raqet,項目名稱:acquisition-server,代碼行數:45,代碼來源:RaqetDiskDriver.java

示例8: searchPseudoFiles

import org.alfresco.jlan.server.filesys.pseudo.PseudoFileList; //導入依賴的package包/類
/**
 * Search for the pseudo files on the specified path
 * @param parentDir NodeRef
 * @param name String
 * @return list of pseudo files.
 */
public PseudoFileList searchPseudoFiles(NodeRef parentDir, String name);
 
開發者ID:Alfresco,項目名稱:alfresco-repository,代碼行數:8,代碼來源:PseudoFileOverlay.java


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