public class

XhtmlCleaningInterceptor

extends Object
implements Interceptor
java.lang.Object
   ↳ com.atlassian.confluence.content.render.xhtml.storage.XhtmlCleaningInterceptor

Class Overview

A Hibernate interceptor that will silently cleanup security issues with XHTML content on saving to the database.

Summary

Public Constructors
XhtmlCleaningInterceptor(XhtmlCleaner storageFormatCleaner)
Public Methods
int[] findDirty(Object entity, Serializable id, Object[] currentState, Object[] previousState, String[] propertyNames, Type[] types)
Object instantiate(Class clazz, Serializable id)
Boolean isUnsaved(Object entity)
void onDelete(Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types)
boolean onFlushDirty(Object entity, Serializable id, Object[] currentState, Object[] previousState, String[] propertyNames, Type[] types)
When a BodyContent is being modified ensure that the body of the entity is safe XHTML.
boolean onLoad(Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types)
boolean onSave(Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types)
If a BodyContent entity is being saved, then ensure the body of the entity is safe XHTML.
void postFlush(Iterator entities)
void preFlush(Iterator entities)
[Expand]
Inherited Methods
From class java.lang.Object
From interface net.sf.hibernate.Interceptor

Public Constructors

public XhtmlCleaningInterceptor (XhtmlCleaner storageFormatCleaner)

Public Methods

public int[] findDirty (Object entity, Serializable id, Object[] currentState, Object[] previousState, String[] propertyNames, Type[] types)

public Object instantiate (Class clazz, Serializable id)

Throws
CallbackException

public Boolean isUnsaved (Object entity)

public void onDelete (Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types)

Throws
CallbackException

public boolean onFlushDirty (Object entity, Serializable id, Object[] currentState, Object[] previousState, String[] propertyNames, Type[] types)

When a BodyContent is being modified ensure that the body of the entity is safe XHTML.

Throws
CallbackException

public boolean onLoad (Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types)

Throws
CallbackException

public boolean onSave (Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types)

If a BodyContent entity is being saved, then ensure the body of the entity is safe XHTML.

Throws
CallbackException

public void postFlush (Iterator entities)

Throws
CallbackException

public void preFlush (Iterator entities)

Throws
CallbackException