use of org.eclipse.linuxtools.internal.mylyn.osio.rest.core.OSIORestConnector in project linuxtools by eclipse.
the class OSIORestRepositoryConnectorUI method getQueryWizard.
@Override
public IWizard getQueryWizard(TaskRepository repository, IRepositoryQuery query) {
RepositoryQueryWizard wizard = new RepositoryQueryWizard(repository);
AbstractRepositoryConnector connector = getConnector();
OSIORestConnector connectorREST = (OSIORestConnector) connector;
TaskData taskData = new TaskData(new OSIORestTaskAttributeMapper(repository, connectorREST), repository.getConnectorKind(), "Query", // $NON-NLS-1$ //$NON-NLS-2$
"Query");
if (query == null) {
wizard.addPage(new OSIORestQueryTypeWizardPage(repository, connector));
} else {
if (isCustomQuery(query)) {
wizard.addPage(OSIORestUIUtil.createOSIORestSearchPage(true, true, taskData, connectorREST, repository, query));
} else {
wizard.addPage(OSIORestUIUtil.createOSIORestSearchPage(false, true, taskData, connectorREST, repository, query));
}
}
return wizard;
}
use of org.eclipse.linuxtools.internal.mylyn.osio.rest.core.OSIORestConnector in project linuxtools by eclipse.
the class TestOSIORestClient method setUp.
@SuppressWarnings("deprecation")
@Before
public void setUp() {
connector = new OSIORestConnector();
repository = new TaskRepository(connector.getConnectorKind(), "http://openshift.io/api");
repository.setProperty(IOSIORestConstants.REPOSITORY_AUTH_ID, "user");
repository.setProperty(IOSIORestConstants.REPOSITORY_AUTH_TOKEN, "xxxxxxTokenxxxxxx");
requestProvider = new OSIOTestRestRequestProvider();
requestProvider.addGetRequest("/user", new Identity("user", "user", new Date(2017, 01, 01), new Date(2017, 01, 01), "User", "//image/user", "user", Boolean.TRUE, "user@user.org", "userCo", "", "//users/user", "TestUser"));
}
use of org.eclipse.linuxtools.internal.mylyn.osio.rest.core.OSIORestConnector in project linuxtools by eclipse.
the class OSIORestSearchQueryPage method doRefreshControls.
@Override
protected void doRefreshControls() {
try {
OSIORestConnector connectorREST = (OSIORestConnector) getConnector();
connectorREST.getRepositoryConfiguration(getTaskRepository()).updateSpaceOptions(getTargetTaskData());
for (Entry<String, AbstractAttributeEditor> entry : editorMap.entrySet()) {
entry.getValue().refresh();
}
} catch (CoreException e) {
StatusHandler.log(new Status(IStatus.ERROR, OSIORestUIPlugin.PLUGIN_ID, "OSIORestSearchQueryPage could not refresh!", // $NON-NLS-1$
e));
}
}
Aggregations