org.faktorips.runtime
Interface IProductComponentGeneration

All Superinterfaces:
IProductComponentLinkSource, IRuntimeObject
All Known Implementing Classes:
ProductComponentGeneration

public interface IProductComponentGeneration
extends IRuntimeObject, IProductComponentLinkSource

A product component generation represents the state of a product component valid for a period of time. The period's begins is defined by the generation's valid from date. The period ends at the next generation's valid from date. A product component's generation periods are none overlapping. For a given point in time exactly one (or none) generation is found.

Author:
Jan Ortmann

Method Summary
 IConfigurableModelObject createPolicyComponent()
          Creates a new policy component that is configured by this product component generation.
 IProductComponentLink<? extends IProductComponent> getLink(String linkName, IProductComponent target)
          Returns the IProductComponentLink for the association with the given role name to the given product component or null if no such association exists.
 List<IProductComponentLink<? extends IProductComponent>> getLinks()
          Returns a List of all the IProductComponentLinks from this product component generation to other product components.
 IProductComponentGeneration getNextGeneration()
          Returns the next generation if available if not null will be returned.
 IProductComponentGeneration getPreviousGeneration()
          Returns the previous generation if available if not null will be returned.
 IProductComponent getProductComponent()
          Returns the product component this generation belongs to.
 IRuntimeRepository getRepository()
          Returns the repository this product component generation belongs to.
 DateTime getValidFrom()
          Returns the date from which this generation is valid.
 Date getValidFrom(TimeZone zone)
          Returns the point in time this generation is valid from in the given time zone.
 boolean isValidationRuleActivated(String ruleName)
          Returns whether the validation rule with the given name is configured as active in this ProductComponent.
 
Methods inherited from interface org.faktorips.runtime.IRuntimeObject
getExtensionPropertyIds, getExtensionPropertyValue
 

Method Detail

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.

getRepository

IRuntimeRepository getRepository()
Returns the repository this product component generation belongs to. This method never returns null.

Specified by:
getRepository in interface IProductComponentLinkSource
Returns:
The IRuntimeRepository that was used to create this IProductComponentLinkSource

getProductComponent

IProductComponent getProductComponent()
Returns the product component this generation belongs to. This method never returns null.


getPreviousGeneration

IProductComponentGeneration getPreviousGeneration()
Returns the previous generation if available if not null will be returned.


getNextGeneration

IProductComponentGeneration getNextGeneration()
Returns the next generation if available if not null will be returned.


getValidFrom

DateTime getValidFrom()
Returns the date from which this generation is valid.

Returns:
The valid from date of this generation

getValidFrom

Date getValidFrom(TimeZone zone)
Returns the point in time this generation is valid from in the given time zone. This method never returns null.

Throws:
NullPointerException - if zone is null.

getLink

IProductComponentLink<? extends IProductComponent> getLink(String linkName,
                                                           IProductComponent target)
Returns the IProductComponentLink for the association with the given role name to the given product component or null if no such association exists.


getLinks

List<IProductComponentLink<? extends IProductComponent>> getLinks()
Returns a List of all the IProductComponentLinks from this product component generation to other product components.


isValidationRuleActivated

boolean isValidationRuleActivated(String ruleName)
Returns whether the validation rule with the given name is configured as active in this ProductComponent.

Parameters:
ruleName - the name of the rule in question
Returns:
true if the rule was activated, false else.


Copyright © 2015. All rights reserved.