Skip to content
Snippets Groups Projects
Commit 40190d3b authored by felmer's avatar felmer
Browse files

LMS-1364 initial code for new plugin 'query'

SVN: 14737
parent f89d87db
No related branches found
No related tags found
No related merge requests found
Showing
with 332 additions and 0 deletions
......@@ -38,6 +38,12 @@
<public path="plugin/generic/client/web/public"/>
<source path="plugin/generic/client/web/client"/>
<source path="plugin/generic/shared/basic"/>
<!-- Query plugin -->
<script src="query-dictionary.js"/>
<public path="plugin/query/client/web/public"/>
<source path="plugin/query/client/web/client"/>
<source path="plugin/query/shared/basic"/>
<!-- Automatically generated part - END -->
<!-- Do not define servlets here, use web.xml -->
......
......@@ -52,6 +52,7 @@ public class DefaultClientPluginFactoryProvider implements IClientPluginFactoryP
{
// Automatically generated part - START
registerPluginFactory(new ch.systemsx.cisd.openbis.plugin.demo.client.web.client.application.ClientPluginFactory(originalViewContext));
registerPluginFactory(new ch.systemsx.cisd.openbis.plugin.query.client.web.client.application.ClientPluginFactory(originalViewContext));
// Automatically generated part - END
}
......
......@@ -16,6 +16,10 @@
package ch.systemsx.cisd.openbis.generic.client.web.client.application.plugin;
import java.util.List;
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 ch.systemsx.cisd.openbis.generic.client.web.client.application.menu.TopMenuItem;
......@@ -38,4 +42,13 @@ public interface IModule
* </p>
*/
Widget getMenu();
String getModuleName();
String getModuleDescription();
/**
* Returns a list with at least one menu item.
*/
List<Component> getMenuItems();
}
......@@ -16,6 +16,9 @@
package ch.systemsx.cisd.openbis.plugin.demo.client.web.client.application.module;
import java.util.List;
import com.extjs.gxt.ui.client.widget.Component;
import com.google.gwt.user.client.ui.Widget;
import ch.systemsx.cisd.openbis.generic.client.web.client.application.IViewContext;
......@@ -48,4 +51,22 @@ public class DemoModule implements IModule
// Uncomment to see customized top menu .
// return new CustomizedWidgetDemoModuleMenu(getViewContext());
}
public List<Component> getMenuItems()
{
// TODO Auto-generated method stub
return null;
}
public String getModuleDescription()
{
// TODO Auto-generated method stub
return null;
}
public String getModuleName()
{
// TODO Auto-generated method stub
return null;
}
}
/*
* Copyright 2010 ETH Zuerich, CISD
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ch.systemsx.cisd.openbis.plugin.query.client.web.client;
import ch.systemsx.cisd.openbis.generic.client.web.client.IClientService;
/**
*
*
* @author Franz-Josef Elmer
*/
public interface IQueryClientService extends IClientService
{
}
/*
* Copyright 2010 ETH Zuerich, CISD
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ch.systemsx.cisd.openbis.plugin.query.client.web.client;
import ch.systemsx.cisd.openbis.generic.client.web.client.IClientServiceAsync;
/**
*
*
* @author Franz-Josef Elmer
*/
public interface IQueryClientServiceAsync extends IClientServiceAsync
{
}
/*
* Copyright 2010 ETH Zuerich, CISD
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ch.systemsx.cisd.openbis.plugin.query.client.web.client.application;
import java.util.Collections;
import java.util.Set;
import ch.systemsx.cisd.openbis.generic.client.web.client.ICommonClientServiceAsync;
import ch.systemsx.cisd.openbis.generic.client.web.client.application.AbstractClientPluginFactory;
import ch.systemsx.cisd.openbis.generic.client.web.client.application.IViewContext;
import ch.systemsx.cisd.openbis.generic.client.web.client.application.plugin.IClientPlugin;
import ch.systemsx.cisd.openbis.generic.client.web.client.application.plugin.IModule;
import ch.systemsx.cisd.openbis.generic.shared.basic.IIdentifiable;
import ch.systemsx.cisd.openbis.generic.shared.basic.dto.EntityKind;
import ch.systemsx.cisd.openbis.generic.shared.basic.dto.EntityType;
/**
*
*
* @author Franz-Josef Elmer
*/
public class ClientPluginFactory extends AbstractClientPluginFactory<ViewContext>
{
public ClientPluginFactory(IViewContext<ICommonClientServiceAsync> originalViewContext)
{
super(originalViewContext);
}
@Override
protected ViewContext createViewContext(
IViewContext<ICommonClientServiceAsync> originalViewContext)
{
return new ViewContext(originalViewContext);
}
public <T extends EntityType, I extends IIdentifiable> IClientPlugin<T, I> createClientPlugin(
EntityKind entityKind)
{
throw new UnsupportedOperationException("IClientPlugin for entity kind '" + entityKind
+ "' not implemented yet.");
}
public Set<String> getEntityTypeCodes(EntityKind entityKind)
{
return Collections.emptySet();
}
@Override
public IModule tryGetModule()
{
return new QueryModule(getViewContext());
}
}
/*
* Copyright 2010 ETH Zuerich, CISD
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ch.systemsx.cisd.openbis.plugin.query.client.web.client.application;
import java.util.List;
import com.extjs.gxt.ui.client.widget.Component;
import com.extjs.gxt.ui.client.widget.button.Button;
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.plugin.IModule;
import ch.systemsx.cisd.openbis.plugin.query.client.web.client.IQueryClientServiceAsync;
/**
*
*
* @author Franz-Josef Elmer
*/
public class QueryModule implements IModule
{
private final IViewContext<IQueryClientServiceAsync> viewContext;
QueryModule(IViewContext<IQueryClientServiceAsync> viewContext)
{
this.viewContext = viewContext;
}
public Widget getMenu()
{
return new Button("hello");
}
public List<Component> getMenuItems()
{
// TODO Auto-generated method stub
return null;
}
public String getModuleDescription()
{
// TODO Auto-generated method stub
return null;
}
public String getModuleName()
{
// TODO Auto-generated method stub
return null;
}
}
/*
* Copyright 2010 ETH Zuerich, CISD
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ch.systemsx.cisd.openbis.plugin.query.client.web.client.application;
import com.google.gwt.core.client.GWT;
import ch.systemsx.cisd.openbis.generic.client.web.client.ICommonClientServiceAsync;
import ch.systemsx.cisd.openbis.generic.client.web.client.application.AbstractPluginViewContext;
import ch.systemsx.cisd.openbis.generic.client.web.client.application.IViewContext;
import ch.systemsx.cisd.openbis.plugin.query.client.web.client.IQueryClientService;
import ch.systemsx.cisd.openbis.plugin.query.client.web.client.IQueryClientServiceAsync;
/**
*
*
* @author Franz-Josef Elmer
*/
public class ViewContext extends AbstractPluginViewContext<IQueryClientServiceAsync>
{
private static final String TECHNOLOGY_NAME = "query";
public ViewContext(IViewContext<ICommonClientServiceAsync> commonViewContext)
{
super(commonViewContext);
}
@Override
protected String getTechnology()
{
return TECHNOLOGY_NAME;
}
@Override
protected IQueryClientServiceAsync createClientServiceAsync()
{
return GWT.create(IQueryClientService.class);
}
}
// Query dictionary
var query = {
// LAST LINE: KEEP IT AT THE END
lastline: "" // we need a line without a comma
};
\ No newline at end of file
/*
* Copyright 2010 ETH Zuerich, CISD
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ch.systemsx.cisd.openbis.plugin.query.client.web.server;
import org.springframework.stereotype.Component;
import ch.systemsx.cisd.openbis.generic.client.web.server.AbstractClientService;
import ch.systemsx.cisd.openbis.generic.shared.IServer;
import ch.systemsx.cisd.openbis.plugin.query.client.web.client.IQueryClientService;
/**
*
*
* @author Franz-Josef Elmer
*/
@Component(value = "query-service")
public class QueryClientService extends AbstractClientService implements IQueryClientService
{
@Override
protected IServer getServer()
{
// TODO Auto-generated method stub
return null;
}
}
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