public class CmsPublish
extends java.lang.Object
| 限定符和类型 | 类和说明 |
|---|---|
class |
CmsPublish.ResourcesAndRelated
Just for passing around resources and their related together but not mixed up.
|
| 限定符和类型 | 字段和说明 |
|---|---|
protected static int |
GROUP_DAYS_NUMBER
The number of day groups.
|
protected static int |
GROUP_SESSIONS_GAP
The gap between session groups.
|
protected static int |
GROUP_SESSIONS_NUMBER
The number of session groups.
|
protected CmsObject |
m_cms
The current cms context.
|
protected CmsPublishOptions |
m_options
The options.
|
protected java.util.Locale |
m_workplaceLocale
The current user workplace locale.
|
| 构造器和说明 |
|---|
CmsPublish(CmsObject cms)
Creates a new instance.
|
CmsPublish(CmsObject cms,
CmsPublishOptions options)
Constructor with options.
|
CmsPublish(CmsObject cms,
java.util.Map<java.lang.String,java.lang.String> params)
Constructor with default options.
|
| 限定符和类型 | 方法和说明 |
|---|---|
java.util.List<CmsPublishResource> |
getBrokenResources(java.util.List<CmsResource> pubResources)
Checks for possible broken links when the given list of resources would be published.
|
protected 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.
|
CmsRelationPublishValidator |
getRelationValidator()
Gets the relation validator instance.
|
void |
publishResources(java.util.List<CmsResource> resources)
Publishes the given list of resources.
|
CmsPublishResource |
relationToBean(CmsRelation relation)
Creates a publish resource bean from the target information of a relation object.
|
void |
removeResourcesFromPublishList(java.util.Collection<CmsUUID> idsToRemove)
Removes the given resources from the user's publish list.
|
protected CmsPublishResource |
resourceToBean(CmsResource resource,
CmsPublishResourceInfo info,
boolean removable,
java.util.List<CmsPublishResource> related)
Creates a publish resource bean instance from the given parameters.
|
protected static final int GROUP_DAYS_NUMBER
protected static final int GROUP_SESSIONS_GAP
protected static final int GROUP_SESSIONS_NUMBER
protected final CmsObject m_cms
protected final CmsPublishOptions m_options
protected final java.util.Locale m_workplaceLocale
public CmsPublish(CmsObject cms)
cms - the CMS context to usepublic CmsPublish(CmsObject cms, CmsPublishOptions options)
cms - the current cms contextoptions - the options to usepublic CmsPublish(CmsObject cms, java.util.Map<java.lang.String,java.lang.String> params)
cms - the current cms contextparams - the additional publish parametersprotected 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> getBrokenResources(java.util.List<CmsResource> pubResources)
pubResources - list of resources to be publishedpublic CmsRelationPublishValidator getRelationValidator()
public void publishResources(java.util.List<CmsResource> resources) throws CmsException
resources - list of resources to publishCmsException - if something goes wrongpublic CmsPublishResource relationToBean(CmsRelation relation)
relation - the relation to usepublic void removeResourcesFromPublishList(java.util.Collection<CmsUUID> idsToRemove) throws CmsException
idsToRemove - list of structure ids identifying the resources to be removedCmsException - if something goes wrongprotected CmsPublishResource resourceToBean(CmsResource resource, CmsPublishResourceInfo info, boolean removable, java.util.List<CmsPublishResource> related)
resource - the resourceinfo - the publish information, if anyremovable - if removablerelated - the list of related resources