public class CmsPublishSelectPanel extends com.google.gwt.user.client.ui.Composite implements I_CmsPublishSelectionChangeHandler, I_CmsPublishItemStatusUpdateHandler
It allows the user to choose which resources from the publish list should be published and/or removed from the publish list.
| 限定符和类型 | 类和说明 |
|---|---|
static class |
CmsPublishSelectPanel.CheckBoxUpdate
Data with which to update a check box.
|
protected static interface |
CmsPublishSelectPanel.I_CmsPublishSelectPanelUiBinder
The UiBinder interface for this widget.
|
protected class |
CmsPublishSelectPanel.MoreItemsCommand
Command for adding more list items to the list of publish items.
|
| 限定符和类型 | 字段和说明 |
|---|---|
protected CmsPushButton |
m_cancelButton
The button for escaping from the publish dialog.
|
protected CmsCheckBox |
m_checkboxAddContents
Checkbox for including the contents of folders in the direct publish case.
|
protected CmsCheckBox |
m_checkboxProblems
The checkbox for the "show problems only" mode.
|
protected CmsCheckBox |
m_checkboxRelated
The checkbox for including related resources.
|
protected CmsCheckBox |
m_checkboxSiblings
The checkbox for including sibling resources.
|
protected com.google.gwt.user.client.ui.Panel |
m_groupPanelContainer
The panel containing the publish groups.
|
protected boolean |
m_loading
Flag to indicate whether new items are currently being added to the list.
|
protected CmsPublishDataModel |
m_model
The data model for the publish dialog.
|
protected com.google.gwt.user.client.ui.Label |
m_noResources
The label which is displayed when there are no resources to publish.
|
protected com.google.gwt.user.client.ui.Panel |
m_problemsPanel
The panel which shows a message telling the user the number of problems.
|
protected CmsSelectBox |
m_projectSelector
The project select box.
|
protected CmsPublishDialog |
m_publishDialog
The publish dialog which contains this panel.
|
protected CmsScrollPanel |
m_scrollPanel
The scroll panel containing the group panel.
|
protected java.util.Map<CmsUUID,org.opencms.ade.publish.client.CmsPublishItemSelectionController> |
m_selectionControllers
The global map of selection controllers for all groups.
|
protected com.google.gwt.user.client.ui.InlineLabel |
m_selectorLabel
The label shown in front of the project selector.
|
protected com.google.gwt.user.client.ui.FlowPanel |
m_selectorPanel
The panel containing the project selector.
|
protected com.google.gwt.user.client.ui.Label |
m_tooManyResources
Label which is shown instead of the resource list when the resource list is too long.
|
protected com.google.gwt.user.client.ui.Panel |
m_topBar
The top button bar.
|
protected CmsSelectBox |
m_workflowSelector
The workflow selector.
|
protected com.google.gwt.user.client.ui.InlineLabel |
m_workflowsLabel
The workflow selector label.
|
| 构造器和说明 |
|---|
CmsPublishSelectPanel(CmsPublishDialog publishDialog,
java.util.List<CmsProjectBean> projects,
CmsPublishOptions publishOptions,
java.util.Map<java.lang.String,CmsWorkflow> workflows,
java.lang.String selectedWorkflowId,
int scrollPanelHeight)
Creates a new instance.
|
| 限定符和类型 | 方法和说明 |
|---|---|
protected void |
addMoreListItems()
Adds more publish list items to the panel.
|
protected boolean |
addNextItem()
Tries to add a new publish list item to the panel, and returns false if there aren't any items left.
|
boolean |
checkForProblems(java.util.Set<CmsUUID> resourceIds)
Check for problems with new/deleted folders in the publish selection.
|
protected void |
executeAction(CmsWorkflowAction action)
Executes the given action.
|
protected void |
finishLoading()
The method to call when the items have finished being loaded into the list.
|
static java.lang.String |
formatResourceCount(int resourceCount)
Formats a number of publish resources in a more user-friendly form.
|
java.util.List<CmsPushButton> |
getButtons()
Returns the buttons of this panel which should be shown as the buttons of the publish dialog.
|
java.util.Set<CmsUUID> |
getResourcesToPublish()
Returns the ids of the resources which should be published.
|
java.util.Set<CmsUUID> |
getResourcesToRemove()
Returns the set of ids of resources which have been selected for removal.
|
java.util.Map<CmsUUID,org.opencms.ade.publish.client.CmsPublishItemSelectionController> |
getSelectionControllers()
Gets the global map of selection controllers.
|
boolean |
isShowResources()
Returns if the resource list is being shown.
|
protected void |
onAddContentsClick(com.google.gwt.event.dom.client.ClickEvent event)
Event handler for the 'add contents' check box.
|
void |
onChangePublishSelection()
The method that will be called when the publish resource selection has changed.
|
protected void |
onClickCancel(com.google.gwt.event.dom.client.ClickEvent e)
The event handler for the Cancel button.
|
protected void |
onProblemClick(com.google.gwt.event.dom.client.ClickEvent event)
Handles the click event for problem resources check box.
|
protected void |
onProjectChange(com.google.gwt.event.logical.shared.ValueChangeEvent<java.lang.String> event)
Handling the value change event for the project selector.
|
protected void |
onRelatedClick(com.google.gwt.event.dom.client.ClickEvent event)
Handles the click event for related resources check box.
|
protected void |
onSiblingClick(com.google.gwt.event.dom.client.ClickEvent event)
Handles the click event for sibling resources check box.
|
protected void |
onWorkflowChange(com.google.gwt.event.logical.shared.ValueChangeEvent<java.lang.String> event)
Handling the value change event for the project selector.
|
void |
setGroupList(CmsPublishGroupList groups,
boolean newData)
Sets the publish groups used by this widget.
|
protected void |
setGroups(java.util.List<CmsPublishGroup> groups,
boolean newData)
Sets the publish groups.
|
protected void |
setProblemMode(boolean enabled)
Enables or disables the "only show resources with problems" mode.
|
void |
setShowResources(boolean showResources,
java.lang.String tooManyResourcesMessage)
Sets the mode to either show resources, or only show a "too many resources" message.
|
boolean |
shouldEnablePublishButton()
Returns true if the publish button should be enabled.
|
protected void |
startLoading()
The method which should be called when new items start being inserted into the list.
|
void |
update(CmsUUID id,
CmsPublishItemStatus status)
Processes a status change.
|
static CmsPublishSelectPanel.CheckBoxUpdate |
updateCheckbox(CmsPublishItemStateSummary states)
Updates the state of a check box used for selecting/deselecting items.
|
void |
updateDialogTitle()
Updates the dialog title.
|
claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidgetaddAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEventsaddStyleDependentName, 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, unsinkEvents@UiField protected CmsPushButton m_cancelButton
@UiField protected CmsCheckBox m_checkboxAddContents
@UiField protected CmsCheckBox m_checkboxProblems
@UiField protected CmsCheckBox m_checkboxRelated
@UiField protected CmsCheckBox m_checkboxSiblings
@UiField protected com.google.gwt.user.client.ui.Panel m_groupPanelContainer
protected boolean m_loading
protected CmsPublishDataModel m_model
@UiField protected com.google.gwt.user.client.ui.Label m_noResources
@UiField protected com.google.gwt.user.client.ui.Panel m_problemsPanel
@UiField protected CmsSelectBox m_projectSelector
protected CmsPublishDialog m_publishDialog
@UiField protected CmsScrollPanel m_scrollPanel
protected java.util.Map<CmsUUID,org.opencms.ade.publish.client.CmsPublishItemSelectionController> m_selectionControllers
@UiField protected com.google.gwt.user.client.ui.InlineLabel m_selectorLabel
@UiField protected com.google.gwt.user.client.ui.FlowPanel m_selectorPanel
@UiField protected com.google.gwt.user.client.ui.Label m_tooManyResources
@UiField protected com.google.gwt.user.client.ui.Panel m_topBar
@UiField protected CmsSelectBox m_workflowSelector
@UiField protected com.google.gwt.user.client.ui.InlineLabel m_workflowsLabel
public CmsPublishSelectPanel(CmsPublishDialog publishDialog, java.util.List<CmsProjectBean> projects, CmsPublishOptions publishOptions, java.util.Map<java.lang.String,CmsWorkflow> workflows, java.lang.String selectedWorkflowId, int scrollPanelHeight)
publishDialog - the publish dialog to which this panel should belongprojects - a map of projects, where the keys are the project ids and the values are the names of the projectspublishOptions - the initial publish optionsworkflows - the available workflowsselectedWorkflowId - the selected workflow idscrollPanelHeight - the available scroll panel heightpublic static java.lang.String formatResourceCount(int resourceCount)
resourceCount - a number of resourcespublic static CmsPublishSelectPanel.CheckBoxUpdate updateCheckbox(CmsPublishItemStateSummary states)
states - the selection states of the items for the check boxpublic boolean checkForProblems(java.util.Set<CmsUUID> resourceIds)
resourceIds - the ids of the resources selected for publishingpublic java.util.List<CmsPushButton> getButtons()
public java.util.Set<CmsUUID> getResourcesToPublish()
public java.util.Set<CmsUUID> getResourcesToRemove()
public java.util.Map<CmsUUID,org.opencms.ade.publish.client.CmsPublishItemSelectionController> getSelectionControllers()
public boolean isShowResources()
The resource list is now shown if it is too long.
public void onChangePublishSelection()
I_CmsPublishSelectionChangeHandlerpublic void setGroupList(CmsPublishGroupList groups, boolean newData)
groups - the new publish groupsnewData - true if the groups are new data which has been loadedpublic void setShowResources(boolean showResources,
java.lang.String tooManyResourcesMessage)
In the latter case, the check boxes for the siblings/related resources will be deactivated.
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 displaypublic boolean shouldEnablePublishButton()
public void update(CmsUUID id, CmsPublishItemStatus status)
I_CmsPublishItemStatusUpdateHandlerupdate 在接口中 I_CmsPublishItemStatusUpdateHandlerid - the id of the publish item whose status has changedstatus - the new statusI_CmsPublishItemStatusUpdateHandler.update(org.opencms.util.CmsUUID, org.opencms.ade.publish.client.CmsPublishItemStatus)public void updateDialogTitle()
protected void addMoreListItems()
protected boolean addNextItem()
protected void executeAction(CmsWorkflowAction action)
action - the action to execute on the selected resourcesprotected void finishLoading()
@UiHandler(value="m_checkboxAddContents") protected void onAddContentsClick(com.google.gwt.event.dom.client.ClickEvent event)
event - @UiHandler(value="m_cancelButton") protected void onClickCancel(com.google.gwt.event.dom.client.ClickEvent e)
e - the event@UiHandler(value="m_checkboxProblems") protected void onProblemClick(com.google.gwt.event.dom.client.ClickEvent event)
event - the click eventClickHandler.onClick(com.google.gwt.event.dom.client.ClickEvent)@UiHandler(value="m_projectSelector") protected void onProjectChange(com.google.gwt.event.logical.shared.ValueChangeEvent<java.lang.String> event)
event - the change eventValueChangeHandler.onValueChange(ValueChangeEvent)@UiHandler(value="m_checkboxRelated") protected void onRelatedClick(com.google.gwt.event.dom.client.ClickEvent event)
event - the click eventClickHandler.onClick(com.google.gwt.event.dom.client.ClickEvent)@UiHandler(value="m_checkboxSiblings") protected void onSiblingClick(com.google.gwt.event.dom.client.ClickEvent event)
event - the click eventClickHandler.onClick(com.google.gwt.event.dom.client.ClickEvent)@UiHandler(value="m_workflowSelector") protected void onWorkflowChange(com.google.gwt.event.logical.shared.ValueChangeEvent<java.lang.String> event)
event - the change eventValueChangeHandler.onValueChange(ValueChangeEvent)protected void setGroups(java.util.List<CmsPublishGroup> groups, boolean newData)
groups - the list of publish groupsnewData - true if the data is newprotected void setProblemMode(boolean enabled)
enabled - if true, enable the mode, else disable itprotected void startLoading()