Package com.adito.webforwards

Examples of com.adito.webforwards.WebForward


     *      boolean)
     */
    public void initialise(HttpServletRequest request, Resource resource, boolean editing, MultiSelectSelectionModel policyModel,
                           PropertyList selectedPolicies, User owner, boolean assignOnly) throws Exception {
        super.initialise(request, resource, editing, policyModel, selectedPolicies, owner, assignOnly);
        WebForward webForward = (WebForward) resource;

        this.type = webForward.getType();
        this.destinationURL = webForward.getDestinationURL();
        this.category = webForward.getCategory();
        this.autoStart = webForward.isAutoStart();
       
        if (this.type == WebForward.TYPE_REPLACEMENT_PROXY) {
            ReplacementProxyWebForward spwf = (ReplacementProxyWebForward) webForward;
            this.restrictToHosts = spwf.getRestrictToHosts();
            this.encoding = spwf.getEncoding();
View Full Code Here


     */
    public void initialise(List webForwards, HostService hostService, SessionInfo sessionInfo) {
        super.initialize(sessionInfo.getHttpSession(), "name");
        try {
            for (Iterator i = webForwards.iterator(); i.hasNext();) {
                WebForward wf = (WebForward) i.next();
                List policies = PolicyDatabaseFactory.getInstance().getPoliciesAttachedToResource(wf, sessionInfo.getUser().getRealm());
                WebForwardItem wfi = new WebForwardItem(wf, hostService, policies, wf.sessionPasswordRequired(sessionInfo));
                wfi.setFavoriteType(getFavoriteType(wf.getResourceId()));
                getModel().addItem(wfi);
            }
            checkSort();
            getPager().rebuild(getFilterText());
        } catch (Throwable t) {
View Full Code Here

    public LaunchWebForwardAction() {
      super(WebForwardPlugin.WEBFORWARD_RESOURCE_TYPE, SessionInfo.MANAGEMENT_CONSOLE_CONTEXT | SessionInfo.USER_CONSOLE_CONTEXT);
    }

    protected String doPrepareLink(LaunchSession launchSession, String returnTo) {
      WebForward webForward = (WebForward)launchSession.getResource();
      String uri = webForward.getLaunchUri(launchSession);
        return new WindowOpenJavascriptLink(uri, "wf_" + webForward.getResourceId(), new Rectangle(0, 0, 800, 600), true, true,
                        true, true, true).toJavascript();
    }
View Full Code Here

            throw new Exception("No launch ID supplied.");
        }
       
        LaunchSession launchSession = LaunchSessionFactory.getInstance().getLaunchSession(launchId);
        launchSession.checkAccessRights(null, getSessionInfo(request));
        WebForward wf = (WebForward)launchSession.getResource();

        CoreEvent evt = new ResourceAccessEvent(this, WebForwardEventConstants.WEB_FORWARD_STARTED, wf, launchSession.getPolicy(), launchSession.getSession(),
                        CoreEvent.STATE_SUCCESSFUL).addAttribute(WebForwardEventConstants.EVENT_ATTR_WEB_FORWARD_URL,
            wf.getDestinationURL()).addAttribute(WebForwardEventConstants.EVENT_ATTR_WEB_FORWARD_TYPE,
            ((WebForwardTypeItem) WebForwardTypes.WEB_FORWARD_TYPES.get(wf.getType())).getName());
        CoreServlet.getServlet().fireCoreEvent(evt);
       
        VariableReplacement replacer = new VariableReplacement();
        replacer.setLaunchSession(launchSession);
        URL url = new URL(replacer.replace(wf.getDestinationURL()));
        MultiplexedConnection agent = DefaultAgentManager.getInstance().getAgentBySession(getSessionInfo(request));
        int port = DefaultAgentManager.getInstance().openURL((AgentTunnel)agent, url, launchSession);
        if(port == -1) {
          throw new Exception("Agent couldn't open tunnel.");
        }
View Full Code Here

        String formParameters = (String) seq.getAttribute(WebForwardAuthenticationDetailsForm.ATTR_FORM_PARAMETERS, "");
        String formType = (String) seq.getAttribute(WebForwardAuthenticationDetailsForm.ATTR_FORM_TYPE, "");
        boolean autoStart = false; // TODO this needs to be hooked in
        User user = this.getSessionInfo(request).getUser();
       
        WebForward webForward = null;
        try {
            try {
                Calendar now = Calendar.getInstance();

                if (type == WebForward.TYPE_TUNNELED_SITE) {
                    com.adito.webforwards.TunneledSiteWebForward sswf = new com.adito.webforwards.TunneledSiteWebForward(user.getRealm().getRealmID(),
                                    -1, destinationURL, name, description, category, autoStart, now, now);
                    webForward = WebForwardDatabaseFactory.getInstance().createWebForward(sswf);
                    CoreEvent evt = new ResourceChangeEvent(this, WebForwardEventConstants.CREATE_WEB_FORWARD, webForward, this
                                    .getSessionInfo(request), CoreEvent.STATE_SUCCESSFUL).addAttribute(
                                                    WebForwardEventConstants.EVENT_ATTR_WEB_FORWARD_CATEGORY, webForward.getCategory()).addAttribute(
                                                                    WebForwardEventConstants.EVENT_ATTR_WEB_FORWARD_TYPE,
                        ((WebForwardTypeItem) WebForwardTypes.WEB_FORWARD_TYPES.get(webForward.getType())).getName()).addAttribute(
                                        WebForwardEventConstants.EVENT_ATTR_WEB_FORWARD_URL, webForward.getDestinationURL());
                    CoreServlet.getServlet().fireCoreEvent(evt);
                } else if (type == WebForward.TYPE_REPLACEMENT_PROXY) {
                    com.adito.webforwards.ReplacementProxyWebForward spwf = new com.adito.webforwards.ReplacementProxyWebForward(user.getRealm().getRealmID(),
                                    -1, destinationURL, name, description, category, authenticationUsername,
                                    authenticationPassword, preferredAuthenticationScheme, encodeing, restrictToHosts, formType,
View Full Code Here

TOP

Related Classes of com.adito.webforwards.WebForward

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.