public class ProcessCommon
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
ALL_PROPERTIES
Property collection identifier indicating all properties.
|
static int |
MINIMAL_PROPERTIES
Property collection identifier indicating a minimal set of required
properties.
|
static java.lang.String |
PLUGIN_ID
Id of the bundle to which this class belongs.
|
Constructor and Description |
---|
ProcessCommon() |
Modifier and Type | Method and Description |
---|---|
static IOperationReport |
cloneReport(IOperationReport toClone)
Returns a copy of the given operation report.
|
static IItemChangeReport |
createItemChangeReport()
Creates a new item change report.
|
static IItemsResponse |
createItemsResponse()
Creates a new items response which can be used to send persistable items
across the wire along with an operation report.
|
static IObjectsResponse |
createObjectsResponse()
Creates a new objects response which can be used to send data transfer
objects (DTOs) across the wire along with an operation report.
|
static java.lang.String |
getPropertyName(java.lang.Class clazz,
java.lang.String propertyId)
Returns the name of the property with the given property id for instances
of
IProjectArea , ITeamArea , IProcessArea ,
IProcessDefinition , IProcessDomainDefinition ,
IDevelopmentLine , IIteration , and
IIterationType . |
static boolean |
requiredPropertiesSet(IProcessItem item,
int propertyCollectionId)
Returns whether the supplied process item has at least the properties set
that are indicated by one of
ALL_PROPERTIES or
MINIMAL_PROPERTIES . |
public static final java.lang.String PLUGIN_ID
public static final int ALL_PROPERTIES
public static final int MINIMAL_PROPERTIES
public static IItemsResponse createItemsResponse()
public static IObjectsResponse createObjectsResponse()
public static IItemChangeReport createItemChangeReport()
public static IOperationReport cloneReport(IOperationReport toClone)
By storing a copy of the report in response DTOs, we thus avoid breaking the nesting of reports.
report
- the report to clonepublic static java.lang.String getPropertyName(java.lang.Class clazz, java.lang.String propertyId)
IProjectArea
, ITeamArea
, IProcessArea
,
IProcessDefinition
, IProcessDomainDefinition
,
IDevelopmentLine
, IIteration
, and
IIterationType
. If the given class is not one of these an
IllegalArgumentException
is thrown. The method returns
null
if no such property is defined.clazz
- the interface clazzpropertyId
- the property idnull
if no such property is definedjava.lang.IllegalArgumentException
- if the clazz is not of the supported
typespublic static boolean requiredPropertiesSet(IProcessItem item, int propertyCollectionId)
ALL_PROPERTIES
or
MINIMAL_PROPERTIES
.item
- the item to checkpropertyCollectionId
- the property collection identifier to ensure
that this item has set.