user3360123
user3360123

Reputation: 99

Hippo CMS 10, interface HstSiteMapItemHandler

In Hippo CMS 10, there is a interface called HstSiteMapItemHandler two methods are now not using any more in Hippo 10.

public interface HstSiteMapItemHandler {
    void init(ServletContext var1, SiteMapItemHandlerConfiguration var2) throws HstSiteMapItemHandlerException;

    ResolvedSiteMapItem process(ResolvedSiteMapItem var1, HttpServletRequest var2, HttpServletResponse var3) throws HstSiteMapItemHandlerException;

    void destroy() throws HstSiteMapItemHandlerException;
}

Before Hippo 10 it was,

public interface HstSiteMapItemHandler {
    void init(ServletContext var1, SiteMapItemHandlerConfiguration var2) throws HstSiteMapItemHandlerException;

    ResolvedSiteMapItem process(ResolvedSiteMapItem var1, HttpServletRequest var2, HttpServletResponse var3) throws HstSiteMapItemHandlerException;

    /** @deprecated */
    @Deprecated
    SiteMapItemHandlerConfiguration getSiteMapItemHandlerConfiguration();

    /** @deprecated */
    @Deprecated
    ServletContext getServletContext();

    void destroy() throws HstSiteMapItemHandlerException;
}

I am just wondering of somebody knows what i should use for deprecated code.

Thank you.

Upvotes: 0

Views: 69

Answers (1)

Ard
Ard

Reputation: 116

The javadoc in pre-10 explained what you should use instead. It mentioned that if you want in your own HstSiteMapItemHandler impl to get hold of the SiteMapItemHandlerConfiguration or ServletContext, you just store the parameters of the #init method as instance variables of your HstSiteMapItemHandler impl.

HTH,

Regards Ard

Upvotes: 3

Related Questions