mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merge DEV to HEAD
ContentDiskDriver rework. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@29451 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
68
source/java/org/alfresco/filesys/repo/TempNetworkFile.java
Normal file
68
source/java/org/alfresco/filesys/repo/TempNetworkFile.java
Normal file
@@ -0,0 +1,68 @@
|
||||
package org.alfresco.filesys.repo;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.Reader;
|
||||
|
||||
import org.alfresco.jlan.server.filesys.cache.FileState;
|
||||
import org.alfresco.jlan.server.filesys.cache.NetworkFileStateInterface;
|
||||
import org.alfresco.jlan.smb.server.disk.JavaNetworkFile;
|
||||
|
||||
/**
|
||||
* Temporary Java backed network file.
|
||||
*
|
||||
* @author mrogers
|
||||
*/
|
||||
public class TempNetworkFile extends JavaNetworkFile implements NetworkFileStateInterface
|
||||
{
|
||||
/**
|
||||
* Create a new temporary file with no existing content.
|
||||
*
|
||||
* @param file the underlying File
|
||||
* @param netPath where in the repo this file is going.
|
||||
*/
|
||||
public TempNetworkFile(File file, String netPath)
|
||||
{
|
||||
super(file, netPath);
|
||||
setFullName(netPath);
|
||||
}
|
||||
|
||||
/**
|
||||
* A new temporary network file with some existing content.
|
||||
* @param file
|
||||
* @param netPath
|
||||
* @param existingContent
|
||||
*/
|
||||
public TempNetworkFile(File file, String netPath, Reader existingContent)
|
||||
{
|
||||
super(file, netPath);
|
||||
setFullName(netPath);
|
||||
}
|
||||
|
||||
/**
|
||||
* Access to the underlying file.
|
||||
* @return the file.
|
||||
*/
|
||||
public File getFile()
|
||||
{
|
||||
return m_file;
|
||||
}
|
||||
|
||||
public String toString()
|
||||
{
|
||||
return "TempNetworkFile:" + getFullName() + " path: " + m_file.getAbsolutePath();
|
||||
}
|
||||
|
||||
// For JLAN file state lock manager
|
||||
public void setFileState(FileState fileState)
|
||||
{
|
||||
this.fileState = fileState;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FileState getFileState()
|
||||
{
|
||||
return fileState;
|
||||
|
||||
}
|
||||
private FileState fileState;
|
||||
}
|
Reference in New Issue
Block a user