Package org.eclipse.mylyn.tasks.core.data

Examples of org.eclipse.mylyn.tasks.core.data.TaskAttribute


            return null;
        }
    }

    private String getOldOwner(Set<TaskAttribute> oldAttributes) {
        TaskAttribute attribute = getOldAttribute(GoogleCodeAttribute.USER_ASSIGNED, oldAttributes);
        if (attribute != null) {
            return attribute.getValue();
        } else {
            return null;
        }
    }
View Full Code Here


            IRepositoryPerson owner = getPerson(data, issueEntry.getOwner());
            setAttributeValue(data, GoogleCodeAttribute.USER_ASSIGNED, owner);
        }

        if (!data.isNew()) {
            TaskAttribute url = getAttribute(data, GoogleCodeAttribute.URL);
            url.setValue(this.connector.getTaskUrl(repository.getUrl(), issueId));
        }

        IGoogleCodeClient client = getClient(repository);
        IssueCommentsFeed comments = client.getAllComments(issueId, monitor);
        if (!data.isNew()) {
View Full Code Here

        int i = 1;
        for (IssueCommentsEntry issueComment : comments.getEntries()) {
            String content = getPlainTextContent(issueComment, false);
            if (!(StringUtils.isEmpty(content))) {
                TaskAttribute attribute = data.getRoot().createAttribute(
                        TaskAttribute.PREFIX_COMMENT + i);
                TaskCommentMapper taskComment = TaskCommentMapper.createFrom(attribute);
                // Comment id is something like
                // http://code.google.com/feeds/issues/p/googlecode-mylyn-connector/issues/1/comments/full/1
                String commentId = StringUtils.substringAfterLast(issueComment.getId(), "/");
View Full Code Here

        return taskData.getRoot().getAttribute(key.getKey());
    }

    private static void setAttributeValue(TaskData data, GoogleCodeAttribute key, String value) {
        if (value != null) {
            TaskAttribute attribute = getAttribute(data, key);
            data.getAttributeMapper().setValue(attribute, value);
        }
    }
View Full Code Here

        }
    }

    private static void setAttributeValue(TaskData data, GoogleCodeAttribute key, DateTime dateTime) {
        if (dateTime != null) {
            TaskAttribute attribute = getAttribute(data, key);
            data.getAttributeMapper().setDateValue(attribute, new Date(dateTime.getValue()));
        }
    }
View Full Code Here

        }
    }

    private static void setAttributeValue(TaskData data, GoogleCodeAttribute key, List<String> list) {
        if (list != null) {
            TaskAttribute attribute = getAttribute(data, key);
            data.getAttributeMapper().setValues(attribute, list);
        }
    }
View Full Code Here

    }

    private static void setAttributeValue(TaskData data, GoogleCodeAttribute key,
            IRepositoryPerson person) {
        if (person != null) {
            TaskAttribute attribute = getAttribute(data, key);
            setAttributeValue(data, attribute, person);
        }
    }
View Full Code Here

    }

    @Override
    public Collection<TaskRelation> getTaskRelations(TaskData taskData) {
        List<TaskRelation> relations = new ArrayList<TaskRelation>();
        TaskAttribute attribute = taskData.getRoot().getAttribute(GoogleCodeAttribute.BLOCKED_ON.getKey());
        if (attribute != null && attribute.getValues().size() > 0) {
            for (String taskId : attribute.getValues()) {
                relations.add(TaskRelation.subtask(taskId.trim()));
            }
        }
        return relations;
    }
View Full Code Here

TOP

Related Classes of org.eclipse.mylyn.tasks.core.data.TaskAttribute

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.