org.eclipse.mylar.internal.tasks.ui.editors
Class RepositoryTaskSelection

java.lang.Object
  extended by org.eclipse.mylar.internal.tasks.ui.editors.RepositoryTaskSelection
All Implemented Interfaces:
org.eclipse.jface.viewers.ISelection, IRepositoryTaskSelection

public class RepositoryTaskSelection
extends java.lang.Object
implements IRepositoryTaskSelection

A selection of an element in a view.


Field Summary
protected  java.lang.String bugSummary
           
protected  java.lang.String contents
          The contents of the selection.
protected  java.lang.String id
          The id of the Bugzilla object that the selection was on.
private  boolean isCommentHeader
           
private  boolean isDescription
           
protected  java.lang.String server
          The server of the Bugzilla object that the selection was on.
protected  TaskComment taskComment
          The comment, if a comment was selected.
 
Constructor Summary
RepositoryTaskSelection(java.lang.String id, java.lang.String server, java.lang.String summary)
          Creates a new RepositoryTaskSelection with no supplied contents or comment.
RepositoryTaskSelection(java.lang.String id, java.lang.String server, java.lang.String contents, boolean isDescription, java.lang.String summary)
          Creates a new RepositoryTaskSelection with no supplied comment.
RepositoryTaskSelection(java.lang.String id, java.lang.String server, java.lang.String contents, TaskComment taskComment, java.lang.String summary)
          Creates a new RepositoryTaskSelection.
RepositoryTaskSelection(java.lang.String id, java.lang.String server, TaskComment taskComment, java.lang.String summary)
          Creates a new RepositoryTaskSelection with no supplied contents.
 
Method Summary
 java.lang.String getBugSummary()
           
 TaskComment getComment()
           
 java.lang.String getContents()
           
 java.lang.String getId()
           
 java.lang.String getServer()
           
 boolean hasComment()
           
 boolean isCommentHeader()
           
 boolean isDescription()
           
 boolean isEmpty()
           
 void setComment(TaskComment taskComment)
          Sets the Comment object for this selection.
 void setContents(java.lang.String contents)
          Sets the contents of the selection.
 void setId(java.lang.String id)
          Sets the id of the Bugzilla object that the selection was on.
 void setIsCommentHeader(boolean isCommentHeader)
           
 void setIsDescription(boolean isDescription)
           
 void setServer(java.lang.String server)
          Sets the server of the Bugzilla object that the selection was on.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

protected java.lang.String id
The id of the Bugzilla object that the selection was on.


server

protected java.lang.String server
The server of the Bugzilla object that the selection was on.


contents

protected java.lang.String contents
The contents of the selection.


bugSummary

protected java.lang.String bugSummary

taskComment

protected TaskComment taskComment
The comment, if a comment was selected. If the selection was not a comment, then this is null.


isCommentHeader

private boolean isCommentHeader

isDescription

private boolean isDescription
Constructor Detail

RepositoryTaskSelection

public RepositoryTaskSelection(java.lang.String id,
                               java.lang.String server,
                               java.lang.String summary)
Creates a new RepositoryTaskSelection with no supplied contents or comment.

Parameters:
id - The id of the Bugzilla object that the selection was on.
server - The server of the Bugzilla object that the selection was on.

RepositoryTaskSelection

public RepositoryTaskSelection(java.lang.String id,
                               java.lang.String server,
                               java.lang.String contents,
                               boolean isDescription,
                               java.lang.String summary)
Creates a new RepositoryTaskSelection with no supplied comment.

Parameters:
id - The id of the Bugzilla object that the selection was on.
server - The server of the Bugzilla object that the selection was on.
contents - The contents of the selection.

RepositoryTaskSelection

public RepositoryTaskSelection(java.lang.String id,
                               java.lang.String server,
                               TaskComment taskComment,
                               java.lang.String summary)
Creates a new RepositoryTaskSelection with no supplied contents.

Parameters:
id - The id of the Bugzilla object that the selection was on.
server - The server of the Bugzilla object that the selection was on.
taskComment - The Comment object for this selection. If a comment was not selected, then this should be null.

RepositoryTaskSelection

public RepositoryTaskSelection(java.lang.String id,
                               java.lang.String server,
                               java.lang.String contents,
                               TaskComment taskComment,
                               java.lang.String summary)
Creates a new RepositoryTaskSelection.

Parameters:
id - The id of the Bugzilla object that the selection was on.
server - The server of the Bugzilla object that the selection was on.
contents - The contents of the selection.
taskComment - The Comment object for this selection. If a comment was not selected, then this should be null.
Method Detail

hasComment

public boolean hasComment()
Specified by:
hasComment in interface IRepositoryTaskSelection
Returns:
true if a comment was selected.

getComment

public TaskComment getComment()
Specified by:
getComment in interface IRepositoryTaskSelection
Returns:
the Comment object for this selection, or null if a comment was not selected.

setComment

public void setComment(TaskComment taskComment)
Description copied from interface: IRepositoryTaskSelection
Sets the Comment object for this selection. If a comment was not selected, then this should be null.

Specified by:
setComment in interface IRepositoryTaskSelection
Parameters:
taskComment - The selection's comment, or null if not applicable.

getContents

public java.lang.String getContents()
Specified by:
getContents in interface IRepositoryTaskSelection
Returns:
The contents of the selection. This can be null.

setContents

public void setContents(java.lang.String contents)
Description copied from interface: IRepositoryTaskSelection
Sets the contents of the selection.

Specified by:
setContents in interface IRepositoryTaskSelection
Parameters:
contents - The selection.

getId

public java.lang.String getId()
Specified by:
getId in interface IRepositoryTaskSelection
Returns:
The id of the Bugzilla object that the selection was on.

setId

public void setId(java.lang.String id)
Description copied from interface: IRepositoryTaskSelection
Sets the id of the Bugzilla object that the selection was on.

Specified by:
setId in interface IRepositoryTaskSelection
Parameters:
id - The id of the bug.

getServer

public java.lang.String getServer()
Specified by:
getServer in interface IRepositoryTaskSelection
Returns:
The server of the Bugzilla object that the selection was on, or null if no server is supplied.

setServer

public void setServer(java.lang.String server)
Description copied from interface: IRepositoryTaskSelection
Sets the server of the Bugzilla object that the selection was on.

Specified by:
setServer in interface IRepositoryTaskSelection
Parameters:
server - The server of the bug.

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface org.eclipse.jface.viewers.ISelection

isCommentHeader

public boolean isCommentHeader()
Specified by:
isCommentHeader in interface IRepositoryTaskSelection

isDescription

public boolean isDescription()
Specified by:
isDescription in interface IRepositoryTaskSelection

setIsCommentHeader

public void setIsCommentHeader(boolean isCommentHeader)

setIsDescription

public void setIsDescription(boolean isDescription)

getBugSummary

public java.lang.String getBugSummary()
Specified by:
getBugSummary in interface IRepositoryTaskSelection