mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
A new flavor of createFile. Slightly slower. Significantly safer.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@3277 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -17,6 +17,8 @@
|
||||
|
||||
package org.alfresco.repo.avm;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
|
||||
/**
|
||||
* A plain old file. Contains a Content object.
|
||||
@@ -50,6 +52,18 @@ class PlainFileNodeImpl extends FileNodeImpl implements PlainFileNode
|
||||
repos.getSuperRepository().getSession().save(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new plain file with given content.
|
||||
* @param repos The repository.
|
||||
* @param content The content to set.
|
||||
*/
|
||||
public PlainFileNodeImpl(Repository repos, File content)
|
||||
{
|
||||
super(repos.getSuperRepository().issueID(), repos);
|
||||
fContent = new FileContentImpl(SuperRepository.GetInstance().issueContentID(), content);
|
||||
repos.getSuperRepository().getSession().save(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Copy on write constructor.
|
||||
* @param other The node we are being copied from.
|
||||
|
Reference in New Issue
Block a user