/sbm4mylyn/branches/V2009R2-maintenance/src/net/brutex/mylyn/sbmconnector/ui/SBMRepositorySettingsPage.java |
---|
0,0 → 1,300 |
/* |
* Mylyn Connector for Serena Business Mashups |
* Copyright 2010 Brian Rosenberger (Brutex Network) |
* |
* 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. |
* |
* Serena, TeamTrack and Serena Business Mashup are |
* registered trademarks of SERENA Software Inc. |
*/ |
package net.brutex.mylyn.sbmconnector.ui; |
import java.util.List; |
import net.brutex.mylyn.sbmconnector.SBMConnectorPlugin; |
import net.brutex.mylyn.sbmconnector.core.SBMClient; |
import net.brutex.mylyn.sbmconnector.core.SBMRepositoryConnector; |
import net.brutex.mylyn.sbmconnector.core.model.SBMField; |
import net.brutex.mylyn.sbmconnector.core.model.SBMSystemFields; |
import org.eclipse.core.runtime.CoreException; |
import org.eclipse.core.runtime.IProgressMonitor; |
import org.eclipse.jface.dialogs.IMessageProvider; |
import org.eclipse.mylyn.tasks.core.TaskRepository; |
import org.eclipse.mylyn.tasks.ui.wizards.AbstractRepositorySettingsPage; |
import org.eclipse.swt.SWT; |
import org.eclipse.swt.layout.GridData; |
import org.eclipse.swt.layout.GridLayout; |
import org.eclipse.swt.widgets.Combo; |
import org.eclipse.swt.widgets.Composite; |
import org.eclipse.swt.widgets.Event; |
import org.eclipse.swt.widgets.Label; |
import org.eclipse.swt.widgets.Listener; |
import org.eclipse.swt.widgets.Table; |
import org.eclipse.swt.widgets.TableColumn; |
import org.eclipse.swt.widgets.TableItem; |
import org.eclipse.ui.forms.widgets.ExpandableComposite; |
import org.eclipse.ui.forms.widgets.FormToolkit; |
public class SBMRepositorySettingsPage extends AbstractRepositorySettingsPage { |
private Combo table; |
private Table list; |
private String solutionTable = ""; |
private String solutionTableList = ""; |
private String tableFieldList = ""; |
private String tableFullFieldList = ""; |
public static final String STRING_SOLUTIONTABLE = "solutionTable"; |
public static final String STRING_SOLUTIONTABLELIST = "solutionTableList"; |
public static final String STRING_TABLEFIELDLIST = "tableFieldList"; |
public static final String STRING_TABLEFULLFIELDLIST = "tableFullFieldList"; |
public SBMRepositorySettingsPage(String title, String description, |
TaskRepository taskRepository) { |
super(title, description, taskRepository); |
setNeedsAdvanced(false); |
setNeedsValidation(true); |
setNeedsEncoding(false); |
// initialize table and table list if not null |
if (taskRepository.hasProperty(STRING_SOLUTIONTABLE)) { |
this.solutionTable = taskRepository |
.getProperty(STRING_SOLUTIONTABLE); |
} |
if (taskRepository.hasProperty(STRING_SOLUTIONTABLELIST)) { |
this.solutionTableList = taskRepository |
.getProperty(STRING_SOLUTIONTABLELIST); |
} |
if (taskRepository.hasProperty(STRING_TABLEFIELDLIST)) { |
this.tableFieldList = taskRepository |
.getProperty(STRING_TABLEFIELDLIST); |
} |
if (taskRepository.hasProperty(STRING_TABLEFULLFIELDLIST)) { |
this.tableFullFieldList = taskRepository |
.getProperty(STRING_TABLEFULLFIELDLIST); |
} |
} |
@Override |
public void applyTo(TaskRepository repository) { |
super.applyTo(repository); |
if (!solutionTable.isEmpty()) { |
repository.setProperty(STRING_SOLUTIONTABLE, solutionTable); |
repository.setProperty(STRING_SOLUTIONTABLELIST, solutionTableList); |
String fieldlist = ","; |
String fullfieldlist = ","; |
for (TableItem t : list.getItems()) { |
if (t.getChecked()) |
fieldlist = fieldlist + t.getText(2) + ","; |
fullfieldlist = fullfieldlist + t.getText(2) + ","; |
} |
repository.setProperty(STRING_TABLEFIELDLIST, fieldlist); |
repository.setProperty(STRING_TABLEFULLFIELDLIST, fullfieldlist); |
} |
} |
@Override |
public boolean isPageComplete() { |
if (table != null |
&& table.getText().length() > 4 |
&& getUserName() != null |
&& getUserName().length() > 0) { |
return true; |
} |
return false; |
} |
@Override |
protected void createContributionControls(Composite parentControl) { |
ExpandableComposite expander = createSection(parentControl, |
"Mashup application"); |
FormToolkit toolkit = new FormToolkit(parentControl.getDisplay()); |
Composite control = toolkit.createComposite(expander, SWT.NONE); |
GridLayout gridLayout = new GridLayout(); |
gridLayout.numColumns = 2; |
gridLayout.verticalSpacing = 5; |
gridLayout.marginWidth = 0; |
control.setLayout(gridLayout); |
control.setBackground(parentControl.getBackground()); |
Label label = new Label(control, SWT.NONE); |
label.setText("Table:"); |
table = new Combo(control, SWT.SINGLE | SWT.BORDER); |
Label label_list = new Label(control, SWT.NONE | SWT.TOP); |
label_list.setText("Fields:"); |
list = new Table(control, SWT.MULTI | SWT.BORDER | SWT.V_SCROLL |
| SWT.H_SCROLL | SWT.FULL_SELECTION | SWT.CHECK); |
list.setLinesVisible(true); |
list.setHeaderVisible(true); |
GridData data = new GridData(SWT.FILL, SWT.FILL, true, true); |
data.heightHint = 200; |
list.setLayoutData(data); |
String[] titles = { " ", "Display Name", "DBName", "Type" }; |
for (int i = 0; i < titles.length; i++) { |
TableColumn column = new TableColumn(list, SWT.NONE); |
column.setText(titles[i]); |
} |
list.addListener(SWT.Selection, new Listener() { |
@Override |
public void handleEvent(Event event) { |
//avoid that a system field may be unchecked |
try { |
SBMSystemFields |
.valueOf(((TableItem) event.item).getText(2)); |
((TableItem) event.item).setChecked(true); |
} catch (IllegalArgumentException e) { |
// do nothing |
} |
} |
}); |
table.addListener(SWT.Selection, new Listener() { |
@Override |
public void handleEvent(Event arg0) { |
// when the table has been changed |
// try to re-read the field list |
tableFieldList = ""; |
tableFullFieldList = ""; |
try { |
SBMField[] fields = SBMRepositoryConnector.getClient( |
createTaskRepository()).getFields(table.getText()) |
.toArray(new SBMField[0]); |
fillList(list, fields); |
} catch (Exception e) { } |
if (getWizard() != null) { |
solutionTable = table.getText(); |
getWizard().getContainer().updateButtons(); |
} |
} |
}); |
regenerateTables(); |
expander.setClient(control); |
} |
@Override |
public String getConnectorKind() { |
return SBMConnectorPlugin.CONNECTOR_KIND; |
} |
@Override |
protected Validator getValidator(TaskRepository repository) { |
return new SBMConnectionValidator(repository); |
} |
@Override |
protected boolean isValidUrl(String url) { |
if (url.contains("<server>")) |
return false; |
return true; |
} |
@Override |
protected void applyValidatorResult(Validator validator) { |
if (((SBMConnectionValidator) validator).getResult() != null) { |
setMessage("Validate first!", IMessageProvider.ERROR); |
setNeedsValidation(true); |
} else { |
regenerateTables(); |
} |
} |
private void regenerateTables() { |
try { |
List<String> tables = SBMRepositoryConnector.getClient( |
createTaskRepository()).getPrimaryTables(); |
for (String table_name : tables) { |
table.add(table_name); |
if (solutionTable.equals(table_name)) { |
table.setText(table_name); |
} |
} |
} catch (Exception e) { |
// it was not possible to read the list of tables |
// from the server, so just restore saved settings |
table.add(solutionTable); |
table.setText(solutionTable); |
} |
try { |
SBMField[] fields = SBMRepositoryConnector.getClient( |
createTaskRepository()).getFields(table.getText()).toArray( |
new SBMField[0]); |
fillList(list, fields); |
} catch (Exception e) { |
// it was not possible to read the fields for the given table |
// do nothing |
} |
} |
protected class SBMConnectionValidator extends Validator { |
private TaskRepository repository; |
private String result = null; |
protected SBMConnectionValidator(TaskRepository repository) { |
this.repository = repository; |
} |
@Override |
public void run(IProgressMonitor monitor) throws CoreException { |
monitor.beginTask("Prüfe Verbindung", IProgressMonitor.UNKNOWN); |
SBMClient client = new SBMClient(repository); |
if (!client.canAuthenticate()) { |
result = "Verbindung fehlgeschlagen"; |
} else { |
result = null; |
} |
monitor.done(); |
} |
public String getResult() { |
return result; |
} |
} |
private void fillList(Table list, SBMField[] fields) { |
list.removeAll(); |
for (int i = 0; i < fields.length; i++) { |
TableItem item = new TableItem(list, 0); |
item.setText(0, ""); |
item.setText(1, fields[i].getLabel()); |
item.setText(2, fields[i].getName()); |
item.setText(3, fields[i].getType().getValue().replaceFirst( |
"FLDTYPE-", "")); |
try { |
// auto-select all system fields |
SBMSystemFields.valueOf(fields[i].getName()); |
item.setChecked(true); |
} catch (IllegalArgumentException e) { |
// do nothing |
} |
if (tableFieldList.contains(","+fields[i].getName()+",")) { |
// item has been checked before |
// so check it |
item.setChecked(true); |
} |
} |
for (TableColumn c : list.getColumns()) { |
c.pack(); |
} |
} |
@Override |
protected void createAdditionalControls(Composite arg0) { |
// TODO Auto-generated method stub |
} |
} |
Property changes: |
Added: svn:mime-type |
+text/plain |
\ No newline at end of property |
/sbm4mylyn/branches/V2009R2-maintenance/src/net/brutex/mylyn/sbmconnector/ui/SBMRepositoryQueryPage.java |
---|
0,0 → 1,184 |
/* |
* Mylyn Connector for Serena Business Mashups |
* Copyright 2010 Brian Rosenberger (Brutex Network) |
* |
* 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. |
* |
* Serena, TeamTrack and Serena Business Mashup are |
* registered trademarks of SERENA Software Inc. |
*/ |
package net.brutex.mylyn.sbmconnector.ui; |
import java.awt.Color; |
import java.util.ArrayList; |
import net.brutex.mylyn.sbmconnector.core.SBMRepositoryConnector; |
import net.brutex.mylyn.sbmconnector.core.model.SBMField; |
import net.brutex.mylyn.sbmconnector.core.model.SBMSystemFields; |
import net.brutex.sbm.wsclient.ReportInfo; |
import org.eclipse.jface.dialogs.Dialog; |
import org.eclipse.jface.layout.GridDataFactory; |
import org.eclipse.mylyn.tasks.core.IRepositoryQuery; |
import org.eclipse.mylyn.tasks.core.TaskRepository; |
import org.eclipse.mylyn.tasks.ui.wizards.AbstractRepositoryQueryPage; |
import org.eclipse.swt.SWT; |
import org.eclipse.swt.events.SelectionEvent; |
import org.eclipse.swt.events.SelectionListener; |
import org.eclipse.swt.layout.GridData; |
import org.eclipse.swt.layout.GridLayout; |
import org.eclipse.swt.widgets.Combo; |
import org.eclipse.swt.widgets.Composite; |
import org.eclipse.swt.widgets.Display; |
import org.eclipse.swt.widgets.Event; |
import org.eclipse.swt.widgets.Label; |
import org.eclipse.swt.widgets.List; |
import org.eclipse.swt.widgets.Listener; |
import org.eclipse.swt.widgets.Table; |
import org.eclipse.swt.widgets.TableColumn; |
import org.eclipse.swt.widgets.TableItem; |
import org.eclipse.swt.widgets.Text; |
import org.eclipse.swt.widgets.Widget; |
import org.eclipse.ui.forms.widgets.ExpandableComposite; |
import org.eclipse.ui.forms.widgets.FormToolkit; |
public class SBMRepositoryQueryPage extends AbstractRepositoryQueryPage { |
private Text sql_where_clause = null; |
private Text query_title = null; |
private Combo reportcombo = null; |
private ReportInfo selectedReport = null; |
public static String SQL_QUERY = "sql_where"; |
public static String SQL_QUERY_NAME = "name"; |
public static String REPORT = "report"; |
public static String REPORT_OR_QUERY = "-- use query --"; |
public SBMRepositoryQueryPage(String pageName, TaskRepository repository, |
IRepositoryQuery query) { |
super(pageName, repository, query); |
setTitle("SBM Query"); |
setDescription("Please specify table database name."); |
} |
@Override |
public void applyTo(IRepositoryQuery query) { |
if (getQueryTitle() != null) { |
query.setSummary(getQueryTitle()); |
} |
query.setAttribute(SQL_QUERY, sql_where_clause.getText()); |
query.setAttribute(SQL_QUERY_NAME, query_title.getText()); |
query.setAttribute(REPORT, selectedReport.getReportUUID()); |
} |
@Override |
public String getQueryTitle() { |
if (query_title != null && !query_title.getText().isEmpty()) |
return query_title.getText(); |
return "new query"; |
} |
@Override |
public void createControl(Composite arg0) { |
Composite control = new Composite(arg0, SWT.BORDER); |
control.setLayout(new GridLayout(2, false)); |
Label report_label = new Label(control, SWT.NONE); |
reportcombo = new Combo(control, SWT.SINGLE | SWT.BORDER); |
new Label(control, SWT.NONE).setText(" OR "); |
new Label(control, SWT.SEPARATOR | SWT.HORIZONTAL); |
Label query_label = new Label(control, SWT.NONE); |
query_label.setText("Query Name:"); |
report_label.setText("Report"); |
String solutionname = getTaskRepository().getProperty( |
SBMRepositorySettingsPage.STRING_SOLUTIONTABLE); |
try { |
final java.util.List<ReportInfo> reportlist = SBMRepositoryConnector |
.getClient(getTaskRepository()).getReportList(solutionname); |
reportcombo.add(REPORT_OR_QUERY); |
reportcombo.select(0); |
for (ReportInfo report : reportlist) { |
reportcombo.add(report.getReportName()); |
} |
reportcombo.addListener(SWT.Selection, new Listener() { |
@Override |
public void handleEvent(Event arg0) { |
if (reportcombo.getSelectionIndex() == 0) { |
query_title.setEditable(true); |
query_title.setEnabled(true); |
sql_where_clause.setEditable(true); |
sql_where_clause.setEnabled(true); |
query_title.setText(""); |
} else { |
query_title.setEditable(false); |
query_title.setEnabled(false); |
sql_where_clause.setEditable(false); |
sql_where_clause.setEnabled(false); |
query_title.setText(reportcombo.getText()); |
selectedReport = reportlist.get(reportcombo |
.getSelectionIndex() - 1); |
} |
} |
}); |
} catch (Exception e) { |
} |
/* |
* |
* |
* table.addListener(SWT.Selection, new Listener() { |
* |
* @Override public void handleEvent(Event arg0) { // when the table has |
* been changed // try to re-read the field list tableFieldList = ""; |
* tableFullFieldList = ""; try { SBMField[] fields = |
* SBMRepositoryConnector.getClient( |
* createTaskRepository()).getFields(table.getText()) .toArray(new |
* SBMField[0]); fillList(list, fields); } catch (Exception e) { } if |
* (getWizard() != null) { solutionTable = table.getText(); |
* getWizard().getContainer().updateButtons(); } } |
* |
* }); regenerateTables(); expander.setClient(control); |
*/ |
query_title = new Text(control, SWT.BORDER); |
if (getQuery() != null) |
query_title.setText(getQuery().getAttribute("name")); |
GridData data = new GridData(SWT.FILL, SWT.FILL, true, true); |
data.heightHint = 200; |
Label label_sql = new Label(control, SWT.NONE); |
label_sql.setText("SQL where:"); |
sql_where_clause = new Text(control, SWT.MULTI | SWT.WRAP |
| SWT.V_SCROLL | SWT.BORDER); |
GridData gd = new GridData(300, 150); |
gd.horizontalSpan = 2; |
sql_where_clause.setLayoutData(gd); |
if (getQuery() != null) |
sql_where_clause.setText(getQuery().getAttribute("sql_where")); |
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.TOP) |
.applyTo(query_title); |
Dialog.applyDialogFont(control); |
setControl(control); |
} |
} |
Property changes: |
Added: svn:mime-type |
+text/plain |
\ No newline at end of property |
/sbm4mylyn/branches/V2009R2-maintenance/src/net/brutex/mylyn/sbmconnector/ui/SBMTicketEditorPageFactory.java |
---|
0,0 → 1,72 |
/* |
* Mylyn Connector for Serena Business Mashups |
* Copyright 2010 Brian Rosenberger (Brutex Network) |
* |
* 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. |
* |
* Serena, TeamTrack and Serena Business Mashup are |
* registered trademarks of SERENA Software Inc. |
*/ |
package net.brutex.mylyn.sbmconnector.ui; |
import net.brutex.mylyn.sbmconnector.SBMConnectorPlugin; |
import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages; |
import org.eclipse.mylyn.tasks.ui.TasksUiImages; |
import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorPageFactory; |
import org.eclipse.mylyn.tasks.ui.editors.BrowserFormPage; |
import org.eclipse.mylyn.tasks.ui.editors.TaskEditor; |
import org.eclipse.mylyn.tasks.ui.editors.TaskEditorInput; |
import org.eclipse.swt.graphics.Image; |
import org.eclipse.ui.forms.editor.IFormPage; |
public class SBMTicketEditorPageFactory extends AbstractTaskEditorPageFactory { |
@Override |
public boolean canCreatePageFor(TaskEditorInput input) { |
if (input.getTask().getConnectorKind().equals(SBMConnectorPlugin.CONNECTOR_KIND)) { |
return true; |
} |
return false; |
} |
@Override |
public IFormPage createPage(TaskEditor parentEditor) { |
TaskEditorInput input = parentEditor.getTaskEditorInput(); |
if (input.getTask().getConnectorKind().equals(SBMConnectorPlugin.CONNECTOR_KIND)) { |
SBMTicketEditorPage sbmeditor = new SBMTicketEditorPage(parentEditor); |
return sbmeditor; |
} else { |
return new BrowserFormPage(parentEditor, "Formular konnte nicht generiert werden"); |
} |
} |
@Override |
public Image getPageImage() { |
return CommonImages.getImage(TasksUiImages.REPOSITORY_SMALL); |
} |
@Override |
public String getPageText() { |
return SBMConnectorPlugin.LABEL; |
} |
@Override |
public int getPriority() { |
// be the first |
return PRIORITY_TASK; |
} |
} |
Property changes: |
Added: svn:mime-type |
+text/plain |
\ No newline at end of property |
/sbm4mylyn/branches/V2009R2-maintenance/src/net/brutex/mylyn/sbmconnector/ui/SBMTicketEditorPage.java |
---|
0,0 → 1,50 |
/* |
* Mylyn Connector for Serena Business Mashups |
* Copyright 2010 Brian Rosenberger (Brutex Network) |
* |
* 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. |
* |
* Serena, TeamTrack and Serena Business Mashup are |
* registered trademarks of SERENA Software Inc. |
*/ |
package net.brutex.mylyn.sbmconnector.ui; |
import net.brutex.mylyn.sbmconnector.SBMConnectorPlugin; |
import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorPage; |
import org.eclipse.mylyn.tasks.ui.editors.TaskEditor; |
public class SBMTicketEditorPage extends AbstractTaskEditorPage { |
public SBMTicketEditorPage(TaskEditor editor) { |
super(editor, SBMConnectorPlugin.CONNECTOR_KIND); |
setNeedsPrivateSection(false); |
setNeedsSubmitButton(false); |
setNeedsSubmit(false); |
setNeedsSubmit(false); |
} |
/*@Override |
protected Set<TaskEditorPartDescriptor> createPartDescriptors() { |
Set<TaskEditorPartDescriptor> descriptors = super.createPartDescriptors(); |
// remove unnecessary default editor parts |
//for (TaskEditorPartDescriptor taskEditorPartDescriptor : descriptors) { |
// if (taskEditorPartDescriptor.getId().equals(ID_PART_PEOPLE)) { |
// descriptors.remove(taskEditorPartDescriptor); |
// break; |
// } |
//} |
return descriptors; |
}*/ |
} |
Property changes: |
Added: svn:mime-type |
+text/plain |
\ No newline at end of property |
/sbm4mylyn/branches/V2009R2-maintenance/src/net/brutex/mylyn/sbmconnector/ui/SBMQueryComposite.java |
---|
0,0 → 1,50 |
/* |
* Mylyn Connector for Serena Business Mashups |
* Copyright 2010 Brian Rosenberger (Brutex Network) |
* |
* 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. |
* |
* Serena, TeamTrack and Serena Business Mashup are |
* registered trademarks of SERENA Software Inc. |
*/ |
package net.brutex.mylyn.sbmconnector.ui; |
import org.eclipse.swt.layout.GridLayout; |
import org.eclipse.swt.graphics.Point; |
import org.eclipse.swt.widgets.Composite; |
import org.eclipse.swt.widgets.Label; |
import org.eclipse.swt.SWT; |
import org.eclipse.swt.widgets.Text; |
public class SBMQueryComposite extends Composite { |
private Label label = null; |
private Text table = null; |
private Text textArea = null; |
public SBMQueryComposite(Composite parent, int style) { |
super(parent, style); |
initialize(); |
} |
private void initialize() { |
GridLayout gridLayout = new GridLayout(); |
gridLayout.numColumns = 2; |
label = new Label(this, SWT.NONE); |
label.setText("Table:"); |
table = new Text(this, SWT.BORDER); |
textArea = new Text(this, SWT.MULTI | SWT.WRAP | SWT.V_SCROLL); |
this.setLayout(gridLayout); |
setSize(new Point(300, 200)); |
} |
} |
Property changes: |
Added: svn:mime-type |
+text/plain |
\ No newline at end of property |
/sbm4mylyn/branches/V2009R2-maintenance/src/net/brutex/mylyn/sbmconnector/ui/SBMRepositoryConnectorUi.java |
---|
0,0 → 1,71 |
/* |
* Mylyn Connector for Serena Business Mashups |
* Copyright 2010 Brian Rosenberger (Brutex Network) |
* |
* 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. |
* |
* Serena, TeamTrack and Serena Business Mashup are |
* registered trademarks of SERENA Software Inc. |
*/ |
package net.brutex.mylyn.sbmconnector.ui; |
import net.brutex.mylyn.sbmconnector.SBMConnectorPlugin; |
import org.eclipse.jface.wizard.IWizard; |
import org.eclipse.mylyn.tasks.core.IRepositoryQuery; |
import org.eclipse.mylyn.tasks.core.ITaskMapping; |
import org.eclipse.mylyn.tasks.core.TaskRepository; |
import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi; |
import org.eclipse.mylyn.tasks.ui.wizards.ITaskRepositoryPage; |
import org.eclipse.mylyn.tasks.ui.wizards.RepositoryQueryWizard; |
public class SBMRepositoryConnectorUi extends AbstractRepositoryConnectorUi { |
@Override |
public String getConnectorKind() { |
return SBMConnectorPlugin.CONNECTOR_KIND; |
} |
@Override |
public IWizard getNewTaskWizard(TaskRepository taskRepository, |
ITaskMapping selection) { |
// TODO Auto-generated method stub |
return null; |
} |
@Override |
public IWizard getQueryWizard(TaskRepository taskRepository, |
IRepositoryQuery queryToEdit) { |
RepositoryQueryWizard w = new RepositoryQueryWizard(taskRepository); |
w.addPage(new SBMRepositoryQueryPage("Primary Table Specification", taskRepository, queryToEdit)); |
return w; |
} |
@Override |
public ITaskRepositoryPage getSettingsPage(TaskRepository taskRepository) { |
return new SBMRepositorySettingsPage(SBMConnectorPlugin.LABEL, |
SBMConnectorPlugin.DESCRIPTION, |
new TaskRepository(SBMConnectorPlugin.CONNECTOR_KIND, |
"http://<server>:80/gsoap/gsoap_ssl.dll?aewebservices71")); |
} |
@Override |
public boolean hasSearchPage() { |
// TODO Auto-generated method stub |
return false; |
} |
} |
Property changes: |
Added: svn:mime-type |
+text/plain |
\ No newline at end of property |
/sbm4mylyn/branches/V2009R2-maintenance/src/net/brutex/mylyn/sbmconnector/ui/package.html |
---|
0,0 → 1,7 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
<html> |
<head></head> |
<body> |
Provides... |
</body> |
</html> |
Property changes: |
Added: svn:mime-type |
+text/plain |
\ No newline at end of property |