/** * Public no argument constructor must be available. */ public ReIndexJob () { // Save to avoid global scope access m_aSC = WebScopeManager.getGlobalScope ().getServletContext (); }
.setCtrl (aScope.getID ())); aViewForm.addFormGroup (new BootstrapFormGroup ().setLabel (EText.MSG_SCOPE_VALID.getDisplayText (aDisplayLocale)) .setCtrl (EPhotonCoreText.getYesOrNo (aScope.isValid (), aDisplayLocale))); aViewForm.addFormGroup (new BootstrapFormGroup ().setLabel (EText.MSG_SCOPE_IN_DESTRUCTION.getDisplayText (aDisplayLocale)) .setCtrl (EPhotonCoreText.getYesOrNo (aScope.isInDestruction (), aDisplayLocale))); aViewForm.addFormGroup (new BootstrapFormGroup ().setLabel (EText.MSG_SCOPE_DESTROYED.getDisplayText (aDisplayLocale)) .setCtrl (EPhotonCoreText.getYesOrNo (aScope.isDestroyed (), aDisplayLocale))); aViewForm.addFormGroup (new BootstrapFormGroup ().setLabel (EText.MSG_SCOPE_ATTRS.getDisplayText (aDisplayLocale)) .setCtrl (Integer.toString (aScope.attrs ().size ()))); aNodeList.addChild (aViewForm); new DTCol (EText.MSG_TYPE.getDisplayText (aDisplayLocale)), new DTCol (EText.MSG_VALUE.getDisplayText (aDisplayLocale))).setID ("globalscope"); for (final Map.Entry <String, Object> aEntry : aScope.attrs ().entrySet ()) aTableAttrs.addBodyRow () .addCell (aEntry.getKey ())
aViewForm.setCondensed (true); aViewForm.addFormGroup (new BootstrapFormGroup ().setLabel (EText.MSG_SCOPE_ID.getDisplayText (aDisplayLocale)) .setCtrl (aScope.getID ())); aViewForm.addFormGroup (new BootstrapFormGroup ().setLabel (EText.MSG_SCOPE_VALID.getDisplayText (aDisplayLocale)) .setCtrl (EPhotonCoreText.getYesOrNo (aScope.isValid (), aDisplayLocale))); aViewForm.addFormGroup (new BootstrapFormGroup ().setLabel (EText.MSG_SCOPE_IN_DESTRUCTION.getDisplayText (aDisplayLocale)) .setCtrl (EPhotonCoreText.getYesOrNo (aScope.isInDestruction (), aDisplayLocale))); aViewForm.addFormGroup (new BootstrapFormGroup ().setLabel (EText.MSG_SCOPE_DESTROYED.getDisplayText (aDisplayLocale)) .setCtrl (EPhotonCoreText.getYesOrNo (aScope.isDestroyed (), aDisplayLocale))); aViewForm.addFormGroup (new BootstrapFormGroup ().setLabel (EText.MSG_SCOPE_ATTRS.getDisplayText (aDisplayLocale)) .setCtrl (Integer.toString (aScope.attrs ().size ()))); aNodeList.addChild (aViewForm); new DTCol (EText.MSG_TYPE.getDisplayText (aDisplayLocale)), new DTCol (EText.MSG_VALUE.getDisplayText (aDisplayLocale))).setID ("globalscope"); for (final Map.Entry <String, Object> aEntry : aScope.attrs ().entrySet ()) aTableAttrs.addBodyRow () .addCell (aEntry.getKey ())
public WebScoped () { this (new OfflineHttpServletRequest (WebScopeManager.getGlobalScope ().getServletContext (), false)); }
for (final ServletRegistration aRegistration : aGlobalScope.getServletContext () .getServletRegistrations () .values ())
/** * @return The dummy HTTP request to be used for executing this job. By * default an {@link OfflineHttpServletRequest} is created. */ @Nonnull @OverrideOnDemand protected MockHttpServletRequest createMockHttpServletRequest () { // Don't use "MockServletContext" to avoid that the global Servlet Context // Path is overriden! final OfflineHttpServletRequest ret = new OfflineHttpServletRequest (WebScopeManager.getGlobalScope () .getServletContext (), false); // Use a fixed session ID, because Quartz jobs regularly use the session and // this avoids spanning too many sessions ret.setSessionID ("quartz.job." + ClassHelper.getClassLocalName (getClass ())); return ret; }
public void run () { // Global scope may not be present here (on shutdown) final IGlobalWebScope aGlobalScope = WebScopeManager.getGlobalScopeOrNull (); if (aGlobalScope != null) try ( final WebScoped aWebScoped = new WebScoped (new OfflineHttpServletRequest (aGlobalScope.getServletContext (), false))) { // Check for long running requests m_aRequestTrackingMgr.checkForLongRunningRequests (s_aLongRunningCallbacks); } catch (final Exception ex) { LOGGER.error ("Error checking for long running requests", ex); } } }
aNodeList.addChild (aToolbar); final ServletContext aSC = WebScopeManager.getGlobalScope ().getServletContext ();
aNodeList.addChild (aToolbar); final ServletContext aSC = WebScopeManager.getGlobalScope ().getServletContext ();