Class PathHandler.Web

java.lang.Object
de.xima.fc.PathHandler.Web
Enclosing class:
PathHandler

public static final class PathHandler.Web extends Object
Zentrale Behandlung von Formcycle-URLs
  • Method Details

    • baseUrlFor

      public static String baseUrlFor(Mandant mandant)
      Liefert die (ggfs mandantenabhängige) Basis-Adresse zum Aufruf von Formcycle.
      Parameters:
      mandant - - Mandant der die Basis-URL definiert haben sollte
      Returns:
      Basis URL zu Formcycle
    • aliasFor

      public static String aliasFor(Mandant mandant)
    • baseUrlFor

      public static String baseUrlFor(MandantFrontendServer mfs)
    • getFormSessionParamName

      public static String getFormSessionParamName()
    • baseFormUrlFor

      public static String baseFormUrlFor(String baseUrl)
      Returns the base URL to the form servlet, using the base URL of the given client.
      Parameters:
      baseUrl - The base URL to the formcycle app.
      Returns:
      The base URL to the form servlet.
    • baseFormUrlFor

      public static String baseFormUrlFor(Mandant client)
      Returns the base URL to the form servlet, using the base URL of the given client.
      Parameters:
      client - Client for which the URL should be returned.
      Returns:
      The base URL to the form servlet.
    • baseFormIncludeUrlFor

      public static String baseFormIncludeUrlFor(Mandant client)
      Determines the path to the JavaScript file for including the form via AJAX. For example:
      https://demo.formcycle.eu/formcycle/form/include.js
      
      Parameters:
      client - The client Mandant for the base URL.
      Returns:
      Path to the include script without options.
    • baseFormIncludeUrlFor

      public static String baseFormIncludeUrlFor(MandantFrontendServer mfs)
    • baseIncludesFor

      public static String baseIncludesFor(String baseUrl)
      Generates the base URL for form includes, /form/includes.
      Parameters:
      baseUrl - The base URL to the formcycle app.
      Returns:
      The base URL for form resource includes.
    • basePublicResourceUrlFor

      public static String basePublicResourceUrlFor(String baseUrl, Mandant client, Projekt form)
      Generates the base URL for form includes with the client and form context, e.g. /form/includes/1/2.
      Parameters:
      baseUrl - The base URL to the formcycle app.
      client - A client for which to generate the URL.
      form - A form for which to generate the URL.
      Returns:
      The base URL for form resource includes for the given client and form context.
    • basePublicResourceUrlForType

      public static String basePublicResourceUrlForType(String baseUrl, Mandant client, Projekt form, EPublicResourceType type)
      Generates the base URL for form includes of the given type, with the client and form context, e.g. /form/includes/1/2/theme.
      Parameters:
      baseUrl - The base URL to the formcycle app.
      client - A client for which to generate the URL.
      form - A form for which to generate the URL.
      type - The type of the resource.
      Returns:
      The base URL for form resource includes for the given client and form context.
    • baseIncludesFor

      public static String baseIncludesFor(Mandant client)
      Generates the base URL for form includes, /form/includes.
      Parameters:
      client - A client for which to generate the URL.
      Returns:
      The base URL for form includes.
    • baseIncludesFor

      public static String baseIncludesFor(MandantFrontendServer clientFrontendServer)
      Generates the base URL for form includes, /form/includes.
      Parameters:
      clientFrontendServer - A frontend server for which to generate the URL.
      Returns:
      The base URL for form includes.
    • userPortalUrl

      public static String userPortalUrl(String baseUrl, String alias)
    • userPortalFormRecordsUrl

      public static String userPortalFormRecordsUrl(String baseUrl, String alias)
      Generates the URL to the form records overview of a user portal.
      Parameters:
      baseUrl - the base url of the user portal
      alias - the alias of the user portal
      Returns:
      the URL to the form records overview
    • formIncludeUrlFor

      public static String formIncludeUrlFor(Projekt p)
      Builds the link to the form include JavaScript (/form/include.js). This uses the URL to the master server.
      Parameters:
      p - The project for which to get the URL.
      Returns:
      The link to the include script.
    • formIncludeUrlFor

      public static String formIncludeUrlFor(Projekt p, MandantFrontendServer mfs)
      Builds the link to the form include JavaScript (/form/include.js) for the given frontend server.
      Parameters:
      p - The project for which to get the URL.
      mfs - The frontend server to use.
      Returns:
      The link to the include script.
    • baseFormUrlFor

      public static String baseFormUrlFor(MandantFrontendServer mfs)
    • fd2NewFor

      @Deprecated public static String fd2NewFor(Projekt project, String baseUrl)
      Deprecated.
      Use EProjectView#DESIGNER and its IViewUriResolver instead.
    • fd2CurrentEditFor

      @Deprecated public static String fd2CurrentEditFor(Projekt project, String baseUrl)
      Deprecated.
      Use EProjectView#DESIGNER and its IViewUriResolver instead.
    • fd2VersionEditFor

      @Deprecated public static String fd2VersionEditFor(Projekt project)
      Deprecated.
      Use EProjectView#DESIGNER and the its IViewUriResolver instead.
    • fd2VersionEditFor

      @Deprecated public static String fd2VersionEditFor(Projekt project, String baseUrl)
      Deprecated.
      Use EProjectView#DESIGNER and the its IViewUriResolver instead.
    • fd2VersionEditFor

      @Deprecated public static String fd2VersionEditFor(Long projectId, Long versionId, Long workflowVersionId, String baseUrl)
      Deprecated.
      Use EProjectView#DESIGNER and the its IViewUriResolver instead.
    • fd2VersionEditFor

      @Deprecated public static String fd2VersionEditFor(Long projectId, Long versionId, Long workflowVersionId, String baseUrl, String initialViewId)
      Deprecated.
      Use EProjectView#DESIGNER and the its IViewUriResolver instead.
    • getContentUri

      public static String getContentUri(String baseUrl, String viewUrl, IPathParams params)
    • fd2VersionEditFor

      @Deprecated public static String fd2VersionEditFor(FormVersion fv, WorkflowVersion workflowVersion)
      Deprecated.
      Use EProjectView#DESIGNER and the its IViewUriResolver instead.
    • fd2VersionEditFor

      @Deprecated public static String fd2VersionEditFor(FormVersion fv, WorkflowVersion workflowVersion, String baseUrl)
      Deprecated.
      Use EProjectView#DESIGNER and the its IViewUriResolver instead.
    • getDesignerBase

      public static String getDesignerBase(String baseUrl)
    • formRequestFor

      public static String formRequestFor(Projekt project)
      Liefert die allgemeine (offizielle und nach außen sichtbare) URL zum Aufruf des aktiven Formulars eines Projektes. Diese Adresse ist für alle FormVersionen und FormTypen gleich, sie leitet intern auf die konkrete Formular-Adresse weiter.
      Parameters:
      project - - das betreffende Projekt
      Returns:
      URL zum Aufruf des aktiven Formulars
    • formRequestFor

      public static String formRequestFor(Projekt project, MandantFrontendServer mfs)
      Liefert die allgemeine (offizielle und nach außen sichtbare) URL zum Aufruf des aktiven Formulars eines Projektes. Diese Adresse ist für alle FormVersionen und FormTypen gleich, sie leitet intern auf die konkrete Formular-Adresse weiter.
      Parameters:
      project - - das betreffende Projekt
      Returns:
      URL zum Aufruf des aktiven Formulars
    • getBaseProvideUrl

      public static String getBaseProvideUrl(Mandant client)
      Parameters:
      client - Mandant
      Returns:
      String base url for accessing forms of the given client
    • getBaseProvideUrl

      public static String getBaseProvideUrl(MandantFrontendServer frontendServer)
      Parameters:
      frontendServer - MandantFrontendServer
      Returns:
      String base url for accessing forms via the given client frontend server
    • aliasFormRequestFor

      public static String aliasFormRequestFor(Projekt p)
      Liefert die allgemeine (offizielle und nach außen sichtbare) URL zum Aufruf des aktiven Formulars eines Projektes. Diese Adresse ist für alle FormVersionen und FormTypen gleich, sie leitet intern auf die konkrete Formular-Adresse weiter.
      Parameters:
      p - - das betreffende Projekt
      Returns:
      URL zum Aufruf des aktiven Formulars
    • aliasFormRequestWithoutAlias

      public static String aliasFormRequestWithoutAlias(Mandant client)
    • aliasFormImageFor

      public static String aliasFormImageFor(Projekt project, String basePath)
      Liefert die allgemeine (offizielle und nach außen sichtbare) URL zum Aufruf des Thumbnail des aktiven Formulars eines
      Parameters:
      project - - das betreffende Projekt
      Returns:
      URL zum Aufruf des aktiven Formulars
    • aliasFormImageFor

      public static String aliasFormImageFor(Long projectId, String basePath)
    • aliasFormImageFor

      public static String aliasFormImageFor(String projectId, String basePath)
    • aliasFormImageFor

      public static String aliasFormImageFor(String projectId, String basePath, String type)
    • aliasFormRequestFor

      public static String aliasFormRequestFor(MandantFrontendServer mfs, Projekt p)
    • aliasFormRequestWithoutAlias

      public static String aliasFormRequestWithoutAlias(MandantFrontendServer mfs, Mandant client)
    • printFormRequestFor

      public static String printFormRequestFor(Projekt p)
    • formRequestFor

      public static String formRequestFor(Long projectId, String baseURL)
    • formRequestFor

      public static String formRequestFor(String projectId, String baseURL)
    • formRequestFor

      public static String formRequestFor(FormVersion fv, String baseURL)
      Liefert die allgemeine (offizielle und nach außen sichtbare) URL zum Aufruf des Formulars zur übergebenen Formularversion. Diese Adresse ist für alle FormVersionen und FormTypen gleich, sie leitet intern auf die konkrete Formular-Adresse weiter.
      Parameters:
      fv - - die betreffende Formularversion
      baseURL - String die Base-URL
      Returns:
      URL zum Aufruf des aktiven Formulars
    • formActionFor

      public static String formActionFor(Projekt project, int formVersion)
      Returns the URL for processing submitted forms of the given project. When rendering an HTML form, this is used as the value action for the attribute action of the FORM HTML element.

      Example:

      http://localhost/xima-formcycle/form/process/742/2/
      
      Parameters:
      project - The project for which the URL is generated.
      formVersion - The version number of the form.
      Returns:
      URL URL for processing submitted forms of the given project.
      See Also:
    • formCorrectionFor

      public static String formCorrectionFor(Projekt project, int formVersion)
      Similar to formActionFor(Projekt, int), but with additional options that influence workflow processing.

      Example:

      http://localhost/xima-formcycle/form/workflow/742/2/
      
      Parameters:
      project - The project for which the URL is generated.
      formVersion - The version number of the form.
      Returns:
      URL URL for processing submitted forms of the given project.
      See Also:
    • formReprovideFor

      public static String formReprovideFor(Vorgang process, String baseURL)
      Liefert die URL zum Aufrufen eines bereits ausgefüllten Formulars
      Parameters:
      process - - Vorgang, anhand dessen Vorgang.getProzessId() das ausgefüllte Formular ermittelt wird
      baseURL - String die Base-URL
      Returns:
      Link zum ausgefüllten Formular
    • formReProvide

      public static String formReProvide(String baseURL, Long projectId, String processId)
      Returns the URL to the form for providing the given process.
      Parameters:
      baseURL - Base URL to use.
      projectId - ID of the project.
      processId - ID of the process.
      Returns:
      URL to the form for providing the given process.
    • formReviewFor

      public static String formReviewFor(Vorgang v, String baseURL)
    • inboxReviewFor

      public static String inboxReviewFor(Vorgang process, String baseURL)
    • formThemeFileFor

      public static String formThemeFileFor(String baseUrl, Mandant client, Projekt form, FormThemeFileReference file)
      Creates the URL to a file from a form theme.
      Parameters:
      baseUrl - The base URL to the formcycle app.
      client - The client for which to generate the URL.
      form - The form for which to generate the URL.
      file - The file reference.
      Returns:
      The URL to the file.
    • includeUrlFor

      public static String includeUrlFor(String baseIncludesUrl, String resourceName)
      Returns the URL to the given form resource, eg. form/includes/010-jquery-min.js?_nc=20190904014040
      Parameters:
      baseIncludesUrl - The baseIncludesFor(Mandant) or baseIncludesFor(MandantFrontendServer)
      resourceName - Name of a resource
      Returns:
      The URL for the form resource.
    • includeUrlFor

      public static String includeUrlFor(Mandant client, String resourceName)
      Returns the URL to the given form resource, eg. form/includes/010-jquery-min.js?_nc=20190904014040
      Parameters:
      client - Client for which to generate the URL.
      resourceName - Name of a resource
      Returns:
      The URL for the form resource.
    • includeUrlFor

      public static String includeUrlFor(MandantFrontendServer mfs, String resourceName)
      Returns the URL to the given form resource, eg. form/includes/010-jquery-min.js?_nc=20190904014040
      Parameters:
      mfs - Frontend server for which to generate the URL.
      resourceName - Name of a resource
      Returns:
      The URL for the form resource.
    • formVerifyFor

      @Deprecated public static String formVerifyFor(Vorgang v, String baseURL)
      Deprecated.
    • formVerifyFor

      public static String formVerifyFor(String baseURL, Vorgang v, WorkflowNode workflowNode)
    • formVerifyFor

      public static String formVerifyFor(String baseURL, Vorgang v, WorkflowNode workflowNode, boolean isVerifyPage)
    • loginRequestFor

      public static String loginRequestFor(Mandant mandant)
      Diese Methode liefert die URL zur Startseite von XFC. Hier kann der Nutzer sich mit deinem Account anmelden
      Parameters:
      mandant - - Mandant dessen gesetzte Basis-URL genutzt werden soll
      Returns:
      URL zur XFC-Startseite
    • projektIdFrom

      public static Long projektIdFrom(String formReqUrl)
      Extrahiert aus der übergebenen URL die XFC-Projekt-ID
      Parameters:
      formReqUrl - - die zu verarbeitende URL
      Returns:
      die extrahierte Projekt-ID oder ITransferableEntity.INVALID_ID, wenn kein entsprechender Wert gefunden wurde
    • formVersionNumFrom

      public static int formVersionNumFrom(String formReqUrl)
      Extrahiert aus der übergebenen URL die Form-Versions-Nummer
      Parameters:
      formReqUrl - - die zu verarbeitende URL
      Returns:
      die extrahierte FormVersion-Nummer oder FormVersion.INVALID_VERS_NUM, wenn kein entsprechender Wert gefunden wurde
    • formVersionStringFrom

      public static String formVersionStringFrom(String formReqUrl)
    • prozessIdFrom

      public static String prozessIdFrom(String formReqUrl)
      Extrahiert aus der übergebenen URL die Form-Versions-Nummer
      Parameters:
      formReqUrl - - die zu verarbeitende URL
      Returns:
      die extrahierte FormVersion-Nummer oder FormVersion.INVALID_VERS_NUM, wenn kein entsprechender Wert gefunden wurde
    • formAttachmentDownload

      public static String formAttachmentDownload(String baseUrl)
    • iCalDownload

      public static String iCalDownload(String baseUrl)