Package org.opencms.ade.publish
Class CmsDirectPublishProject
- java.lang.Object
-
- org.opencms.ade.publish.CmsDirectPublishProject
-
- All Implemented Interfaces:
I_CmsVirtualProject
public class CmsDirectPublishProject extends java.lang.Object implements I_CmsVirtualProject
Virtual project for 'direct publishing' of resources.This virtual project gets the names of the resources to publish from the publish parameter map. If the 'add contents' mode is enabled (which is also determined from the publish parameters), the contents of folders are added to the list of publish resources. This virtual project is only available if any file names are passed via the
-
-
Constructor Summary
Constructors Constructor Description CmsDirectPublishProject()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addSubResources(CmsObject cms, java.util.Set<CmsResource> resources)
Adds contents of folders to a list of resources.CmsProjectBean
getProjectBean(CmsObject cms, java.util.Map<java.lang.String,java.lang.String> params)
Gets the project bean.CmsUUID
getProjectId()
Gets the project id.I_CmsPublishRelatedResourceProvider
getRelatedResourceProvider(CmsObject cmsObject, CmsPublishOptions options)
Returns an object that can be queried for 'related' resources specific to this virtual project.java.util.List<CmsResource>
getResources(CmsObject cms, java.util.Map<java.lang.String,java.lang.String> params, java.lang.String workflowId)
Gets the resources of the virtual project.boolean
isAutoSelectable()
Returns true if in this virtual project, resource groups should be able to be automatically selected by the GUI.protected boolean
shouldIncludeContents(java.util.Map<java.lang.String,java.lang.String> params)
Returns true if the folder contents should be included.
-
-
-
Constructor Detail
-
CmsDirectPublishProject
public CmsDirectPublishProject()
-
-
Method Detail
-
getProjectBean
public CmsProjectBean getProjectBean(CmsObject cms, java.util.Map<java.lang.String,java.lang.String> params)
Description copied from interface:I_CmsVirtualProject
Gets the project bean.Should return null if the virtual project is not available or applicable for the given parameters.
- Specified by:
getProjectBean
in interfaceI_CmsVirtualProject
- Parameters:
cms
- the CMS context to useparams
- the publish parameters- Returns:
- the project bean
- See Also:
I_CmsVirtualProject.getProjectBean(org.opencms.file.CmsObject, java.util.Map)
-
getProjectId
public CmsUUID getProjectId()
Description copied from interface:I_CmsVirtualProject
Gets the project id.- Specified by:
getProjectId
in interfaceI_CmsVirtualProject
- Returns:
- the project id
- See Also:
I_CmsVirtualProject.getProjectId()
-
getRelatedResourceProvider
public I_CmsPublishRelatedResourceProvider getRelatedResourceProvider(CmsObject cmsObject, CmsPublishOptions options)
Description copied from interface:I_CmsVirtualProject
Returns an object that can be queried for 'related' resources specific to this virtual project.- Specified by:
getRelatedResourceProvider
in interfaceI_CmsVirtualProject
- Parameters:
cmsObject
- the current CMS contextoptions
- the publish options- Returns:
- the related resource provider
- See Also:
I_CmsVirtualProject.getRelatedResourceProvider(org.opencms.file.CmsObject, org.opencms.ade.publish.shared.CmsPublishOptions)
-
getResources
public java.util.List<CmsResource> getResources(CmsObject cms, java.util.Map<java.lang.String,java.lang.String> params, java.lang.String workflowId) throws CmsException
Description copied from interface:I_CmsVirtualProject
Gets the resources of the virtual project.- Specified by:
getResources
in interfaceI_CmsVirtualProject
- Parameters:
cms
- the CMS context to useparams
- the publish parametersworkflowId
- the workflow id- Returns:
- the generated list of resources
- Throws:
CmsException
- if something goes wrong- See Also:
I_CmsVirtualProject.getResources(org.opencms.file.CmsObject, java.util.Map, java.lang.String)
-
isAutoSelectable
public boolean isAutoSelectable()
Description copied from interface:I_CmsVirtualProject
Returns true if in this virtual project, resource groups should be able to be automatically selected by the GUI.- Specified by:
isAutoSelectable
in interfaceI_CmsVirtualProject
- Returns:
- true if resource groups should be auto-selectable
- See Also:
I_CmsVirtualProject.isAutoSelectable()
-
addSubResources
protected void addSubResources(CmsObject cms, java.util.Set<CmsResource> resources) throws CmsException
Adds contents of folders to a list of resources.- Parameters:
cms
- the CMS context to useresources
- the resource list to which to add the folder contents- Throws:
CmsException
- if something goes wrong
-
shouldIncludeContents
protected boolean shouldIncludeContents(java.util.Map<java.lang.String,java.lang.String> params)
Returns true if the folder contents should be included.- Parameters:
params
- the publish parameters- Returns:
- true if the folder contents should be included
-
-