|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.confluence.content.apisupport.ContentCreator
public class ContentCreator
Constructor Summary | |
---|---|
ContentCreator(SpaceManager spaceManager,
ContentBodyConversionService contentBodyConversionService,
PermissionManager permissionManager,
PageManagerInternal pageManager,
CustomContentManager customContentEntityManager)
|
Method Summary | ||
---|---|---|
|
cloneForUpdate(T ceo)
|
|
|
saveForCreate(T entity)
Save a newly created CEO |
|
|
saveNewVersion(T ceo,
T originalCEO,
Version version)
Save a new version of the CEO due to an update |
|
void |
setCommonPropertiesForCreate(Content newContent,
ContentEntityObject entity,
com.atlassian.user.User authenticatedUser)
Sets common properties on a newly created entity in preparation for being saved. |
|
boolean |
setCommonPropertiesForUpdate(Content updatedContent,
ContentEntityObject entity)
Sets common properties on the entity in preparation for an update. |
|
boolean |
setContentBodyOnEntity(Content updatedContent,
ContentEntityObject entity)
Sets the body content in updatedContent on the entity |
|
void |
setSpaceForCreate(Content newContent,
SpaceContentEntityObject spacedEntity,
com.atlassian.user.User authenticatedUser)
Sets the space in newContent on this spacedEntity |
|
boolean |
setTitleOnEntity(Content updatedContent,
ContentEntityObject entity)
Sets the title in updatedContent on the entity |
|
ValidationResult |
validateCreate(ConfluenceUser confluenceUser,
Content newContent,
Class<? extends ContentEntityObject> entityClass)
Perform common validation checks for creation of content in a space |
|
ValidationResult |
validateUpdate(ConfluenceUser user,
Content updatedContent,
ContentEntityObject entity)
Perform common validation checks for updating content |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ContentCreator(SpaceManager spaceManager, ContentBodyConversionService contentBodyConversionService, PermissionManager permissionManager, PageManagerInternal pageManager, CustomContentManager customContentEntityManager)
Method Detail |
---|
public void setCommonPropertiesForCreate(Content newContent, ContentEntityObject entity, com.atlassian.user.User authenticatedUser)
newContent
- the content containing the new properties to set on the entityentity
- the entity to set the new properties onauthenticatedUser
- the user that performing the operationpublic ValidationResult validateUpdate(ConfluenceUser user, Content updatedContent, ContentEntityObject entity)
user
- the user to perform permission checks onupdatedContent
- the content to be updatedentity
- the entity to be updated
public ValidationResult validateCreate(ConfluenceUser confluenceUser, Content newContent, Class<? extends ContentEntityObject> entityClass)
confluenceUser
- the user to perform permission checks onnewContent
- the content to be createdentityClass
- the class of content to create
public boolean setCommonPropertiesForUpdate(Content updatedContent, ContentEntityObject entity)
updatedContent
- the content containing the properties to update on the entityentity
- the entity to be updated
public boolean setTitleOnEntity(Content updatedContent, ContentEntityObject entity)
updatedContent
- the content with the new titleentity
- the entity to be updated
public boolean setContentBodyOnEntity(Content updatedContent, ContentEntityObject entity)
updatedContent
- the content with the new body contententity
- the entity to be updated
public void setSpaceForCreate(Content newContent, SpaceContentEntityObject spacedEntity, com.atlassian.user.User authenticatedUser)
newContent
- the content with the new space to setspacedEntity
- the entity to be updated with the spacepublic <T extends ContentEntityObject> T saveNewVersion(T ceo, T originalCEO, Version version)
ceo
- the new version of the CEOoriginalCEO
- the original version of the ceoversion
- the version object with information about the new version to be saved
public <T extends ContentEntityObject> T saveForCreate(T entity)
entity
- the newly created CEO
public <T extends ContentEntityObject> T cloneForUpdate(T ceo)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |