Package com.cosmo.net

Examples of com.cosmo.net.URL


      ctrl = template.getControl(WIDGET_ID);

      if (!getWorkspace().isValidUserSession())
      {
         // Configura la url del login
         URL url = new URL(getWorkspace().getProperties().getSecurityProperties().getLoginPage());
         url.addParameter("tourl", getWorkspace().getRequestedUrl());

         // Genera el XHTML del widget
         xhtml += ctrl.getElement(WPART_LOGIN);
         xhtml = Control.replaceTag(xhtml, TAG_HREF, url.build(getWorkspace().getCharset()));
      }
      else
      {
         // Configura la url del login
         URL url = new URL("LogoutPage");
         url.addParameter("tourl", getWorkspace().getRequestedUrl());

         // Genera el XHTML del widget
         xhtml += ctrl.getElement(WPART_LOGOUT);
         xhtml = Control.replaceTag(xhtml, TAG_HREF, url.build(getWorkspace().getCharset()));
         xhtml = Control.replaceTag(xhtml, TAG_USER, getWorkspace().getUserSession().getCurrentUser().getLogin());
      }

      return xhtml;
   }
View Full Code Here


      wordMLPackage.getMainDocumentPart().getContent().addAll(xHTMLImporter.convert(stream, null));

      wordMLPackage.save(new File(fileNamePath));

      // Construye la URL de acceso al informe PDF generado
      URL url = new URL(workspace.getUrl());
      url.addFolderOrFile("reports");
      url.addFolderOrFile("temp");
      url.addFolderOrFile(filename);

      return url.build();
   }
View Full Code Here

      document.open();
      XMLWorkerHelper.getInstance().parseXHtml(writer, document, stream);
      document.close();

      // Construye la URL de acceso al informe PDF generado
      URL url = new URL(workspace.getUrl());
      url.addFolderOrFile("reports");
      url.addFolderOrFile("temp");
      url.addFolderOrFile(filename);

      return url.build();
   }
View Full Code Here

         {
            ormp.delete(instance);
         }

         // Genera la URL para mostrar el listado
         URL url = new URL(URL_BASE);
         url.addParameter(PARAMETER_APPID, HttpRequestUtils.getValue(request, PARAMETER_APPID));
         url.addParameter(PARAMETER_COMMAND, COMMAND_REPORT);

         // Redirige el flujo de la aplicaci� al listado
         response.sendRedirect(url.toString());
         return null;
      }
      catch (Exception ex)
      {
         DynamicMessageControl msg = (DynamicMessageControl) pc.getControl(CTRL_MESSAGE);
View Full Code Here

    *
    * @return Una cadena que representa la URL de inicio de la aplicaci�n.
    */
   public String getApplicationUrl(Workspace workspace)
   {
      URL url = new URL(workspace.getUrl() + OrmDataService.URL_BASE);
      url.addParameter("appid", this.id);

      return url.toString();
   }
View Full Code Here

   /**
    * Devuelve la URL usada para la autenticaci�n de usuarios.
    */
   public String getLoginGatewayUrl()
   {
      URL url = new URL(agent.getParamString(AGENT_PARAM_CASSERVICE).trim());
      url.addFolderOrFile(LOGIN_URL_PART);
      url.addParameter(URL_PARAM_SERVICE, agent.getParamString(AGENT_PARAM_SERVICEURL));
     
      return url.toString();
   }
View Full Code Here

    */
   private User validate(String serviceUrl, String serviceTicket) throws AuthenticationException
   {
      User user = null;
     
      URL url = new URL(agent.getParamString(AGENT_PARAM_CASSERVICE));
      url.addFolderOrFile(SERVICE_VALIDATE_URL_PART);
     
      String toUrl = url.toString();
     
      PostMethod method = new PostMethod(toUrl);
      method.setParameter(URL_PARAM_SERVICE, serviceUrl);
      method.setParameter(URL_PARAM_TICKET, serviceTicket);
     
View Full Code Here

    *
    * @throws IOException
    */
   private void sendLoginRedirect(Workspace workspace, HttpServletResponse response) throws IOException
   {
      URL url;

      url = new URL(workspace.getProperties().getSecurityProperties().getLoginPage());
      url.addParameter(Cosmo.URL_PARAM_TOURL, workspace.getRequestedUrl());

      // Redirecciona la p�gina al servlet de LOGIN.
      response.sendRedirect(url.build(workspace.getCharset()));
   }
View Full Code Here

TOP

Related Classes of com.cosmo.net.URL

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.