Interface Site

    • Method Detail

      • hasApplication

        boolean hasApplication​(String name)
        Checks whether the Application with the given name is assigned to this Site.
        Parameters:
        name - the name of the Application
        Returns:
        true if the Application with the given name is assigned to this Site, false otherwise
      • getHost

        String getHost()
        Returns the host for this site
        Returns:
        the host
      • getDomain

        String getDomain()
        Returns the domain for this Site.
        Returns:
        the domain
      • isActive

        boolean isActive()
        Returns true if this Site is active, which means it is being loaded at platform startup.
        Returns:
        true if this Site is active, false otherwise
      • isCreateRepository

        boolean isCreateRepository()
        Returns true if a JSP-repository folder has been created for this Site.
        Returns:
        true if a JSP-repository folder has been created
      • sendRedirect

        void sendRedirect​(Environment env,
                          String target,
                          Integer statusCode)
        redirects the request to the given target. If the target not starts with a slash ("/"), the target has to be a relative path to a certain Application of this site (like "application/page"). If the target does start with a slash, it is expected to be a target relative to the domain of this site.
        Parameters:
        env - the actual Environment
        target - the redirect target
        statusCode - -the HTTP status code to send. Use constants from HttpServletRequest
      • readFile

        File readFile​(String relativePath)
        Returns the File defined by the given path, which is located relative to the site's repository-folder.
        Parameters:
        relativePath - the relative path of the file
        Returns:
        the File, if such a path exists
      • getGroups

        Set<Named<Integer>> getGroups()
        Returns a set containing a Named-instance for each Group that exists within the platform.
        Returns:
        the Named groups
      • getStartupTime

        Date getStartupTime()
        Returns the time at which the site has been loaded during platform-startup.
        Returns:
        the time, or null if the site has (yet) not been loaded.
      • sendEvent

        boolean sendEvent​(Event event)
        If clustering is enabled, sends an Event to other appNG nodes
        Parameters:
        event - the event to send
        Returns:
        true if the event was sent successfully