Package com.atlassian.confluence.core
Class BodyContent
java.lang.Object
com.atlassian.confluence.core.BodyContent
- All Implemented Interfaces:
Serializable
,Cloneable
- See Also:
-
Constructor Summary
ConstructorDescriptionBodyContent
(BodyContent orig) BodyContent
(ContentEntityObject content, String body, BodyType bodyType) -
Method Summary
Modifier and TypeMethodDescriptioncleanBody
(ContentCleaner cleaner) Cleans the stored body (marking it as such), and returns it.clone()
boolean
getBody()
long
getId()
Hibernate IDint
hashCode()
boolean
void
Sets the new body for this object.void
setBodyType
(BodyType bodyType) Changes the body type for this object.void
setContent
(ContentEntityObject content) void
setId
(long id) Hibernate IDvoid
shallowCopy
(BodyContent orig) Does a shallow copy of object orig.
-
Constructor Details
-
BodyContent
public BodyContent() -
BodyContent
-
BodyContent
-
-
Method Details
-
shallowCopy
Does a shallow copy of object orig. Hibernate ID is not copied. -
getBody
- Returns:
- the current body for this object. This body could be dirty (not AntiSamy'ed), see
isBodyCleaned()
andcleanBody(com.atlassian.confluence.content.ContentCleaner)
-
setBody
Sets the new body for this object. This body will be marked as dirty (not AntiSamy'ed), seeisBodyCleaned()
andcleanBody(com.atlassian.confluence.content.ContentCleaner)
-
getBodyType
-
setBodyType
Changes the body type for this object. Type could be RAW or XHTML (seeBodyType
). When changing the body type to a different one or to null, the body will be marked as dirty (not AntiSamy'ed), seeisBodyCleaned()
andcleanBody(com.atlassian.confluence.content.ContentCleaner)
-
getId
public long getId()Hibernate ID -
setId
public void setId(long id) Hibernate ID -
getContent
-
setContent
-
isBodyCleaned
public boolean isBodyCleaned()- Returns:
- true if the body has been "cleaned", this is, if AntiSamy has been called on this object's body.
Used on
XhtmlCleaningInterceptor.cleanBodyContents(Object, String[], Object[])
} to check if we've already cleaned this object's body
-
cleanBody
Cleans the stored body (marking it as such), and returns it.- Parameters:
cleaner
- clean() will be called on this object with the current body passed to it- Returns:
- the cleaned body
-
equals
-
hashCode
public int hashCode() -
clone
-