Package org.webswing.server
Class GlobalUrlHandler
- java.lang.Object
-
- org.webswing.server.base.AbstractUrlHandler
-
- org.webswing.server.base.PrimaryUrlHandler
-
- org.webswing.server.GlobalUrlHandler
-
- All Implemented Interfaces:
UrlHandler,org.webswing.server.common.model.meta.ConfigContext,org.webswing.server.services.security.api.SecurityContext,SecuredPathHandler,SecurableService
public class GlobalUrlHandler extends PrimaryUrlHandler implements SecuredPathHandler
-
-
Field Summary
-
Fields inherited from class org.webswing.server.base.PrimaryUrlHandler
JAVASCRIPT_NLS_PREFIX, securityModuleService, varSubs
-
-
Constructor Summary
Constructors Constructor Description GlobalUrlHandler(ConfigurationService config, SwingInstanceManagerService appFactory, ResourceHandlerService resourceService, SecurityModuleService securityService, LoginHandlerService loginService, javax.servlet.ServletContext servletContext, ExtensionService extService, RestService restService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddestroy()SwingInstanceManagergetApplication(String path)List<SwingInstanceManager>getApplications()protected StringgetPath()protected org.webswing.server.services.security.api.WebswingSecurityConfiggetSecurityConfig()javax.servlet.ServletContextgetServletContext()URLgetWebResource(String resource)voidinit()SwingInstanceManagerinstallApplication(org.webswing.server.common.model.SecuredPathConfig swing)voidloadApplications()voidregisterChildUrlHandler(UrlHandler handler)voidregisterFirstChildUrlHandler(UrlHandler handler)voidremoveChildUrlHandler(UrlHandler handler)booleanserve(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)voiduninstallApplication(SwingInstanceManager appToRemove)-
Methods inherited from class org.webswing.server.base.PrimaryUrlHandler
disable, generateCsrfToken, get, getConfig, getFromSecuritySession, getStatus, getSwingConfig, getVariableMap, initConfiguration, isEnabled, isOriginAllowed, isSameOrigin, isSubPath, killAll, replaceVariables, resolveFile, setToSecuritySession, validateCsrfToken
-
Methods inherited from class org.webswing.server.base.AbstractUrlHandler
checkMasterPermission, checkPermission, checkPermissionLocalOrMaster, getFullPathMapping, getLastModified, getMasterUser, getPathInfo, getPathMapping, getRootHandler, getSecuredPath, getSecurityProvider, getUser, secureServe, toPath
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.webswing.server.services.security.login.SecuredPathHandler
get, getConfig, getPathMapping, initConfiguration, isEnabled
-
-
-
-
Constructor Detail
-
GlobalUrlHandler
@Inject public GlobalUrlHandler(ConfigurationService config, SwingInstanceManagerService appFactory, ResourceHandlerService resourceService, SecurityModuleService securityService, LoginHandlerService loginService, javax.servlet.ServletContext servletContext, ExtensionService extService, RestService restService)
-
-
Method Detail
-
init
public void init()
- Specified by:
initin interfaceUrlHandler- Overrides:
initin classPrimaryUrlHandler
-
destroy
public void destroy()
- Specified by:
destroyin interfaceUrlHandler- Overrides:
destroyin classPrimaryUrlHandler
-
serve
public boolean serve(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)- Specified by:
servein interfaceUrlHandler- Overrides:
servein classPrimaryUrlHandler
-
getSecurityConfig
protected org.webswing.server.services.security.api.WebswingSecurityConfig getSecurityConfig()
- Overrides:
getSecurityConfigin classPrimaryUrlHandler
-
loadApplications
public void loadApplications()
-
installApplication
public SwingInstanceManager installApplication(org.webswing.server.common.model.SecuredPathConfig swing)
-
uninstallApplication
public void uninstallApplication(SwingInstanceManager appToRemove)
-
registerFirstChildUrlHandler
public void registerFirstChildUrlHandler(UrlHandler handler)
- Specified by:
registerFirstChildUrlHandlerin interfaceUrlHandler- Overrides:
registerFirstChildUrlHandlerin classAbstractUrlHandler
-
registerChildUrlHandler
public void registerChildUrlHandler(UrlHandler handler)
- Specified by:
registerChildUrlHandlerin interfaceUrlHandler- Overrides:
registerChildUrlHandlerin classAbstractUrlHandler
-
removeChildUrlHandler
public void removeChildUrlHandler(UrlHandler handler)
- Specified by:
removeChildUrlHandlerin interfaceUrlHandler- Overrides:
removeChildUrlHandlerin classAbstractUrlHandler
-
getPath
protected String getPath()
- Specified by:
getPathin classAbstractUrlHandler
-
getServletContext
public javax.servlet.ServletContext getServletContext()
- Specified by:
getServletContextin interfaceUrlHandler- Overrides:
getServletContextin classAbstractUrlHandler
-
getApplications
public List<SwingInstanceManager> getApplications()
- Specified by:
getApplicationsin classPrimaryUrlHandler
-
getApplication
public SwingInstanceManager getApplication(String path)
-
getWebResource
public URL getWebResource(String resource)
- Specified by:
getWebResourcein interfaceorg.webswing.server.common.model.meta.ConfigContext- Overrides:
getWebResourcein classPrimaryUrlHandler
-
-