@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
Application s 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
Application s 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, wait
getAuditName
public Integer getId()
Identifiable
getId
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()
Nameable
public void setName(String name)
@Size(max=8192, message="{validation.string.max}") public @Size(max=8192,message="{validation.string.max}") String getDescription()
Nameable
getDescription
in interface Nameable
public void setDescription(String description)
public Date getVersion()
Versionable
getVersion
in interface Versionable<Date>
public void setVersion(Date version)
public Set<SiteApplication> getSiteApplications()
public void setSiteApplications(Set<SiteApplication> applications)
public Set<Application> getApplications()
Site
Application
s which are currently assigned to this Site
.getApplications
in interface Site
Application
s 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()
Site
public void setHost(String host)
public Set<String> getHostAliases()
Site
Site
getHostAliases
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()
Site
Site
.public void setDomain(String domain)
public boolean isActive()
Site
true
if this Site
is active, which means it is being loaded at platform startup.public void setActive(boolean active)
public boolean isCreateRepository()
Site
true
if a JSP-repository folder has been created for this Site
.isCreateRepository
in interface Site
true
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)
Site
getApplication
in interface Site
name
- the name of the Application
Application
, if such a Application
is assigned to this Site
, null
otherwisepublic boolean hasApplication(String name)
Site
Application
with the given name is assigned to this Site
.hasApplication
in interface Site
name
- the name of the Application
true
if the Application
with the given name is assigned to this Site
,
false
otherwisepublic Properties getProperties()
Site
Properties
for this Site
.getProperties
in interface Site
Properties
for this Site
SiteProperties
public void setProperties(Properties properties)
public SiteClassLoader getSiteClassLoader()
Site
URLClassLoader
for this Site
, which contains all the jars provided by the
Application
s that are assigned to this Site
.getSiteClassLoader
in interface Site
URLClassLoader
public void setSiteClassLoader(SiteClassLoader siteClassLoader)
public void setSender(Sender sender)
public boolean sendEvent(Event event)
Site
Event
to other appNG nodespublic void sendRedirect(Environment env, String target)
Site
sendRedirect
in interface Site
sendRedirect(Environment, String)
public void sendRedirect(Environment env, String target, Integer statusCode)
Site
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.sendRedirect
in interface Site
env
- the actual Environment
target
- the redirect targetstatusCode
- -the HTTP status code to send. Use constants from HttpServletRequest
public void sendRedirect(Environment env, String target, Integer statusCode, boolean keepOrigin)
public File readFile(String relativePath)
Site
File
defined by the given path, which is located relative to the site's repository-folder.public Date getStartupTime()
Site
getStartupTime
in interface Site
null
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()
Site
getPasswordPolicy
in interface Site
PasswordPolicy
public 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.