com.versionone.om
Class V1InstanceCreator

java.lang.Object
  extended by com.versionone.om.V1InstanceCreator

public class V1InstanceCreator
extends java.lang.Object

Create Assets.


Method Summary
protected  void addAttributes(Entity entity, java.util.Map<java.lang.String,java.lang.Object> attributes)
          Fill attributes for specified entity.
 Attachment attachment(java.lang.String name, BaseAsset asset, java.lang.String filename, java.io.InputStream stream)
          Create a new attachment with a name.
 Attachment attachment(java.lang.String name, BaseAsset asset, java.lang.String filename, java.io.InputStream stream, java.util.Map<java.lang.String,java.lang.Object> attributes)
          Create a new attachment with a name.
 BuildProject buildProject(java.lang.String name, java.lang.String reference)
          Create a new Build Project with a name and reference.
 BuildProject buildProject(java.lang.String name, java.lang.String reference, java.util.Map<java.lang.String,java.lang.Object> attributes)
          Create a new Build Project with a name and reference.
 BuildRun buildRun(BuildProject buildProject, java.lang.String name, DateTime date)
          Create a new Build Run in the given Build Project with a name and date.
 BuildRun buildRun(BuildProject buildProject, java.lang.String name, DateTime date, java.util.Map<java.lang.String,java.lang.Object> attributes)
          Create a new Build Run in the given Build Project with a name and date.
 ChangeSet changeSet(java.lang.String name, java.lang.String reference)
          Create a new ChangeSet with a name and reference.
 ChangeSet changeSet(java.lang.String name, java.lang.String reference, java.util.Map<java.lang.String,java.lang.Object> attributes)
          Create a new ChangeSet with a name and reference.
 Conversation conversation(Member author, java.lang.String content)
          Adds new Conversation.
 Conversation conversation(Member author, java.lang.String content, java.util.Map<java.lang.String,java.lang.Object> attributes)
          Adds new Conversation.
 Conversation conversation(java.lang.String content)
          Adds new Conversation with author as current logged user.
 Defect defect(java.lang.String name, Project project)
          Create a new Defect with a name.
 Defect defect(java.lang.String name, Project project, java.util.Map<java.lang.String,java.lang.Object> attributes)
          Create a new Defect with a name.
 Effort effort(double value, Workitem item)
          Create a new effort record for the currently logged in member.
 Effort effort(double value, Workitem item, java.util.Map<java.lang.String,java.lang.Object> attributes)
          Create a new effort record for the currently logged in member.
 Effort effort(double value, Workitem item, Member member, DateTime date)
          Create a new effort record with a value and date, assigned to the given workitem and member.
 Effort effort(double value, Workitem item, Member member, DateTime date, java.util.Map<java.lang.String,java.lang.Object> attributes)
          Create a new effort record with a value and date, assigned to the given workitem and member.
 Environment environment(java.lang.String name, Project project)
          Creates new Environment.
 Environment environment(java.lang.String name, Project project, java.util.Map<java.lang.String,java.lang.Object> attributes)
          Creates new Environment.
 Epic epic(java.lang.String name, Project project)
          Create a new Epic with a name.
 Epic epic(java.lang.String name, Project project, java.util.Map<java.lang.String,java.lang.Object> attributes)
          Create a new Epic with a name.
 Goal goal(java.lang.String name, Project project)
          Create a new Goal with a name.
 Goal goal(java.lang.String name, Project project, java.util.Map<java.lang.String,java.lang.Object> attributes)
          Create a new Goal with a name.
 Issue issue(java.lang.String name, Project project)
          Create a new Issue with a name.
 Issue issue(java.lang.String name, Project project, java.util.Map<java.lang.String,java.lang.Object> attributes)
          Create a new Issue with a name.
 Issue issue(java.lang.String name, Retrospective retrospective)
          Creates an Issue related to a Retrospective.
 Issue issue(java.lang.String name, Retrospective retrospective, java.util.Map<java.lang.String,java.lang.Object> attributes)
          Creates an Issue related to a Retrospective.
 Iteration iteration(Project project)
          Create a new iteration using suggested system values.
 Iteration iteration(Project project, java.util.Map<java.lang.String,java.lang.Object> attributes)
          Create a new iteration using suggested system values.
 Iteration iteration(java.lang.String name, Schedule schedule, DateTime beginDate, DateTime endDate)
          Create a new iteration with a name, begin date, and end date.
 Iteration iteration(java.lang.String name, Schedule schedule, DateTime beginDate, DateTime endDate, java.util.Map<java.lang.String,java.lang.Object> attributes)
          Create a new iteration with a name, begin date, and end date.
 Link link(java.lang.String name, BaseAsset asset, java.lang.String url, boolean onMenu)
          Create a new link with a name.
 Link link(java.lang.String name, BaseAsset asset, java.lang.String url, boolean onMenu, java.util.Map<java.lang.String,java.lang.Object> attributes)
          Create a new link with a name.
 Member member(java.lang.String name, java.lang.String shortName)
          Create a new member entity with a name and short name.
 Member member(java.lang.String name, java.lang.String shortName, java.util.Map<java.lang.String,java.lang.Object> attributes)
          Create a new member entity with a name and short name.
 Member member(java.lang.String name, java.lang.String shortName, Role defaultRole)
          Create a new member entity with a name, short name, and default role.
 Member member(java.lang.String name, java.lang.String shortName, Role defaultRole, java.util.Map<java.lang.String,java.lang.Object> attributes)
          Create a new member entity with a name, short name, and default role.
 Message message(java.lang.String subject, java.lang.String messageBody)
          Create a new Message with a subject and recipient.
 Message message(java.lang.String subject, java.lang.String messageBody, java.util.Collection<Member> recipients)
          Create a new Message with a subject and recipient.
 Message message(java.lang.String subject, java.lang.String messageBody, java.util.Collection<Member> recipients, java.util.Map<java.lang.String,java.lang.Object> attributes)
          Create a new Message with a subject and recipient.
 Message message(java.lang.String subject, java.lang.String messageBody, java.util.Map<java.lang.String,java.lang.Object> attributes)
          Create a new Message with a subject and recipient.
 Message message(java.lang.String subject, java.lang.String messageBody, Member recipient)
          Create a new Message with a subject and recipient.
 Message message(java.lang.String subject, java.lang.String messageBody, Member recipient, java.util.Map<java.lang.String,java.lang.Object> attributes)
          Create a new Message with a subject and recipient.
 Note note(Note responseTo, java.lang.String name, java.lang.String content, boolean personal)
          Create a new response to an existing note with a name, content, and 'personal' flag
 Note note(Note responseTo, java.lang.String name, java.lang.String content, boolean personal, java.util.Map<java.lang.String,java.lang.Object> attributes)
          Create a new response to an existing note with a name, content, and 'personal' flag
 Note note(java.lang.String name, BaseAsset asset, java.lang.String content, boolean personal)
          Create a new note with a name, asset, content, and 'personal' flag.
 Note note(java.lang.String name, BaseAsset asset, java.lang.String content, boolean personal, java.util.Map<java.lang.String,java.lang.Object> attributes)
          Create a new note with a name, asset, content, and 'personal' flag.
 Project project(java.lang.String name, AssetID parentProjectID, DateTime beginDate, Schedule schedule)
          Create a new project entity with a name, parent project, begin date, and optional schedule.
 Project project(java.lang.String name, AssetID parentProjectID, DateTime beginDate, Schedule schedule, java.util.Map<java.lang.String,java.lang.Object> attributes)
          Create a new project entity with a name, parent project, begin date, and optional schedule.
 Project project(java.lang.String name, Project parentProject, DateTime beginDate, Schedule schedule)
          Create a new project entity with a name, parent project, begin date, and optional schedule.
 Project project(java.lang.String name, Project parentProject, DateTime beginDate, Schedule schedule, java.util.Map<java.lang.String,java.lang.Object> attributes)
          Create a new project entity with a name, parent project, begin date, and optional schedule with specified attributes.
 RegressionPlan regressionPlan(java.lang.String name, Project project)
          Creates a new Regression Plan with title and project.
 RegressionPlan regressionPlan(java.lang.String name, Project project, java.util.Map<java.lang.String,java.lang.Object> attributes)
          Creates a new Regression Plan with title and project.
 RegressionSuite regressionSuite(java.lang.String name, RegressionPlan regressionPlan)
          Creates a new Regression Suite with title assigned with this Regression Plan.
 RegressionSuite regressionSuite(java.lang.String name, RegressionPlan regressionPlan, java.util.Map<java.lang.String,java.lang.Object> attributes)
          Creates a new Regression Suite with title assigned with this Regression Plan.
 RegressionTest regressionTest(java.lang.String name, Project project)
          Creates new Regression Test.
 RegressionTest regressionTest(java.lang.String name, Project project, java.util.Map<java.lang.String,java.lang.Object> attributes)
          Creates new Regression Test.
 RegressionTest regressionTest(Test test)
          Creates new Regression Test based on Test
 Request request(java.lang.String name, Project project)
          Create a new Request with a name.
 Request request(java.lang.String name, Project project, java.util.Map<java.lang.String,java.lang.Object> attributes)
          Create a new Request with a name.
 Retrospective retrospective(java.lang.String name, Project project)
          Create a new retrospective with a name.
 Retrospective retrospective(java.lang.String name, Project project, java.util.Map<java.lang.String,java.lang.Object> attributes)
          Create a new retrospective with a name.
 Schedule schedule(java.lang.String name, Duration iterationLength, Duration iterationGap)
          Create a new schedule entity with a name, iteration length, and iteration gap
 Schedule schedule(java.lang.String name, Duration iterationLength, Duration iterationGap, java.util.Map<java.lang.String,java.lang.Object> attributes)
          Create a new schedule entity with a name, iteration length, and iteration gap
 Story story(java.lang.String name, Project project)
          Create a new Story with a name.
 Story story(java.lang.String name, Project project, java.util.Map<java.lang.String,java.lang.Object> attributes)
          Create a new Story with a name.
 Story story(java.lang.String name, Retrospective retrospective)
          Create a new story with a name.
 Story story(java.lang.String name, Retrospective retrospective, java.util.Map<java.lang.String,java.lang.Object> attributes)
          Create a new story with a name.
 Task task(java.lang.String name, PrimaryWorkitem primaryWorkitem)
          Create a new Task with a name.
 Task task(java.lang.String name, PrimaryWorkitem primaryWorkitem, java.util.Map<java.lang.String,java.lang.Object> attributes)
          Create a new Task with a name.
 Team team(java.lang.String name)
          Create a new team entity with a name.
 Team team(java.lang.String name, java.util.Map<java.lang.String,java.lang.Object> attributes)
          Create a new team entity with a name.
 Test test(java.lang.String name, PrimaryWorkitem primaryWorkitem)
          Create a new Test with a name.
 Test test(java.lang.String name, PrimaryWorkitem primaryWorkitem, java.util.Map<java.lang.String,java.lang.Object> attributes)
          Create a new Test with a name.
 TestSet testSet(java.lang.String name, RegressionSuite suite, Project project)
          Creates a new TestSet with title and project.
 TestSet testSet(java.lang.String name, RegressionSuite suite, Project project, java.util.Map<java.lang.String,java.lang.Object> attributes)
          Creates a new TestSet with title and project.
 TestSuite testSuite(java.lang.String name, java.lang.String reference)
          Create a new TestSuite with a name.
 TestSuite testSuite(java.lang.String name, java.lang.String reference, java.util.Map<java.lang.String,java.lang.Object> attributes)
          Create a new TestSuite with a name.
 Theme theme(java.lang.String name, Project project)
          Create a new Theme with a name.
 Theme theme(java.lang.String name, Project project, java.util.Map<java.lang.String,java.lang.Object> attributes)
          Create a new Theme with a name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

project

public Project project(java.lang.String name,
                       Project parentProject,
                       DateTime beginDate,
                       Schedule schedule)
Create a new project entity with a name, parent project, begin date, and optional schedule.

Parameters:
name - name of project.
parentProject - parent project for created project.
beginDate - start date of created project.
schedule - Schedule that defines how this project's iterations are spaced.
Returns:
A newly minted Project that exists in the VersionOne system.

project

public Project project(java.lang.String name,
                       Project parentProject,
                       DateTime beginDate,
                       Schedule schedule,
                       java.util.Map<java.lang.String,java.lang.Object> attributes)
Create a new project entity with a name, parent project, begin date, and optional schedule with specified attributes.

Parameters:
name - name of project.
parentProject - parent project for created project.
beginDate - start date of created project.
schedule - Schedule that defines how this project's iterations are spaced.
attributes - additional attributes for inicialization project.
Returns:
A newly minted Project that exists in the VersionOne system.

project

public Project project(java.lang.String name,
                       AssetID parentProjectID,
                       DateTime beginDate,
                       Schedule schedule)
Create a new project entity with a name, parent project, begin date, and optional schedule.

Parameters:
name - name of project.
parentProjectID - id of parent project for created project.
beginDate - start date of created project.
schedule - Schedule that defines how this project's iterations are spaced.
Returns:
A newly minted Project that exists in the VersionOne system.

project

public Project project(java.lang.String name,
                       AssetID parentProjectID,
                       DateTime beginDate,
                       Schedule schedule,
                       java.util.Map<java.lang.String,java.lang.Object> attributes)
Create a new project entity with a name, parent project, begin date, and optional schedule.

Parameters:
name - name of project.
parentProjectID - id of parent project for created project.
beginDate - start date of created project.
schedule - Schedule that defines how this project's iterations are spaced.
attributes - additional attributes for the Project.
Returns:
A newly minted Project that exists in the VersionOne system.

member

public Member member(java.lang.String name,
                     java.lang.String shortName,
                     Role defaultRole)
Create a new member entity with a name, short name, and default role.

Parameters:
name - The full name of the user.
shortName - An alias or nickname used throughout the VersionOne user interface.
defaultRole - The new user's default role on projects.
Returns:
A newly minted Member that exists in the VersionOne system.

member

public Member member(java.lang.String name,
                     java.lang.String shortName,
                     Role defaultRole,
                     java.util.Map<java.lang.String,java.lang.Object> attributes)
Create a new member entity with a name, short name, and default role.

Parameters:
name - The full name of the user.
shortName - An alias or nickname used throughout the VersionOne user interface.
defaultRole - The new user's default role on projects.
attributes - additional attributes for the Member.
Returns:
A newly minted Member that exists in the VersionOne system.

member

public Member member(java.lang.String name,
                     java.lang.String shortName)
Create a new member entity with a name and short name.

Parameters:
name - The full name of the user.
shortName - An alias or nickname used throughout the VersionOne user interface.
Returns:
A newly minted Member that exists in the VersionOne system.

member

public Member member(java.lang.String name,
                     java.lang.String shortName,
                     java.util.Map<java.lang.String,java.lang.Object> attributes)
Create a new member entity with a name and short name.

Parameters:
name - The full name of the user.
shortName - An alias or nickname used throughout the VersionOne user interface.
attributes - additional attributes for the member.
Returns:
A newly minted Member that exists in the VersionOne system.

team

public Team team(java.lang.String name)
Create a new team entity with a name.

Parameters:
name - name of team.
Returns:
A newly minted Team that exists in the VersionOne system.

team

public Team team(java.lang.String name,
                 java.util.Map<java.lang.String,java.lang.Object> attributes)
Create a new team entity with a name.

Parameters:
name - name of team.
attributes - additional attributes for the Team.
Returns:
A newly minted Team that exists in the VersionOne system.

story

public Story story(java.lang.String name,
                   Project project)
Create a new Story with a name.

Parameters:
name - The initial name of the entity.
project - The Project this Story will be in.
Returns:
A newly minted Story that exists in the VersionOne system.

story

public Story story(java.lang.String name,
                   Project project,
                   java.util.Map<java.lang.String,java.lang.Object> attributes)
Create a new Story with a name.

Parameters:
name - The initial name of the entity.
project - The Project this Story will be in.
attributes - additional attributes for the Story.
Returns:
A newly minted Story that exists in the VersionOne system.

story

public Story story(java.lang.String name,
                   Retrospective retrospective)
Create a new story with a name. Set the story's IdentifiedIn to the given retrospective and the project to the retrospective's project.

Parameters:
name - The initial name of the story.
retrospective - The retrospective this story was identified in.
Returns:
A newly minted Story that exists in the VersionOne system.

story

public Story story(java.lang.String name,
                   Retrospective retrospective,
                   java.util.Map<java.lang.String,java.lang.Object> attributes)
Create a new story with a name. Set the story's IdentifiedIn to the given retrospective and the project to the retrospective's project.

Parameters:
name - The initial name of the story.
retrospective - The retrospective this story was identified in.
attributes - additional attributes for the Story.
Returns:
A newly minted Story that exists in the VersionOne system.

defect

public Defect defect(java.lang.String name,
                     Project project)
Create a new Defect with a name.

Parameters:
name - The initial name of the entity.
project - The Project this Defect will be in.
Returns:
A newly minted Defect that exists in the VersionOne system.

defect

public Defect defect(java.lang.String name,
                     Project project,
                     java.util.Map<java.lang.String,java.lang.Object> attributes)
Create a new Defect with a name.

Parameters:
name - The initial name of the entity.
project - The Project this Defect will be in.
attributes - additional attributes for the Defect.
Returns:
A newly minted Defect that exists in the VersionOne system.

task

public Task task(java.lang.String name,
                 PrimaryWorkitem primaryWorkitem)
Create a new Task with a name. Assign it to the given primary workitem.

Parameters:
name - The initial name of the task.
primaryWorkitem - The PrimaryWorkitem this Task will belong to.
Returns:
A newly minted Task that exists in the VersionOne system.

task

public Task task(java.lang.String name,
                 PrimaryWorkitem primaryWorkitem,
                 java.util.Map<java.lang.String,java.lang.Object> attributes)
Create a new Task with a name. Assign it to the given primary workitem.

Parameters:
name - The initial name of the task.
primaryWorkitem - The PrimaryWorkitem this Task will belong to.
attributes - additional attributes for the Task.
Returns:
A newly minted Task that exists in the VersionOne system.

test

public Test test(java.lang.String name,
                 PrimaryWorkitem primaryWorkitem)
Create a new Test with a name. Assign it to the given primary workitem.

Parameters:
name - The initial name of the test.
primaryWorkitem - The PrimaryWorkitem this Test will belong to.
Returns:
A newly minted Test that exists in the VersionOne system.

test

public Test test(java.lang.String name,
                 PrimaryWorkitem primaryWorkitem,
                 java.util.Map<java.lang.String,java.lang.Object> attributes)
Create a new Test with a name. Assign it to the given primary workitem.

Parameters:
name - The initial name of the test.
primaryWorkitem - The PrimaryWorkitem this Test will belong to.
attributes - additional attributes for the Test.
Returns:
A newly minted Test that exists in the VersionOne system.

theme

public Theme theme(java.lang.String name,
                   Project project)
Create a new Theme with a name.

Parameters:
name - The initial name of the entity.
project - The Project this Theme will be in.
Returns:
A newly minted Theme that exists in the VersionOne system.

theme

public Theme theme(java.lang.String name,
                   Project project,
                   java.util.Map<java.lang.String,java.lang.Object> attributes)
Create a new Theme with a name.

Parameters:
name - The initial name of the entity.
project - The Project this Theme will be in.
attributes - additional attributes for the Theme.
Returns:
A newly minted Theme that exists in the VersionOne system.

goal

public Goal goal(java.lang.String name,
                 Project project)
Create a new Goal with a name.

Parameters:
name - The initial name of the entity.
project - The Project this Goal will be in.
Returns:
A newly minted Goal that exists in the VersionOne system.

goal

public Goal goal(java.lang.String name,
                 Project project,
                 java.util.Map<java.lang.String,java.lang.Object> attributes)
Create a new Goal with a name.

Parameters:
name - The initial name of the entity.
project - The Project this Goal will be in.
attributes - additional attributes for the Goal.
Returns:
A newly minted Goal that exists in the VersionOne system.

issue

public Issue issue(java.lang.String name,
                   Project project)
Create a new Issue with a name.

Parameters:
name - The initial name of the entity.
project - The Project this Issue will be in.
Returns:
A newly minted Issue that exists in the VersionOne system.

issue

public Issue issue(java.lang.String name,
                   Project project,
                   java.util.Map<java.lang.String,java.lang.Object> attributes)
Create a new Issue with a name.

Parameters:
name - The initial name of the entity.
project - The Project this Issue will be in.
attributes - additional attributes for the Issue.
Returns:
A newly minted Issue that exists in the VersionOne system.

issue

public Issue issue(java.lang.String name,
                   Retrospective retrospective)
Creates an Issue related to a Retrospective.

Parameters:
name - The name of the Issue.
retrospective - The Retrospective to relate the Issue to.
Returns:
The newly saved Issue.

issue

public Issue issue(java.lang.String name,
                   Retrospective retrospective,
                   java.util.Map<java.lang.String,java.lang.Object> attributes)
Creates an Issue related to a Retrospective.

Parameters:
name - The name of the Issue.
retrospective - The Retrospective to relate the Issue to.
attributes - additional attributes for the Issue.
Returns:
The newly saved Issue.

request

public Request request(java.lang.String name,
                       Project project)
Create a new Request with a name.

Parameters:
name - The initial name of the entity.
project - The Project this Request will be in.
Returns:
A newly minted Request that exists in the VersionOne system.

request

public Request request(java.lang.String name,
                       Project project,
                       java.util.Map<java.lang.String,java.lang.Object> attributes)
Create a new Request with a name.

Parameters:
name - The initial name of the entity.
project - The Project this Request will be in.
attributes - additional attributes for the Request.
Returns:
A newly minted Request that exists in the VersionOne system.

epic

public Epic epic(java.lang.String name,
                 Project project)
Create a new Epic with a name.

Parameters:
name - The initial name of the entity.
project - The Project this Epic will be in.
Returns:
A newly minted Epic that exists in the VersionOne system.

epic

public Epic epic(java.lang.String name,
                 Project project,
                 java.util.Map<java.lang.String,java.lang.Object> attributes)
Create a new Epic with a name.

Parameters:
name - The initial name of the entity.
project - The Project this Epic will be in.
attributes - additional attributes for the Epic.
Returns:
A newly minted Epic that exists in the VersionOne system.

link

public Link link(java.lang.String name,
                 BaseAsset asset,
                 java.lang.String url,
                 boolean onMenu)
Create a new link with a name.

Parameters:
name - The initial name of the link.
asset - The asset this link belongs to.
url - The URL of the link.
onMenu - True to show on the asset's detail page menu.
Returns:
A newly minted Link that exists in the VersionOne system.

link

public Link link(java.lang.String name,
                 BaseAsset asset,
                 java.lang.String url,
                 boolean onMenu,
                 java.util.Map<java.lang.String,java.lang.Object> attributes)
Create a new link with a name.

Parameters:
name - The initial name of the link.
asset - The asset this link belongs to.
url - The URL of the link.
onMenu - True to show on the asset's detail page menu.
attributes - additional attributes for the Link.
Returns:
A newly minted Link that exists in the VersionOne system.

note

public Note note(java.lang.String name,
                 BaseAsset asset,
                 java.lang.String content,
                 boolean personal)
Create a new note with a name, asset, content, and 'personal' flag.

Parameters:
name - The initial name of the note.
asset - The asset this note belongs to.
content - The content of the note.
personal - True if this note is only visible to.
Returns:
A newly minted Note that exists in the VersionOne system.

note

public Note note(java.lang.String name,
                 BaseAsset asset,
                 java.lang.String content,
                 boolean personal,
                 java.util.Map<java.lang.String,java.lang.Object> attributes)
Create a new note with a name, asset, content, and 'personal' flag.

Parameters:
name - The initial name of the note.
asset - The asset this note belongs to.
content - The content of the note.
personal - True if this note is only visible to.
attributes - additional attributes for the Note.
Returns:
A newly minted Note that exists in the VersionOne system.

testSuite

public TestSuite testSuite(java.lang.String name,
                           java.lang.String reference)
Create a new TestSuite with a name.

Parameters:
name - The initial name of the TestSuite.
reference - A free text field used for reference (perhaps to an external system).
Returns:
A newly minted TestSuite that exists in the VersionOne system.

testSuite

public TestSuite testSuite(java.lang.String name,
                           java.lang.String reference,
                           java.util.Map<java.lang.String,java.lang.Object> attributes)
Create a new TestSuite with a name.

Parameters:
name - The initial name of the TestSuite.
reference - A free text field used for reference (perhaps to an external system).
attributes - additional attributes for the TestSuite.
Returns:
A newly minted TestSuite that exists in the VersionOne system.

attachment

public Attachment attachment(java.lang.String name,
                             BaseAsset asset,
                             java.lang.String filename,
                             java.io.InputStream stream)
                      throws AttachmentLengthExceededException,
                             ApplicationUnavailableException
Create a new attachment with a name.

Parameters:
name - The name of the attachment.
asset - The asset this attachment belongs to.
filename - The name of the original attachment file.
stream - The read-enabled stream that contains the attachment content to upload.
Returns:
A newly minted Attachment that exists in the VersionOne system.
Throws:
AttachmentLengthExceededException - if attachment is too long.
ApplicationUnavailableException - if appears any problem with connection to service.

attachment

public Attachment attachment(java.lang.String name,
                             BaseAsset asset,
                             java.lang.String filename,
                             java.io.InputStream stream,
                             java.util.Map<java.lang.String,java.lang.Object> attributes)
                      throws AttachmentLengthExceededException,
                             ApplicationUnavailableException
Create a new attachment with a name.

Parameters:
name - The name of the attachment.
asset - The asset this attachment belongs to.
filename - The name of the original attachment file.
stream - The read-enabled stream that contains the attachment content to upload.
attributes - additional attributes for the Attachment.
Returns:
A newly minted Attachment that exists in the VersionOne system.
Throws:
AttachmentLengthExceededException - if attachment is too long.
ApplicationUnavailableException - if appears any problem with connection to service.

retrospective

public Retrospective retrospective(java.lang.String name,
                                   Project project)
Create a new retrospective with a name.

Parameters:
name - The name of the retrospective.
project - The project this retrospective belongs to.
Returns:
A newly minted Retrospective that exists in the VersionOne system.

retrospective

public Retrospective retrospective(java.lang.String name,
                                   Project project,
                                   java.util.Map<java.lang.String,java.lang.Object> attributes)
Create a new retrospective with a name.

Parameters:
name - The name of the retrospective.
project - The project this retrospective belongs to.
attributes - additional attributes for the Retrospective.
Returns:
A newly minted Retrospective that exists in the VersionOne system.

iteration

public Iteration iteration(Project project)
Create a new iteration using suggested system values.

Parameters:
project - The project is used to determine the schedule this iteration belongs to.
Returns:
A newly minted Iteration that exists in the VersionOne system.

iteration

public Iteration iteration(Project project,
                           java.util.Map<java.lang.String,java.lang.Object> attributes)
Create a new iteration using suggested system values.

Parameters:
project - The project is used to determine the schedule this iteration belongs to.
attributes - additional attributes for the Iteration.
Returns:
A newly minted Iteration that exists in the VersionOne system.

iteration

public Iteration iteration(java.lang.String name,
                           Schedule schedule,
                           DateTime beginDate,
                           DateTime endDate)
Create a new iteration with a name, begin date, and end date.

Parameters:
name - The name of the iteration.
schedule - The schedule this iteration belongs to.
beginDate - The begin date or start date of this iteration.
endDate - The end date of this iteration.
Returns:
A newly minted Iteration that exists in the VersionOne system.

iteration

public Iteration iteration(java.lang.String name,
                           Schedule schedule,
                           DateTime beginDate,
                           DateTime endDate,
                           java.util.Map<java.lang.String,java.lang.Object> attributes)
Create a new iteration with a name, begin date, and end date.

Parameters:
name - The name of the iteration.
schedule - The schedule this iteration belongs to.
beginDate - The begin date or start date of this iteration.
endDate - The end date of this iteration.
attributes - additional attributes for the Iteration.
Returns:
A newly minted Iteration that exists in the VersionOne system.

effort

public Effort effort(double value,
                     Workitem item,
                     Member member,
                     DateTime date)
              throws java.lang.IllegalStateException
Create a new effort record with a value and date, assigned to the given workitem and member.

Parameters:
value - the value of the effort record.
item - the workitem to assign the effort record to.
member - the member to assign the effort record to. If is null then member not set.
date - the date to log the effort record against. If is null then date not set.
Returns:
A newly minted Effort Record that exists in the VersionOne system.
Throws:
java.lang.IllegalStateException - if Effort tracking is not enabled.

effort

public Effort effort(double value,
                     Workitem item,
                     Member member,
                     DateTime date,
                     java.util.Map<java.lang.String,java.lang.Object> attributes)
              throws java.lang.IllegalStateException
Create a new effort record with a value and date, assigned to the given workitem and member.

Parameters:
value - the value of the effort record.
item - the workitem to assign the effort record to.
member - the member to assign the effort record to. If is null then member not set.
date - the date to log the effort record against. If is null then date not set.
attributes - additional attributes for the Effort.
Returns:
A newly minted Effort Record that exists in the VersionOne system.
Throws:
java.lang.IllegalStateException - if Effort tracking is not enabled.

effort

public Effort effort(double value,
                     Workitem item)
              throws java.lang.IllegalStateException
Create a new effort record for the currently logged in member.

Parameters:
value - The value of the effort record.
item - The workitem to assign the effort record to.
Returns:
A newly minted Effort Record that exists in the VersionOne system.
Throws:
java.lang.IllegalStateException - if Effort tracking is not enabled.

effort

public Effort effort(double value,
                     Workitem item,
                     java.util.Map<java.lang.String,java.lang.Object> attributes)
              throws java.lang.IllegalStateException
Create a new effort record for the currently logged in member.

Parameters:
value - The value of the effort record.
item - The workitem to assign the effort record to.
attributes - additional attributes for the Effort.
Returns:
A newly minted Effort Record that exists in the VersionOne system.
Throws:
java.lang.IllegalStateException - if Effort tracking is not enabled.

buildProject

public BuildProject buildProject(java.lang.String name,
                                 java.lang.String reference)
Create a new Build Project with a name and reference.

Parameters:
name - Initial name.
reference - Reference value.
Returns:
A newly minted Build Project that exists in the VersionOne system.

buildProject

public BuildProject buildProject(java.lang.String name,
                                 java.lang.String reference,
                                 java.util.Map<java.lang.String,java.lang.Object> attributes)
Create a new Build Project with a name and reference.

Parameters:
name - Initial name.
reference - Reference value.
attributes - additional attributes for the BuildProject.
Returns:
A newly minted Build Project that exists in the VersionOne system.

buildRun

public BuildRun buildRun(BuildProject buildProject,
                         java.lang.String name,
                         DateTime date)
Create a new Build Run in the given Build Project with a name and date.

Parameters:
buildProject - The Build Project this Build Run belongs to.
name - Name of the build project.
date - The Date this Build Run ran.
Returns:
A newly minted Build Run that exists in the VersionOne system.

buildRun

public BuildRun buildRun(BuildProject buildProject,
                         java.lang.String name,
                         DateTime date,
                         java.util.Map<java.lang.String,java.lang.Object> attributes)
Create a new Build Run in the given Build Project with a name and date.

Parameters:
buildProject - The Build Project this Build Run belongs to.
name - Name of the build project.
date - The Date this Build Run ran.
attributes - additional attributes for the BuildRun.
Returns:
A newly minted Build Run that exists in the VersionOne system.

changeSet

public ChangeSet changeSet(java.lang.String name,
                           java.lang.String reference)
Create a new ChangeSet with a name and reference.

Parameters:
name - Initial name.
reference - Reference value.
Returns:
A newly minted ChangeSet that exists in the VersionOne system.

changeSet

public ChangeSet changeSet(java.lang.String name,
                           java.lang.String reference,
                           java.util.Map<java.lang.String,java.lang.Object> attributes)
Create a new ChangeSet with a name and reference.

Parameters:
name - Initial name.
reference - Reference value.
attributes - additional attributes for the ChangeSet.
Returns:
A newly minted ChangeSet that exists in the VersionOne system.

schedule

public Schedule schedule(java.lang.String name,
                         Duration iterationLength,
                         Duration iterationGap)
Create a new schedule entity with a name, iteration length, and iteration gap

Parameters:
name - Name of the new schedule
iterationLength - The duration an iteration will last in this schedule
iterationGap - The duration between iterations in this schedule.
Returns:
A newly minted Schedule that exists in the VersionOne system.

schedule

public Schedule schedule(java.lang.String name,
                         Duration iterationLength,
                         Duration iterationGap,
                         java.util.Map<java.lang.String,java.lang.Object> attributes)
Create a new schedule entity with a name, iteration length, and iteration gap

Parameters:
name - Name of the new schedule
iterationLength - The duration an iteration will last in this schedule
iterationGap - The duration between iterations in this schedule.
attributes - additional attributes for the Schedule.
Returns:
A newly minted Schedule that exists in the VersionOne system.

note

public Note note(Note responseTo,
                 java.lang.String name,
                 java.lang.String content,
                 boolean personal)
Create a new response to an existing note with a name, content, and 'personal' flag

Parameters:
responseTo - The Note to respond to
name - The initial name of the note
content - The content of the note
personal - True if this note is only visible to
Returns:
A newly minted Note in response to the original one that exists in the VersionOne system.

note

public Note note(Note responseTo,
                 java.lang.String name,
                 java.lang.String content,
                 boolean personal,
                 java.util.Map<java.lang.String,java.lang.Object> attributes)
Create a new response to an existing note with a name, content, and 'personal' flag

Parameters:
responseTo - The Note to respond to.
name - The initial name of the note.
content - The content of the note.
personal - True if this note is only visible to.
attributes - additional attributes for the note.
Returns:
A newly minted Note in response to the original one that exists in the VersionOne system.

message

public Message message(java.lang.String subject,
                       java.lang.String messageBody)
Create a new Message with a subject and recipient.

Parameters:
subject - Message subject.
messageBody - Message body.
Returns:
A newly minted Message that exists in the VersionOne system.

message

public Message message(java.lang.String subject,
                       java.lang.String messageBody,
                       java.util.Map<java.lang.String,java.lang.Object> attributes)
Create a new Message with a subject and recipient.

Parameters:
subject - Message subject.
messageBody - Message body.
attributes - additional attributes for the Message.
Returns:
A newly minted Message that exists in the VersionOne system.

message

public Message message(java.lang.String subject,
                       java.lang.String messageBody,
                       Member recipient)
Create a new Message with a subject and recipient.

Parameters:
subject - Message subject.
messageBody - Message body.
recipient - Who this message will go to.
Returns:
A newly minted Message that exists in the VersionOne system.

message

public Message message(java.lang.String subject,
                       java.lang.String messageBody,
                       Member recipient,
                       java.util.Map<java.lang.String,java.lang.Object> attributes)
Create a new Message with a subject and recipient.

Parameters:
subject - Message subject.
messageBody - Message body.
recipient - Who this message will go to.
attributes - additional attributes for the Message.
Returns:
A newly minted Message that exists in the VersionOne system.

message

public Message message(java.lang.String subject,
                       java.lang.String messageBody,
                       java.util.Collection<Member> recipients)
Create a new Message with a subject and recipient.

Parameters:
subject - Message subject.
messageBody - Message body.
recipients - Who this message will go to. May be null.
Returns:
A newly minted Message that exists in the VersionOne system.

message

public Message message(java.lang.String subject,
                       java.lang.String messageBody,
                       java.util.Collection<Member> recipients,
                       java.util.Map<java.lang.String,java.lang.Object> attributes)
Create a new Message with a subject and recipient.

Parameters:
subject - Message subject.
messageBody - Message body.
recipients - Who this message will go to. May be null.
attributes - additional attributes for the Message.
Returns:
A newly minted Message that exists in the VersionOne system.

regressionSuite

public RegressionSuite regressionSuite(java.lang.String name,
                                       RegressionPlan regressionPlan)
Creates a new Regression Suite with title assigned with this Regression Plan.

Parameters:
name - Title of the suite.
regressionPlan - Regression Plan to assign.
Returns:
A newly minted Regression Suite that exists in the VersionOne system.

regressionSuite

public RegressionSuite regressionSuite(java.lang.String name,
                                       RegressionPlan regressionPlan,
                                       java.util.Map<java.lang.String,java.lang.Object> attributes)
Creates a new Regression Suite with title assigned with this Regression Plan.

Parameters:
name - Title of the suite.
regressionPlan - Regression Plan to assign.
attributes - additional attributes for the RegressionSuite.
Returns:
A newly minted Regression Suite that exists in the VersionOne system.

regressionPlan

public RegressionPlan regressionPlan(java.lang.String name,
                                     Project project)
Creates a new Regression Plan with title and project.

Parameters:
name - Title of the plan.
project - Project to assign.
Returns:
A newly minted Regression Plan that exists in the VersionOne system.

regressionPlan

public RegressionPlan regressionPlan(java.lang.String name,
                                     Project project,
                                     java.util.Map<java.lang.String,java.lang.Object> attributes)
Creates a new Regression Plan with title and project.

Parameters:
name - Title of the plan.
project - Project to assign.
attributes - Additional attributes for initialization Regression Plan.
Returns:
A newly minted Regression Plan that exists in the VersionOne system.

testSet

public TestSet testSet(java.lang.String name,
                       RegressionSuite suite,
                       Project project)
Creates a new TestSet with title and project.

Parameters:
name - Title of the testSet.
suite - Parent RegressionSuite.
project - Project to assign.
Returns:
Newly created Test Set.

testSet

public TestSet testSet(java.lang.String name,
                       RegressionSuite suite,
                       Project project,
                       java.util.Map<java.lang.String,java.lang.Object> attributes)
Creates a new TestSet with title and project.

Parameters:
name - Title of the testSet.
suite - Parent RegressionSuite.
project - Project to assign.
attributes - Additional attributes for initialization TestSet.
Returns:
Newly created Test Set.

environment

public Environment environment(java.lang.String name,
                               Project project)
Creates new Environment.

Parameters:
name - Environment name.
project - Parent Project.
Returns:
Newly created Environment.

environment

public Environment environment(java.lang.String name,
                               Project project,
                               java.util.Map<java.lang.String,java.lang.Object> attributes)
Creates new Environment.

Parameters:
name - Environment name.
project - Parent Project.
attributes - Additional attributes that should be set for Environment.
Returns:
Newly created Environment.

regressionTest

public RegressionTest regressionTest(java.lang.String name,
                                     Project project)
Creates new Regression Test.

Parameters:
name - Regression Test name
project - Regression Test project.
Returns:
Newly created Regression Test.

regressionTest

public RegressionTest regressionTest(java.lang.String name,
                                     Project project,
                                     java.util.Map<java.lang.String,java.lang.Object> attributes)
Creates new Regression Test.

Parameters:
name - Regression Test name
project - Regression Test project.
attributes - Additional attributes that should be set for RegressionTest.
Returns:
Newly created Regression Test.

regressionTest

public RegressionTest regressionTest(Test test)
Creates new Regression Test based on Test

Parameters:
test - Test which we will be used to create Regression Test.
Returns:
Newly created Regression Test.

conversation

public Conversation conversation(java.lang.String content)
Adds new Conversation with author as current logged user.

Parameters:
content - Content of Conversation.
Returns:
Newly created Conversation.

conversation

public Conversation conversation(Member author,
                                 java.lang.String content)
Adds new Conversation.

Parameters:
author - Author of Conversation.
content - Content of Conversation.
Returns:
Newly created Conversation.

conversation

public Conversation conversation(Member author,
                                 java.lang.String content,
                                 java.util.Map<java.lang.String,java.lang.Object> attributes)
Adds new Conversation.

Parameters:
author - Author of Conversation.
content - Content of Conversation.
attributes - Additional attributes that should be set for Conversation.
Returns:
Newly created Conversation

addAttributes

protected void addAttributes(Entity entity,
                             java.util.Map<java.lang.String,java.lang.Object> attributes)
Fill attributes for specified entity.

Parameters:
entity - entity to fill.
attributes - Map of attributes on filling to entity.