Skip to content

Commit

Permalink
[BACKLOG-39783] - Fix so that the EmbeddedQuartzSystemListener will k…
Browse files Browse the repository at this point in the history
…eep the scheduler in a paused state until the SolutionContextListener notifies that the system has completed its startup
  • Loading branch information
wseyler committed Feb 8, 2024
2 parents 23765fa + 03fd757 commit 44c13d3
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 726 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,7 @@ public static boolean init( final IApplicationContext pApplicationContext, final
if ( debug ) {
Logger.debug( PentahoSystem.class, "PentahoSystem Init Complete" ); //$NON-NLS-1$
}

return true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,20 @@
* See the GNU Lesser General Public License for more details.
*
*
* Copyright (c) 2002-2023 Hitachi Vantara. All rights reserved.
* Copyright (c) 2002-2024 Hitachi Vantara. All rights reserved.
*
*/

package org.pentaho.mantle.client;

import com.google.gwt.http.client.RequestBuilder;
import com.google.gwt.http.client.RequestException;
import org.pentaho.gwt.widgets.client.filechooser.RepositoryFile;
import org.pentaho.mantle.client.events.EventBusUtil;
import org.pentaho.mantle.client.events.GenericEvent;
import org.pentaho.mantle.client.events.SolutionFileHandler;
import org.pentaho.mantle.client.solutionbrowser.SolutionBrowserPanel;
import org.pentaho.mantle.client.solutionbrowser.filelist.FileItem;
import org.pentaho.mantle.client.ui.PerspectiveManager;

public class MantleUtils {
Expand All @@ -33,7 +36,6 @@ public class MantleUtils {
setupNativeHooks( new MantleUtils() );
}


public void setSchedulesPerspective() {
PerspectiveManager.getInstance().setPerspective( PerspectiveManager.SCHEDULES_PERSPECTIVE );
}
Expand Down Expand Up @@ -61,6 +63,34 @@ public void fireRefreshFolderEvent( String outputLocation ) {
EventBusUtil.EVENT_BUS.fireEvent( event );
}

public void handleRepositoryFileSelection( String solutionPath, Boolean isAdhoc) {
final SolutionBrowserPanel sbp = SolutionBrowserPanel.getInstance();
sbp.getFile( solutionPath, new SolutionFileHandler() {
@Override
public void handle( RepositoryFile repositoryFile ) {
if( isAdhoc ) {
openAdhocDialog( true );
} else {
FileItem fileItem = new FileItem( repositoryFile, null, null, false, null );
checkSchedulePermissionAndDialog( fileItem.getRepositoryFile().getId(), fileItem.getPath() );
}
}
} );
}

private native void openAdhocDialog( boolean feedback ) /*-{
$wnd.pho.showDialog(feedback);
}-*/;

private native void checkSchedulePermissionAndDialog( String repositoryFileId, String repositoryFilePath ) /*-{
$wnd.pho.checkSchedulePermissionAndDialog(repositoryFileId, repositoryFilePath);
}-*/;

public boolean checkSelectedPerspective() {
return !PerspectiveManager.getInstance().getActivePerspective().getId().equals(
PerspectiveManager.SCHEDULES_PERSPECTIVE );
}

public static native String getSchedulerPluginContextURL()/*-{
if (typeof $wnd.pho.getSchedulerPluginContextURL !== "undefined" ) {
return $wnd.pho.getSchedulerPluginContextURL();
Expand Down Expand Up @@ -93,5 +123,15 @@ private static native void setupNativeHooks( MantleUtils utils )
//CHECKSTYLE IGNORE LineLength FOR NEXT 1 LINES
[email protected]::fireRefreshFolderEvent(Ljava/lang/String;)(outputLocation);
}
$wnd.mantle.handleRepositoryFileSelection = function(solutionPath, isAdhoc) {
//CHECKSTYLE IGNORE LineLength FOR NEXT 1 LINES
[email protected]::handleRepositoryFileSelection(Ljava/lang/String;Ljava/lang/Boolean;)(solutionPath, isAdhoc);
}
$wnd.mantle.checkSelectedPerspective = function() {
//CHECKSTYLE IGNORE LineLength FOR NEXT 1 LINES
return [email protected]::checkSelectedPerspective()();
}
}-*/;
}

This file was deleted.

Loading

0 comments on commit 44c13d3

Please sign in to comment.