com.jamasoftware.contour.ws.v3.domain
Class WsItem

java.lang.Object
  extended by com.jamasoftware.contour.ws.v3.domain.WsItem

public class WsItem
extends java.lang.Object

This object represents a Contour Document/Item. Depending on how your Organization uses Contour, an Item could represent a feature, a requirement, a use case, a test case, a defect, and/or other Items you need to manage and track within the development process. Each type of Item has a template with specific fields to complete when adding new Items of that type.

Author:
Dylan

Constructor Summary
WsItem()
          Creates an empty WsItem object.
WsItem(java.lang.String name, java.lang.String description, java.lang.Integer documentTypeId, java.lang.Integer parentId)
          Creates a new WsItem object with the given values.
 
Method Summary
 java.lang.Integer getChildDocumentTypeId()
          Gets the id of the item's child document type.
 java.util.Date getCreatedDate()
          Gets the date the item was created.
 java.lang.Boolean getCurrentUserWritePermissions()
          Gets whether the current user has write permissions for the item.
 java.lang.String getDescription()
          Gets the description of the item.
 WsDocumentTypeCategory getDocTypeCategory()
          Gets the category of this item's document type.
 java.lang.Integer getDocumentTypeId()
          Gets the WsDocumentType id for this item
 WsField[] getFields()
          Gets the item's fields.
 java.lang.Integer getGlobalSortOrder()
          Gets the global sort order of this item in the project tree.
 java.lang.Boolean getHasChildren()
          Gets whether or not this item has any children
 java.lang.Integer getId()
          Gets the item's id.
 java.lang.Integer getIndent()
          Gets the indent value of this item in the project tree.
 java.lang.Boolean getIsStructureOnly()
           
 java.util.Date getModifiedDate()
          Gets the date the item was modified.
 java.lang.String getName()
          Gets the item name.
 java.lang.Integer getParentId()
          Gets the id of the item's parent (Can be null).
 java.lang.Integer getProjectId()
          Gets the id of the project this item belongs to.
 java.lang.String getSequence()
          Gets the sequence number of this item.
 java.lang.Integer getSortOrder()
          Gets the sort order of this item.
 void setChildDocumentTypeId(java.lang.Integer childDocumentTypeId)
          Sets the id of the item's child document type.
 void setCreatedDate(java.util.Date createdDate)
          Sets the date the item was created.
 void setCurrentUserWritePermissions(java.lang.Boolean currentUserWritePermissions)
           
 void setDescription(java.lang.String description)
          Sets the description of the item.
 void setDocTypeCategory(WsDocumentTypeCategory docTypeCategory)
           
 void setDocumentTypeId(java.lang.Integer documentTypeId)
          Set the WsDocumentType id for this item.
 void setFields(WsField[] fields)
          Sets the item's fields.
 void setGlobalSortOrder(java.lang.Integer globalSortOrder)
           
 void setHasChildren(java.lang.Boolean hasChildren)
           
 void setId(java.lang.Integer id)
           
 void setIndent(java.lang.Integer indent)
           
 void setIsStructureOnly(java.lang.Boolean isStructureOnly)
          When searching with a filter, users can choose to include items that are necessary to maintain the heirarchy of the Contour tree, but are not in the filter results.
 void setModifiedDate(java.util.Date modifiedDate)
          Sets the date this item was modified.
 void setName(java.lang.String name)
          Sets the name of the item.
 void setParentId(java.lang.Integer parentId)
          Sets the id of the item's parent.
 void setProjectId(java.lang.Integer projectId)
          Sets the id of the project this item belongs to.
 void setSequence(java.lang.String sequence)
           
 void setSortOrder(java.lang.Integer sortOrder)
           
 java.lang.String toString()
          Gets a string representation of this item.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WsItem

public WsItem()
Creates an empty WsItem object.


WsItem

public WsItem(java.lang.String name,
              java.lang.String description,
              java.lang.Integer documentTypeId,
              java.lang.Integer parentId)
Creates a new WsItem object with the given values.

Parameters:
name - name of the item
description - description of the item (can be null)
documentTypeId - id of the WsDocumentType the item is in
parentId - id of the parent of the item (can be null)
Method Detail

getId

public java.lang.Integer getId()
Gets the item's id.

Returns:
item id

setId

public void setId(java.lang.Integer id)

getDocumentTypeId

public java.lang.Integer getDocumentTypeId()
Gets the WsDocumentType id for this item

Returns:
The id of the document type of this item.

setDocumentTypeId

public void setDocumentTypeId(java.lang.Integer documentTypeId)
Set the WsDocumentType id for this item.

Parameters:
documentTypeId - The id of the type to set this item as

getName

public java.lang.String getName()
Gets the item name.

Returns:
name of the item

setName

public void setName(java.lang.String name)
Sets the name of the item.

Parameters:
name - name to set to item

getDescription

public java.lang.String getDescription()
Gets the description of the item.

Returns:
description of the item

setDescription

public void setDescription(java.lang.String description)
Sets the description of the item.

Parameters:
description - description of the item

getCreatedDate

public java.util.Date getCreatedDate()
Gets the date the item was created.

Returns:
Date

setCreatedDate

public void setCreatedDate(java.util.Date createdDate)
Sets the date the item was created.

Parameters:
createdDate - date item was created

getModifiedDate

public java.util.Date getModifiedDate()
Gets the date the item was modified.

Returns:
Date

setModifiedDate

public void setModifiedDate(java.util.Date modifiedDate)
Sets the date this item was modified.

Parameters:
modifiedDate - date item was modified

getParentId

public java.lang.Integer getParentId()
Gets the id of the item's parent (Can be null).

Returns:
item id of this item's parent

setParentId

public void setParentId(java.lang.Integer parentId)
Sets the id of the item's parent. This will not affect anything on item update, but will place the item in the tree when saving a new item.

Parameters:
parentId - id of an item to be the parent of this item. The parent must be a folder.

getFields

public WsField[] getFields()
Gets the item's fields.

Returns:
an array of WsFields

setFields

public void setFields(WsField[] fields)
Sets the item's fields.

Parameters:
fields - an array of WsFields

getProjectId

public java.lang.Integer getProjectId()
Gets the id of the project this item belongs to.

Returns:
Integer

setProjectId

public void setProjectId(java.lang.Integer projectId)
Sets the id of the project this item belongs to.

Parameters:
projectId - id of the project this item should belong to

getDocTypeCategory

public WsDocumentTypeCategory getDocTypeCategory()
Gets the category of this item's document type.

Returns:
WsDocumentTypeCategory

setDocTypeCategory

public void setDocTypeCategory(WsDocumentTypeCategory docTypeCategory)

getChildDocumentTypeId

public java.lang.Integer getChildDocumentTypeId()
Gets the id of the item's child document type. This is used by Sets and Folders to determine what type of items they can contain.

Returns:
Integer

setChildDocumentTypeId

public void setChildDocumentTypeId(java.lang.Integer childDocumentTypeId)
Sets the id of the item's child document type. This is used by Sets and Folders to determine what type of items they can contain.

Parameters:
childDocumentTypeId - id of the document type this item can contain (only used for Sets and Folders)

getSortOrder

public java.lang.Integer getSortOrder()
Gets the sort order of this item.

Returns:
Integer

setSortOrder

public void setSortOrder(java.lang.Integer sortOrder)

getGlobalSortOrder

public java.lang.Integer getGlobalSortOrder()
Gets the global sort order of this item in the project tree.

Returns:
Integer

setGlobalSortOrder

public void setGlobalSortOrder(java.lang.Integer globalSortOrder)

getIndent

public java.lang.Integer getIndent()
Gets the indent value of this item in the project tree.

Returns:
Integer

setIndent

public void setIndent(java.lang.Integer indent)

getSequence

public java.lang.String getSequence()
Gets the sequence number of this item. ("1.1.4", "3.2", etc...).

Returns:
String

setSequence

public void setSequence(java.lang.String sequence)

getHasChildren

public java.lang.Boolean getHasChildren()
Gets whether or not this item has any children

Returns:
Boolean

setHasChildren

public void setHasChildren(java.lang.Boolean hasChildren)

getCurrentUserWritePermissions

public java.lang.Boolean getCurrentUserWritePermissions()
Gets whether the current user has write permissions for the item. Read permission is implied by the fact that the item was retrieved from Contour.

Returns:
Boolean

setCurrentUserWritePermissions

public void setCurrentUserWritePermissions(java.lang.Boolean currentUserWritePermissions)

setIsStructureOnly

public void setIsStructureOnly(java.lang.Boolean isStructureOnly)
When searching with a filter, users can choose to include items that are necessary to maintain the heirarchy of the Contour tree, but are not in the filter results. This property designates this item as a heirarchy-only item.


getIsStructureOnly

public java.lang.Boolean getIsStructureOnly()

toString

public java.lang.String toString()
Gets a string representation of this item.

Overrides:
toString in class java.lang.Object
Returns:
String


Copyright (c) 2010 Jama Software, Inc. All Rights Reserved.