Package com.adito.webforwards

Examples of com.adito.webforwards.AbstractAuthenticatingWebForward


                    com.adito.webforwards.ReplacementProxyWebForward spwf = new com.adito.webforwards.ReplacementProxyWebForward(user.getRealm().getRealmID(),
                                    -1, destinationURL, name, description, category, authenticationUsername,
                                    authenticationPassword, preferredAuthenticationScheme, encodeing, restrictToHosts, formType,
                                    formParameters, autoStart, now, now);

                    AbstractAuthenticatingWebForward abstractAuthenticatingWebForward = (AbstractAuthenticatingWebForward) WebForwardDatabaseFactory
                                    .getInstance().createWebForward(spwf);
                    CoreEvent evt = new ResourceChangeEvent(this, WebForwardEventConstants.CREATE_WEB_FORWARD, abstractAuthenticatingWebForward, this
                                    .getSessionInfo(request), CoreEvent.STATE_SUCCESSFUL).addAttribute(
                                                    WebForwardEventConstants.EVENT_ATTR_WEB_FORWARD_CATEGORY, abstractAuthenticatingWebForward.getCategory()).addAttribute(
                                                                    WebForwardEventConstants.EVENT_ATTR_WEB_FORWARD_TYPE,
                        ((WebForwardTypeItem) WebForwardTypes.WEB_FORWARD_TYPES.get(abstractAuthenticatingWebForward.getType())).getName()).addAttribute(
                                        WebForwardEventConstants.EVENT_ATTR_WEB_FORWARD_URL, abstractAuthenticatingWebForward.getDestinationURL()).addAttribute(
                                                        WebForwardEventConstants.EVENT_ATTR_WEB_FORWARD_PREFERED_AUTH_SCHEME,
                        abstractAuthenticatingWebForward.getPreferredAuthenticationScheme()).addAttribute(
                                        WebForwardEventConstants.EVENT_ATTR_WEB_FORWARD_AUTH_USERNAME,
                        abstractAuthenticatingWebForward.getAuthenticationUsername()).addAttribute(
                                        WebForwardEventConstants.EVENT_ATTR_WEB_FORWARD_AUTH_FORM_TYPE,
                        abstractAuthenticatingWebForward.getFormType()).addAttribute(
                                        WebForwardEventConstants.EVENT_ATTR_REPLACEMENT_WEB_FORWARD_ENCODEING, spwf.getEncoding());

                    spwf.addFormParametersToEvent(evt, WebForwardEventConstants.EVENT_ATTR_WEB_FORWARD_AUTH_FORM_PARAMETERS);
                    spwf
                                    .addRestrictToHostsToEvent(evt,
                                                    WebForwardEventConstants.EVENT_ATTR_REPLACEMENT_WEB_FORWARD_RESTRICT_TO_HOSTS);
                    CoreServlet.getServlet().fireCoreEvent(evt);
                    webForward = abstractAuthenticatingWebForward;
                } else if (type == WebForward.TYPE_PATH_BASED_REVERSE_PROXY || type == WebForward.TYPE_HOST_BASED_REVERSE_PROXY) {
                    com.adito.webforwards.ReverseProxyWebForward rpwf = new com.adito.webforwards.ReverseProxyWebForward(user.getRealm().getRealmID(),
                                    -1, type, destinationURL, name, description, category, authenticationUsername,
                                    authenticationPassword, preferredAuthenticationScheme, formType, formParameters, paths,
                                    hostHeader, activeDNS, autoStart, now, now, encodeing);
                    AbstractAuthenticatingWebForward abstractAuthenticatingWebForward = (AbstractAuthenticatingWebForward) WebForwardDatabaseFactory
                                    .getInstance().createWebForward(rpwf);
                    CoreEvent evt = new ResourceChangeEvent(this, WebForwardEventConstants.CREATE_WEB_FORWARD, abstractAuthenticatingWebForward, this
                                    .getSessionInfo(request), CoreEvent.STATE_SUCCESSFUL).addAttribute(
                                                    WebForwardEventConstants.EVENT_ATTR_WEB_FORWARD_CATEGORY, abstractAuthenticatingWebForward.getCategory()).addAttribute(
                                                                    WebForwardEventConstants.EVENT_ATTR_WEB_FORWARD_TYPE,
                        ((WebForwardTypeItem) WebForwardTypes.WEB_FORWARD_TYPES.get(abstractAuthenticatingWebForward.getType())).getName()).addAttribute(
                                        WebForwardEventConstants.EVENT_ATTR_WEB_FORWARD_URL, abstractAuthenticatingWebForward.getDestinationURL()).addAttribute(
                                                        WebForwardEventConstants.EVENT_ATTR_WEB_FORWARD_PREFERED_AUTH_SCHEME,
                        abstractAuthenticatingWebForward.getPreferredAuthenticationScheme()).addAttribute(
                                        WebForwardEventConstants.EVENT_ATTR_WEB_FORWARD_AUTH_USERNAME,
                        abstractAuthenticatingWebForward.getAuthenticationUsername()).addAttribute(
                                        WebForwardEventConstants.EVENT_ATTR_WEB_FORWARD_AUTH_FORM_TYPE,
                        abstractAuthenticatingWebForward.getFormType()).addAttribute(
                                        WebForwardEventConstants.EVENT_ATTR_REVERSE_WEB_FORWARD_ACTIVE_DNS, String.valueOf(rpwf.getActiveDNS()))
                                    .addAttribute(WebForwardEventConstants.EVENT_ATTR_REVERSE_WEB_FORWARD_HOST_HEADER,
                                        rpwf.getHostHeader());

                    rpwf.addPathsToEvent(evt, WebForwardEventConstants.EVENT_ATTR_REVERSE_WEB_FORWARD_PATHS);
View Full Code Here

TOP

Related Classes of com.adito.webforwards.AbstractAuthenticatingWebForward

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.