Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/RepositoryTaskHandleUtil.java')
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/RepositoryTaskHandleUtil.java57
1 files changed, 0 insertions, 57 deletions
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/RepositoryTaskHandleUtil.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/RepositoryTaskHandleUtil.java
deleted file mode 100644
index a02978a1d..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/RepositoryTaskHandleUtil.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 Tasktop Technologies and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Tasktop Technologies - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core;
-
-/**
- * @author Mik Kersten
- */
-public class RepositoryTaskHandleUtil {
-
- public static final String HANDLE_DELIM = "-"; //$NON-NLS-1$
-
- private static final String MISSING_REPOSITORY = "norepository"; //$NON-NLS-1$
-
- public static String getHandle(String repositoryUrl, String taskId) {
- if (!isValidTaskId(taskId)) {
- throw new RuntimeException("invalid handle for task, can not contain: " + HANDLE_DELIM + ", was: " + taskId); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- if (repositoryUrl == null) {
- return MISSING_REPOSITORY + HANDLE_DELIM + taskId;
- } else {
- return (repositoryUrl + HANDLE_DELIM + taskId).intern();
- }
- }
-
- public static String getRepositoryUrl(String taskHandle) {
- int index = taskHandle.lastIndexOf(RepositoryTaskHandleUtil.HANDLE_DELIM);
- String url = null;
- if (index != -1) {
- url = taskHandle.substring(0, index);
- }
- return url;
- }
-
- public static String getTaskId(String taskHandle) {
- int index = taskHandle.lastIndexOf(HANDLE_DELIM);
- if (index != -1) {
- String id = taskHandle.substring(index + 1);
- return id;
- }
- return null;
- }
-
- public static boolean isValidTaskId(String taskId) {
- return !taskId.contains(HANDLE_DELIM);
- }
-
-}

Back to the top