Subversion Repositories SmartDukaan

Rev

Rev 3311 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

package in.shop2020.serving.mappers;

import in.shop2020.serving.services.SpecialPageConfigurer;
import org.apache.struts2.dispatcher.mapper.ActionMapping;
import org.apache.struts2.rest.RestActionMapper;

/**
 * 
 * @author rajveer
 * 
 * Saholic mapper will allow us to dynamically map the urls with action. We will be able to create the pages dynamically in cms.
 */
public class SaholicMapper extends RestActionMapper{
            
        @Override
        public org.apache.struts2.dispatcher.mapper.ActionMapping getMapping(javax.servlet.http.HttpServletRequest request, com.opensymphony.xwork2.config.ConfigurationManager configManager){
                ActionMapping mapping = super.getMapping(request, configManager);
                if(SpecialPageConfigurer.isValidSpecialPage(mapping.getName())){
                        mapping.setName("special-page");
                }
                return mapping;
        }
}