Package org.opencms.ade.publish.client
Class CmsPublishSelectPanel
java.lang.Object
com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.google.gwt.user.client.ui.Composite
org.opencms.ade.publish.client.CmsPublishSelectPanel
- All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasAttachHandlers,com.google.gwt.event.shared.HasHandlers,com.google.gwt.user.client.EventListener,com.google.gwt.user.client.ui.HasVisibility,com.google.gwt.user.client.ui.IsRenderable,com.google.gwt.user.client.ui.IsWidget,I_CmsPublishItemStatusUpdateHandler,I_CmsPublishSelectionChangeHandler
public class CmsPublishSelectPanel
extends com.google.gwt.user.client.ui.Composite
implements I_CmsPublishSelectionChangeHandler, I_CmsPublishItemStatusUpdateHandler
This is the main widget of the publish dialog.
It allows the user to choose which resources from the publish list should be published and/or removed from the publish list.
- Since:
- 8.0.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classData with which to update a check box.protected static interfaceThe UiBinder interface for this widget.protected classCommand for adding more list items to the list of publish items.Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CmsPushButtonThe button for escaping from the publish dialog.protected CmsCheckBoxCheckbox for including the contents of folders in the direct publish case.protected CmsCheckBoxThe checkbox for the "show problems only" mode.protected CmsCheckBoxThe checkbox for including related resources.protected CmsCheckBoxThe checkbox for including sibling resources.protected com.google.gwt.user.client.ui.PanelThe panel containing the publish groups.protected booleanFlag to indicate whether new items are currently being added to the list.protected CmsPublishDataModelThe data model for the publish dialog.protected com.google.gwt.user.client.ui.LabelThe label which is displayed when there are no resources to publish.protected com.google.gwt.user.client.ui.PanelThe panel which shows a message telling the user the number of problems.protected CmsSelectBoxThe project select box.protected CmsPublishDialogThe publish dialog which contains this panel.protected CmsScrollPanelThe scroll panel containing the group panel.protected Map<org.opencms.util.CmsUUID, org.opencms.ade.publish.client.CmsPublishItemSelectionController> The global map of selection controllers for all groups.protected com.google.gwt.user.client.ui.InlineLabelThe label shown in front of the project selector.protected com.google.gwt.user.client.ui.FlowPanelThe panel containing the project selector.protected com.google.gwt.user.client.ui.LabelLabel which is shown instead of the resource list when the resource list is too long.protected com.google.gwt.user.client.ui.PanelThe top button bar.protected CmsSelectBoxThe workflow selector.protected com.google.gwt.user.client.ui.InlineLabelThe workflow selector label.Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX -
Constructor Summary
ConstructorsConstructorDescriptionCmsPublishSelectPanel(CmsPublishDialog publishDialog, List<org.opencms.ade.publish.shared.CmsProjectBean> projects, org.opencms.ade.publish.shared.CmsPublishOptions publishOptions, Map<String, org.opencms.ade.publish.shared.CmsWorkflow> workflows, String selectedWorkflowId, int scrollPanelHeight) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidAdds more publish list items to the panel.protected booleanTries to add a new publish list item to the panel, and returns false if there aren't any items left.booleancheckForProblems(Set<org.opencms.util.CmsUUID> resourceIds) Check for problems with new/deleted folders in the publish selection.protected voidexecuteAction(org.opencms.ade.publish.shared.CmsWorkflowAction action) Executes the given action.protected voidThe method to call when the items have finished being loaded into the list.static StringformatResourceCount(int resourceCount) Formats a number of publish resources in a more user-friendly form.Returns the buttons of this panel which should be shown as the buttons of the publish dialog.Set<org.opencms.util.CmsUUID> Returns the ids of the resources which should be published.Set<org.opencms.util.CmsUUID> Returns the set of ids of resources which have been selected for removal.Map<org.opencms.util.CmsUUID, org.opencms.ade.publish.client.CmsPublishItemSelectionController> Gets the global map of selection controllers.booleanReturns if the resource list is being shown.protected voidonAddContentsClick(com.google.gwt.event.dom.client.ClickEvent event) Event handler for the 'add contents' check box.voidThe method that will be called when the publish resource selection has changed.protected voidonClickCancel(com.google.gwt.event.dom.client.ClickEvent e) The event handler for the Cancel button.protected voidonProblemClick(com.google.gwt.event.dom.client.ClickEvent event) Handles the click event for problem resources check box.protected voidonProjectChange(com.google.gwt.event.logical.shared.ValueChangeEvent<String> event) Handling the value change event for the project selector.protected voidonRelatedClick(com.google.gwt.event.dom.client.ClickEvent event) Handles the click event for related resources check box.protected voidonSiblingClick(com.google.gwt.event.dom.client.ClickEvent event) Handles the click event for sibling resources check box.protected voidonWorkflowChange(com.google.gwt.event.logical.shared.ValueChangeEvent<String> event) Handling the value change event for the project selector.voidsetGroupList(org.opencms.ade.publish.shared.CmsPublishGroupList groups, boolean newData, String defaultWorkflow) Sets the publish groups used by this widget.protected voidSets the publish groups.protected voidsetGroups(List<org.opencms.ade.publish.shared.CmsPublishGroup> groups, boolean newData, String defaultWorkflow) Sets the publish groups.protected voidsetProblemMode(boolean enabled) Enables or disables the "only show resources with problems" mode.voidsetShowResources(boolean showResources, String tooManyResourcesMessage) Sets the mode to either show resources, or only show a "too many resources" message.booleanReturns true if the publish button should be enabled.protected voidThe method which should be called when new items start being inserted into the list.voidupdate(org.opencms.util.CmsUUID id, CmsPublishItemStatus status) Processes a status change.Updates the state of a check box used for selecting/deselecting items.voidUpdates the dialog title.Methods inherited from class com.google.gwt.user.client.ui.Composite
claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidgetMethods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEventsMethods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString
-
Field Details
-
m_cancelButton
The button for escaping from the publish dialog. -
m_checkboxAddContents
Checkbox for including the contents of folders in the direct publish case. -
m_checkboxProblems
The checkbox for the "show problems only" mode. -
m_checkboxRelated
The checkbox for including related resources. -
m_checkboxSiblings
The checkbox for including sibling resources. -
m_groupPanelContainer
The panel containing the publish groups. -
m_loading
Flag to indicate whether new items are currently being added to the list. -
m_model
The data model for the publish dialog. -
m_noResources
The label which is displayed when there are no resources to publish. -
m_problemsPanel
The panel which shows a message telling the user the number of problems. -
m_projectSelector
The project select box. -
m_publishDialog
The publish dialog which contains this panel. -
m_scrollPanel
The scroll panel containing the group panel. -
m_selectionControllers
protected Map<org.opencms.util.CmsUUID,org.opencms.ade.publish.client.CmsPublishItemSelectionController> m_selectionControllersThe global map of selection controllers for all groups. -
m_selectorLabel
The label shown in front of the project selector. -
m_selectorPanel
The panel containing the project selector. -
m_tooManyResources
Label which is shown instead of the resource list when the resource list is too long. -
m_topBar
The top button bar. -
m_workflowSelector
The workflow selector. -
m_workflowsLabel
The workflow selector label.
-
-
Constructor Details
-
Method Details
-
formatResourceCount
Formats a number of publish resources in a more user-friendly form.- Parameters:
resourceCount- a number of resources- Returns:
- the formatted number of resources
-
updateCheckbox
public static CmsPublishSelectPanel.CheckBoxUpdate updateCheckbox(CmsPublishItemStateSummary states) Updates the state of a check box used for selecting/deselecting items.- Parameters:
states- the selection states of the items for the check box- Returns:
- the data needed to update the check box
-
checkForProblems
Check for problems with new/deleted folders in the publish selection.- Parameters:
resourceIds- the ids of the resources selected for publishing- Returns:
- true if there are problems with nested
-
getButtons
Returns the buttons of this panel which should be shown as the buttons of the publish dialog.- Returns:
- a list of buttons
-
getResourcesToPublish
Returns the ids of the resources which should be published.- Returns:
- a set of id strings
-
getResourcesToRemove
Returns the set of ids of resources which have been selected for removal.- Returns:
- a set of id strings
-
getSelectionControllers
public Map<org.opencms.util.CmsUUID,org.opencms.ade.publish.client.CmsPublishItemSelectionController> getSelectionControllers()Gets the global map of selection controllers.- Returns:
- the map of selection controller
-
isShowResources
Returns if the resource list is being shown.The resource list is now shown if it is too long.
- Returns:
- true if the resource list is being shown
-
onChangePublishSelection
Description copied from interface:I_CmsPublishSelectionChangeHandlerThe method that will be called when the publish resource selection has changed.- Specified by:
onChangePublishSelectionin interfaceI_CmsPublishSelectionChangeHandler- See Also:
-
setShowResources
Sets the mode to either show resources, or only show a "too many resources" message.In the latter case, the check boxes for the siblings/related resources will be deactivated.
- Parameters:
showResources- true if the resource list should be shown, false if only the given message should be showntooManyResourcesMessage- the message to show if there are too many resources to display
-
shouldEnablePublishButton
Returns true if the publish button should be enabled.- Returns:
- true if the publish button should be enabled
-
update
Description copied from interface:I_CmsPublishItemStatusUpdateHandlerProcesses a status change.- Specified by:
updatein interfaceI_CmsPublishItemStatusUpdateHandler- Parameters:
id- the id of the publish item whose status has changedstatus- the new status- See Also:
-
updateDialogTitle
Updates the dialog title. -
addMoreListItems
Adds more publish list items to the panel. -
addNextItem
Tries to add a new publish list item to the panel, and returns false if there aren't any items left.- Returns:
- true if an item could be added, false if no items are left
-
finishLoading
The method to call when the items have finished being loaded into the list. -
onAddContentsClick
@UiHandler("m_checkboxAddContents") protected void onAddContentsClick(com.google.gwt.event.dom.client.ClickEvent event) Event handler for the 'add contents' check box.- Parameters:
event- the click event
-
onClickCancel
@UiHandler("m_cancelButton") protected void onClickCancel(com.google.gwt.event.dom.client.ClickEvent e) The event handler for the Cancel button.- Parameters:
e- the event
-
onProblemClick
@UiHandler("m_checkboxProblems") protected void onProblemClick(com.google.gwt.event.dom.client.ClickEvent event) Handles the click event for problem resources check box.- Parameters:
event- the click event- See Also:
-
onRelatedClick
@UiHandler("m_checkboxRelated") protected void onRelatedClick(com.google.gwt.event.dom.client.ClickEvent event) Handles the click event for related resources check box.- Parameters:
event- the click event- See Also:
-
onSiblingClick
@UiHandler("m_checkboxSiblings") protected void onSiblingClick(com.google.gwt.event.dom.client.ClickEvent event) Handles the click event for sibling resources check box.- Parameters:
event- the click event- See Also:
-
setGroups
protected void setGroups(List<org.opencms.ade.publish.shared.CmsPublishGroup> groups, boolean newData) Sets the publish groups.- Parameters:
groups- the list of publish groupsnewData- true if the data is new
-
setGroups
protected void setGroups(List<org.opencms.ade.publish.shared.CmsPublishGroup> groups, boolean newData, String defaultWorkflow) Sets the publish groups.- Parameters:
groups- the list of publish groupsnewData- true if the data is newdefaultWorkflow- the default workflow id
-
setProblemMode
Enables or disables the "only show resources with problems" mode.- Parameters:
enabled- if true, enable the mode, else disable it
-
startLoading
The method which should be called when new items start being inserted into the list.
-