Package rife.cmf.loader
Class XhtmlContentLoaderBackend
java.lang.Object
rife.cmf.loader.XhtmlContentLoaderBackend
- All Implemented Interfaces:
ContentLoaderBackend<String>
- Direct Known Subclasses:
SAXLoader
public abstract class XhtmlContentLoaderBackend
extends Object
implements ContentLoaderBackend<String>
This is an abstract class that should be implemented by all xhtml content
loader back-ends.
The load
method simply checks the
type of the data and delegates the handling to typed methods that should be
implemented by the back-ends.
- Since:
- 1.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionLoads any kind of raw data and tries to accommodate as much as possible to return an instance ofInternalType
after successful loading and handling.protected abstract LoadedContent<String>
loadFromString
(String data, boolean fragment, Set<String> errors) Loads the data from a stringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface rife.cmf.loader.ContentLoaderBackend
isBackendPresent
-
Constructor Details
-
XhtmlContentLoaderBackend
public XhtmlContentLoaderBackend()
-
-
Method Details
-
loadFromString
protected abstract LoadedContent<String> loadFromString(String data, boolean fragment, Set<String> errors) throws ContentManagerException Loads the data from a string- Parameters:
data
- the raw data that has to be loadedfragment
-true
if the raw data is a fragment; orfalse
if the raw data is a complete document or fileerrors
- a set to which possible error messages will be added- Returns:
- an instance of the
LoadedContent
as XHTML as aString
; ornull
if the raw data couldn't be loaded - Throws:
ContentManagerException
- Since:
- 1.4
-
load
public LoadedContent<String> load(Object data, boolean fragment, Set<String> errors) throws ContentManagerException Description copied from interface:ContentLoaderBackend
Loads any kind of raw data and tries to accommodate as much as possible to return an instance ofInternalType
after successful loading and handling.Should any errors occur, then they will be added as text messages to the
errors
collection.- Specified by:
load
in interfaceContentLoaderBackend<String>
- Parameters:
data
- the raw data that has to be loadedfragment
-true
if the raw data is a fragment; orfalse
if the raw data is a complete document or fileerrors
- a set to which possible error messages will be added- Returns:
- an instance of the
LoadedContent
with theInternalType
; ornull
if the raw data couldn't be loaded - Throws:
ContentManagerException
-