Interface IStructure
- All Superinterfaces:
IChangeGenerator
,IChangeListener
,IHasCustomValues
,IHasValues
- All Known Subinterfaces:
IApprovalStruct
,IBaselineCollectionElement
,IBuildDeploymentArtifact
,IBuildEvent
,IBuildEvents
,IBuildLinkedWorkItemStruct
,IBuildTestResults
,IExternallyLinkedWorkItemStruct
,IFeatureSelection
,IFeatureSelectionItem
,IHyperlinkStruct
,ILinkedOslcResourceStruct
,ILinkedRevisionStruct
,ILinkedWorkItemStruct
,IModule.IOutlineNumberingDef
,IModule.IRenderingLayoutStruct
,IModule.IStructureNode
,IModuleComment.IImportedCommentStruct
,IParameterDefinitionStruct
,IParametersAndDefinitionsStruct
,IParameterStruct<T>
,IPlanningConstraintStruct
,IPlanRecord
,IRow
,ISignature
,ISignatureData
,ITable
,ITestRecord
,ITestStep
,ITestStepResult
,ITestSteps
- All Known Implementing Classes:
Structure
Structure, which wraps underlying
Map
in from IDataObject
to the level of the IPObject
s.
It has several functions:
- Translates
SubterraURI
s toIPObject
s (in case of reference type keys). - Propagates the dirty flag to the owner object.
- Checks the type of inserted items against model.
- Protects the read only collections.
-
Method Summary
Modifier and TypeMethodDescriptiongetEnumeration
(String key) Returns theIEnumeration
if this one was registered for specific key ornull
.getEnumerationOptionForField
(String key, String optionId) Returns wrapped enumeration option for given field.Returns the wrapped value.boolean
boolean
boolean
isReadOnly
(String key) void
Methods inherited from interface com.polarion.platform.persistence.model.IChangeGenerator
setChangeOwner
Methods inherited from interface com.polarion.platform.persistence.model.IChangeListener
markChanged
Methods inherited from interface com.polarion.platform.persistence.model.IHasCustomValues
getCustomField, getCustomFieldPrototype, getCustomFieldsList, setCustomField
-
Method Details
-
getPrototype
IStructType getPrototype() -
getValue
Returns the wrapped value.- Specified by:
getValue
in interfaceIHasValues
- Parameters:
key
-
-
setValue
- Specified by:
setValue
in interfaceIHasValues
-
isReadOnly
boolean isReadOnly()- Returns:
true
if the whole structure is read-only,false
otherwise.- See Also:
-
isReadOnly
- Returns:
true
if the whole structure is read-only or if the given key is defined and is read-only,false
otherwise.- See Also:
-
isModified
boolean isModified()- Returns:
True
is this object was modified since it's load,false
otherwise.- Since:
- 3.2.0
-
getEnumeration
Returns theIEnumeration
if this one was registered for specific key ornull
.This is a convenience method, which calls the appropriate method on the
IDataService
- Parameters:
key
- the key of some field of the structure- Returns:
- the enumeration factory or
null
-
getEnumerationTypeForField
- Returns:
- the Optional of
IEnumType
for the given field if it is of enum or multi-enum type, otherwise returns Optional.empty(). - Since:
- 3.21.1
-
getEnumerationOptionForField
Returns wrapped enumeration option for given field.- Parameters:
key
- field name (notnull
)optionId
- option id- Returns:
- wrapped option (
null
if and only ifoptionId
isnull
) - Throws:
UnknownKeyException
- if the field is not valid or of enumeration type- Since:
- 3.21.2
- See Also:
-