public class CmsPublishDataModel
extends java.lang.Object
限定符和类型 | 类和说明 |
---|---|
static class |
CmsPublishDataModel.HasProblems
Predicate used to check if a resource has problems.
|
static interface |
CmsPublishDataModel.I_CmsPublishResourceCheck
Predicate for testing properties of publish resources.
|
构造器和说明 |
---|
CmsPublishDataModel(java.util.List<CmsPublishGroup> publishGroups,
I_CmsPublishItemStatusUpdateHandler handler)
Creates and initializes a new publish resource data model from a list of publish groups.
|
限定符和类型 | 方法和说明 |
---|---|
java.util.Map<java.lang.Integer,CmsPublishItemStateSummary> |
computeGroupSelectionStates()
Collects group selection states.
|
int |
countProblems()
Counts the resources which have problems.
|
int |
countResources(CmsPublishDataModel.I_CmsPublishResourceCheck check)
Counts the resources which pass a given check.
|
int |
countResourcesInGroup(CmsPublishDataModel.I_CmsPublishResourceCheck check,
java.util.List<CmsPublishResource> group)
Counts the resources of a group which pass a given check.
|
java.util.List<CmsPublishGroup> |
getGroups()
Gets the list of publish groups.
|
java.util.List<CmsUUID> |
getIdsForGroup(int groupNum)
Gets the ids for a given publish group.
|
java.util.List<CmsUUID> |
getIdsOfAlreadyPublishedResources()
Returns the id's of all already published resources.
|
java.util.Set<CmsUUID> |
getPublishIds()
Returns the ids of publish resources which should be published.
|
java.util.Map<CmsUUID,CmsPublishResource> |
getPublishResources()
Returns the list of all publish resources.
|
java.util.Map<java.lang.String,CmsPublishResource> |
getPublishResourcesByPath()
Returns the map of publish resources by path.
|
java.util.List<CmsUUID> |
getRemoveIds()
Returns the ids of publish resources which should be removed.
|
CmsPublishItemStatus |
getStatus(CmsUUID id)
Returns the status for a given publish resource id.
|
static boolean |
hasProblems(CmsPublishResource publishResource)
Returns if the given publish resource has problems preventing it from being published.
|
boolean |
hasSingleGroup()
Checks if there is only a single group of resources.
|
boolean |
isEmpty()
Checks if there are any publish resources.
|
void |
setSelectionChangeAction(java.lang.Runnable action)
Sets the action which should be executed when the selection changes.
|
void |
signal(org.opencms.ade.publish.client.CmsPublishItemStatus.Signal signal,
CmsUUID id)
Sends a signal to a publish item status bean with the given id.
|
void |
signalAll(org.opencms.ade.publish.client.CmsPublishItemStatus.Signal signal)
Sends a signal to all publish item status beans.
|
void |
signalGroup(org.opencms.ade.publish.client.CmsPublishItemStatus.Signal signal,
int groupNum)
Sends a signal to all publish items in a given group.
|
public CmsPublishDataModel(java.util.List<CmsPublishGroup> publishGroups, I_CmsPublishItemStatusUpdateHandler handler)
publishGroups
- the original publish groupshandler
- the handler which should be notified of state changespublic static boolean hasProblems(CmsPublishResource publishResource)
publishResource
- the publish resourcetrue
if the publish resource has problemspublic java.util.Map<java.lang.Integer,CmsPublishItemStateSummary> computeGroupSelectionStates()
public int countProblems()
public int countResources(CmsPublishDataModel.I_CmsPublishResourceCheck check)
check
- the check to applypublic int countResourcesInGroup(CmsPublishDataModel.I_CmsPublishResourceCheck check, java.util.List<CmsPublishResource> group)
check
- the check to applygroup
- the group of publish resourcespublic java.util.List<CmsPublishGroup> getGroups()
public java.util.List<CmsUUID> getIdsForGroup(int groupNum)
groupNum
- the index of the grouppublic java.util.List<CmsUUID> getIdsOfAlreadyPublishedResources()
public java.util.Set<CmsUUID> getPublishIds()
public java.util.Map<CmsUUID,CmsPublishResource> getPublishResources()
public java.util.Map<java.lang.String,CmsPublishResource> getPublishResourcesByPath()
public java.util.List<CmsUUID> getRemoveIds()
public CmsPublishItemStatus getStatus(CmsUUID id)
id
- the publish resource's structure idpublic boolean hasSingleGroup()
public boolean isEmpty()
public void setSelectionChangeAction(java.lang.Runnable action)
action
- the action to run when the selection changespublic void signal(org.opencms.ade.publish.client.CmsPublishItemStatus.Signal signal, CmsUUID id)
signal
- the signalid
- the structure idpublic void signalAll(org.opencms.ade.publish.client.CmsPublishItemStatus.Signal signal)
signal
- the signalpublic void signalGroup(org.opencms.ade.publish.client.CmsPublishItemStatus.Signal signal, int groupNum)
signal
- the signal to sendgroupNum
- the group index