|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.opencms.ade.publish.CmsPublish
public class CmsPublish
ADE publishing features.
| Nested Class Summary | |
|---|---|
class |
CmsPublish.ResourcesAndRelated
Just for passing around resources and their related together but not mixed up. |
| Field Summary | |
|---|---|
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. |
| Constructor Summary | |
|---|---|
CmsPublish(CmsObject cms)
Constructor with default options. |
|
CmsPublish(CmsObject cms,
CmsPublishOptions options)
Constructor with options. |
|
| Method Summary | |
|---|---|
protected void |
addRelated(CmsPublish.ResourcesAndRelated resourceList)
Adds related resource to a publish list. |
protected void |
addSiblings(CmsPublish.ResourcesAndRelated resourceList)
Adds siblings to a publish list. |
protected CmsPublishResource |
createPublishResource(CmsResource resource,
java.util.List<CmsResource> pubList,
java.util.Set<CmsResource> allPubRes,
java.util.Set<CmsResource> published,
CmsPublish.ResourcesAndRelated permissions,
CmsPublish.ResourcesAndRelated locked)
Creates a CmsPublishResource from a CmsResource. |
protected java.util.Set<CmsResource> |
getAlreadyPublishedResources(CmsPublish.ResourcesAndRelated publishResources)
Returns already published resources. |
protected CmsPublish.ResourcesAndRelated |
getBlockingLockedResources(CmsPublish.ResourcesAndRelated publishResources,
java.util.Set<CmsResource> exclude)
Returns locked resources that do not belong to the current user. |
java.util.List<CmsPublishResource> |
getBrokenResources(java.util.List<CmsResource> pubResources)
Checks for possible broken links when the given list of resources would be published. |
java.util.List<CmsProjectBean> |
getManageableProjects()
Returns the current user's manageable projects. |
CmsPublishOptions |
getOptions()
Returns the options. |
protected java.lang.String |
getOuAwareName(java.lang.String name)
Returns the simple name if the ou is the same as the current user's ou. |
java.util.List<CmsPublishGroup> |
getPublishGroups()
Returns the list of publish groups with resources that can be published. |
java.util.List<CmsPublishResource> |
getPublishResourceBeans()
Gets the list of publish resource beans. |
java.util.List<CmsPublishResource> |
getPublishResourceBeans(CmsPublish.ResourcesAndRelated rawPublishResources)
Gets the publish resources as a list of CmsPublishResource beans. |
java.util.List<CmsResource> |
getPublishResources()
Gets the publish resources as a list of CmsResource objects. |
CmsPublish.ResourcesAndRelated |
getPublishResourcesInternal()
Returns the resources stored in the user's publish list. |
protected java.util.List<CmsResource> |
getRawPublishResources()
Gets the raw list of publish resources without any related resources or siblings. |
protected java.util.List<CmsPublishResource> |
getRelatedResources(CmsResource resource,
java.util.Set<CmsResource> resources,
java.util.Set<CmsResource> published,
CmsPublish.ResourcesAndRelated permissions,
CmsPublish.ResourcesAndRelated locked)
Returns a string with a list of related resources in the publish list. |
protected CmsPublishResourceInfo |
getResourceInfo(CmsResource resource,
java.util.Set<CmsResource> published,
CmsPublish.ResourcesAndRelated permissions,
CmsPublish.ResourcesAndRelated locked)
Returns the additional info for the given resource. |
protected java.lang.String |
getResourceName(java.lang.String rootPath,
java.lang.String siteRoot)
Formats the given resource path depending on the site root. |
protected CmsPublish.ResourcesAndRelated |
getResourcesWithoutPermissions(CmsPublish.ResourcesAndRelated publishResources,
java.util.Set<CmsResource> exclude)
Returns the sublist of the publish list with resources without publish permissions. |
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
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 java.util.Locale m_workplaceLocale
protected final CmsPublishOptions m_options
| Constructor Detail |
|---|
public CmsPublish(CmsObject cms)
cms - the current cms context
public CmsPublish(CmsObject cms,
CmsPublishOptions options)
cms - the current cms contextoptions - the options to use| Method Detail |
|---|
public java.util.List<CmsPublishResource> getBrokenResources(java.util.List<CmsResource> pubResources)
pubResources - list of resources to be published
public java.util.List<CmsProjectBean> getManageableProjects()
public CmsPublishOptions getOptions()
public java.util.List<CmsPublishGroup> getPublishGroups()
public java.util.List<CmsPublishResource> getPublishResourceBeans()
public java.util.List<CmsPublishResource> getPublishResourceBeans(CmsPublish.ResourcesAndRelated rawPublishResources)
rawPublishResources - the publish resources which should be converted to publish resource beans
public java.util.List<CmsResource> getPublishResources()
CmsResource objects.
public CmsPublish.ResourcesAndRelated getPublishResourcesInternal()
public void publishResources(java.util.List<CmsResource> resources)
throws CmsException
resources - list of resources to publish
CmsException - if something goes wrongpublic CmsPublishResource relationToBean(CmsRelation relation)
relation - the relation to use
public void removeResourcesFromPublishList(java.util.Collection<CmsUUID> idsToRemove)
throws CmsException
idsToRemove - list of structure ids identifying the resources to be removed
CmsException - if something goes wrongprotected void addRelated(CmsPublish.ResourcesAndRelated resourceList)
resourceList - the publish listto which the related resources should be addedprotected void addSiblings(CmsPublish.ResourcesAndRelated resourceList)
resourceList - the publish list to which siblings should be added
protected CmsPublishResource createPublishResource(CmsResource resource,
java.util.List<CmsResource> pubList,
java.util.Set<CmsResource> allPubRes,
java.util.Set<CmsResource> published,
CmsPublish.ResourcesAndRelated permissions,
CmsPublish.ResourcesAndRelated locked)
CmsPublishResource from a CmsResource.
resource - the resource to convertpubList - a publish listallPubRes - a set of all publish resourcespublished - a set of already published resourcespermissions - resources for which we don't have the permissionslocked - resources which are locked by another user
protected java.util.Set<CmsResource> getAlreadyPublishedResources(CmsPublish.ResourcesAndRelated publishResources)
publishResources - the resources from which we should find the already published resources
protected CmsPublish.ResourcesAndRelated getBlockingLockedResources(CmsPublish.ResourcesAndRelated publishResources,
java.util.Set<CmsResource> exclude)
publishResources - the publish resources for which we should find the locked resourcesexclude - the resources to exclude
CmsLock.getBlockingLockedResources()protected java.lang.String getOuAwareName(java.lang.String name)
name - the fully qualified name to check
protected java.util.List<CmsResource> getRawPublishResources()
throws CmsException
CmsException - if something goes wrong
protected java.util.List<CmsPublishResource> getRelatedResources(CmsResource resource,
java.util.Set<CmsResource> resources,
java.util.Set<CmsResource> published,
CmsPublish.ResourcesAndRelated permissions,
CmsPublish.ResourcesAndRelated locked)
resource - the resource to useresources - the resources the user can really publishpublished - the already published resourcespermissions - the resource the current user does not have publish permissions forlocked - the locked resources
null if none
protected CmsPublishResourceInfo getResourceInfo(CmsResource resource,
java.util.Set<CmsResource> published,
CmsPublish.ResourcesAndRelated permissions,
CmsPublish.ResourcesAndRelated locked)
resource - the resource to usepublished - the already published resourcespermissions - the resource the current user does not have publish permissions forlocked - the locked resources
protected java.lang.String getResourceName(java.lang.String rootPath,
java.lang.String siteRoot)
rootPath - the resource path to formatsiteRoot - the site root
protected CmsPublish.ResourcesAndRelated getResourcesWithoutPermissions(CmsPublish.ResourcesAndRelated publishResources,
java.util.Set<CmsResource> exclude)
publishResources - the publish resources for which we should get the resources without permissionexclude - the resources to exclude
protected 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
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||