This repository has been archived by the owner on Nov 23, 2021. It is now read-only.
Sites publish and unpublish
Wiktor Szczepaniak edited this page Sep 5, 2016
·
2 revisions
Using AEM Sites page, we can do several operations regarding page activation.
List of operations supported by Bobcat's SiteadminPage
class :
- publish page using method
publishPage(String title)
- unpublish page using method
unpublishPage(String title)
- publish page later using method
publishPageLater(String title, LocalDateTime publicationDate)
- unpublish page later using method
unpublishPageLater(String title, LocalDateTime unpublicationDate)
Assuming, that we have a existing page that can be published, we can use this example code :
@Test
Public void shouldPublishPage() {
siteadminPage.publishPage(“example existing page”);
}
Assuming, we have a existing page that can be unpublished, we can use example code below:
@Test
Public void shouldUnpublishPage() {
siteadminPage.unpublishPage(“example existing page”);
}
To publish page later, we can use an example below:
@Test
public void shouldPublishPageLaterProperly() {
LocalDateTime exampleFutureTime = LocalDateTime.now().plusMonths(2).plusDays(1).plusMinutes(2);
siteadminPage.publishPageLater(“existing Page”, exampleFutureTime);
}
Similarly to above example, to unpublish page we can use code below :
@Test
public void shouldUnpublishPageLaterProperly() {
LocalDateTime exampleFutureTime = LocalDateTime.now().plusMonths(2).plusDays(1).plusMinutes(2);
siteadminPage.unpublishPageLater(“existing Page”, exampleFutureTime);
}
Back to Sites management
- Configuring Bobcat
- Selenium enhancements
- Cucumber enhancements
- Traffic analyzer
- Email support
- Reporting
- Cloud integration
- Mobile integration
- Executing tests on different environments
- Working with multiple threads
- Tips and tricks
- Authoring tutorial - Classic
- AEM Classic Authoring Advanced usage
- Siteadmin
- Sidekick
- Aem Component
- Working with author pages
- Working with Publish pages
- Advanced component interactions
- Working with Context Menu
- Using Aem Content Tree
- Aem Content Finder
- Storing component configurations
- Working with packages
- Jcr Support
- Authoring tutorial - Touch UI
- Adding and editing a component
- Sites management tutorial