public class ItemCommentsController
extends DefaultWidgetController
| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
COMPONENT_ADD_COMMENT_BUTTON |
protected static java.lang.String |
COMPONENT_COMMENTS_COUNT_LABEL
Deprecated.
since 1811, the field is unused
|
protected static java.lang.String |
COMPONENT_SHOW_POPUP_BUTTON
Deprecated.
since 1811, the field is unused
|
protected static java.lang.String |
LABEL_NO_COMMENTS |
protected static java.lang.String |
MODEL_COMMENTS |
protected static java.lang.String |
MODEL_DATA_TYPE |
static java.lang.String |
MODEL_DATE_FORMATTER |
protected static java.lang.String |
SCLASS_ADD_COMMENT_SECTION |
protected static java.lang.String |
SCLASS_ADD_COMMENT_SECTION_BUTTON_CANCEL |
protected static java.lang.String |
SCLASS_ADD_COMMENT_SECTION_BUTTON_OK |
protected static java.lang.String |
SCLASS_ADD_COMMENT_SECTION_TEXTBOX |
protected static java.lang.String |
SCLASS_COMMENTS_LIST_EMPTY |
protected static java.lang.String |
SETTING_COMMENTS_LIST_RENDERER |
protected static java.lang.String |
SETTING_DATE_FORMAT |
protected static java.lang.String |
SETTING_DEFAULT_COMMENTS_COMMENT_TYPE |
protected static java.lang.String |
SETTING_DEFAULT_COMMENTS_COMPONENT |
protected static java.lang.String |
SETTING_DEFAULT_COMMENTS_DOMAIN |
protected static java.lang.String |
SETTING_DEFAULT_COMMENTS_LIST_RENDERER |
protected static java.lang.String |
SETTING_POPUP_POSITION |
protected static java.lang.String |
SOCKET_IN_INPUT_ITEM |
| Constructor and Description |
|---|
ItemCommentsController() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addCommentToItem(CommentModel newComment) |
protected boolean |
canCreateComment() |
protected boolean |
canReadThisComment(CommentModel comment) |
protected void |
closePopup() |
protected Div |
createAddCommentContainer(Textbox textbox,
Button okButton,
Button cancelButton) |
protected <any> |
createCancelButtonListener() |
protected java.util.Optional<CommentModel> |
createNewComment(java.lang.String text,
ComponentModel component,
CommentTypeModel commentType) |
protected java.util.Optional<CommentModel> |
createNewComment(Textbox textbox) |
protected <any> |
createOkButtonEventListener(Textbox textbox) |
protected java.util.List<CommentModel> |
filterNotPermitted(java.util.List<CommentModel> comments) |
Button |
getAddCommentButton() |
Div |
getAddCommentContainer() |
<any> |
getCommentRenderer() |
Label |
getCommentsCountLabel() |
CommentService |
getCommentService() |
java.util.List<CommentModel> |
getCommentsFromModel() |
Div |
getCommentsListContainer() |
Popup |
getCommentsPopup() |
protected java.lang.String |
getDefaultDateFormat() |
ItemModel |
getInputItemModel() |
protected NotificationService |
getNotificationService() |
ObjectFacade |
getObjectFacade() |
protected java.util.Collection<Component> |
getOpenPopupAwareComponents() |
PermissionFacade |
getPermissionFacade() |
PopupPosition |
getPopupPosition() |
Button |
getShowCommentsButton() |
TypeFacade |
getTypeFacade() |
UserService |
getUserService() |
protected void |
handleCommentSavingException(ObjectSavingException exception) |
protected void |
initDataType(ItemModel inputItem) |
protected void |
initDateFormatter() |
void |
initialize(Component component) |
protected void |
initPopupPosition() |
protected void |
initRenderer() |
protected boolean |
isCommentsChanged(ItemModel freshInputItemModel) |
protected void |
loadNewCommentsIfPossible() |
protected void |
notifyUserOfWrongSettings(java.lang.String wrongSettingsMessage) |
void |
onHeartbeat(CockpitEvent cockpitEvent) |
void |
onInputItemReceive(ItemModel inputItem) |
void |
openPopup() |
protected void |
render() |
protected void |
renderComments() |
protected void |
renderCommentsList() |
protected void |
renderContent() |
protected void |
renderEmptyMessage() |
protected void |
runWithReopeningPopup(Executable executable)
Performs passed operation and closes and reopens comments popup so any modified elements in it will be recalculated
correctly.
|
protected void |
scrollToLastComment() |
void |
setAddCommentButton(Button addCommentButton) |
void |
setAddCommentContainer(Div addCommentContainer) |
void |
setCommentRenderer(<any> commentRenderer) |
void |
setCommentsCountLabel(Label commentsCountLabel) |
void |
setCommentService(CommentService commentService) |
void |
setCommentsListContainer(Div commentsListContainer) |
void |
setCommentsPopup(Popup commentsPopup) |
void |
setNotificationService(NotificationService notificationService) |
void |
setObjectFacade(ObjectFacade objectFacade) |
protected void |
setOnClickEventListenersForOpenPopupAwareComponent(Component component,
boolean clickable) |
protected void |
setOpenPopupAwareComponentsClickability() |
void |
setPermissionFacade(PermissionFacade permissionFacade) |
void |
setPopupPosition(PopupPosition popupPosition) |
void |
setShowCommentsButton(Button showCommentsButton) |
void |
setTypeFacade(TypeFacade typeFacade) |
protected void |
setUIStateForOpenPopupAwareComponent(Component component,
boolean clickable) |
void |
setUserService(UserService userService) |
void |
showNewCommentSection() |
protected void |
sortAndSetComments(java.util.List<CommentModel> comments) |
protected void |
tryToSaveItemComment(CommentModel comment) |
public static final java.lang.String MODEL_DATE_FORMATTER
protected static final java.lang.String SOCKET_IN_INPUT_ITEM
protected static final java.lang.String SETTING_COMMENTS_LIST_RENDERER
protected static final java.lang.String SETTING_POPUP_POSITION
protected static final java.lang.String SETTING_DATE_FORMAT
protected static final java.lang.String SETTING_DEFAULT_COMMENTS_LIST_RENDERER
protected static final java.lang.String SETTING_DEFAULT_COMMENTS_DOMAIN
protected static final java.lang.String SETTING_DEFAULT_COMMENTS_COMPONENT
protected static final java.lang.String SETTING_DEFAULT_COMMENTS_COMMENT_TYPE
@Deprecated protected static final java.lang.String COMPONENT_SHOW_POPUP_BUTTON
@Deprecated protected static final java.lang.String COMPONENT_COMMENTS_COUNT_LABEL
protected static final java.lang.String COMPONENT_ADD_COMMENT_BUTTON
protected static final java.lang.String SCLASS_ADD_COMMENT_SECTION
protected static final java.lang.String SCLASS_ADD_COMMENT_SECTION_TEXTBOX
protected static final java.lang.String SCLASS_ADD_COMMENT_SECTION_BUTTON_OK
protected static final java.lang.String SCLASS_ADD_COMMENT_SECTION_BUTTON_CANCEL
protected static final java.lang.String SCLASS_COMMENTS_LIST_EMPTY
protected static final java.lang.String LABEL_NO_COMMENTS
protected static final java.lang.String MODEL_DATA_TYPE
protected static final java.lang.String MODEL_COMMENTS
public void initialize(Component component)
public void onInputItemReceive(ItemModel inputItem)
protected void scrollToLastComment()
public void showNewCommentSection()
public void onHeartbeat(CockpitEvent cockpitEvent)
public void openPopup()
protected void loadNewCommentsIfPossible()
throws ObjectNotFoundException
ObjectNotFoundExceptionprotected void setOpenPopupAwareComponentsClickability()
protected java.util.Collection<Component> getOpenPopupAwareComponents()
protected void setUIStateForOpenPopupAwareComponent(Component component,
boolean clickable)
protected void setOnClickEventListenersForOpenPopupAwareComponent(Component component,
boolean clickable)
protected boolean isCommentsChanged(ItemModel freshInputItemModel)
protected void runWithReopeningPopup(Executable executable)
onHeartbeat(CockpitEvent) )executable - passed operation which will be executed before popup will be reopened.protected void closePopup()
protected Div createAddCommentContainer(Textbox textbox,
Button okButton,
Button cancelButton)
protected <any> createOkButtonEventListener(Textbox textbox)
protected <any> createCancelButtonListener()
protected void tryToSaveItemComment(CommentModel comment)
protected void handleCommentSavingException(ObjectSavingException exception)
protected void addCommentToItem(CommentModel newComment) throws ObjectSavingException
ObjectSavingExceptionprotected java.util.Optional<CommentModel> createNewComment(Textbox textbox) throws ObjectCreationException
ObjectCreationExceptionprotected void notifyUserOfWrongSettings(java.lang.String wrongSettingsMessage)
protected java.util.Optional<CommentModel> createNewComment(java.lang.String text, ComponentModel component, CommentTypeModel commentType) throws ObjectCreationException
ObjectCreationExceptionpublic ItemModel getInputItemModel()
public java.util.List<CommentModel> getCommentsFromModel()
protected void render()
protected void renderCommentsList()
protected void renderContent()
protected void renderEmptyMessage()
protected void renderComments()
protected java.lang.String getDefaultDateFormat()
protected void initDataType(ItemModel inputItem)
protected void initDateFormatter()
protected void initRenderer()
protected void initPopupPosition()
protected void sortAndSetComments(java.util.List<CommentModel> comments)
protected java.util.List<CommentModel> filterNotPermitted(java.util.List<CommentModel> comments)
protected boolean canReadThisComment(CommentModel comment)
protected boolean canCreateComment()
public Div getCommentsListContainer()
public void setCommentsListContainer(Div commentsListContainer)
public Button getShowCommentsButton()
public void setShowCommentsButton(Button showCommentsButton)
public Label getCommentsCountLabel()
public void setCommentsCountLabel(Label commentsCountLabel)
public PopupPosition getPopupPosition()
public void setPopupPosition(PopupPosition popupPosition)
public Popup getCommentsPopup()
public void setCommentsPopup(Popup commentsPopup)
public Button getAddCommentButton()
public void setAddCommentButton(Button addCommentButton)
public Div getAddCommentContainer()
public void setAddCommentContainer(Div addCommentContainer)
public ObjectFacade getObjectFacade()
public void setObjectFacade(ObjectFacade objectFacade)
public TypeFacade getTypeFacade()
public void setTypeFacade(TypeFacade typeFacade)
public UserService getUserService()
public void setUserService(UserService userService)
public CommentService getCommentService()
public void setCommentService(CommentService commentService)
public <any> getCommentRenderer()
public void setCommentRenderer(<any> commentRenderer)
public PermissionFacade getPermissionFacade()
public void setPermissionFacade(PermissionFacade permissionFacade)
protected NotificationService getNotificationService()
public void setNotificationService(NotificationService notificationService)
Copyright © 2018 SAP SE. All Rights Reserved.