@Entity public class SiteImpl extends Object implements Site, Auditable<Integer>
Site-implementationSite.SiteState| Constructor and Description |
|---|
SiteImpl() |
| Modifier and Type | Method and Description |
|---|---|
int |
addRequest() |
void |
closeSiteContext() |
boolean |
equals(Object o) |
Application |
getApplication(String name)
|
Map<String,Application> |
getApplicationMap() |
Set<Application> |
getApplications()
Returns the
Applications which are currently assigned to this Site. |
@Size(max=8192,message="{validation.string.max}") String |
getDescription()
Returns the description.
|
@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()
Returns the domain for this
Site. |
Set<Named<Integer>> |
getGroups()
|
@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()
Returns the main hostname for this site
|
Set<String> |
getHostAliases()
Returns alias hostnames for ths
Site |
Integer |
getId()
Returns the id.
|
@NotNull(message="{validation.notNull}") @Pattern(regexp="[a-zA-Z0-9\\-]{3,}",message="{validation.nameStrict}") @Size(max=64,message="{validation.string.max}") String |
getName()
Returns the name.
|
PasswordPolicy |
getPasswordPolicy()
|
Properties |
getProperties()
Returns the
Properties for this Site. |
int |
getReloadCount() |
int |
getRequests() |
SiteApplication |
getSiteApplication(String name) |
Set<SiteApplication> |
getSiteApplications() |
SiteClassLoader |
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() |
Date |
getVersion()
Returns the version.
|
boolean |
hasApplication(String name)
Checks whether the
Application with the given name is assigned to this Site. |
int |
hashCode() |
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. |
boolean |
isRunning() |
File |
readFile(String relativePath)
Returns the
File defined by the given path, which is located relative to the site's repository-folder. |
int |
removeRequest() |
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.
|
void |
sendRedirect(Environment env,
String target,
Integer statusCode,
boolean keepOrigin) |
void |
setActive(boolean active) |
void |
setCreateRepository(boolean createRepository) |
void |
setDescription(String description) |
void |
setDomain(String domain) |
void |
setGroups(Set<Named<Integer>> groups) |
void |
setHost(String host) |
void |
setHostAliases(Set<String> hostAliases) |
void |
setId(Integer id) |
void |
setName(String name) |
void |
setPasswordPolicy(PasswordPolicy policy) |
void |
setProperties(Properties properties) |
void |
setReloadCount(int reloadCount) |
void |
setRootDirectory(File siteRootDirectory) |
void |
setRunning(boolean isRunning) |
void |
setSender(Sender sender) |
void |
setSiteApplications(Set<SiteApplication> applications) |
void |
setSiteClassLoader(SiteClassLoader siteClassLoader) |
void |
setStartupTime(Date startupTime) |
void |
setState(Site.SiteState state) |
void |
setState(Site.SiteState state,
Environment env) |
void |
setVersion(Date version) |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitgetAuditNamepublic Integer getId()
IdentifiablegetId in interface Identifiable<Integer>public void setId(Integer id)
@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()
Nameablepublic void setName(String name)
@Size(max=8192,
message="{validation.string.max}")
public @Size(max=8192,message="{validation.string.max}") String getDescription()
NameablegetDescription in interface Nameablepublic void setDescription(String description)
public Date getVersion()
VersionablegetVersion in interface Versionable<Date>public void setVersion(Date version)
public Set<SiteApplication> getSiteApplications()
public void setSiteApplications(Set<SiteApplication> applications)
public Set<Application> getApplications()
SiteApplications which are currently assigned to this Site.getApplications in interface SiteApplications currently assigned to this Site@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()
Sitepublic void setHost(String host)
public Set<String> getHostAliases()
SiteSitegetHostAliases in interface Site@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()
SiteSite.public void setDomain(String domain)
public boolean isActive()
Sitetrue if this Site is active, which means it is being loaded at platform startup.public void setActive(boolean active)
public boolean isCreateRepository()
Sitetrue if a JSP-repository folder has been created for this Site.isCreateRepository in interface Sitetrue if a JSP-repository folder has been createdpublic void setCreateRepository(boolean createRepository)
public int getReloadCount()
public void setReloadCount(int reloadCount)
public Map<String,Application> getApplicationMap()
public Application getApplication(String name)
SitegetApplication in interface Sitename - the name of the ApplicationApplication, if such a Application is assigned to this Site, null
otherwisepublic boolean hasApplication(String name)
SiteApplication with the given name is assigned to this Site.hasApplication in interface Sitename - the name of the Applicationtrue if the Application with the given name is assigned to this Site,
false otherwisepublic Properties getProperties()
SiteProperties for this Site.getProperties in interface SiteProperties for this SiteSitePropertiespublic void setProperties(Properties properties)
public SiteClassLoader getSiteClassLoader()
SiteURLClassLoader for this Site, which contains all the jars provided by the
Applications that are assigned to this Site.getSiteClassLoader in interface SiteURLClassLoaderpublic void setSiteClassLoader(SiteClassLoader siteClassLoader)
public void setSender(Sender sender)
public boolean sendEvent(Event event)
SiteEvent to other appNG nodespublic void sendRedirect(Environment env, String target)
SitesendRedirect in interface SitesendRedirect(Environment, String)public void sendRedirect(Environment env, String target, Integer statusCode)
SiteApplication 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.sendRedirect in interface Siteenv - the actual Environmenttarget - the redirect targetstatusCode - -the HTTP status code to send. Use constants from HttpServletRequestpublic void sendRedirect(Environment env, String target, Integer statusCode, boolean keepOrigin)
public File readFile(String relativePath)
SiteFile defined by the given path, which is located relative to the site's repository-folder.public Date getStartupTime()
SitegetStartupTime in interface Sitenull if the site has (yet) not been loaded.public void setStartupTime(Date startupTime)
public void closeSiteContext()
public void setRootDirectory(File siteRootDirectory)
public SiteApplication getSiteApplication(String name)
public PasswordPolicy getPasswordPolicy()
SitegetPasswordPolicy in interface SitePasswordPolicypublic void setPasswordPolicy(PasswordPolicy policy)
public boolean isRunning()
public void setRunning(boolean isRunning)
public Site.SiteState getState()
public void setState(Site.SiteState state)
public void setState(Site.SiteState state, Environment env)
public boolean hasState(Site.SiteState... states)
public int addRequest()
public int removeRequest()
public int getRequests()
Copyright © 2011–2023 aiticon GmbH. All rights reserved.