public interface ISyncRule extends ISyncRuleHandle, IAuditable
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ENABLED_TEAM_AREAS_PROPERTY
The enabled team areas property.
|
static java.lang.String |
EXTERNAL_MANAGER_PROPERTY
The external manager property.
|
static java.lang.String |
EXTERNAL_REPOSITORY_PROPERTY
The external repository property.
|
static java.lang.String |
EXTERNAL_TYPE_NAME_PROPERTY
The external type name property.
|
static java.lang.String |
ITEM_MANAGER_PROPERTY
The item manager property.
|
static IItemType |
ITEM_TYPE
SyncRule item type.
|
static java.lang.String |
MAX_CYCLE_COUNT_PROPERTY
The maximum cycle count property.
|
static java.lang.String |
NAME_PROPERTY
The name property.
|
static java.lang.String |
PROJECT_AREA_PROPERTY
The project area property.
|
static java.lang.String |
PROPERTY_MAPPINGS_PROPERTY
The property mappings property.
|
static java.lang.String |
SYNC_ALL_ITEM_STATES_PROPERTY
The sync all item states property.
|
static java.lang.String |
SYNC_INFO_PROPERTY
The sync info property, for getting the last search time and
synchronization enabled flags.
|
static java.lang.String |
SYNC_ITEM_TYPE_PROPERTY
The sync item type property.
|
static java.lang.String |
SYNC_ITEM_TYPE_QUALIFIER_PROPERTY
The sync item type qualifier property.
|
MERGE_PREDECESSOR_STATE_PROPERTY, PREDECESSOR_STATE_PROPERTY
CONTEXT_ID_PROPERTY, ITEM_ID_PROPERTY, MAX_LARGE_STRING_BYTES, MAX_MEDIUM_STRING_BYTES, MAX_SMALL_STRING_BYTES, MODIFIED_BY_PROPERTY, MODIFIED_PROPERTY, STATE_ID_PROPERTY
Modifier and Type | Method and Description |
---|---|
IPropertyMapping[] |
addCandidatePropertyMappings(ITypeInfoDTO itemTypeInfo,
ITypeInfoDTO externalTypeInfo,
boolean mappedOnly)
Add mappings for the properties of item and/or external types.
|
IValueMapping[] |
addCandidateValueMappings(IPropertyMapping propertyMapping,
IPropertyInfoDTO itemPropertyInfo,
IPropertyInfoDTO externalPropertyInfo,
boolean mappedOnly)
Add mappings for the possible values of an item and/or external property.
|
void |
addPropertyMappings(IPropertyMapping[] mappings)
Add property mappings to the current set of mappings for this
synchronization rule.
|
void |
exportDefinition(java.io.Writer output)
Export an external definition of this synchronization rule.
|
java.util.List<ITeamAreaHandle> |
getEnabledTeamAreas()
Get any team areas that have been explicitly enabled for outgoing
synchronization of unconnected artifacts.
|
IPropertyMapping |
getExternalIdentifierPropertyMapping()
Get the mapping for a property that is used as an identifier for finding
existing external objects, if any.
|
java.lang.String |
getExternalManager()
Get the name of the external manager (if any) to use when fetching,
creating, or updating external objects.
|
IPropertyMapping |
getExternalModifierPropertyMapping()
Get the mapping for a property that is used to identify the user that
was responsible for the external object modifications that a particular
external state represents.
|
IPropertyMapping |
getExternalPropertyMapping(java.lang.String externalPropertyName)
Get the mapping for a particular external property, if one exists.
|
IExternalRepositoryConnectionHandle |
getExternalRepository()
Get any external repository connection info needed for the external
objects covered by this synchronization rule.
|
java.lang.String |
getExternalTypeName()
Get the external object type name this synchronization rule applies to,
if any.
|
IPropertyMapping |
getItemIdentifierPropertyMapping()
Get the mapping for a property that is used as an identifier for finding
existing Jazz items, if any.
|
java.lang.String |
getItemManager()
Get the name of the item manager (if any) to use when fetching,
creating, or updating Jazz items.
|
IPropertyMapping |
getItemPropertyMapping(java.lang.String itemPropertyName)
Get the mapping for a particular item property, if one exists.
|
int |
getMaxCycleCount()
Get the cycle count limit for this synchronization rule.
|
java.lang.String |
getName()
Get the name of this synchronization rule.
|
IProjectAreaHandle |
getProjectArea()
Get the project area that the synchronization rule is associated with.
|
java.util.List |
getPropertyMappings()
Get the property mappings for this synchronization rule.
|
java.lang.String |
getQualifiedSyncItemTypeName()
Get the name of the Jazz item type that this synchronization rule applies to,
in the form "namespace.name".
|
IItemType |
getSyncItemType()
Get the Jazz item type that this synchronization rule applies to, if any.
|
java.lang.String |
getSyncItemTypeQualifier()
Get any further qualification of the item type that this synchronization
rule applies to, if any.
|
void |
importDefinition(java.io.Reader input)
Import an external definition of a synchronization rule into this
object.
|
boolean |
isSyncAllItemStates()
Determine whether all item states should be synchronized out to an
external object.
|
void |
setExternalManager(java.lang.String value)
Set the name of the external manager.
|
void |
setExternalRepository(IExternalRepositoryConnectionHandle externalConnectionHandle)
Associate or unassociate external repository connection info with this
synchronization rule.
|
void |
setExternalTypeName(java.lang.String typeName)
Set the external object type name that this synchronization rule applies
to.
|
void |
setItemManager(java.lang.String value)
Set the name of the item manager.
|
void |
setMaxCycleCount(int value)
Set the cycle count limit for this sychronization rule.
|
void |
setName(java.lang.String name)
Set the name of this synchronization rule.
|
void |
setProjectArea(IProjectAreaHandle projectAreaHandle)
Set the project area that this synchronization rule should be associated
with.
|
void |
setPropertyMappings(IPropertyMapping[] mappings)
Set the property mappings for this synchronization rule, completely
replacing any existing mappings.
|
void |
setQualifiedSyncItemTypeName(java.lang.String qualifiedName)
Set the type of Jazz item that this synchronization rule applies to,
using a qualified name of the form "namespace.name".
|
void |
setSyncAllItemStates(boolean syncAll)
Set whether all item states of an item with history should be
synchronized out to an external object.
|
void |
setSyncItemType(IItemType value)
Set the type of Jazz item that this synchronization rule applies to.
|
void |
setSyncItemType(java.lang.String namespace,
java.lang.String name)
Set the type of Jazz item that this synchronization rule applies to,
using the namespace and name of the item type.
|
void |
setSyncItemTypeQualifier(java.lang.String qualifier)
Set an item type qualifier to restrict this synchronization rule to
apply to only certain items of the type identified by
getSyncItemType() . |
getMergePredecessorState, getPredecessorState
isNewItem
getContextId, getItemHandle, getModifiedBy, getRedactedCopy, getRequestedModified, getRequestedStateId, getStateHandle, getWorkingCopy, hasHistory, isComplete, isPropertySet, isRedactedCopy, isWorkingCopy, modified, setContextId, setRequestedModified, setRequestedStateId
equals, getAdapter, getFullState, getItemId, getItemType, getOrigin, getStateId, hasFullState, hasStateId, isAuditable, isConfigurationAware, isImmutable, isSimple, isUnmanaged, makeImmutable, protect, sameItemId, sameStateId, size
static final IItemType ITEM_TYPE
static final java.lang.String NAME_PROPERTY
getName()
static final java.lang.String EXTERNAL_TYPE_NAME_PROPERTY
getExternalTypeName()
static final java.lang.String SYNC_ITEM_TYPE_PROPERTY
getSyncItemType()
static final java.lang.String SYNC_ITEM_TYPE_QUALIFIER_PROPERTY
getSyncItemTypeQualifier()
static final java.lang.String PROPERTY_MAPPINGS_PROPERTY
getPropertyMappings()
static final java.lang.String ITEM_MANAGER_PROPERTY
getItemManager()
static final java.lang.String EXTERNAL_MANAGER_PROPERTY
getExternalManager()
static final java.lang.String PROJECT_AREA_PROPERTY
getProjectArea()
static final java.lang.String MAX_CYCLE_COUNT_PROPERTY
getMaxCycleCount()
static final java.lang.String SYNC_INFO_PROPERTY
static final java.lang.String SYNC_ALL_ITEM_STATES_PROPERTY
isSyncAllItemStates()
static final java.lang.String ENABLED_TEAM_AREAS_PROPERTY
getEnabledTeamAreas()
static final java.lang.String EXTERNAL_REPOSITORY_PROPERTY
getExternalRepository()
java.lang.String getName()
void setName(java.lang.String name)
value
- the sync rule name; never null
java.lang.String getExternalTypeName()
null
or the empty string if unspecifiedvoid setExternalTypeName(java.lang.String typeName)
typeName
- the external object type name that this synchronization
rule applies to; may be null
or the empty string to
clear this propertyIItemType getSyncItemType()
null
if there is no synchronization, just
replicationjava.lang.String getQualifiedSyncItemTypeName()
null
if there is no synchronization, just replicationvoid setSyncItemType(IItemType value)
value
- the type of Jazz item that is synchronized with an external
object, or null
if no synchronization occursvoid setQualifiedSyncItemTypeName(java.lang.String qualifiedName)
qualifiedName
- the qualified name of the item type, or null
to clear the item typevoid setSyncItemType(java.lang.String namespace, java.lang.String name)
namespace
- the namespace for the item type, or null
to clear the item typename
- the simple name of the item type, or null
to clear the item typejava.lang.String getSyncItemTypeQualifier()
null
or empty, then the synchronization rule applies to
all items of the type identified by getSyncItemType()
.null
or empty if nonevoid setSyncItemTypeQualifier(java.lang.String qualifier)
getSyncItemType()
.
qualifier
- the qualifier for selecting items that this synchronization
rule will apply to; null
or empty for no qualificationgetSyncItemType()
boolean isSyncAllItemStates()
false
, only the current state of an
item is considered when changes are detected for outgoing synchronization.
If true
, and the item maintains history, then all states
created since the last time the item was synchronized out (all existing
state the first time it is synchronized) are "replayed" to the external
object.
The default value for this property is false
.
true
if all states of an item with history should
be synchronized out to an external object, false
if
only the current state should be synchronized outvoid setSyncAllItemStates(boolean syncAll)
syncAll
- true
to synchronize all item state out to an
external object, false
to synchronize only the current
stateisSyncAllItemStates()
java.util.List getPropertyMappings()
#IPropertyMapping
.null
, but may be
emptyIPropertyMapping getItemPropertyMapping(java.lang.String itemPropertyName)
itemPropertyName
- the name of the item propertynull
if
none was foundIPropertyMapping getExternalPropertyMapping(java.lang.String externalPropertyName)
externalPropertyName
- the name of the external propertynull
if
none was foundIPropertyMapping getItemIdentifierPropertyMapping()
null
if noneIPropertyMapping getExternalIdentifierPropertyMapping()
null
if noneIPropertyMapping getExternalModifierPropertyMapping()
null
if nonevoid setPropertyMappings(IPropertyMapping[] mappings)
mappings
- new list of property mappings; never null
void addPropertyMappings(IPropertyMapping[] mappings)
mappings
- array of mappings to add/replace; never null
IPropertyMapping[] addCandidatePropertyMappings(ITypeInfoDTO itemTypeInfo, ITypeInfoDTO externalTypeInfo, boolean mappedOnly)
mappedOnly
argument is
true, only properties that could be mapped are added, otherwise all item properties
are added, whether they could be mapped or not. If no item type info is supplied,
then all external properties are added.itemTypeInfo
- information about the item type's properties, or null
if item type info not knownexternalTypeInfo
- information about the external type's properties; must not
be null
mappedOnly
- if itemTypeInfo
is not null
, then
true
means to add only item properties that could be mapped to external
properties, and false
means to add all item propertiesnull
; may be emptyIValueMapping[] addCandidateValueMappings(IPropertyMapping propertyMapping, IPropertyInfoDTO itemPropertyInfo, IPropertyInfoDTO externalPropertyInfo, boolean mappedOnly)
mappedOnly
argument is
true, only values that could be mapped are added, otherwise all item values are
added, whether they could be mapped or not. If no item property info is supplied,
then all external values are added.propertyMapping
- the property mappings to add value mappings toitemPropertyInfo
- information about the allowed property values, or
null
if item property info not knownexternalPropertyInfo
- information about the external property values;
must not be null
mappedOnly
- if itemPropertyInfo
is not null
,
then true
means to add only item properties that could be mapped
to external properties, and false
means to add all item propertiesnull
; may be emptyjava.lang.String getItemManager()
null
or the empty string if no incoming synchronization is configuredvoid setItemManager(java.lang.String value)
value
- the name of the item manager; null
or the
empty string if there is no incoming synchronizationjava.lang.String getExternalManager()
null
or the empty string if no outgoing synchronization is configuredvoid setExternalManager(java.lang.String value)
value
- the name of the external manager; null
or the empty string if there is no outgoing synchronizationint getMaxCycleCount()
IExternalProxy#STATUS_CYCLE
, so
it is one greater than the number of permitted cycles. The default value
is 0, which allows 1 cycle.void setMaxCycleCount(int value)
getMaxCycleCount()
for a description of the value.value
- the new cycle count limit; must be non-negativeIProjectAreaHandle getProjectArea()
null
void setProjectArea(IProjectAreaHandle projectAreaHandle)
projectAreaHandle
- handle for the project area, or null
to unassociate the synchronization rule with any project areajava.util.List<ITeamAreaHandle> getEnabledTeamAreas()
This affects whether external connections are attempted for artifacts that currently have no external connection. When an unconnected artifact is created or modified, and there is a synchronization rule that applies to the artifact in the project area associated with the artifact, then if the synchronization rule has any explicitly enabled team areas, the artifact must also be associated with one of the team areas in order to be considered for connection to an external object.
To modify the list of explicitly enabled team areas, use this method to retrieve the list, then operate on the list directly.
null
IExternalRepositoryConnectionHandle getExternalRepository()
null
void setExternalRepository(IExternalRepositoryConnectionHandle externalConnectionHandle)
externalConnectionHandle
- handle for an IExternalRepositoryConnection
item, or null
to clear any referencegetExternalRepository()
void importDefinition(java.io.Reader input) throws TeamRepositoryException
The external definition format is XML, with the schema defined in the schema/syncrule.xsd file. Note that a definition need not be complete; most elements are optional. Whatever properties are present in the definition will be applied to this object, so this is really just a way of setting properties.
Note that if the input is coming from byte-oriented media, since UTF-8 encoding is assumed, the input Reader must be configured to use the UTF-8 character set for decoding bytes into characters.
input
- a reader for the source of the imported definitionTeamRepositoryException
- if the definition is invalidvoid exportDefinition(java.io.Writer output) throws TeamRepositoryException
The external definition format is XML, with the schema defined in the schema/syncrule.xsd file.
Note that if the output is going to byte-oriented media, since UTF-8 encoding is assumed, the output Writer must be configured to use the UTF-8 character set for encoding characters into bytes.
output
- a writer for the destination of the exported definitionTeamRepositoryException
- if there is an output error