How to invalidate HTMLPageAsset?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

How to invalidate HTMLPageAsset?

acheung
Hi. I am refactoring our static plugin to suit dotcms version 4.1.1. As we no longer have HTMLPage and instead we use HtmlPageAsset, how do we invalidate the page? 
e.g. In version 3.3.1, we have :

  HTMLPage page=APILocator.getHTMLPageAPI().loadPageByPath(pageIdent.getURI(), pageIdent.getHostId());
                    if(page!=null && UtilMethods.isSet(page.getIdentifier()))
                        PageServices.invalidateLive(page);
                }


For version 4.1.1, we have :

Contentlet pageContentlet = conAPI.findContentletByIdentifier(pageIdent.getId(), true, con.getLanguageId(), user, respectFrontendRoles);
        HTMLPageAsset pageAsset  = htmlPageAssetAPI.fromContentlet(pageContentlet);


         

PageServices.invalidateLive(page) will only take HTMLPage as parameter. Do we still use PageServices to invalidate the page? If yes, how do we do that? If not, what do we use?

Any help is appreciated.

 -Andrew

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/054e901f-0bad-4415-9394-8e279629b334%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.