Package org.alfresco.utility.model
Class FileModel
java.lang.Object
org.alfresco.utility.model.TestModel
org.alfresco.utility.model.RepoTestModel
org.alfresco.utility.model.ContentModel
org.alfresco.utility.model.FileModel
- All Implemented Interfaces:
Model
-
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionClone file model to working copy.static FileModelgetFileModelBasedOnTestDataFile(String resourceDataFile) This will generate a new FileModel having one existing file from src/main/resources/shared-data locationstatic FileModelgetFileModelWithContentSizeOfxMB(int size) Create a FileModel with content size of MB e.g.: getFileModelWithContentSizeOfxMB(1) will return a FileModel with a content of 1 MBstatic FileModelgetRandomFileModel(FileType fileType) Generates a new randomFileModelobjectstatic FileModelgetRandomFileModel(FileType fileType, String content) Generates a new randomFileModelobject with contentvoidsetContent(String content) voidsetFileType(FileType fileType) toFile()Methods inherited from class org.alfresco.utility.model.ContentModel
getCmisLocation, getDescription, getName, getParentFolder, getProtocolLocation, getProtocolParentFolder, getTitle, my, rename, setCmisLocation, setDescription, setName, setProtocolLocation, setTitleMethods inherited from class org.alfresco.utility.model.RepoTestModel
getIdentifier, getNodeRef, getNodeRefWithoutVersion, setIdentifier, setNodeRefMethods inherited from class org.alfresco.utility.model.TestModel
setRandomValuesForAllFields, toInfo, toJson, toString
-
Constructor Details
-
FileModel
public FileModel() -
FileModel
-
FileModel
-
FileModel
-
FileModel
-
FileModel
-
FileModel
-
-
Method Details
-
getContent
-
setContent
-
getFileType
-
setFileType
-
getRandomFileModel
Generates a new randomFileModelobject -
getRandomFileModel
Generates a new randomFileModelobject with content -
toFile
-
getFileModelBasedOnTestDataFile
This will generate a new FileModel having one existing file from src/main/resources/shared-data location- Parameters:
resourceDataFile-- Returns:
- Throws:
IORuntimeException- if the file cannot be read.
-
cloneAsWorkingCopy
Clone file model to working copy. (e.g. 'test.txt' to 'test (Working Copy).txt' )- Returns:
FileModel
-
getFileModelWithContentSizeOfxMB
Create a FileModel with content size of MB e.g.: getFileModelWithContentSizeOfxMB(1) will return a FileModel with a content of 1 MB
-