Package org.javlo.component.web2
Class ReactionComponent
- java.lang.Object
-
- org.javlo.component.core.AbstractVisualComponent
-
- org.javlo.component.dynamic.DynamicComponent
-
- org.javlo.component.web2.ReactionComponent
-
- All Implemented Interfaces:
Serializable,Comparable<IContentVisualComponent>,IAction,IContentVisualComponent,IDate,ILink,ISubTitle,IImageTitle,ITimeRange,IRestItem,IFieldContainer,IStaticContainer
public class ReactionComponent extends DynamicComponent implements IAction
- Author:
- pvandermaesen
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classReactionComponent.Reaction-
Nested classes/interfaces inherited from class org.javlo.component.dynamic.DynamicComponent
DynamicComponent.FieldOrderComparator
-
-
Field Summary
Fields Modifier and Type Field Description protected static Loggerloggercreate a static logger.static StringTYPE-
Fields inherited from class org.javlo.component.dynamic.DynamicComponent
HIDDEN, JSP_HEADER, properties
-
Fields inherited from class org.javlo.component.core.AbstractVisualComponent
CACHE_KEY_SUFFIX_PARAM_NAME, COMPONENT_KEY, config, EDIT_CLASS, FLUID_COL_SIZE, FORCE_COMPONENT_ID, I18N_FILE, MAX_COL_VALUE, MOBILE_TYPE, NOT_EDIT_PREVIEW_PARAM_NAME, SCROLL_TO_COMP_ID_ATTRIBUTE_NAME, TIME_CACHE_NAME, VALUE_SEPARATOR
-
Fields inherited from interface org.javlo.component.core.IContentVisualComponent
COLORED_WRAPPER_CLASS, COMP_ID_REQUEST_PARAM, COMPLEXITY_ADMIN, COMPLEXITY_EASY, COMPLEXITY_STANDARD, CONTAINER_COLOR, DEFAULT_COLOR, DYN_COMP_COLOR, ECOM_COLOR, EDIT_ACTION_CSS_CLASS, GRAPHIC_COLOR, HIGH_LABEL_LEVEL, ID_SEPARATOR, LINK_COLOR, LOW_LABEL_LEVEL, META_COLOR, MIDDLE_LABEL_LEVEL, SEARCH_LEVEL_HIGH, SEARCH_LEVEL_LOW, SEARCH_LEVEL_MIDDLE, SEARCH_LEVEL_NONE, TEXT_COLOR, VIEW_DEFINITION_REQUEST_ID, WEB2_COLOR
-
Fields inherited from interface org.javlo.component.image.IImageTitle
NO_LINK
-
-
Constructor Summary
Constructors Constructor Description ReactionComponent()
-
Method Summary
-
Methods inherited from class org.javlo.component.dynamic.DynamicComponent
contains, contentHashCode, contructViewStyle, getAllResources, getAllResourcesLinks, getColumnableDefaultValue, getComponentLabel, getConfigProperties, getContainerType, getContentAsMap, getCSSClass, getDataPath, getDate, getDirSelected, getDynamicId, getExternalResources, getField, getFieldsNames, getFieldValue, getFiles, getIcon, getImageDescription, getImageField, getImageLinkURL, getLabel, getLabelLevel, getLatestValidDate, getList, getList, getNotififyPageName, getPageDescription, getPopularity, getPrefix, getPrefixViewXHTMLCode, getPriority, getProperties, getResourceURL, getSpecificClass, getStyleLabelList, getStyleList, getSubTitle, getSubTitleLevel, getSuffix, getSuffixViewXHTMLCode, getTextForSearch, getTextLabel, getTextTitle, getTimeRangeEnd, getTimeRangeStart, getType, getURL, getViewListXHTMLCode, getViewXHTMLCode, getXHTMLId, init, initContent, isAutoDeletable, isFieldContainer, isImageValid, isLinkValid, isMobileOnly, isNotififyCreation, isRealContent, isRestMatch, isValidDate, isValueTranslatable, isWrapped, prepareView, reload, reloadProperties, renameResource, setConfigProperties, setDirSelected, setDynamicId, setLatestValidDate, setProperties, setValue, storeProperties, transflateFrom
-
Methods inherited from class org.javlo.component.core.AbstractVisualComponent
applyReplacement, cleanResources, cleanValue, clearReplacement, clone, compareTo, countLine, delete, deleteMySelf, drawColumn, equals, equals, executeCurrentRenderer, executeJSP, executeRenderer, executeRenderer, extractFieldsFromRenderer, forceInit, getAjaxId, getArea, getAuthors, getBackgroundColor, getBaseHelpURL, getClassName, getColomnablePrefix, getColomnableSuffix, getColumn, getColumnMaxSize, getColumnSize, getColumnSizes, getColumnStyle, getComponentBean, getComponentCSS, getComponentCssClass, getComponentId, getComponentPath, getConfig, getConfigInValue, getConfigMessage, getContainerPage, getContentAsText, getContentCache, getContentMessage, getContentName, getContentTimeCache, getCookiesDisplayStatus, getCreationDate, getCSSStyle, getCurrentPage, getCurrentRenderer, getDataAttributes, getDebugHeader, getDefaultHelpURI, getDefaultRenderer, getDeleteDate, getDescription, getDisplayAsInputName, getDisplayMessage, getEditorComplexity, getEditRenderer, getEditText, getEmptyCode, getEmptyXHTMLCode, getErrorMessage, getErrorMessage, getExternalModules, getFileDirectory, getFirstPrefix, getForcedId, getForcedPrefixViewXHTMLCode, getForcedRenderer, getForcedSuffixViewXHTMLCode, getFormName, getGroup, getHeaderContent, getHelpText, getHelpType, getHelpURI, getHelpURL, getI18nEditableKeys, getId, getImportFolderPath, getImportFolderPath, getInlineStyle, getInputNameColomn, getInputNameColomnStyle, getInputNameRenderer, getInputNameRendererTitle, getItalicAndStrongLanguageMarkerList, getJSOnSubmit, getLastSufix, getLayout, getListClass, getListGroup, getListItemTag, getListTag, getLocalMessage, getLock, getManualCssClass, getMarkerList, getMessage, getMirrorWrapper, getModificationDate, getNextComponent, getPage, getPrefixCssClass, getPreviewAttributes, getPreviewCssClass, getPreviewCssId, getPreviousComponent, getQuotationLanguageMarkerList, getReferenceComponent, getRemplacement, getRenderer, getRendererTitle, getRenderes, getRequestComponent, getSearchLevel, getSelectRendererXHTML, getSpecialInputTag, getSpecialPreviewCssId, getSpecialTagTitle, getSpecialTagXHTML, getSpecificCssClass, getStyle, getStyleLabel, getStyleTitle, getTag, getTextColor, getTextMessage, getTextPosition, getTitleLevel, getTypeInputName, getValue, getValue, getVersion, getViewData, getViewDataFile, getViewID, getViewText, getWidth, getWordCount, getXHTMLCode, getXHTMLConfig, haveRight, includeComponentJSP, includePage, insert, isAjaxWrapper, isAskWidth, isAutoRenderer, isBackgroundColored, isCanAddClass, isCloseRow, isColored, isColumnable, isConfig, isContentCachableByQuery, isDefaultValue, isDispayEmptyXHTMLCode, isDisplayable, isDisplayHidden, isEditOnCreate, isFirstElementOfRepeatSequence, isFirstRepeated, isFreeInputLayout, isHelpURL, isHiddable, isHidden, isHiddenInMode, isHiddenInModeValue, isInline, isInsertable, isList, isListable, isMetaTitle, isMirroredByDefault, isMirrorWrapped, isModify, isNeedDelete, isNeedRefresh, isNeedRenderer, isNew, isNextSame, isNextSame, isNolink, isNoLinkable, isOpenRow, isPreviousSame, isPreviousSame, isRepeat, isRepeatable, isReversedLink, isStyleHidden, isUnique, isValueProperties, isViewDataFile, isVisible, isVisible, isVisibleFromCookies, isWrapped, isXML, loadViewData, markAsNew, next, onStyleChange, performColumnable, performConfig, performUpdate, prepareEdit, previous, processView, renderOtherComponent, renderViewXHTMLCode, replaceAllInContent, replaceInContent, resetContentCache, resetViewData, setBackgroundColor, setColumnSize, setColumnStyle, setComponentBean, setContainerPage, setContentCache, setContentTimeCache, setDisplayHidden, setForcedId, setForcedRenderer, setGroup, setHidden, setHiddenInMode, setList, setLocalMessage, setMessage, setMirrorWrapped, setModify, setNeedRefresh, setNextComponent, setNolink, setPage, setPreviousComponent, setRenderer, setRepeat, setStyle, setTextColor, setTextPosition, setValid, setWidth, stored, storeViewData, stringToReader, stringToReader, stringToStream, textToXHTML, toString, updateCache
-
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Comparable
compareTo
-
Methods inherited from interface org.javlo.component.core.IContentVisualComponent
cleanResources, clearReplacement, delete, equals, extractFieldsFromRenderer, forceInit, getArea, getAuthors, getClassName, getColumnSize, getColumnStyle, getComponentBean, getComponentCssClass, getConfig, getConfigInValue, getConfigMessage, getContentAsText, getContentMessage, getContentName, getCreationDate, getCurrentRenderer, getDescription, getEditText, getEmptyXHTMLCode, getErrorMessage, getErrorMessage, getExternalModules, getFirstPrefix, getGroup, getHeaderContent, getHelpText, getHelpURL, getI18nEditableKeys, getId, getInputNameRenderer, getJSOnSubmit, getLastSufix, getLayout, getListGroup, getMarkerList, getMessage, getModificationDate, getNextComponent, getPreviousComponent, getReferenceComponent, getRenderer, getSearchLevel, getSpecialTagTitle, getSpecialTagXHTML, getStyle, getStyleLabel, getStyleTitle, getTextMessage, getTitleLevel, getValue, getVersion, getViewText, getWordCount, getXHTMLCode, getXHTMLConfig, insert, isColumnable, isConfig, isDefaultValue, isDispayEmptyXHTMLCode, isDisplayable, isDisplayHidden, isEditOnCreate, isFirstRepeated, isHelpURL, isHidden, isHiddenInMode, isInline, isInsertable, isList, isListable, isMetaTitle, isMirroredByDefault, isModify, isNeedRefresh, isNew, isNolink, isRepeat, isRepeatable, isUnique, isVisible, isVisible, isVisibleFromCookies, loadViewData, markAsNew, next, performConfig, previous, replaceAllInContent, replaceInContent, resetViewData, setColumnSize, setContainerPage, setDisplayHidden, setGroup, setList, setNeedRefresh, setNextComponent, setPage, setPreviousComponent, setRenderer, setRepeat, setStyle, setValid, stored
-
Methods inherited from interface org.javlo.fields.IFieldContainer
getPage
-
Methods inherited from interface org.javlo.component.meta.ITimeRange
isTimeRangeValid
-
-
-
-
Method Detail
-
performAdd
public static final String performAdd(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws Exception
ACTIONS **- Throws:
Exception
-
performDelete
public static final String performDelete(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws Exception
- Throws:
Exception
-
getReactionPrefix
protected String getReactionPrefix(ContentContext ctx)
-
getDelReactionPrefix
protected String getDelReactionPrefix(ContentContext ctx)
-
getEditXHTMLCode
protected String getEditXHTMLCode(ContentContext ctx) throws Exception
- Overrides:
getEditXHTMLCodein classDynamicComponent- Throws:
Exception
-
getEmail
protected String getEmail(ContentContext ctx)
-
getTitle
protected String getTitle(ContentContext ctx)
-
isWithTitle
protected boolean isWithTitle(ContentContext ctx)
-
isReplyAllowed
protected boolean isReplyAllowed(ContentContext ctx)
-
isRequestLoginToView
protected boolean isRequestLoginToView(ContentContext ctx)
-
isRequestLoginToAdd
protected boolean isRequestLoginToAdd(ContentContext ctx)
-
getFields
public List<Field> getFields(ContentContext ctx) throws FileNotFoundException, IOException
- Specified by:
getFieldsin interfaceIFieldContainer- Overrides:
getFieldsin classDynamicComponent- Throws:
FileNotFoundExceptionIOException
-
getHexColor
public String getHexColor()
Description copied from interface:IContentVisualComponentget the exadecimal color for representation of the component.- Specified by:
getHexColorin interfaceIContentVisualComponent- Overrides:
getHexColorin classDynamicComponent- Returns:
- a exadecimal color (sample : a5b499)
-
getInputName
protected String getInputName(String field)
- Overrides:
getInputNamein classDynamicComponent
-
getKey
public String getKey()
Description copied from interface:IContentVisualComponentget a unic key of the component. User special for DynamicComponent.- Specified by:
getKeyin interfaceIContentVisualComponent- Overrides:
getKeyin classDynamicComponent
-
getAllReactions
public Collection<ReactionComponent.Reaction> getAllReactions(ContentContext ctx)
-
getReactions
public Collection<ReactionComponent.Reaction> getReactions(ContentContext ctx)
-
getDeletedReactions
public Collection<ReactionComponent.Reaction> getDeletedReactions(ContentContext ctx)
-
getAllDeletedReactions
public Collection<ReactionComponent.Reaction> getAllDeletedReactions(ContentContext ctx)
-
getReactionUnvalidInputName
public String getReactionUnvalidInputName()
-
getType
public String getType()
Description copied from interface:IContentVisualComponentreturn the type of the element.- Specified by:
getTypein interfaceIContentVisualComponent- Overrides:
getTypein classDynamicComponent- Returns:
- the type of the element.
-
getViewFields
protected List<Field> getViewFields(ContentContext ctx, String reactionId) throws FileNotFoundException, IOException
- Throws:
FileNotFoundExceptionIOException
-
getViewXHTMLCode
public String getViewXHTMLCode(ContentContext ctx) throws Exception
- Specified by:
getViewXHTMLCodein interfaceIFieldContainer- Overrides:
getViewXHTMLCodein classDynamicComponent- Throws:
Exception- See Also:
org.javlo.itf.IContentVisualComponent#getXHTMLCode()
-
init
protected void init() throws ResourceNotFoundException- Overrides:
initin classAbstractVisualComponent- Throws:
ResourceNotFoundException
-
newInstance
public IContentVisualComponent newInstance(ComponentBean bean, ContentContext newCtx, MenuElement page) throws Exception
Description copied from interface:IContentVisualComponentinit the component, do that before all using.- Specified by:
newInstancein interfaceIContentVisualComponent- Overrides:
newInstancein classDynamicComponentnewCtx- the context of the content manager.- Throws:
Exception
-
performEdit
public String performEdit(ContentContext ctx) throws Exception
Description copied from interface:IContentVisualComponentaction call when update the content page.- Specified by:
performEditin interfaceIContentVisualComponent- Overrides:
performEditin classDynamicComponent- Returns:
- the error message, null if no error
- Throws:
Exception
-
deleteReaction
public void deleteReaction(ContentContext ctx, String id, boolean store) throws IOException
- Throws:
IOException
-
validReaction
public void validReaction(ContentContext ctx, String id) throws IOException
- Throws:
IOException
-
getActionGroupName
public String getActionGroupName()
Description copied from interface:IActionthe group name of the action- Specified by:
getActionGroupNamein interfaceIAction- Returns:
- a group name.
-
isContentCachable
public boolean isContentCachable(ContentContext ctx)
Description copied from interface:IContentVisualComponentreturn the part of header needed for this component- Specified by:
isContentCachablein interfaceIContentVisualComponent- Overrides:
isContentCachablein classDynamicComponent- Returns:
-
isContentTimeCachable
public boolean isContentTimeCachable(ContentContext ctx)
- Overrides:
isContentTimeCachablein classDynamicComponent
-
getComplexityLevel
public int getComplexityLevel(ContentContext ctx)
Description copied from interface:IContentVisualComponentreturn the complexity level of the component.- Specified by:
getComplexityLevelin interfaceIContentVisualComponent- Overrides:
getComplexityLevelin classDynamicComponent- Parameters:
ctx- TODO- Returns:
- see contant
-
isCaptcha
public boolean isCaptcha(ContentContext ctx)
-
isAllowHtml
public boolean isAllowHtml(ContentContext ctx)
-
isWithLink
protected boolean isWithLink(ContentContext ctx)
-
getReactionSize
public int getReactionSize(ContentContext ctx)
-
main
public static void main(String[] args)
-
getFontAwesome
public String getFontAwesome()
- Specified by:
getFontAwesomein interfaceIContentVisualComponent- Overrides:
getFontAwesomein classAbstractVisualComponent
-
-