Class SiteImpl

    • Constructor Detail

      • SiteImpl

        public SiteImpl()
    • Method Detail

      • setId

        public void setId​(Integer id)
      • getName

        @NotNull(message="{validation.notNull}")
        @Pattern(regexp="[a-zA-Z0-9\\-]{3,}",
                 message="{validation.nameStrict}")
        @Size(max=64,
              message="{validation.string.max}")
        public @NotNull(message="{validation.notNull}") @Pattern(regexp="[a-zA-Z0-9\\-]{3,}",message="{validation.nameStrict}") @Size(max=64,message="{validation.string.max}") String getName()
        Description copied from interface: Nameable
        Returns the name.
        Specified by:
        getName in interface Nameable
        Returns:
        the name
      • setName

        public void setName​(String name)
      • getDescription

        @Size(max=8192,
              message="{validation.string.max}")
        public @Size(max=8192,message="{validation.string.max}") String getDescription()
        Description copied from interface: Nameable
        Returns the description.
        Specified by:
        getDescription in interface Nameable
        Returns:
        the description
      • setDescription

        public void setDescription​(String description)
      • setVersion

        public void setVersion​(Date version)
      • setSiteApplications

        public void setSiteApplications​(Set<SiteApplication> applications)
      • getHost

        @NotNull(message="{validation.notNull}")
        @Pattern(regexp="(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\-]*[a-zA-Z0-9])\\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\\-]*[A-Za-z0-9])",
                 message="{validation.host}")
        public @NotNull(message="{validation.notNull}") @Pattern(regexp="(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\-]*[a-zA-Z0-9])\\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\\-]*[A-Za-z0-9])",message="{validation.host}") String getHost()
        Description copied from interface: Site
        Returns the host for this site
        Specified by:
        getHost in interface Site
        Returns:
        the host
      • setHost

        public void setHost​(String host)
      • getDomain

        @NotNull(message="{validation.notNull}")
        @Pattern(regexp="(http(s?)(\\://))?((([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\-]*[a-zA-Z0-9])\\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\\-]*[A-Za-z0-9]))(\\:[0-9]+)?",
                 message="{validation.domain}")
        public @NotNull(message="{validation.notNull}") @Pattern(regexp="(http(s?)(\\://))?((([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\-]*[a-zA-Z0-9])\\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\\-]*[A-Za-z0-9]))(\\:[0-9]+)?",message="{validation.domain}") String getDomain()
        Description copied from interface: Site
        Returns the domain for this Site.
        Specified by:
        getDomain in interface Site
        Returns:
        the domain
      • setDomain

        public void setDomain​(String domain)
      • isActive

        public boolean isActive()
        Description copied from interface: Site
        Returns true if this Site is active, which means it is being loaded at platform startup.
        Specified by:
        isActive in interface Site
        Returns:
        true if this Site is active, false otherwise
      • setActive

        public void setActive​(boolean active)
      • isCreateRepository

        public boolean isCreateRepository()
        Description copied from interface: Site
        Returns true if a JSP-repository folder has been created for this Site.
        Specified by:
        isCreateRepository in interface Site
        Returns:
        true if a JSP-repository folder has been created
      • setCreateRepository

        public void setCreateRepository​(boolean createRepository)
      • getReloadCount

        public int getReloadCount()
      • setReloadCount

        public void setReloadCount​(int reloadCount)
      • hasApplication

        public boolean hasApplication​(String name)
        Description copied from interface: Site
        Checks whether the Application with the given name is assigned to this Site.
        Specified by:
        hasApplication in interface Site
        Parameters:
        name - the name of the Application
        Returns:
        true if the Application with the given name is assigned to this Site, false otherwise
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • setProperties

        public void setProperties​(Properties properties)
      • setSiteClassLoader

        public void setSiteClassLoader​(SiteClassLoader siteClassLoader)
      • setSender

        public void setSender​(Sender sender)
      • sendEvent

        public boolean sendEvent​(Event event)
        Description copied from interface: Site
        If clustering is enabled, sends an Event to other appNG nodes
        Specified by:
        sendEvent in interface Site
        Parameters:
        event - the event to send
        Returns:
        true if the event was sent successfully
      • sendRedirect

        public void sendRedirect​(Environment env,
                                 String target,
                                 Integer statusCode)
        Description copied from interface: Site
        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.
        Specified by:
        sendRedirect in interface Site
        Parameters:
        env - the actual Environment
        target - the redirect target
        statusCode - -the HTTP status code to send. Use constants from HttpServletRequest
      • readFile

        public File readFile​(String relativePath)
        Description copied from interface: Site
        Returns the File defined by the given path, which is located relative to the site's repository-folder.
        Specified by:
        readFile in interface Site
        Parameters:
        relativePath - the relative path of the file
        Returns:
        the File, if such a path exists
      • getStartupTime

        public Date getStartupTime()
        Description copied from interface: Site
        Returns the time at which the site has been loaded during platform-startup.
        Specified by:
        getStartupTime in interface Site
        Returns:
        the time, or null if the site has (yet) not been loaded.
      • setStartupTime

        public void setStartupTime​(Date startupTime)
      • closeSiteContext

        public void closeSiteContext()
      • getGroups

        public Set<Named<Integer>> getGroups()
        Description copied from interface: Site
        Returns a set containing a Named-instance for each Group that exists within the platform.
        Specified by:
        getGroups in interface Site
        Returns:
        the Named groups
      • setRootDirectory

        public void setRootDirectory​(File siteRootDirectory)
      • setPasswordPolicy

        public void setPasswordPolicy​(PasswordPolicy policy)
      • isRunning

        public boolean isRunning()
      • setRunning

        public void setRunning​(boolean isRunning)
      • addRequest

        public int addRequest()
      • removeRequest

        public int removeRequest()
      • getRequests

        public int getRequests()