org.mantisbt.connect
Interface IMCSession

All Known Implementing Classes:
MCSession

public interface IMCSession

Author:
Peter Lanser, planser@users.sourceforge.net

Method Summary
 long addIssue(IIssue issue)
          Submit the specified issue.
 long addIssueAttachment(long issueId, java.lang.String name, java.lang.String fileType, byte[] content)
          Submit an issue attachment
 long addNote(long issueId, INote note)
          Submit a new note.
 long addProject(IProject project)
          Add a new project to the tracker (must have admin privileges).
 long addProjectAttachment(long projectId, java.lang.String name, java.lang.String fileType, java.lang.String title, java.lang.String description, byte[] content)
          Submit a project attachment
 long addRelationship(long issueId, IRelationship relationship)
          Submit a new realtionship.
 long addVersion(IProjectVersion version)
          Submit the specified version details.
 boolean deleteIssue(long issueId)
          Delete the issue with the specified id.
 boolean deleteIssueAttachment(long attachmentId)
          Delete the issue attachment with the specified id.
 boolean deleteNote(long noteId)
          Delete the note with the specified id.
 boolean deleteProject(long projectId)
          Delete the project with the specified id (must have admin privileges).
 boolean deleteProjectAttachment(long attachmentId)
          Delete the project attachment with the specified id.
 boolean deleteRelationship(long issueId, long relationshipId)
          Delete the relationship for the specified issue.
 boolean deleteVersion(long id)
          Delete the version with the specified id.
 void flush()
          Flush cached information
 IProject[] getAccessibleProjects()
          Get the list of projects that are accessible to the logged in user.
 long getBiggestIssueId(long projectId)
          Get the latest submitted issue in the specified project.
 java.lang.String[] getCategories(long projectId)
          Get the categories belonging to the specified project.
 java.lang.String getConfigString(java.lang.String configVar)
          Get the value for the specified configuration variable.
 ICustomFieldDefinition[] getCustomFieldDefinitions(long projectId)
          Get the custom fields that belong to the specified project.
 IMCAttribute getDefaultIssuePriority()
          Get the default priority for new issues.
 IMCAttribute getDefaultIssueSeverity()
          Get the default severity for new issues.
 Viewstate getDefaultIssueViewState()
          Get the default viewstate for new issues.
 Viewstate getDefaultNoteViewState()
          Get the default viewstate for new notes.
 IMCAttribute[] getEnum(Enumeration enumeration)
          Get the specified enumeration.
 java.lang.String getEnum(java.lang.String enumeration)
          Get the specified enumeration.
 IFilter[] getFilters(long projectId)
          Get the filters defined for the specified project.
 long getIdFromSummary(java.lang.String summary)
          Get the id of the issue with the specified summary.
 IIssue getIssue(long issueId)
          Get the issue with the specified id.
 byte[] getIssueAttachment(long attachmentId)
          Get the data for the specified issue attachment.
 IIssueHeader[] getIssueHeaders(long projectId, long filterId)
          Get all issue headers that match the specified filter.
 IIssueHeader[] getIssueHeaders(long projectId, long filterId, int limit)
          Get issue headers that match the specified filter.
 IIssueHeader[] getIssueHeaders(long projectId, long filterId, int pageNumber, int perPage)
          Get all issue headers that match the specified filter and paging details.
 IIssue[] getIssues(long projectId, long filterId)
          Get all issues that match the specified filter.
 IIssue[] getIssues(long projectId, long filterId, int limit)
          Get issues that match the specified filter.
 IIssue[] getIssues(long projectId, long filterId, int pageNumber, int perPage)
          Get all issues that match the specified filter and paging details.
 IProject getProject(long projectId)
          Returns the project with id projectId.
 IProject getProject(java.lang.String name)
          Returns the project with name name.
 byte[] getProjectAttachment(long attachmentId)
          Get the data for the specified project attachment.
 IProjectAttachment[] getProjectAttachments(long projectId)
          Get the attachments that belong to the specified project.
 IIssueHeader[] getProjectIssueHeaders(long projectId)
          Get all issue headers that match the specified project.
 IIssueHeader[] getProjectIssueHeaders(long projectId, int limit)
          Get the issue headers that match the specified project id and paging details Constrain the number of issues to limit.
 IIssueHeader[] getProjectIssueHeaders(long projectId, int pageNumber, int perPage)
          Get the issue headers that match the specified project id and paging details
 IIssue[] getProjectIssues(long projectId)
          Get all issues that match the specified project.
 IIssue[] getProjectIssues(long projectId, int limit)
          Get the issues that match the specified project id and paging details Constrain the number of issues to limit.
 IIssue[] getProjectIssues(long projectId, int pageNumber, int perPage)
          Get the issues that match the specified project id and paging details
 IAccount[] getProjectUsers(long projectId, AccessLevel access)
          Get appropriate users assigned to a project by access level.
 IProjectVersion[] getReleasedVersions(long projectId)
          Get the released versions that belong to the specified project.
 IProjectVersion[] getUnreleasedVersions(long projectId)
          Get the unreleased version that belong to the specified project.
 java.lang.String getVersion()
          Get Version of MantisConnect this session is connected to.
 IProjectVersion[] getVersions(long projectId)
          Get the versions belonging to the specified project.
 boolean issueExists(long issueId)
          Check there exists an issue with the specified id.
 IIssue newIssue(long projectId)
          Create a new Issue with default values set.
 INote newNote(java.lang.String text)
          Create a new Note with default values set.
 boolean updateIssue(IIssue issue)
          Update issue.
 boolean updateVersion(IProjectVersion version)
          Update version method.
 

Method Detail

flush

public void flush()
Flush cached information


newIssue

public IIssue newIssue(long projectId)
                throws MCException
Create a new Issue with default values set.

Throws:
MCException

newNote

public INote newNote(java.lang.String text)
              throws MCException
Create a new Note with default values set.

Throws:
MCException

getVersion

public java.lang.String getVersion()
                            throws MCException
Get Version of MantisConnect this session is connected to.

Throws:
MCException

getEnum

public IMCAttribute[] getEnum(Enumeration enumeration)
                       throws MCException
Get the specified enumeration.

Throws:
MCException

getEnum

public java.lang.String getEnum(java.lang.String enumeration)
                         throws MCException
Get the specified enumeration.

Throws:
MCException

issueExists

public boolean issueExists(long issueId)
                    throws MCException
Check there exists an issue with the specified id.

Throws:
MCException

getIssue

public IIssue getIssue(long issueId)
                throws MCException
Get the issue with the specified id.

Throws:
MCException

getBiggestIssueId

public long getBiggestIssueId(long projectId)
                       throws MCException
Get the latest submitted issue in the specified project.

Throws:
MCException

getIdFromSummary

public long getIdFromSummary(java.lang.String summary)
                      throws MCException
Get the id of the issue with the specified summary.

Throws:
MCException

addIssue

public long addIssue(IIssue issue)
              throws MCException
Submit the specified issue.

Throws:
MCException

addNote

public long addNote(long issueId,
                    INote note)
             throws MCException
Submit a new note.

Throws:
MCException

deleteIssue

public boolean deleteIssue(long issueId)
                    throws MCException
Delete the issue with the specified id.

Throws:
MCException

addProject

public long addProject(IProject project)
                throws MCException
Add a new project to the tracker (must have admin privileges).

Throws:
MCException

deleteProject

public boolean deleteProject(long projectId)
                      throws MCException
Delete the project with the specified id (must have admin privileges).

Throws:
MCException

getAccessibleProjects

public IProject[] getAccessibleProjects()
                                 throws MCException
Get the list of projects that are accessible to the logged in user.

Throws:
MCException

getCategories

public java.lang.String[] getCategories(long projectId)
                                 throws MCException
Get the categories belonging to the specified project.

Throws:
MCException

getVersions

public IProjectVersion[] getVersions(long projectId)
                              throws MCException
Get the versions belonging to the specified project.

Throws:
MCException

getReleasedVersions

public IProjectVersion[] getReleasedVersions(long projectId)
                                      throws MCException
Get the released versions that belong to the specified project.

Throws:
MCException

getUnreleasedVersions

public IProjectVersion[] getUnreleasedVersions(long projectId)
                                        throws MCException
Get the unreleased version that belong to the specified project.

Throws:
MCException

getFilters

public IFilter[] getFilters(long projectId)
                     throws MCException
Get the filters defined for the specified project.

Throws:
MCException

getIssues

public IIssue[] getIssues(long projectId,
                          long filterId)
                   throws MCException
Get all issues that match the specified filter.

Throws:
MCException

getIssues

public IIssue[] getIssues(long projectId,
                          long filterId,
                          int limit)
                   throws MCException
Get issues that match the specified filter. Constrain the number of issues to limit.

Throws:
MCException

getIssues

public IIssue[] getIssues(long projectId,
                          long filterId,
                          int pageNumber,
                          int perPage)
                   throws MCException
Get all issues that match the specified filter and paging details.

Throws:
MCException

getIssueHeaders

public IIssueHeader[] getIssueHeaders(long projectId,
                                      long filterId)
                               throws MCException
Get all issue headers that match the specified filter.

Throws:
MCException

getIssueHeaders

public IIssueHeader[] getIssueHeaders(long projectId,
                                      long filterId,
                                      int limit)
                               throws MCException
Get issue headers that match the specified filter. Constrain the number of issues to limit.

Throws:
MCException

getIssueHeaders

public IIssueHeader[] getIssueHeaders(long projectId,
                                      long filterId,
                                      int pageNumber,
                                      int perPage)
                               throws MCException
Get all issue headers that match the specified filter and paging details.

Throws:
MCException

getProjectIssues

public IIssue[] getProjectIssues(long projectId)
                          throws MCException
Get all issues that match the specified project.

Throws:
MCException

getProjectIssues

public IIssue[] getProjectIssues(long projectId,
                                 int limit)
                          throws MCException
Get the issues that match the specified project id and paging details Constrain the number of issues to limit.

Throws:
MCException

getProjectIssues

public IIssue[] getProjectIssues(long projectId,
                                 int pageNumber,
                                 int perPage)
                          throws MCException
Get the issues that match the specified project id and paging details

Throws:
MCException

getProjectIssueHeaders

public IIssueHeader[] getProjectIssueHeaders(long projectId)
                                      throws MCException
Get all issue headers that match the specified project.

Throws:
MCException

getProjectIssueHeaders

public IIssueHeader[] getProjectIssueHeaders(long projectId,
                                             int limit)
                                      throws MCException
Get the issue headers that match the specified project id and paging details Constrain the number of issues to limit.

Throws:
MCException

getProjectIssueHeaders

public IIssueHeader[] getProjectIssueHeaders(long projectId,
                                             int pageNumber,
                                             int perPage)
                                      throws MCException
Get the issue headers that match the specified project id and paging details

Throws:
MCException

getProjectAttachments

public IProjectAttachment[] getProjectAttachments(long projectId)
                                           throws MCException
Get the attachments that belong to the specified project.

Throws:
MCException

getProjectAttachment

public byte[] getProjectAttachment(long attachmentId)
                            throws MCException
Get the data for the specified project attachment.

Throws:
MCException

addProjectAttachment

public long addProjectAttachment(long projectId,
                                 java.lang.String name,
                                 java.lang.String fileType,
                                 java.lang.String title,
                                 java.lang.String description,
                                 byte[] content)
                          throws MCException
Submit a project attachment

Throws:
MCException

deleteProjectAttachment

public boolean deleteProjectAttachment(long attachmentId)
                                throws MCException
Delete the project attachment with the specified id.

Throws:
MCException

getProjectUsers

public IAccount[] getProjectUsers(long projectId,
                                  AccessLevel access)
                           throws MCException
Get appropriate users assigned to a project by access level.

Throws:
MCException

getConfigString

public java.lang.String getConfigString(java.lang.String configVar)
                                 throws MCException
Get the value for the specified configuration variable.

Throws:
MCException

deleteNote

public boolean deleteNote(long noteId)
                   throws MCException
Delete the note with the specified id.

Throws:
MCException

updateIssue

public boolean updateIssue(IIssue issue)
                    throws MCException
Update issue.

Throws:
MCException

getIssueAttachment

public byte[] getIssueAttachment(long attachmentId)
                          throws MCException
Get the data for the specified issue attachment.

Throws:
MCException

addIssueAttachment

public long addIssueAttachment(long issueId,
                               java.lang.String name,
                               java.lang.String fileType,
                               byte[] content)
                        throws MCException
Submit an issue attachment

Throws:
MCException

deleteIssueAttachment

public boolean deleteIssueAttachment(long attachmentId)
                              throws MCException
Delete the issue attachment with the specified id.

Throws:
MCException

getCustomFieldDefinitions

public ICustomFieldDefinition[] getCustomFieldDefinitions(long projectId)
                                                   throws MCException
Get the custom fields that belong to the specified project.

Throws:
MCException

addVersion

public long addVersion(IProjectVersion version)
                throws MCException
Submit the specified version details.

Throws:
MCException

updateVersion

public boolean updateVersion(IProjectVersion version)
                      throws MCException
Update version method.

Throws:
MCException

deleteVersion

public boolean deleteVersion(long id)
                      throws MCException
Delete the version with the specified id.

Throws:
MCException

getDefaultIssuePriority

public IMCAttribute getDefaultIssuePriority()
                                     throws MCException
Get the default priority for new issues.

Throws:
MCException

getDefaultIssueSeverity

public IMCAttribute getDefaultIssueSeverity()
                                     throws MCException
Get the default severity for new issues.

Throws:
MCException

getDefaultIssueViewState

public Viewstate getDefaultIssueViewState()
                                   throws MCException
Get the default viewstate for new issues.

Throws:
MCException

getDefaultNoteViewState

public Viewstate getDefaultNoteViewState()
                                  throws MCException
Get the default viewstate for new notes.

Throws:
MCException

addRelationship

public long addRelationship(long issueId,
                            IRelationship relationship)
                     throws MCException
Submit a new realtionship.

Throws:
MCException

deleteRelationship

public boolean deleteRelationship(long issueId,
                                  long relationshipId)
                           throws MCException
Delete the relationship for the specified issue.

Throws:
MCException

getProject

public IProject getProject(long projectId)
                    throws MCException
Returns the project with id projectId. Subprojects are included (recursively) in the search.

Throws:
MCException

getProject

public IProject getProject(java.lang.String name)
                    throws MCException
Returns the project with name name. Subprojects are included (recursively) in the search.

Throws:
MCException