Package org.serviceconnector.web.xml
Class AbstractXMLLoader
java.lang.Object
org.serviceconnector.web.xml.AbstractXMLLoader
- All Implemented Interfaces:
IXMLLoader
- Direct Known Subclasses:
AjaxContentXMLLoader,AjaxMaintenanceXMLLoader,AjaxResourceXMLLoader,AjaxSystemXMLLoader,CacheXMLLoader,DefaultXMLLoader,DumpXMLLoader,LogsXMLLoader,MaintenanceXMLLoader,ResourceXMLLoader,RespondersXMLLoader,ServersXMLLoader,ServicesXMLLoader,SessionsXMLLoader,SubscriptionsXMLLoader,TimerXMLLoader
The Class AbstractXMLLoader.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classThe Class Paging for internal use only, holds paging data. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds the meta.voidAdds the meta.protected SCClientconnectClientToService(Service service) Connect client to service.protected intgetParameterInt(IWebRequest request, String name, int defaultValue) Gets the parameter int.booleanisText()Checks if is text.final voidload(IWebRequest request, OutputStream os) Load.voidloadBody(Writer writer, IWebRequest request) Load body.abstract voidloadBody(XMLStreamWriter writer, IWebRequest request) Load body.voidwriteBean(XMLStreamWriter writer, Object obj) Write bean.voidwriteFailure(XMLStreamWriter writer, String msg) Write failure to xml stream using given message text.voidwriteHeaderMap(XMLStreamWriter writer, Map<String, String> map) Write header map.protected AbstractXMLLoader.PagingwritePagingAttributes(XMLStreamWriter writer, IWebRequest request, int size, String prefix) Write paging attributes.voidwriteRuntime(XMLStreamWriter writer) Write runtime.voidwriteSuccess(XMLStreamWriter writer, String msg) Write success to xml stream using given message text.voidwriteSystem(XMLStreamWriter writer) Write system.voidwriteWebInfo(XMLStreamWriter writer) Write web info.protected DatewriteXMLDate(XMLStreamWriter writer, IWebRequest request)
-
Field Details
-
XMLSDF
The Constant XMLSDF.
-
-
Constructor Details
-
AbstractXMLLoader
public AbstractXMLLoader()Instantiates a new abstract xml loader.
-
-
Method Details
-
isText
public boolean isText()Checks if is text.- Specified by:
isTextin interfaceIXMLLoader- Returns:
- true, if is text true, if is raw
-
addMeta
Adds the meta.- Specified by:
addMetain interfaceIXMLLoader- Parameters:
name- the namevalue- the value the value
-
addMeta
Adds the meta.- Specified by:
addMetain interfaceIXMLLoader- Parameters:
map- the map the map
-
loadBody
Load body.- Specified by:
loadBodyin interfaceIXMLLoader- Parameters:
writer- the writerrequest- the request- Throws:
Exception- the exception
-
loadBody
Load body.- Specified by:
loadBodyin interfaceIXMLLoader- Parameters:
writer- the writerrequest- the request- Throws:
Exception- the exception
-
load
Load.- Specified by:
loadin interfaceIXMLLoader- Parameters:
request- the requestos- the os- Throws:
Exception- the exception the exception
-
writeSystem
Write system.- Parameters:
writer- the writer- Throws:
XMLStreamException- the xML stream exception
-
writeBean
Write bean.- Parameters:
writer- the writerobj- the obj- Throws:
XMLStreamException- the xML stream exception
-
writeHeaderMap
public void writeHeaderMap(XMLStreamWriter writer, Map<String, String> map) throws XMLStreamExceptionWrite header map.- Parameters:
writer- the writermap- the map- Throws:
XMLStreamException- the XML stream exception
-
writeWebInfo
Write web info.- Parameters:
writer- the writer- Throws:
XMLStreamException- the xML stream exception
-
writeRuntime
Write runtime.- Parameters:
writer- the writer- Throws:
XMLStreamException- the xML stream exception
-
writeSuccess
Write success to xml stream using given message text.- Parameters:
writer- the writermsg- the msg- Throws:
Exception- the exception
-
writeFailure
Write failure to xml stream using given message text.- Parameters:
writer- the writermsg- the msg- Throws:
Exception- the exception
-
connectClientToService
Connect client to service. In case of FileService get first netty tcp endpoint or netty http endpoint if no netty tcp endpoint is available- Parameters:
service- the service- Returns:
- the sC mgmt client
- Throws:
WebCommandException- the web command exception
-
getParameterInt
Gets the parameter int.- Parameters:
request- the requestname- the namedefaultValue- the default value- Returns:
- the parameter int
-
writePagingAttributes
protected AbstractXMLLoader.Paging writePagingAttributes(XMLStreamWriter writer, IWebRequest request, int size, String prefix) throws Exception Write paging attributes.- Parameters:
writer- the writerrequest- the requestsize- the size- Returns:
- the paging
- Throws:
Exception- the exception
-
writeXMLDate
- Throws:
XMLStreamException
-