diff options
Diffstat (limited to 'org.eclipse.mylyn.tasks.core')
-rw-r--r-- | org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskRepository.java | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskRepository.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskRepository.java index 682f4325d..7d11b0455 100644 --- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskRepository.java +++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskRepository.java @@ -153,6 +153,8 @@ public final class TaskRepository extends PlatformObject { // HACK: private credentials for headless operation private static Map<String, Map<String, String>> credentials = new HashMap<String, Map<String, String>>(); + private static String CREATED_FROM_TEMPLATE = "org.eclipse.mylyn.tasklist.repositories.template"; //$NON-NLS-1$ + static { URL url = null; try { @@ -292,7 +294,7 @@ public final class TaskRepository extends PlatformObject { } } - @SuppressWarnings( { "unchecked" }) + @SuppressWarnings({ "unchecked" }) private Map<String, String> getAuthInfo() { synchronized (LOCK) { if (Platform.isRunning()) { @@ -676,7 +678,7 @@ public final class TaskRepository extends PlatformObject { } /** - * Use platform proxy settings + * Returns true, if platform proxy settings should be used. */ public boolean isDefaultProxyEnabled() { return "true".equals(getProperty(PROXY_USEDEFAULT)); //$NON-NLS-1$ @@ -909,4 +911,24 @@ public final class TaskRepository extends PlatformObject { setProperty(TaskRepository.PROXY_USEDEFAULT, String.valueOf(useDefaultProxy)); } + /** + * If this repository was automatically created from a template <code>value</code> should be set to true. + * + * @since 3.5 + * @see #isCreatedFromTemplate() + */ + public void setCreatedFromTemplate(boolean value) { + setProperty(TaskRepository.CREATED_FROM_TEMPLATE, String.valueOf(value)); + } + + /** + * Returns true, if this repository was automatically created from a template. + * + * @since 3.5 + * @see #setCreatedFromTemplate(boolean) + */ + public boolean isCreatedFromTemplate() { + return "true".equals(getProperty(CREATED_FROM_TEMPLATE)); //$NON-NLS-1$ + } + } |