public class CmsDefaultPublishResourceFormatter extends java.lang.Object implements I_CmsPublishResourceFormatter
| Modifier and Type | Class and Description |
|---|---|
class |
CmsDefaultPublishResourceFormatter.AlreadyPublishedValidator
Excludes resources which have already been published.
|
class |
CmsDefaultPublishResourceFormatter.BlockingLockedValidator
Validator which checks if resources are locked by someone else.
|
static class |
CmsDefaultPublishResourceFormatter.DefaultComparator
Compares publish resources by their sort date.
|
static interface |
CmsDefaultPublishResourceFormatter.I_PublishResourceValidator
Validator which can exclude some resources from publishing and supplies a status object for the excluded resources.
|
class |
CmsDefaultPublishResourceFormatter.NoPermissionsValidator
Validator which excludes resources for which the user has no publish permissions.
|
class |
CmsDefaultPublishResourceFormatter.PublishPermissionFilter
Predicate which checks whether the current user has publish permissions for a resource.
|
| Modifier and Type | Field and Description |
|---|---|
protected CmsPublishOptions |
m_options
The publish options.
|
| Constructor and Description |
|---|
CmsDefaultPublishResourceFormatter(CmsObject cms)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected java.util.Map<CmsUUID,CmsPublishResourceInfo> |
computeWarnings()
Creates the publish resource warnings.
|
protected CmsPublishResource |
createPublishResource(CmsResource resource)
Creates a publish resource bean from a resource.
|
protected java.util.Locale |
getLocale()
Gets the workplace locale for the currently used CMS context.
|
static java.lang.String |
getOuAwareName(CmsObject cms,
java.lang.String name)
Returns the simple name if the ou is the same as the current user's ou.
|
java.util.List<CmsPublishResource> |
getPublishResources()
Gets the publish resource beans created by this formatter.
|
protected com.google.common.base.Predicate<CmsResource> |
getResourceMapFilter()
Gets the resource map filter.
|
protected java.util.List<CmsDefaultPublishResourceFormatter.I_PublishResourceValidator> |
getValidators()
Gets the list of publish resource validators.
|
void |
initialize(CmsPublishOptions options,
CmsPublishRelationFinder.ResourceMap resources)
Initializes the formatter.
|
protected void |
sortResult(java.util.List<CmsPublishResource> publishResources)
Sorts the result publish resource list.
|
protected CmsPublishOptions m_options
public CmsDefaultPublishResourceFormatter(CmsObject cms)
cms - the CMS context to usepublic static java.lang.String getOuAwareName(CmsObject cms, java.lang.String name)
cms - the CMS contextname - the fully qualified name to checkpublic java.util.List<CmsPublishResource> getPublishResources()
I_CmsPublishResourceFormattergetPublishResources in interface I_CmsPublishResourceFormatterI_CmsPublishResourceFormatter.getPublishResources()public void initialize(CmsPublishOptions options, CmsPublishRelationFinder.ResourceMap resources) throws CmsException
I_CmsPublishResourceFormatterinitialize in interface I_CmsPublishResourceFormatteroptions - the publish optionsresources - the publish resourcesCmsException - in case something goes wrongI_CmsPublishResourceFormatter.initialize(org.opencms.ade.publish.shared.CmsPublishOptions, org.opencms.ade.publish.CmsPublishRelationFinder.ResourceMap)protected java.util.Map<CmsUUID,CmsPublishResourceInfo> computeWarnings()
protected CmsPublishResource createPublishResource(CmsResource resource) throws CmsException
resource - the resourceCmsException - if something goes wrongprotected java.util.Locale getLocale()
protected com.google.common.base.Predicate<CmsResource> getResourceMapFilter()
This can be used to remove resources which shouldn't be displayed.
protected java.util.List<CmsDefaultPublishResourceFormatter.I_PublishResourceValidator> getValidators()
protected void sortResult(java.util.List<CmsPublishResource> publishResources)
publishResources - the list to sort