public interface Site extends Named<Integer>
Site is the highest level entry-point to the platform. Besides a unique name, it needs to have a domain and
a host. A site can use any of the several Applications which have been deployed to the platform.| Modifier and Type | Interface and Description |
|---|---|
static class |
Site.SiteState
The different states a site can have
|
| Modifier and Type | Method and Description |
|---|---|
Application |
getApplication(String name)
|
Set<Application> |
getApplications()
Returns the
Applications which are currently assigned to this Site. |
String |
getDomain()
Returns the domain for this
Site. |
Set<Named<Integer>> |
getGroups()
|
String |
getHost()
Returns the host for this site
|
PasswordPolicy |
getPasswordPolicy()
|
Properties |
getProperties()
Returns the
Properties for this Site. |
URLClassLoader |
getSiteClassLoader()
Returns the
URLClassLoader for this Site, which contains all the jars provided by the
Applications that are assigned to this Site. |
Date |
getStartupTime()
Returns the time at which the site has been loaded during platform-startup.
|
Site.SiteState |
getState() |
boolean |
hasApplication(String name)
Checks whether the
Application with the given name is assigned to this Site. |
boolean |
hasState(Site.SiteState... states) |
boolean |
isActive()
Returns
true if this Site is active, which means it is being loaded at platform startup. |
boolean |
isCreateRepository()
Returns
true if a JSP-repository folder has been created for this Site. |
File |
readFile(String relativePath)
Returns the
File defined by the given path, which is located relative to the site's repository-folder. |
boolean |
sendEvent(Event event)
If clustering is enabled, sends an
Event to other appNG nodes |
void |
sendRedirect(Environment env,
String target)
sends a redirect with HTTP-Status 301 (moved permanently)
|
void |
sendRedirect(Environment env,
String target,
Integer statusCode)
redirects the request to the given target.
|
getDescription, getNamegetIdSet<Application> getApplications()
Applications which are currently assigned to this Site.Applications currently assigned to this SiteApplication getApplication(String name)
name - the name of the ApplicationApplication, if such a Application is assigned to this Site, null
otherwiseboolean hasApplication(String name)
Application with the given name is assigned to this Site.name - the name of the Applicationtrue if the Application with the given name is assigned to this Site,
false otherwiseString getHost()
Properties getProperties()
Properties for this Site.Properties for this SiteSitePropertiesURLClassLoader getSiteClassLoader()
URLClassLoader for this Site, which contains all the jars provided by the
Applications that are assigned to this Site.URLClassLoaderboolean isActive()
true if this Site is active, which means it is being loaded at platform startup.true if this Site is active, false otherwiseboolean isCreateRepository()
true if a JSP-repository folder has been created for this Site.true if a JSP-repository folder has been createdvoid sendRedirect(Environment env, String target)
void sendRedirect(Environment env, String target, Integer statusCode)
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.env - the actual Environmenttarget - the redirect targetstatusCode - -the HTTP status code to send. Use constants from HttpServletRequestFile readFile(String relativePath)
File defined by the given path, which is located relative to the site's repository-folder.relativePath - the relative path of the fileFile, if such a path existsPasswordPolicy getPasswordPolicy()
PasswordPolicyDate getStartupTime()
null if the site has (yet) not been loaded.boolean sendEvent(Event event)
Event to other appNG nodesevent - the event to sendtrue if the event was sent successfullySite.SiteState getState()
boolean hasState(Site.SiteState... states)
Copyright © 2011–2021 aiticon GmbH. All rights reserved.