Search in sources :

Example 1 with IPageParametersEncoder

use of org.apache.wicket.request.mapper.parameter.IPageParametersEncoder in project midpoint by Evolveum.

the class PageMounter method mountPage.

private void mountPage(PageDescriptor descriptor, Class clazz, MidPointApplication application) throws InstantiationException, IllegalAccessException {
    for (Url url : descriptor.urls()) {
        IPageParametersEncoder encoder = descriptor.encoder().newInstance();
        LOGGER.trace("Mounting page '{}' to url '{}' with encoder '{}'.", clazz.getName(), url, encoder.getClass().getSimpleName());
        application.mount(new ExactMatchMountedMapper(url.mountUrl(), clazz, encoder));
        urlClassMap.put(url.mountUrl(), clazz);
    }
}
Also used : IPageParametersEncoder(org.apache.wicket.request.mapper.parameter.IPageParametersEncoder) ExactMatchMountedMapper(com.evolveum.midpoint.web.util.ExactMatchMountedMapper) Url(com.evolveum.midpoint.authentication.api.authorization.Url)

Example 2 with IPageParametersEncoder

use of org.apache.wicket.request.mapper.parameter.IPageParametersEncoder in project midpoint by Evolveum.

the class DescriptorLoader method mountPage.

private void mountPage(PageDescriptor descriptor, Class clazz, MidPointApplication application) throws InstantiationException, IllegalAccessException {
    //todo remove for cycle later
    for (String url : descriptor.url()) {
        IPageParametersEncoder encoder = descriptor.encoder().newInstance();
        LOGGER.trace("Mounting page '{}' to url '{}' with encoder '{}'.", new Object[] { clazz.getName(), url, encoder.getClass().getSimpleName() });
        application.mount(new ExactMatchMountedMapper(url, clazz, encoder));
        urlClassMap.put(url, clazz);
    }
    for (Url url : descriptor.urls()) {
        IPageParametersEncoder encoder = descriptor.encoder().newInstance();
        LOGGER.trace("Mounting page '{}' to url '{}' with encoder '{}'.", new Object[] { clazz.getName(), url, encoder.getClass().getSimpleName() });
        application.mount(new ExactMatchMountedMapper(url.mountUrl(), clazz, encoder));
        urlClassMap.put(url.mountUrl(), clazz);
    }
}
Also used : IPageParametersEncoder(org.apache.wicket.request.mapper.parameter.IPageParametersEncoder) ExactMatchMountedMapper(com.evolveum.midpoint.web.util.ExactMatchMountedMapper)

Aggregations

ExactMatchMountedMapper (com.evolveum.midpoint.web.util.ExactMatchMountedMapper)2 IPageParametersEncoder (org.apache.wicket.request.mapper.parameter.IPageParametersEncoder)2 Url (com.evolveum.midpoint.authentication.api.authorization.Url)1