/** * Returns a publish list with all new/changed/deleted resources of the current (offline) * project that actually get published for a direct publish of a List of resources.<p> * * @param cms the cms request context * @param directPublishResources the resources which will be directly published * @param directPublishSiblings <code>true</code>, if all eventual siblings of the direct * published resources should also get published. * * @return a publish list * * @throws CmsException if something goes wrong */ public CmsPublishList getPublishList(CmsObject cms, List directPublishResources, boolean directPublishSiblings) throws CmsException { return getPublishList(cms, directPublishResources, directPublishSiblings, true); }
/** * Returns a publish list with all new/changed/deleted resources of the current (offline) * project that actually get published for a direct publish of a List of resources.<p> * * @param cms the cms request context * @param directPublishResources the resources which will be directly published * @param directPublishSiblings <code>true</code>, if all eventual siblings of the direct * published resources should also get published. * * @return a publish list * * @throws CmsException if something goes wrong */ public CmsPublishList getPublishList( CmsObject cms, List<CmsResource> directPublishResources, boolean directPublishSiblings) throws CmsException { return getPublishList(cms, directPublishResources, directPublishSiblings, true); }
/** * Publishes the current project.<p> * * @param cms the cms request context * @param report an instance of <code>{@link I_CmsReport}</code> to print messages * * @return the publish history id of the published project * * @throws CmsException if something goes wrong */ public CmsUUID publishProject(CmsObject cms, I_CmsReport report) throws CmsException { return publishProject(cms, report, getPublishList(cms)); }
/** * Returns a publish list with all new/changed/deleted resources of the current (offline) * project that actually get published.<p> * * @return a publish list * * @throws CmsException if something goes wrong * * @deprecated use <code>{@link OpenCms#getPublishManager()}.{@link org.opencms.publish.CmsPublishManager#getPublishList(CmsObject) getPublishList(CmsObject)}</code> instead */ public CmsPublishList getPublishList() throws CmsException { return OpenCms.getPublishManager().getPublishList(this); }
/** * Publishes the current project.<p> * * @param cms the cms request context * @param report an instance of <code>{@link I_CmsReport}</code> to print messages * * @return the publish history id of the published project * * @throws CmsException if something goes wrong */ public CmsUUID publishProject(CmsObject cms, I_CmsReport report) throws CmsException { return publishProject(cms, report, getPublishList(cms)); }
/** * Returns a publish list with all new/changed/deleted resources of the current (offline) * project that actually get published for a direct publish of a single resource.<p> * * @param directPublishResource the resource which will be directly published * @param directPublishSiblings <code>true</code>, if all eventual siblings of the direct * published resource should also get published. * * @return a publish list * * @throws CmsException if something goes wrong * * @deprecated use <code>{@link OpenCms#getPublishManager()}.{@link org.opencms.publish.CmsPublishManager#getPublishList(CmsObject, CmsResource, boolean) getPublishList(CmsObject, CmsResource, boolean)}</code> instead */ public CmsPublishList getPublishList(CmsResource directPublishResource, boolean directPublishSiblings) throws CmsException { return OpenCms.getPublishManager().getPublishList(this, directPublishResource, directPublishSiblings); }
/** * Returns a publish list with all new/changed/deleted resources of the current (offline) * project that actually get published for a direct publish of a List of resources.<p> * * @param directPublishResources the resources which will be directly published * @param directPublishSiblings <code>true</code>, if all eventual siblings of the direct * published resources should also get published. * * @return a publish list * * @throws CmsException if something goes wrong * * @deprecated use <code>{@link OpenCms#getPublishManager()}.{@link org.opencms.publish.CmsPublishManager#getPublishList(CmsObject, List, boolean) getPublishList(CmsObject, List, boolean)}</code> instead */ public CmsPublishList getPublishList(List directPublishResources, boolean directPublishSiblings) throws CmsException { return OpenCms.getPublishManager().getPublishList(this, directPublishResources, directPublishSiblings, true); }
/** * Direct publishes a specified resource.<p> * * @param cms the cms request context * @param report an instance of <code>{@link I_CmsReport}</code> to print messages * @param directPublishResource a <code>{@link CmsResource}</code> that gets directly published; * or <code>null</code> if an entire project gets published. * @param directPublishSiblings if a <code>{@link CmsResource}</code> that should get published directly is * provided as an argument, all eventual siblings of this resource * get publish too, if this flag is <code>true</code>. * * @return the publish history id of the published project * * @throws CmsException if something goes wrong */ public CmsUUID publishProject( CmsObject cms, I_CmsReport report, CmsResource directPublishResource, boolean directPublishSiblings) throws CmsException { return publishProject(cms, report, getPublishList(cms, directPublishResource, directPublishSiblings)); }
/** * Direct publishes a specified resource.<p> * * @param cms the cms request context * @param report an instance of <code>{@link I_CmsReport}</code> to print messages * @param directPublishResource a <code>{@link CmsResource}</code> that gets directly published; * or <code>null</code> if an entire project gets published. * @param directPublishSiblings if a <code>{@link CmsResource}</code> that should get published directly is * provided as an argument, all eventual siblings of this resource * get publish too, if this flag is <code>true</code>. * * @return the publish history id of the published project * * @throws CmsException if something goes wrong */ public CmsUUID publishProject( CmsObject cms, I_CmsReport report, CmsResource directPublishResource, boolean directPublishSiblings) throws CmsException { return publishProject(cms, report, getPublishList(cms, directPublishResource, directPublishSiblings)); }
/** * Returns a publish list with all new/changed/deleted resources of the current (offline) * project that actually get published for a direct publish of a List of resources.<p> * * @param directPublishResources the {@link CmsResource} objects which will be directly published * @param directPublishSiblings <code>true</code>, if all eventual siblings of the direct * published resources should also get published. * @param publishSubResources indicates if sub-resources in folders should be published (for direct publish only) * * @return a publish list * * @throws CmsException if something goes wrong * * @deprecated use <code>{@link OpenCms#getPublishManager()}.{@link org.opencms.publish.CmsPublishManager#getPublishList(CmsObject, List, boolean, boolean) getPublishList(CmsObject, List, boolean)}</code> instead */ public CmsPublishList getPublishList( List directPublishResources, boolean directPublishSiblings, boolean publishSubResources) throws CmsException { return OpenCms.getPublishManager().getPublishList( this, directPublishResources, directPublishSiblings, publishSubResources); }
/** * @see org.opencms.workplace.editors.I_CmsEditorActionHandler#isButtonActive(CmsJspActionElement, java.lang.String) */ public boolean isButtonActive(CmsJspActionElement jsp, String resourceName) { try { OpenCms.getPublishManager().getPublishList( jsp.getCmsObject(), jsp.getCmsObject().readResource(resourceName, CmsResourceFilter.IGNORE_EXPIRATION), false); return true; } catch (Exception e) { return false; } } }
/** * @see org.opencms.workplace.editors.I_CmsEditorActionHandler#isButtonActive(CmsJspActionElement, java.lang.String) */ public boolean isButtonActive(CmsJspActionElement jsp, String resourceName) { try { OpenCms.getPublishManager().getPublishList( jsp.getCmsObject(), jsp.getCmsObject().readResource(resourceName, CmsResourceFilter.IGNORE_EXPIRATION), false); return true; } catch (Exception e) { return false; } } }
boolean publishSiblings = Boolean.valueOf(getParamPublishsiblings()).booleanValue(); publishList = OpenCms.getPublishManager().getPublishList( getCms(), publishResources, try { publishList = OpenCms.getPublishManager().getPublishList(getCms()); } catch (CmsException e) { addMultiOperationException(e);
boolean publishSiblings = Boolean.valueOf(getParamPublishsiblings()).booleanValue(); publishList = OpenCms.getPublishManager().getPublishList( getCms(), publishResources, try { publishList = OpenCms.getPublishManager().getPublishList(getCms()); } catch (CmsException e) { addMultiOperationException(e);
/** * Publishes the current project.<p> * * @param report an instance of <code>{@link I_CmsReport}</code> to print messages * * @return the publish history id of the published project * * @throws CmsException if something goes wrong * * @deprecated use <code>{@link OpenCms#getPublishManager()}.{@link org.opencms.publish.CmsPublishManager#publishProject(CmsObject, I_CmsReport) publishProject(CmsObject, I_CmsReport)}</code> instead */ public CmsUUID publishProject(I_CmsReport report) throws CmsException { CmsUUID publishHistoryId = OpenCms.getPublishManager().publishProject( this, report, OpenCms.getPublishManager().getPublishList(this)); OpenCms.getPublishManager().waitWhileRunning(); return publishHistoryId; }
/** * Direct publishes a specified resource.<p> * * @param report an instance of <code>{@link I_CmsReport}</code> to print messages * @param directPublishResource a <code>{@link CmsResource}</code> that gets directly published; * or <code>null</code> if an entire project gets published. * @param directPublishSiblings if a <code>{@link CmsResource}</code> that should get published directly is * provided as an argument, all eventual siblings of this resource * get publish too, if this flag is <code>true</code>. * * @return the publish history id of the published project * * @throws CmsException if something goes wrong * * @see #publishResource(String) * @see #publishResource(String, boolean, I_CmsReport) * * @deprecated use <code>{@link OpenCms#getPublishManager()}.{@link org.opencms.publish.CmsPublishManager#publishProject(CmsObject, I_CmsReport, CmsResource, boolean) publishProject(CmsObject, I_CmsReport, CmsResource, boolean)}</code> instead */ public CmsUUID publishProject(I_CmsReport report, CmsResource directPublishResource, boolean directPublishSiblings) throws CmsException { CmsUUID publishHistoryId = OpenCms.getPublishManager().publishProject( this, report, OpenCms.getPublishManager().getPublishList(this, directPublishResource, directPublishSiblings)); OpenCms.getPublishManager().waitWhileRunning(); return publishHistoryId; }
/** * @see org.opencms.ade.publish.I_CmsVirtualProject#getResources(org.opencms.file.CmsObject, java.util.Map, java.lang.String) */ public List<CmsResource> getResources(CmsObject cms, Map<String, String> params, String workflowId) throws CmsException { List<CmsResource> rawResourceList = new ArrayList<CmsResource>(); CmsProject project = cms.getRequestContext().getCurrentProject(); try { project = cms.readProject(getProjectId()); } catch (CmsException e) { // ignore } // get the project publish list CmsProject originalProject = cms.getRequestContext().getCurrentProject(); try { cms.getRequestContext().setCurrentProject(project); rawResourceList.addAll(OpenCms.getPublishManager().getPublishList(cms).getAllResources()); } finally { cms.getRequestContext().setCurrentProject(originalProject); } return rawResourceList; }
/** * Creates a thread that validates the relations in the list of unpublished file(s) of the * current (offline) project.<p> * * The publish list *IS* saved in the current user's workplace settings for * further processing by other threads. The last thread processing this publish list *MUST* * ensure that the publish list gets removed from the current user's workplace settings!<p> * * @param cms the current OpenCms context object * @param publishList the list of resources which will be directly published * @param settings the current user's workplace settings */ public CmsRelationsValidatorThread(CmsObject cms, CmsPublishList publishList, CmsWorkplaceSettings settings) { super( cms, Messages.get().getBundle().key( Messages.GUI_HTML_LINK_VALIDATOR_THREAD_NAME_1, new Object[] {cms.getRequestContext().getCurrentProject().getName()})); m_publishList = publishList; if (m_publishList == null) { try { m_publishList = OpenCms.getPublishManager().getPublishList(cms); } catch (CmsException e) { // ignore } } m_savePublishList = true; m_settings = settings; initHtmlReport(cms.getRequestContext().getLocale()); }
/** * Creates a thread that validates the relations in the list of unpublished file(s) of the * current (offline) project.<p> * * The publish list *IS* saved in the current user's workplace settings for * further processing by other threads. The last thread processing this publish list *MUST* * ensure that the publish list gets removed from the current user's workplace settings!<p> * * @param cms the current OpenCms context object * @param publishList the list of resources which will be directly published * @param settings the current user's workplace settings */ public CmsRelationsValidatorThread(CmsObject cms, CmsPublishList publishList, CmsWorkplaceSettings settings) { super(cms, Messages.get().getBundle().key( Messages.GUI_HTML_LINK_VALIDATOR_THREAD_NAME_1, new Object[] {cms.getRequestContext().currentProject().getName()})); m_publishList = publishList; if (m_publishList == null) { try { m_publishList = OpenCms.getPublishManager().getPublishList(cms); } catch (CmsException e) { // ignore } } m_savePublishList = true; m_settings = settings; initHtmlReport(cms.getRequestContext().getLocale()); }
getCms().getRequestContext().setCurrentProject( getCms().readProject(new CmsUUID(getParamProjectid()))); list = OpenCms.getPublishManager().getPublishList(getCms()); getCms().getRequestContext().setCurrentProject(currentProject); } catch (CmsException e) {