Package org.opencms.ade.publish
Class CmsPublish
java.lang.Object
org.opencms.ade.publish.CmsPublish
ADE publishing features.
- Since:
- 8.0.0
-
Nested Class Summary
Modifier and TypeClassDescriptionclass
Just for passing around resources and their related together but not mixed up. -
Field Summary
Modifier and TypeFieldDescriptionprotected static final int
The number of day groups.protected static final int
The gap between session groups.protected static final int
The number of session groups.protected final CmsObject
The current cms context.protected final CmsPublishOptions
The options.protected final Locale
The current user workplace locale. -
Constructor Summary
ConstructorDescriptionCmsPublish
(CmsObject cms) Creates a new instance.CmsPublish
(CmsObject cms, Map<String, String> params) Constructor with default options.CmsPublish
(CmsObject cms, CmsPublishOptions options) Constructor with options. -
Method Summary
Modifier and TypeMethodDescriptiongetBrokenResources
(List<CmsResource> pubResources) Checks for possible broken links when the given list of resources would be published.protected static String
getOuAwareName
(CmsObject cms, String name) Returns the simple name if the ou is the same as the current user's ou.Gets the relation validator instance.void
publishResources
(List<CmsResource> resources) Publishes the given list of resources.relationToBean
(CmsRelation relation) Creates a publish resource bean from the target information of a relation object.void
removeResourcesFromPublishList
(Collection<CmsUUID> idsToRemove) Removes the given resources from the user's publish list.protected CmsPublishResource
resourceToBean
(CmsResource resource, CmsPublishResourceInfo info, boolean removable, List<CmsPublishResource> related) Creates a publish resource bean instance from the given parameters.
-
Field Details
-
GROUP_DAYS_NUMBER
The number of day groups.- See Also:
-
GROUP_SESSIONS_GAP
The gap between session groups.- See Also:
-
GROUP_SESSIONS_NUMBER
The number of session groups.- See Also:
-
m_cms
The current cms context. -
m_options
The options. -
m_workplaceLocale
The current user workplace locale.
-
-
Constructor Details
-
CmsPublish
Creates a new instance.- Parameters:
cms
- the CMS context to use
-
CmsPublish
Constructor with default options.- Parameters:
cms
- the current cms contextparams
- the additional publish parameters
-
-
Method Details
-
getOuAwareName
Returns the simple name if the ou is the same as the current user's ou.- Parameters:
cms
- the CMS contextname
- the fully qualified name to check- Returns:
- the simple name if the ou is the same as the current user's ou
-
getBrokenResources
Checks for possible broken links when the given list of resources would be published.- Parameters:
pubResources
- list of resources to be published- Returns:
- a list of resources that would produce broken links when published
-
getRelationValidator
Gets the relation validator instance.- Returns:
- the relation validator
-
publishResources
Publishes the given list of resources.- Parameters:
resources
- list of resources to publish- Throws:
CmsException
- if something goes wrong
-
relationToBean
Creates a publish resource bean from the target information of a relation object.- Parameters:
relation
- the relation to use- Returns:
- the publish resource bean for the relation target
-
removeResourcesFromPublishList
Removes the given resources from the user's publish list.- Parameters:
idsToRemove
- list of structure ids identifying the resources to be removed- Throws:
CmsException
- if something goes wrong
-