public class DocumentVersionImpl extends StoredObjectImpl implements DocumentVersion
description, fAclId, fCreatedAt, fCreatedBy, fId, fModifiedAt, fModifiedBy, fName, fObjStore, fProperties, fRepositoryId, fTypeId, ICON_SIZE, RENDITION_MIME_TYPE_JPEG, RENDITION_MIME_TYPE_PNG, RENDITION_SUFFIX, secondaryTypeIds
PATH_SEPARATOR
Constructor and Description |
---|
DocumentVersionImpl(String repositoryId,
VersionedDocument container,
ContentStream content,
VersioningState verState,
ObjectStoreImpl objStore) |
Modifier and Type | Method and Description |
---|---|
void |
addParent(Folder parent)
Add this document to a new parent folder as child object
|
void |
appendContent(ContentStream content)
Append content to an existing content stream.
|
void |
commit(boolean isMajor)
make the private working copy an official version.
|
void |
fillProperties(Map<String,PropertyData<?>> properties,
BindingsObjectFactory objFactory,
List<String> requestedIds) |
int |
getAclId() |
String |
getCheckinComment() |
ContentStream |
getContent(long offset,
long length)
retrieve the content of a document
|
VersionedDocument |
getParentDocument() |
List<Folder> |
getParents(String user)
return a list of parents the principal has access to.
|
String |
getPathSegment()
retrieve the path segment of this folder
|
String |
getVersionLabel() |
boolean |
hasContent()
return true if this object has content or false if there is no content
attached.
|
boolean |
hasParent()
usually true except for the root folder, optimized call that just tests
existence to provide information for AtomPub links (much cheaper than
calling getParents() and test for empty result.
|
boolean |
isMajor() |
boolean |
isPwc() |
void |
move(Folder oldParent,
Folder newParent)
Move an object to a different folder.
|
void |
removeParent(Folder parent)
Remove this object from the children of parent
|
void |
rename(String newName)
Rename an object
|
void |
setAclId(int id) |
void |
setCheckinComment(String comment) |
void |
setContent(ContentStream content,
boolean mustPersist)
Assign content to a document.
|
createSystemBasePropertiesWhenCreated, getAcl, getAllowableActions, getChangeToken, getCreatedAt, getCreatedBy, getDescription, getIconFromResourceDir, getId, getModifiedAt, getModifiedBy, getName, getObjectRelationships, getProperties, getRenditionContent, getRenditions, getRepositoryId, getSecondaryTypeIds, getTypeId, hasRendition, persist, setCreatedAt, setCreatedBy, setCustomProperties, setDescription, setModifiedAtNow, setModifiedBy, setName, setProperties, setRepositoryId, setSystemBasePropertiesWhenCreatedDirect, setTypeId, testRenditionFilterForImage, updateSystemBasePropertiesWhenModified
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createSystemBasePropertiesWhenCreated, getAcl, getAllowableActions, getChangeToken, getCreatedAt, getCreatedBy, getDescription, getId, getModifiedAt, getModifiedBy, getName, getObjectRelationships, getProperties, getRenditionContent, getRenditions, getRepositoryId, getSecondaryTypeIds, getTypeId, hasRendition, persist, setCreatedAt, setCreatedBy, setCustomProperties, setDescription, setModifiedAtNow, setModifiedBy, setName, setProperties, setRepositoryId, setTypeId, updateSystemBasePropertiesWhenModified
public DocumentVersionImpl(String repositoryId, VersionedDocument container, ContentStream content, VersioningState verState, ObjectStoreImpl objStore)
public void setContent(ContentStream content, boolean mustPersist)
Content
setContent
in interface Content
content
- content to be assigned to the document.mustPersist
- persist document (set to false if content is set during
creation of a document)public void appendContent(ContentStream content)
Content
appendContent
in interface Content
content
- content to be assigned to the document.public void setCheckinComment(String comment)
setCheckinComment
in interface Version
public String getCheckinComment()
getCheckinComment
in interface Version
public void commit(boolean isMajor)
Version
public ContentStream getContent(long offset, long length)
Content
getContent
in interface Content
public VersionedDocument getParentDocument()
getParentDocument
in interface Version
public void fillProperties(Map<String,PropertyData<?>> properties, BindingsObjectFactory objFactory, List<String> requestedIds)
fillProperties
in interface StoredObject
fillProperties
in class StoredObjectImpl
public int getAclId()
getAclId
in class StoredObjectImpl
public void setAclId(int id)
setAclId
in class StoredObjectImpl
public List<Folder> getParents(String user)
Filing
getParents
in interface Filing
user
- user idpublic String getPathSegment()
MultiFiling
getPathSegment
in interface MultiFiling
public void move(Folder oldParent, Folder newParent)
Filing
public void addParent(Folder parent)
MultiFiling
addParent
in interface MultiFiling
parent
- new parent folder of the document.public void removeParent(Folder parent)
MultiFiling
removeParent
in interface MultiFiling
parent
- parent folder of the documentpublic boolean hasContent()
Content
hasContent
in interface Content
public boolean hasParent()
Filing
public void rename(String newName)
StoredObject
rename
in interface StoredObject
rename
in class StoredObjectImpl
newName
- the new name of the objectpublic String getVersionLabel()
getVersionLabel
in interface Version
Copyright © 2009-2013 The Apache Software Foundation. All Rights Reserved.