public abstract class PrimaryUrlHandler extends AbstractUrlHandler implements SecuredPathHandler, SecurityContext
| Modifier and Type | Field and Description |
|---|---|
protected ConfigurationService |
configService |
static String |
JAVASCRIPT_NLS_PREFIX |
protected SecurityModuleService |
securityModuleService |
protected org.webswing.server.common.util.VariableSubstitutor |
varSubs |
| Constructor and Description |
|---|
PrimaryUrlHandler(UrlHandler parent,
SecurityModuleService securityModuleService,
ConfigurationService configService) |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy() |
void |
disable() |
String |
generateCsrfToken() |
WebswingSecurityModule |
get() |
org.webswing.server.common.model.SecuredPathConfig |
getConfig() |
org.webswing.server.common.model.meta.MetaObject |
getConfigMeta() |
Object |
getFromSecuritySession(String attributeName) |
org.webswing.server.common.model.meta.MetaObject |
getMeta(Map<String,Object> json) |
protected Map<String,Boolean> |
getPermissions() |
protected WebswingSecurityConfig |
getSecurityConfig() |
org.webswing.server.common.model.admin.InstanceManagerStatus |
getStatus() |
org.webswing.server.common.model.SwingConfig |
getSwingConfig() |
Map<String,String> |
getVariables(String type) |
String |
getVersion() |
URL |
getWebResource(String resource) |
void |
init() |
void |
initConfiguration() |
boolean |
isEnabled() |
protected boolean |
isMasterPermited(WebswingAction... actions) |
boolean |
isOriginAllowed(String header) |
protected boolean |
isPermited(WebswingAction... actions) |
boolean |
isSameOrigin(javax.servlet.http.HttpServletRequest req) |
boolean |
isSubPath(String subpath,
String path) |
protected void |
killAll() |
String |
replaceVariables(String string) |
File |
resolveFile(String name) |
boolean |
serve(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res) |
void |
setConfig(Map<String,Object> config) |
void |
setToSecuritySession(String attributeName,
Object value) |
boolean |
validateCsrfToken(javax.servlet.http.HttpServletRequest req) |
checkMasterPermission, checkPermission, checkPermissionLocalOrMaster, getFullPathMapping, getLastModified, getMasterUser, getPath, getPathInfo, getPathMapping, getRootHandler, getSecuredPath, getSecurityProvider, getServletContext, getUser, registerChildUrlHandler, registerFirstChildUrlHandler, removeChildUrlHandler, secureServe, serveRestMethod, toPathclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetPathMappinggetSecuredPathpublic static final String JAVASCRIPT_NLS_PREFIX
protected final ConfigurationService configService
protected final SecurityModuleService securityModuleService
protected org.webswing.server.common.util.VariableSubstitutor varSubs
public PrimaryUrlHandler(UrlHandler parent, SecurityModuleService securityModuleService, ConfigurationService configService)
public void init()
init in interface UrlHandlerinit in class AbstractUrlHandlerpublic void initConfiguration()
initConfiguration in interface SecuredPathHandlerpublic void disable()
protected void killAll()
protected WebswingSecurityConfig getSecurityConfig()
public void destroy()
destroy in interface UrlHandlerdestroy in class AbstractUrlHandlerpublic boolean serve(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
throws org.webswing.server.model.exception.WsException
serve in interface UrlHandlerserve in class AbstractUrlHandlerorg.webswing.server.model.exception.WsExceptionpublic boolean isSubPath(String subpath, String path)
isSubPath in class AbstractUrlHandlerpublic boolean isOriginAllowed(String header)
public boolean isSameOrigin(javax.servlet.http.HttpServletRequest req)
public org.webswing.server.common.model.SecuredPathConfig getConfig()
getConfig in interface SecuredPathHandlerpublic org.webswing.server.common.model.SwingConfig getSwingConfig()
public org.webswing.server.common.model.admin.InstanceManagerStatus getStatus()
public boolean isEnabled()
isEnabled in interface org.webswing.server.common.model.meta.ConfigContextisEnabled in interface SecuredPathHandlerpublic String getVersion() throws org.webswing.server.model.exception.WsException
org.webswing.server.model.exception.WsExceptionpublic org.webswing.server.common.model.meta.MetaObject getMeta(Map<String,Object> json) throws org.webswing.server.model.exception.WsException
org.webswing.server.model.exception.WsExceptionpublic org.webswing.server.common.model.meta.MetaObject getConfigMeta()
throws org.webswing.server.model.exception.WsException
org.webswing.server.model.exception.WsExceptionpublic Map<String,String> getVariables(String type) throws org.webswing.server.model.exception.WsException
org.webswing.server.model.exception.WsExceptionprotected boolean isPermited(WebswingAction... actions)
protected boolean isMasterPermited(WebswingAction... actions)
public WebswingSecurityModule get()
get in interface SecuredPathHandlerpublic File resolveFile(String name)
resolveFile in interface org.webswing.server.common.model.meta.ConfigContextpublic URL getWebResource(String resource)
getWebResource in interface org.webswing.server.common.model.meta.ConfigContextpublic String generateCsrfToken() throws org.webswing.server.model.exception.WsException
org.webswing.server.model.exception.WsExceptionpublic boolean validateCsrfToken(javax.servlet.http.HttpServletRequest req)
public String replaceVariables(String string)
replaceVariables in interface org.webswing.server.common.model.meta.ConfigContextpublic Object getFromSecuritySession(String attributeName)
getFromSecuritySession in interface SecurityContextpublic void setToSecuritySession(String attributeName, Object value)
setToSecuritySession in interface SecurityContextCopyright © 2018. All rights reserved.