public class SiteUtil extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
javax.servlet.http.HttpServletRequest |
request
The request.
|
javax.servlet.http.HttpServletResponse |
response
The response.
|
| 构造器和说明 |
|---|
SiteUtil(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Instantiates a new site util.
|
| 限定符和类型 | 方法和说明 |
|---|---|
static AdminUser |
confirmAdminUser(javax.servlet.ServletContext context)
Confirm admin user.
|
static String |
getAdminUserFile(javax.servlet.ServletContext context)
Gets the admin user file.
|
static SiteInformation |
getFromMemory(javax.servlet.ServletContext context,
boolean reload)
Gets the from memory.
|
static List<RewriteData> |
getRewriteDataFromMemory(javax.servlet.ServletContext context)
Gets the rewrite data from memory.
|
static String |
getSiteInfoFile(javax.servlet.ServletContext context)
Gets the site info file.
|
static String |
getUrlRewtireConfigureFile(javax.servlet.ServletContext context)
Gets the url rewtire configure file.
|
static String |
getWebInfoPath(javax.servlet.ServletContext context)
Gets the web info path.
|
static void |
main(String[] args)
The main method.
|
static AdminUser |
writeAdminUser(javax.servlet.ServletContext context,
AdminUser user)
Write admin user.
|
static void |
writeRewriteData(javax.servlet.ServletContext context,
List<RewriteData> list)
Write rewrite data.
|
static void |
writeSiteInfo(javax.servlet.ServletContext context,
SiteInformation info)
Write site info.
|
void |
writeXmlFile(org.dom4j.Document doc,
String file)
Write xml file.
|
public javax.servlet.http.HttpServletRequest request
public javax.servlet.http.HttpServletResponse response
public SiteUtil(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
request - the requestresponse - the responsepublic static void main(String[] args) throws Exception
args - the argumentsException - the exceptionpublic static String getSiteInfoFile(javax.servlet.ServletContext context)
context - the contextpublic static SiteInformation getFromMemory(javax.servlet.ServletContext context, boolean reload)
context - the contextreload - the reloadpublic void writeXmlFile(org.dom4j.Document doc,
String file)
throws IOException
doc - the docfile - the fileIOException - Signals that an I/O exception has occurred.public static String getWebInfoPath(javax.servlet.ServletContext context)
context - the contextpublic static void writeSiteInfo(javax.servlet.ServletContext context,
SiteInformation info)
context - the contextinfo - the infopublic static String getUrlRewtireConfigureFile(javax.servlet.ServletContext context)
context - the contextpublic static String getAdminUserFile(javax.servlet.ServletContext context)
context - the contextpublic static AdminUser confirmAdminUser(javax.servlet.ServletContext context) throws AdminLoginException
context - the contextAdminLoginException - the admin login exceptionpublic static AdminUser writeAdminUser(javax.servlet.ServletContext context, AdminUser user) throws AdminLoginException
context - the contextuser - the userAdminLoginException - the admin login exceptionpublic static List<RewriteData> getRewriteDataFromMemory(javax.servlet.ServletContext context)
context - the contextpublic static void writeRewriteData(javax.servlet.ServletContext context,
List<RewriteData> list)
context - the contextlist - the listCopyright © 2017. All rights reserved.