diff options
author | David Green | 2013-10-26 01:53:23 +0000 |
---|---|---|
committer | David Green | 2013-10-26 01:53:23 +0000 |
commit | 77caae4506b7f806d7f740e759ddcd269393588d (patch) | |
tree | ca9a4d20f0850062267abe13e9cf2dcc1063f8e3 /org.eclipse.mylyn.tasks.core/src | |
parent | b7836ef3608f5e511420b0cb0e0958cc29cc6a6b (diff) | |
download | org.eclipse.mylyn.tasks-77caae4506b7f806d7f740e759ddcd269393588d.tar.gz org.eclipse.mylyn.tasks-77caae4506b7f806d7f740e759ddcd269393588d.tar.xz org.eclipse.mylyn.tasks-77caae4506b7f806d7f740e759ddcd269393588d.zip |
Revert "413584: provide API for encoding/decoding task id"
This reverts commit 9c7ab4a6357cdacf9491a74f0d47772e2be63778.
Diffstat (limited to 'org.eclipse.mylyn.tasks.core/src')
-rw-r--r-- | org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/spi/TaskIdEncoder.java | 51 | ||||
-rw-r--r-- | org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/spi/package-info.java | 16 |
2 files changed, 0 insertions, 67 deletions
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/spi/TaskIdEncoder.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/spi/TaskIdEncoder.java deleted file mode 100644 index 14042a56f..000000000 --- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/spi/TaskIdEncoder.java +++ /dev/null @@ -1,51 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013 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.tasks.core.spi; - -import static org.eclipse.core.runtime.Assert.isNotNull; - -/** - * An encoder that can encode/decode task ids. Task ids must not contain specific characters when used in the Mylyn - * framework. This class can be used to safely encode a task id to the Mylyn-acceptable form, and decode it back to the - * repository-specific form. - * - * @since 3.10 - */ -public class TaskIdEncoder { - /** - * Encodes the given {@code repositoryId} to a form that is acceptable to Mylyn. - * - * @param repositoryId - * the repository id to encode - * @return the encoded id - * @see #decode(String) - */ - public static String encode(String repositoryId) { - isNotNull(repositoryId); - return repositoryId.replaceAll("%", "%25").replaceAll( //$NON-NLS-1$ //$NON-NLS-2$ - org.eclipse.mylyn.internal.tasks.core.RepositoryTaskHandleUtil.HANDLE_DELIM, "%2D"); //$NON-NLS-1$ - } - - /** - * Decodes the given {@code encodedForm} to it's original format. - * - * @param encodedForm - * the decoded form of the string, previously obtained from {@link #encode(String)} - * @return the decoded string - */ - public static String decode(String encodedForm) { - isNotNull(encodedForm); - return encodedForm.replaceAll( - "%2D", org.eclipse.mylyn.internal.tasks.core.RepositoryTaskHandleUtil.HANDLE_DELIM) //$NON-NLS-1$ - .replaceAll("%25", "%"); //$NON-NLS-1$//$NON-NLS-2$ - } -} diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/spi/package-info.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/spi/package-info.java deleted file mode 100644 index a216aa8c5..000000000 --- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/spi/package-info.java +++ /dev/null @@ -1,16 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013 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 - *******************************************************************************/ - -/** - * Provides API for connector implementors. - */ -package org.eclipse.mylyn.tasks.core.spi; - |