com.jamasoftware.contour.domain
Class DocumentTypeCategory

java.lang.Object
  extended by com.jamasoftware.contour.domain.DocumentTypeCategory
All Implemented Interfaces:
DomainObjectBase, OrganizationAware, java.io.Serializable

@Entity
public class DocumentTypeCategory
extends java.lang.Object
implements DomainObjectBase

See Also:
Serialized Form

Field Summary
static DocumentTypeCategory ATTACHMENT
           
static java.util.List<DocumentTypeCategory> CHILD_TYPE_CATEGORIES
          Child type categories are those that specify the type of children they can contain
static DocumentTypeCategory COMPONENT
           
static DocumentTypeCategory CORE
           
static java.util.List<DocumentTypeCategory> DOCUMENT_CATEGORIES
          Categories that are represented in the back end by Document.java
static java.util.List<DocumentTypeCategory> FOLDER_CATEGORIES
          Folder categories are those documents which act as high-level folders.
static java.util.List<DocumentTypeCategory> ITEM_SYNC_NOT_ALLOWED_CATEGORIES
          Categories for items that can't be sync'd
static java.util.List<DocumentTypeCategory> NO_RELATIONSHIP_CATEGORIES
          System categories that are not allowed to have relationships.
static java.util.List<DocumentTypeCategory> PERMISSION_CATEGORIES
          Permission categories are those that can have permissions associated with them
static DocumentTypeCategory SECTION
           
static DocumentTypeCategory SET
           
static java.util.List<DocumentTypeCategory> SYSTEM_CATEGORIES
          System categories are managed by Contour and shouldn't be edited or deleted
static java.util.List<java.lang.Integer> SYSTEM_CATEGORY_IDS
           
static DocumentTypeCategory TEST_CASE
           
static java.util.List<DocumentTypeCategory> TEST_CENTER_CATEGORIES
          Categories of "Test Center" things
static java.util.List<java.lang.Integer> TEST_CENTER_CATEGORY_IDS
           
static DocumentTypeCategory TEST_CYCLE
           
static DocumentTypeCategory TEST_PLAN
           
static DocumentTypeCategory TEST_RUN
           
static DocumentTypeCategory TEXT
           
 
Fields inherited from interface com.jamasoftware.contour.domain.DomainObjectBase
ORGANIZATION_COLUMN_NAME
 
Constructor Summary
DocumentTypeCategory()
           
DocumentTypeCategory(DocumentTypeCategory dtc)
           
DocumentTypeCategory(java.lang.Integer id)
           
DocumentTypeCategory(java.lang.Integer id, java.lang.String name)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
static DocumentTypeCategory getDocumentTypeCategoryById(java.lang.Integer id)
           
 java.lang.Integer getId()
           
 java.lang.String getName()
           
 java.lang.Integer getOrganizationId()
           
 int hashCode()
           
static boolean isCategory(DocumentTypeCategory docTypeCategory, DocumentTypeCategory category)
           
static boolean isCategory(DocumentType docType, DocumentTypeCategory category)
           
static boolean isChildTypeCategory(DocumentTypeCategory category)
          Given a category id (from DocumentType.getCategory()), returns whether or not the category represents a type that has a specified child document type.
static boolean isChildTypeType(DocumentType documentType)
          Determine if a DocumentType is a childType type
static boolean isFolderCategory(DocumentTypeCategory category)
          Given a DocumentType.getCategory(), returns whether or not the category represents a folder type
static boolean isFolderType(DocumentType documentType)
          Determine if a DocumentType is a folder type
static boolean isItemSyncAllowed(DocumentType documentType)
           
static boolean isNoItemSyncAllowedCategory(DocumentTypeCategory category)
           
static boolean isNoRelationshipCategory(DocumentTypeCategory category)
          Given a DocumentType.getCategory(), returns whether or not the category represents a system type that is not allowed to have relationships
static boolean isNoRelationshipType(DocumentType documentType)
          Determine if a DocumentType is a no-relationship type
static boolean isPermissionCategory(DocumentTypeCategory category)
          Given a category id (from DocumentType.getCategory()), returns whether or not the category represents a permission type (where permissions can be specified)
static boolean isPermissionType(DocumentType documentType)
          Determine if a DocumentType is a permission type (a "permission" type is any type of document where permissions are placed)
static boolean isSystemCategory(com.jamasoftware.contour.service.dto.property.DocumentTypeCategoryPropertyDTO category)
           
static boolean isSystemType(DocumentType documentType)
          Determine if a DocumentType is a system controlled type
static boolean isTestCenterTypeCategory(DocumentTypeCategory category)
           
 void setId(java.lang.Integer id)
           
 void setName(java.lang.String name)
           
 void setOrganizationId(java.lang.Integer organizationId)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

CORE

public static final DocumentTypeCategory CORE

ATTACHMENT

public static final DocumentTypeCategory ATTACHMENT

COMPONENT

public static final DocumentTypeCategory COMPONENT

SET

public static final DocumentTypeCategory SET

SECTION

public static final DocumentTypeCategory SECTION

TEXT

public static final DocumentTypeCategory TEXT

TEST_PLAN

public static final DocumentTypeCategory TEST_PLAN

TEST_CYCLE

public static final DocumentTypeCategory TEST_CYCLE

TEST_RUN

public static final DocumentTypeCategory TEST_RUN

TEST_CASE

public static final DocumentTypeCategory TEST_CASE

SYSTEM_CATEGORIES

public static final java.util.List<DocumentTypeCategory> SYSTEM_CATEGORIES
System categories are managed by Contour and shouldn't be edited or deleted


SYSTEM_CATEGORY_IDS

public static final java.util.List<java.lang.Integer> SYSTEM_CATEGORY_IDS

DOCUMENT_CATEGORIES

public static final java.util.List<DocumentTypeCategory> DOCUMENT_CATEGORIES
Categories that are represented in the back end by Document.java


ITEM_SYNC_NOT_ALLOWED_CATEGORIES

public static final java.util.List<DocumentTypeCategory> ITEM_SYNC_NOT_ALLOWED_CATEGORIES
Categories for items that can't be sync'd


TEST_CENTER_CATEGORIES

public static final java.util.List<DocumentTypeCategory> TEST_CENTER_CATEGORIES
Categories of "Test Center" things


TEST_CENTER_CATEGORY_IDS

public static final java.util.List<java.lang.Integer> TEST_CENTER_CATEGORY_IDS

NO_RELATIONSHIP_CATEGORIES

public static final java.util.List<DocumentTypeCategory> NO_RELATIONSHIP_CATEGORIES
System categories that are not allowed to have relationships.


PERMISSION_CATEGORIES

public static final java.util.List<DocumentTypeCategory> PERMISSION_CATEGORIES
Permission categories are those that can have permissions associated with them


CHILD_TYPE_CATEGORIES

public static final java.util.List<DocumentTypeCategory> CHILD_TYPE_CATEGORIES
Child type categories are those that specify the type of children they can contain


FOLDER_CATEGORIES

public static final java.util.List<DocumentTypeCategory> FOLDER_CATEGORIES
Folder categories are those documents which act as high-level folders. They are displayed in the Review Center Table of Contents, for example.

Constructor Detail

DocumentTypeCategory

public DocumentTypeCategory()

DocumentTypeCategory

public DocumentTypeCategory(java.lang.Integer id)

DocumentTypeCategory

public DocumentTypeCategory(java.lang.Integer id,
                            java.lang.String name)

DocumentTypeCategory

public DocumentTypeCategory(DocumentTypeCategory dtc)
Method Detail

getDocumentTypeCategoryById

public static DocumentTypeCategory getDocumentTypeCategoryById(java.lang.Integer id)

isSystemType

public static boolean isSystemType(DocumentType documentType)
Determine if a DocumentType is a system controlled type

Parameters:
documentType - A document type
Returns:
true if the doc type is a system type, false otherwise

isSystemCategory

public static boolean isSystemCategory(com.jamasoftware.contour.service.dto.property.DocumentTypeCategoryPropertyDTO category)

isPermissionType

public static boolean isPermissionType(DocumentType documentType)
Determine if a DocumentType is a permission type (a "permission" type is any type of document where permissions are placed)

Parameters:
documentType - The DocumentType
Returns:
true if the given doc type is permission type, false otherwise

isPermissionCategory

public static boolean isPermissionCategory(DocumentTypeCategory category)
Given a category id (from DocumentType.getCategory()), returns whether or not the category represents a permission type (where permissions can be specified)

Parameters:
category - The category of a DocumentType
Returns:
true if the category is a permission category, false otherwise

isChildTypeType

public static boolean isChildTypeType(DocumentType documentType)
Determine if a DocumentType is a childType type

Parameters:
documentType - The DocumentType
Returns:
true if the given doc type is childType type, false otherwise

isChildTypeCategory

public static boolean isChildTypeCategory(DocumentTypeCategory category)
Given a category id (from DocumentType.getCategory()), returns whether or not the category represents a type that has a specified child document type. Documents of a type with this category can expect Document.getChildDocumentType() to always be populated

Parameters:
category - The category of a DocumentType
Returns:
true if the category is a child type category, false otherwise

isFolderType

public static boolean isFolderType(DocumentType documentType)
Determine if a DocumentType is a folder type

Parameters:
documentType - The DocumentType
Returns:
true if the given doc type is folder type, false otherwise

isFolderCategory

public static boolean isFolderCategory(DocumentTypeCategory category)
Given a DocumentType.getCategory(), returns whether or not the category represents a folder type

Parameters:
category - The category of a DocumentType
Returns:
true if the category is a folder category, false otherwise

isNoRelationshipType

public static boolean isNoRelationshipType(DocumentType documentType)
Determine if a DocumentType is a no-relationship type

Parameters:
documentType - The DocumentType
Returns:
true if the given doc type is no-relationship type, false otherwise

isNoRelationshipCategory

public static boolean isNoRelationshipCategory(DocumentTypeCategory category)
Given a DocumentType.getCategory(), returns whether or not the category represents a system type that is not allowed to have relationships

Parameters:
category - The category of a DocumentType
Returns:
true if the category is not allowed to have relationships, false otherwise

isNoItemSyncAllowedCategory

public static boolean isNoItemSyncAllowedCategory(DocumentTypeCategory category)

isItemSyncAllowed

public static boolean isItemSyncAllowed(DocumentType documentType)

isTestCenterTypeCategory

public static boolean isTestCenterTypeCategory(DocumentTypeCategory category)

isCategory

public static boolean isCategory(DocumentType docType,
                                 DocumentTypeCategory category)

isCategory

public static boolean isCategory(DocumentTypeCategory docTypeCategory,
                                 DocumentTypeCategory category)

getId

public java.lang.Integer getId()
Specified by:
getId in interface DomainObjectBase

setId

public void setId(java.lang.Integer id)
Specified by:
setId in interface DomainObjectBase

getName

public java.lang.String getName()

setName

public void setName(java.lang.String name)

getOrganizationId

public java.lang.Integer getOrganizationId()
Specified by:
getOrganizationId in interface DomainObjectBase
Specified by:
getOrganizationId in interface OrganizationAware

setOrganizationId

public void setOrganizationId(java.lang.Integer organizationId)
Specified by:
setOrganizationId in interface DomainObjectBase

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object


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