Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteffen Pingel2012-02-25 14:07:54 +0000
committerSteffen Pingel2012-02-25 14:07:54 +0000
commit3910a9fb5ac20c523859ca17ef8aac80d6c17245 (patch)
treee4653a3c4cbeacb151c30d7bbe0992c085546535 /stubs/org.eclipse.mylyn.commons.identity/src/org/eclipse/mylyn/commons
parentc04f8f262fa49407fd6dff4420f4644ec8470fdd (diff)
downloadorg.eclipse.mylyn.commons-3910a9fb5ac20c523859ca17ef8aac80d6c17245.tar.gz
org.eclipse.mylyn.commons-3910a9fb5ac20c523859ca17ef8aac80d6c17245.tar.xz
org.eclipse.mylyn.commons-3910a9fb5ac20c523859ca17ef8aac80d6c17245.zip
NEW - bug 371599: Workbench fails to start: Plug-in
org.eclipse.mylyn.tasks.ui was unable to load class org.eclipse.mylyn.internal.tasks.ui.TaskTrimWidget https://bugs.eclipse.org/bugs/show_bug.cgi?id=371599 Change-Id: Ia209c264ad178e8b7397f3e7354e48a30bdc9b80
Diffstat (limited to 'stubs/org.eclipse.mylyn.commons.identity/src/org/eclipse/mylyn/commons')
-rw-r--r--stubs/org.eclipse.mylyn.commons.identity/src/org/eclipse/mylyn/commons/identity/Account.java127
-rw-r--r--stubs/org.eclipse.mylyn.commons.identity/src/org/eclipse/mylyn/commons/identity/IIdentity.java52
-rw-r--r--stubs/org.eclipse.mylyn.commons.identity/src/org/eclipse/mylyn/commons/identity/IProfile.java32
-rw-r--r--stubs/org.eclipse.mylyn.commons.identity/src/org/eclipse/mylyn/commons/identity/IProfileImage.java30
-rw-r--r--stubs/org.eclipse.mylyn.commons.identity/src/org/eclipse/mylyn/commons/identity/spi/IdentityConnector.java31
-rw-r--r--stubs/org.eclipse.mylyn.commons.identity/src/org/eclipse/mylyn/commons/identity/spi/Profile.java87
-rw-r--r--stubs/org.eclipse.mylyn.commons.identity/src/org/eclipse/mylyn/commons/identity/spi/ProfileImage.java68
7 files changed, 427 insertions, 0 deletions
diff --git a/stubs/org.eclipse.mylyn.commons.identity/src/org/eclipse/mylyn/commons/identity/Account.java b/stubs/org.eclipse.mylyn.commons.identity/src/org/eclipse/mylyn/commons/identity/Account.java
new file mode 100644
index 00000000..e3b64ea5
--- /dev/null
+++ b/stubs/org.eclipse.mylyn.commons.identity/src/org/eclipse/mylyn/commons/identity/Account.java
@@ -0,0 +1,127 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Tasktop Technologies.
+ * 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.commons.identity;
+
+import java.io.Serializable;
+
+import org.eclipse.core.runtime.Assert;
+
+/**
+ * @author Steffen Pingel
+ */
+public class Account implements Serializable {
+
+ private static final long serialVersionUID = 3670630150657553390L;
+
+ public static Account id(String id) {
+ Assert.isNotNull(id);
+ return new Account(id);
+ }
+
+ private final String id;
+
+ private String kind;
+
+ private String name;
+
+ private String url;
+
+ private Account(String id) {
+ this.id = id;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (obj == null) {
+ return false;
+ }
+ if (getClass() != obj.getClass()) {
+ return false;
+ }
+ Account other = (Account) obj;
+ if (id == null) {
+ if (other.id != null) {
+ return false;
+ }
+ } else if (!id.equals(other.id)) {
+ return false;
+ }
+ if (kind == null) {
+ if (other.kind != null) {
+ return false;
+ }
+ } else if (!kind.equals(other.kind)) {
+ return false;
+ }
+ if (name == null) {
+ if (other.name != null) {
+ return false;
+ }
+ } else if (!name.equals(other.name)) {
+ return false;
+ }
+ if (url == null) {
+ if (other.url != null) {
+ return false;
+ }
+ } else if (!url.equals(other.url)) {
+ return false;
+ }
+ return true;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public String getKind() {
+ return kind;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public String getUrl() {
+ return url;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((id == null) ? 0 : id.hashCode());
+ result = prime * result + ((kind == null) ? 0 : kind.hashCode());
+ result = prime * result + ((name == null) ? 0 : name.hashCode());
+ result = prime * result + ((url == null) ? 0 : url.hashCode());
+ return result;
+ }
+
+ public Account kind(String kind) {
+ this.kind = kind;
+ return this;
+ }
+
+ public Account name(String name) {
+ this.name = name;
+ return this;
+ }
+
+ public Account url(String url) {
+ this.url = url;
+ return this;
+ }
+
+}
diff --git a/stubs/org.eclipse.mylyn.commons.identity/src/org/eclipse/mylyn/commons/identity/IIdentity.java b/stubs/org.eclipse.mylyn.commons.identity/src/org/eclipse/mylyn/commons/identity/IIdentity.java
new file mode 100644
index 00000000..0e1efff1
--- /dev/null
+++ b/stubs/org.eclipse.mylyn.commons.identity/src/org/eclipse/mylyn/commons/identity/IIdentity.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Tasktop Technologies.
+ * 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.commons.identity;
+
+import java.beans.PropertyChangeListener;
+import java.util.UUID;
+import java.util.concurrent.Future;
+
+/**
+ * @author Steffen Pingel
+ * @noimplement This interface is not intended to be implemented by clients.
+ * @noextend This interface is not intended to be extended by clients.
+ * @since 0.8
+ */
+public interface IIdentity {
+
+ // public static final String KIND_DEFAULT = "org.eclipse.mylyn.commons.identity.default"; //$NON-NLS-1$
+ //
+ // public static final String KIND_EMAIL = "org.eclipse.mylyn.commons.identity.email"; //$NON-NLS-1$
+
+ public void addAccount(Account account);
+
+ public void addPropertyChangeListener(PropertyChangeListener listener);
+
+ public Account getAccountById(String id);
+
+ public Account getAccountByKind(String kind);
+
+ public Account[] getAccounts();
+
+ public String[] getAliases();
+
+ public UUID getId();
+
+ public void removeAccount(Account account);
+
+ public void removePropertyChangeListener(PropertyChangeListener listener);
+
+ public Future<IProfileImage> requestImage(int preferredWidth, int preferredHeight);
+
+ public Future<IProfile> requestProfile();
+
+}
diff --git a/stubs/org.eclipse.mylyn.commons.identity/src/org/eclipse/mylyn/commons/identity/IProfile.java b/stubs/org.eclipse.mylyn.commons.identity/src/org/eclipse/mylyn/commons/identity/IProfile.java
new file mode 100644
index 00000000..42c996e9
--- /dev/null
+++ b/stubs/org.eclipse.mylyn.commons.identity/src/org/eclipse/mylyn/commons/identity/IProfile.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2011 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.commons.identity;
+
+/**
+ * @author Steffen Pingel
+ * @noimplement This interface is not intended to be implemented by clients.
+ * @noextend This interface is not intended to be extended by clients.
+ * @since 0.8
+ */
+public interface IProfile {
+
+ public abstract String getCity();
+
+ public abstract String getCountry();
+
+ public abstract String getEmail();
+
+ public abstract IIdentity getIdentity();
+
+ public abstract String getName();
+
+}
diff --git a/stubs/org.eclipse.mylyn.commons.identity/src/org/eclipse/mylyn/commons/identity/IProfileImage.java b/stubs/org.eclipse.mylyn.commons.identity/src/org/eclipse/mylyn/commons/identity/IProfileImage.java
new file mode 100644
index 00000000..763fbc02
--- /dev/null
+++ b/stubs/org.eclipse.mylyn.commons.identity/src/org/eclipse/mylyn/commons/identity/IProfileImage.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2011 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.commons.identity;
+
+/**
+ * @author Steffen Pingel
+ * @noimplement This interface is not intended to be implemented by clients.
+ * @noextend This interface is not intended to be extended by clients.
+ * @since 0.8
+ */
+public interface IProfileImage {
+
+ public abstract byte[] getData();
+
+ public abstract int getWidth();
+
+ public abstract int getHeight();
+
+ public abstract String getFormat();
+
+} \ No newline at end of file
diff --git a/stubs/org.eclipse.mylyn.commons.identity/src/org/eclipse/mylyn/commons/identity/spi/IdentityConnector.java b/stubs/org.eclipse.mylyn.commons.identity/src/org/eclipse/mylyn/commons/identity/spi/IdentityConnector.java
new file mode 100644
index 00000000..ca0f84bf
--- /dev/null
+++ b/stubs/org.eclipse.mylyn.commons.identity/src/org/eclipse/mylyn/commons/identity/spi/IdentityConnector.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2011 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.commons.identity.spi;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.mylyn.commons.identity.IIdentity;
+
+/**
+ * @author Steffen Pingel
+ * @since 0.8
+ */
+public abstract class IdentityConnector {
+
+ public abstract ProfileImage getImage(IIdentity identity, int preferredWidth, int preferredHeight,
+ IProgressMonitor monitor) throws CoreException;
+
+ public abstract boolean supportsImageSize(int preferredWidth, int preferredHeight);
+
+ public abstract void updateProfile(Profile profile, IProgressMonitor monitor) throws CoreException;
+
+}
diff --git a/stubs/org.eclipse.mylyn.commons.identity/src/org/eclipse/mylyn/commons/identity/spi/Profile.java b/stubs/org.eclipse.mylyn.commons.identity/src/org/eclipse/mylyn/commons/identity/spi/Profile.java
new file mode 100644
index 00000000..6183a6f3
--- /dev/null
+++ b/stubs/org.eclipse.mylyn.commons.identity/src/org/eclipse/mylyn/commons/identity/spi/Profile.java
@@ -0,0 +1,87 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Tasktop Technologies.
+ * 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.commons.identity.spi;
+
+import java.io.Serializable;
+
+import org.eclipse.mylyn.commons.identity.IIdentity;
+import org.eclipse.mylyn.commons.identity.IProfile;
+
+/**
+ * @author Steffen Pingel
+ * @since 0.8
+ */
+public final class Profile implements IProfile, Serializable {
+
+ private static final long serialVersionUID = -1079729573911113939L;
+
+ private String city;
+
+ private String country;
+
+ private String email;
+
+ private final IIdentity identity;
+
+ private String name;
+
+ private int timeZoneOffset;
+
+ public Profile(IIdentity identity) {
+ this.identity = identity;
+ }
+
+ public String getCity() {
+ return city;
+ }
+
+ public String getCountry() {
+ return country;
+ }
+
+ public String getEmail() {
+ return email;
+ }
+
+ public IIdentity getIdentity() {
+ return identity;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public int getTimeZoneOffset() {
+ return timeZoneOffset;
+ }
+
+ public void setCity(String city) {
+ this.city = city;
+ }
+
+ public void setCountry(String country) {
+ this.country = country;
+ }
+
+ public void setEmail(String email) {
+ this.email = email;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public void setTimeZoneOffset(int timeZoneOffset) {
+ this.timeZoneOffset = timeZoneOffset;
+ }
+
+}
diff --git a/stubs/org.eclipse.mylyn.commons.identity/src/org/eclipse/mylyn/commons/identity/spi/ProfileImage.java b/stubs/org.eclipse.mylyn.commons.identity/src/org/eclipse/mylyn/commons/identity/spi/ProfileImage.java
new file mode 100644
index 00000000..ad047bc7
--- /dev/null
+++ b/stubs/org.eclipse.mylyn.commons.identity/src/org/eclipse/mylyn/commons/identity/spi/ProfileImage.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Tasktop Technologies.
+ * 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.commons.identity.spi;
+
+import java.io.Serializable;
+
+import org.eclipse.mylyn.commons.identity.IProfileImage;
+
+/**
+ * @author Steffen Pingel
+ * @since 0.8
+ */
+public final class ProfileImage implements IProfileImage, Serializable {
+
+ private static final long serialVersionUID = 8211724823497362719L;
+
+ byte[] data;
+
+ int width;
+
+ int height;
+
+ String format;
+
+ long timestamp;
+
+ public ProfileImage(byte[] data, int width, int height, String format) {
+ this.data = data;
+ this.width = width;
+ this.height = height;
+ this.format = format;
+ this.timestamp = System.currentTimeMillis();
+ }
+
+ public byte[] getData() {
+ return data;
+ }
+
+ public int getWidth() {
+ return width;
+ }
+
+ public int getHeight() {
+ return height;
+ }
+
+ public String getFormat() {
+ return format;
+ }
+
+ public long getTimestamp() {
+ return timestamp;
+ }
+
+ public void setTimestamp(long timestamp) {
+ this.timestamp = timestamp;
+ }
+
+}

Back to the top