org.eclipse.mylar.tasks.tests.connector
Class MockRepositoryConnector
java.lang.Object
org.eclipse.mylar.tasks.core.AbstractRepositoryConnector
org.eclipse.mylar.tasks.tests.connector.MockRepositoryConnector
- Direct Known Subclasses:
- RepositoryTaskSynchronizationTest.TestRepositoryConnector
public class MockRepositoryConnector
- extends AbstractRepositoryConnector
- Author:
- Mik Kersten, Rob Elves
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
REPOSITORY_KIND
public static final java.lang.String REPOSITORY_KIND
- See Also:
- Constant Field Values
REPOSITORY_URL
public static final java.lang.String REPOSITORY_URL
- See Also:
- Constant Field Values
MockRepositoryConnector
public MockRepositoryConnector()
canCreateNewTask
public boolean canCreateNewTask(TaskRepository repository)
- Specified by:
canCreateNewTask
in class AbstractRepositoryConnector
canCreateTaskFromKey
public boolean canCreateTaskFromKey(TaskRepository repository)
- Specified by:
canCreateTaskFromKey
in class AbstractRepositoryConnector
createTaskFromExistingKey
public ITask createTaskFromExistingKey(TaskRepository repository,
java.lang.String id,
java.net.Proxy proxySettings)
throws org.eclipse.core.runtime.CoreException
- Specified by:
createTaskFromExistingKey
in class AbstractRepositoryConnector
id
- identifier, e.g. "123" bug Bugzilla bug 123proxySettings
- TODO
- Returns:
- null if task could not be created
- Throws:
org.eclipse.core.runtime.CoreException
- TODO
getAttachmentHandler
public IAttachmentHandler getAttachmentHandler()
- Specified by:
getAttachmentHandler
in class AbstractRepositoryConnector
- Returns:
- null if not supported
getLabel
public java.lang.String getLabel()
- Specified by:
getLabel
in class AbstractRepositoryConnector
getOfflineTaskHandler
public IOfflineTaskHandler getOfflineTaskHandler()
- Specified by:
getOfflineTaskHandler
in class AbstractRepositoryConnector
- Returns:
- null if not supported
getRepositoryType
public java.lang.String getRepositoryType()
- Specified by:
getRepositoryType
in class AbstractRepositoryConnector
- Returns:
- the unique type of the repository, e.g. "bugzilla"
getRepositoryUrlFromTaskUrl
public java.lang.String getRepositoryUrlFromTaskUrl(java.lang.String url)
- Specified by:
getRepositoryUrlFromTaskUrl
in class AbstractRepositoryConnector
getSupportedVersions
public java.util.List<java.lang.String> getSupportedVersions()
- Specified by:
getSupportedVersions
in class AbstractRepositoryConnector
updateAttributes
public void updateAttributes(TaskRepository repository,
org.eclipse.core.runtime.IProgressMonitor monitor)
throws org.eclipse.core.runtime.CoreException
- Description copied from class:
AbstractRepositoryConnector
- Reset and update the repository attributes from the server (e.g.
products, components)
TODO: remove?
- Specified by:
updateAttributes
in class AbstractRepositoryConnector
- Throws:
org.eclipse.core.runtime.CoreException
updateTask
public void updateTask(TaskRepository repository,
AbstractRepositoryTask repositoryTask)
- Description copied from class:
AbstractRepositoryConnector
- Updates the properties of
repositoryTask
. Invoked when on
task synchronization if AbstractRepositoryConnector.getOfflineTaskHandler()
returns
null
or
IOfflineTaskHandler.downloadTaskData(TaskRepository, String)
returns null
.
Connectors that provide RepositoryTaskData
objects for all tasks
do not need to implement this method.
- Specified by:
updateTask
in class AbstractRepositoryConnector
- Parameters:
repository
- the repositoryrepositoryTask
- the task that is synchronized- See Also:
#getOfflineTaskHandler()}
performQuery
public org.eclipse.core.runtime.IStatus performQuery(AbstractRepositoryQuery query,
TaskRepository repository,
org.eclipse.core.runtime.IProgressMonitor monitor,
QueryHitCollector resultCollector)
- Description copied from class:
AbstractRepositoryConnector
- Implementors must execute query synchronously.
- Specified by:
performQuery
in class AbstractRepositoryConnector
repository
- TODOresultCollector
- IQueryHitCollector that collects the hits found