Package org.faktorips.runtime
Interface IProductObject
- All Superinterfaces:
IProductComponentLinkSource
- All Known Subinterfaces:
IProductComponent,IProductComponentGeneration
- All Known Implementing Classes:
ProductComponent,ProductComponentGeneration
Common interface for
IProductComponent and IProductComponentGeneration.-
Method Summary
Modifier and TypeMethodDescriptionCreates a new policy component that is configured by this product component generation.Returns the date from which this generation is valid.getValidFrom(TimeZone zone) Returns the point in time this generation is valid from in the given time zone.booleanisValidationRuleActivated(String ruleName) Returns whether the validation rule with the given name is configured as active in thisIProductObject.voidsetValidationRuleActivated(String ruleName, boolean active) Enables or disables validation for a specific rule.Methods inherited from interface org.faktorips.runtime.IProductComponentLinkSource
getLink, getLinks, getRepository
-
Method Details
-
createPolicyComponent
IConfigurableModelObject createPolicyComponent()Creates a new policy component that is configured by this product component generation. After creating the policy component it is automatically initialized. The new policy component is not added to any parent structure.- Throws:
RuntimeException- if this product component does not configure a policy component.
-
getValidFrom
DateTime getValidFrom()Returns the date from which this generation is valid.- Returns:
- The valid from date of this generation
-
getValidFrom
Returns the point in time this generation is valid from in the given time zone. This method never returnsnull.- Throws:
NullPointerException- if zone isnull.
-
isValidationRuleActivated
Returns whether the validation rule with the given name is configured as active in thisIProductObject. If there is no configuration for the given rule,falseis returned.Please be aware that only one of
IProductComponentorIProductComponentGenerationcan configure any given rule depending on its changing-over-time configuration.- Parameters:
ruleName- the name of the rule in question- Returns:
trueif the rule was activated,falseelse.- Since:
- 3.22
-
setValidationRuleActivated
Enables or disables validation for a specific rule.- Parameters:
ruleName- the name of the rule in questionactive- indicating whether the validation rule is configured as active- Throws:
IllegalRepositoryModificationException- if theIRuntimeRepositorycontaining thisIProductObjectis notmodifiable- Since:
- 3.22
-