org.faktorips.runtime
Interface IProductComponent

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

public interface IProductComponent
extends IRuntimeObject, IProductComponentLinkSource

Interface for all product components.

Author:
Jan Ortmann

Method Summary
 IConfigurableModelObject createPolicyComponent()
          Creates a new policy component that is configured by this product component.
 IProductComponentGeneration getGenerationBase(Calendar effectiveDate)
          Returns the generation that is effective on the given date or null if no generation is effective on that date.
 String getId()
          Returns the product component's id that uniquely identifies it in the repository it belongs to.
 String getKindId()
          Returns the id of the product component kind that this product component belongs to.
 IProductComponentGeneration getLatestProductComponentGeneration()
          Returns the latest product component generation of the provided product component or null if non available.
 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.
 IRuntimeRepository getRepository()
          Returns the repository this product component belongs to.
 DateTime getValidFrom()
          Returns the date from which this product component is valid.
 Date getValidFrom(TimeZone timeZone)
          Returns the date from which this product component is valid as a Date.
 DateTime getValidTo()
          Returns the date when this product component expires.
 String getVersionId()
          Returns the version id that identifies this product component in its kind.
 boolean isChangingOverTime()
          Returns true if this product component has product component generations.
 
Methods inherited from interface org.faktorips.runtime.IRuntimeObject
getExtensionPropertyIds, getExtensionPropertyValue
 

Method Detail

getRepository

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

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

getId

String getId()
Returns the product component's id that uniquely identifies it in the repository it belongs to.


getKindId

String getKindId()
Returns the id of the product component kind that this product component belongs to.


getVersionId

String getVersionId()
Returns the version id that identifies this product component in its kind.


getValidFrom

DateTime getValidFrom()
Returns the date from which this product component is valid. If this product component supports generations this is the same valid from date as the first generation.

Returns:
The valid from date of this product component

getValidFrom

Date getValidFrom(TimeZone timeZone)
Returns the date from which this product component is valid as a Date. If this product component supports generations this is the same valid from date as the first generation.

Parameters:
timeZone - The time zone which is used to calculate the returned valid from date.
Returns:
The valid from date of this product component

getValidTo

DateTime getValidTo()
Returns the date when this product component expires. Returning null means no end of the validity period.


getGenerationBase

IProductComponentGeneration getGenerationBase(Calendar effectiveDate)
Returns the generation that is effective on the given date or null if no generation is effective on that date.

Throws:
UnsupportedOperationException - if this product component has no product component generations.
NullPointerException - if effective date is null.

getLatestProductComponentGeneration

IProductComponentGeneration getLatestProductComponentGeneration()
Returns the latest product component generation of the provided product component or null if non available.

Throws:
UnsupportedOperationException - if this product component has no product component generations.

createPolicyComponent

IConfigurableModelObject createPolicyComponent()
Creates a new policy component that is configured by this product component.


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.

Since:
3.8

getLinks

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

Since:
3.8

isChangingOverTime

boolean isChangingOverTime()
Returns true if this product component has product component generations.

Since:
3.15


Copyright © 2015. All rights reserved.