Skip to content
Snippets Groups Projects
Commit 666f06ef authored by felmer's avatar felmer
Browse files

LMS-1364 IModule extended

SVN: 14738
parent 40190d3b
No related branches found
No related tags found
No related merge requests found
...@@ -25,12 +25,21 @@ import com.google.gwt.user.client.ui.Widget; ...@@ -25,12 +25,21 @@ import com.google.gwt.user.client.ui.Widget;
import ch.systemsx.cisd.openbis.generic.client.web.client.application.menu.TopMenuItem; import ch.systemsx.cisd.openbis.generic.client.web.client.application.menu.TopMenuItem;
/** /**
* Plugin that does not depend on entity kind and type. * Plugin that does not depend on entity kind and type. All methods except
* {@link #initialize(AsyncCallback)} is invoked after invocation of the call back of the
* initialization method.
* *
* @author Izabela Adamczyk * @author Izabela Adamczyk
*/ */
public interface IModule public interface IModule
{ {
/**
* Initializes the module and invoke method {@link AsyncCallback#onSuccess(Object)} on the
* specified call back after successful initialization. Otherwise
* {@link AsyncCallback#onFailure(Throwable)} is invoked.
*/
void initialize(AsyncCallback<Void> callback);
/** /**
* Returns a widget that will be used as a top menu element. * Returns a widget that will be used as a top menu element.
* <p> * <p>
...@@ -46,9 +55,9 @@ public interface IModule ...@@ -46,9 +55,9 @@ public interface IModule
String getModuleName(); String getModuleName();
String getModuleDescription(); String getModuleDescription();
/** /**
* Returns a list with at least one menu item. * Returns a list with menu items. The list empty if this module isn't applicable.
*/ */
List<Component> getMenuItems(); List<Component> getMenuItems();
} }
...@@ -19,6 +19,7 @@ package ch.systemsx.cisd.openbis.plugin.demo.client.web.client.application.modul ...@@ -19,6 +19,7 @@ package ch.systemsx.cisd.openbis.plugin.demo.client.web.client.application.modul
import java.util.List; import java.util.List;
import com.extjs.gxt.ui.client.widget.Component; import com.extjs.gxt.ui.client.widget.Component;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.ui.Widget; import com.google.gwt.user.client.ui.Widget;
import ch.systemsx.cisd.openbis.generic.client.web.client.application.IViewContext; import ch.systemsx.cisd.openbis.generic.client.web.client.application.IViewContext;
...@@ -69,4 +70,10 @@ public class DemoModule implements IModule ...@@ -69,4 +70,10 @@ public class DemoModule implements IModule
// TODO Auto-generated method stub // TODO Auto-generated method stub
return null; return null;
} }
public void initialize(AsyncCallback<Void> callback)
{
// TODO Auto-generated method stub
}
} }
...@@ -20,6 +20,7 @@ import java.util.List; ...@@ -20,6 +20,7 @@ import java.util.List;
import com.extjs.gxt.ui.client.widget.Component; import com.extjs.gxt.ui.client.widget.Component;
import com.extjs.gxt.ui.client.widget.button.Button; import com.extjs.gxt.ui.client.widget.button.Button;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.ui.Widget; import com.google.gwt.user.client.ui.Widget;
import ch.systemsx.cisd.openbis.generic.client.web.client.application.IViewContext; import ch.systemsx.cisd.openbis.generic.client.web.client.application.IViewContext;
...@@ -63,4 +64,10 @@ public class QueryModule implements IModule ...@@ -63,4 +64,10 @@ public class QueryModule implements IModule
return null; return null;
} }
public void initialize(AsyncCallback<Void> callback)
{
// TODO Auto-generated method stub
}
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment