Package de.xima.fc.gui.common.bean
Class ResourceContentBean
- java.lang.Object
-
- de.xima.fc.gui.common.utils.msg.I18nUtils
-
- de.xima.fc.gui.common.utils.msg.MessageUtils
-
- de.xima.fc.gui.common.utils.msg.AMessaging
-
- de.xima.fc.gui.common.utils.msg.AJSFContext
-
- de.xima.fc.gui.common.bean.ResourceContentBean
-
- All Implemented Interfaces:
Serializable
@Named @SessionScoped public class ResourceContentBean extends AJSFContext
Bean-Klasse zum Anzeigen von Resourcen. ACHTUNG!! Diese muss wird separat benutzt, da zum streamen von dynamischen Inhalten (Hier z.B. Bildern) die Bean im Session oder Application-Scope sein muss!!!- Author:
- XIMA MEDIA GmbH
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class de.xima.fc.gui.common.utils.msg.AJSFContext
AJSFContext.RedirectOptions, AJSFContext.RedirectOptionsBuilder
-
-
Field Summary
Fields Modifier and Type Field Description protected String
contentType
protected byte[]
data
-
Fields inherited from class de.xima.fc.gui.common.utils.msg.AJSFContext
localeBean
-
-
Constructor Summary
Constructors Constructor Description ResourceContentBean()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
getData()
org.primefaces.model.StreamedContent
getResourceDataStream()
String
getResourceDataString()
boolean
hasData()
boolean
isPlainTextDataString()
void
setData(byte[] data)
void
setData(byte[] data, String contentType)
void
setResourceDataString(String resourceData)
-
Methods inherited from class de.xima.fc.gui.common.utils.msg.AJSFContext
destroySessionBean, encodeURL, findBean, findBean, findBean, findBean, findBean, findBean, findBean, findCurrentView, findUserContext, getBeanName, getBeanName, getContext, getCurrentViewBean, getLocaleBean, getRequest, getResponse, getSession, getSession, getSessionAttribute, isMasterServerContext, loadLazy, redirect, redirect, redirect, redirect, redirectToDashboard, redirectToDashboard, redirectToDashboard, setLocaleBean, setSessionAttribute, uc
-
Methods inherited from class de.xima.fc.gui.common.utils.msg.MessageUtils
addErrorMsg, addErrorMsg, addErrorMsg, addErrorMsg, addErrorMsg, addErrorMsg, addErrorMsgFromString, addErrorMsgFromString, addErrorMsgToComponent, addErrorMsgToComponent, addErrorMsgToComponent, addErrorMsgToComponent, addErrorMsgToComponent, addErrorMsgToComponent, addInfoMsg, addInfoMsg, addInfoMsg, addInfoMsg, addInfoMsgFromString, addInfoMsgFromString, addInfoMsgToComponent, addInfoMsgToComponent, addInfoMsgToComponent, addInfoMsgToComponent, addMsg, addMsg, addMsg, addMsg, addMsgs, addMsgs, addMsgToComponent, addMsgToComponent, addWarnMsg, addWarnMsg, addWarnMsg, addWarnMsg, addWarnMsgFromString, addWarnMsgFromString, addWarnMsgToComponent, addWarnMsgToComponent, addWarnMsgToComponent, addWarnMsgToComponent, cleanErrorMsg, errorMsg, errorMsg, getErrorMessage, getNewErrorMsg, getNewErrorMsg, getNewErrorMsg, getNewInfoMsg, getNewInfoMsg, getNewMsg, getNewWarnMsg, getNewWarnMsg, msg
-
-
-
-
Field Detail
-
data
protected byte[] data
-
contentType
protected String contentType
-
-
Method Detail
-
getData
public byte[] getData()
- Returns:
- the data
-
setData
public void setData(byte[] data)
- Parameters:
data
- the data to set
-
setData
public void setData(byte[] data, String contentType)
-
getResourceDataStream
public org.primefaces.model.StreamedContent getResourceDataStream()
-
isPlainTextDataString
public boolean isPlainTextDataString()
- Returns:
true
iff the content of the currently selected resource represents plain text, ie. valid UTF-8 bytes.
-
getResourceDataString
public String getResourceDataString()
-
setResourceDataString
public void setResourceDataString(String resourceData)
-
hasData
public boolean hasData()
-
-