public abstract class ProductComponent extends RuntimeObject implements IProductComponent, IXmlPersistenceSupport
Deliberately implements IXmlPersistenceSupport directly. Letting
IProductComponent extend IXmlPersistenceSupport would have published it, which is
undesired.
| Constructor and Description |
|---|
ProductComponent(IRuntimeRepository repository,
String id,
String productKindId,
String versionId)
Creates a new product component with the indicate id, kind id and version id.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
doInitPropertiesFromXml(Map<String,Element> map)
Initializes the properties with the data in the map.
|
protected void |
doInitReferencesFromXml(Map<String,List<Element>> linkElements) |
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 |
getValidTo()
Returns the date when this product component expires.
|
String |
getVersionId()
Returns the version id that identifies this product component in its kind.
|
void |
initFromXml(Element cmptElement)
Initializes the generation with the data from the xml element.
|
void |
setValidTo(DateTime validTo) |
String |
toString() |
Element |
toXml(Document document)
Creates an XML
Element that represents this product component's data. |
Element |
toXml(Document document,
boolean includeGenerations)
Creates an XML
Element that represents this product component's data. |
protected void |
writePropertiesToXml(Element element)
Subclasses override this method to write their properties into the given XML element.
|
protected void |
writeReferencesToXml(Element element)
This is a utility method called by generated code.
|
getExtensionPropertyIds, getExtensionPropertyValue, initExtensionPropertiesFromXml, writeExtensionPropertiesToXml, writeExtensionPropertiesToXmlclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcreatePolicyComponentgetExtensionPropertyIds, getExtensionPropertyValuepublic ProductComponent(IRuntimeRepository repository, String id, String productKindId, String versionId)
repository - The component registry the component uses to resolve references to other
components.id - The component's runtime id.productKindId - The component's kind idversionId - The component's version idNullPointerException - if repository, id, productKindId, or versionId is
null.public String getKindId()
IProductComponentgetKindId in interface IProductComponentpublic String getVersionId()
IProductComponentgetVersionId in interface IProductComponentpublic final String getId()
IProductComponentgetId in interface IProductComponentpublic DateTime getValidTo()
IProductComponentnull means no
end of the validity period.getValidTo in interface IProductComponentpublic void setValidTo(DateTime validTo)
public IRuntimeRepository getRepository()
IProductComponentnull.getRepository in interface IProductComponentgetRepository in interface IProductComponentLinkSourceIRuntimeRepository that was used to create this
IProductComponentLinkSourcepublic IProductComponentGeneration getGenerationBase(Calendar effectiveDate)
IProductComponentnull if no
generation is effective on that date.getGenerationBase in interface IProductComponentpublic IProductComponentGeneration getLatestProductComponentGeneration()
IProductComponentnull if non available.getLatestProductComponentGeneration in interface IProductComponentpublic void initFromXml(Element cmptElement)
initFromXml in interface IClRepositoryObjectNullPointerException - if cmptElement is null.protected void doInitReferencesFromXml(Map<String,List<Element>> linkElements)
linkElements - the XML elements used to initialize ProductComponentLink
instances.protected void doInitPropertiesFromXml(Map<String,Element> map)
map - the map of property elementspublic Element toXml(Document document)
Element that represents this product component's data.
Throws an UnsupportedOperationException if the support for toXml
("Generate toXml Support") is not activated in the FIPS standard builder.toXml in interface IXmlPersistenceSupportdocument - a document, that can be used to create XML elements.Element that represents this object as XML elementpublic Element toXml(Document document, boolean includeGenerations)
Element that represents this product component's data.
Throws an UnsupportedOperationException if the support for toXml
("Generate toXml Support") is not activated in the FIPS standard builder.document - a document, that can be used to create XML elements.includeGenerations - true if the created XML element should include the
data of all the product component's generations, false if generations
should be ignored when creating the XML output.protected void writePropertiesToXml(Element element)
UnsupportedOperationException if the support
for toXml ("Generate toXml Support") is not activated in the FIPS standard builder. Generated
classes override but do NOT call super.element - the XML element to write the properties topublic IProductComponentLink<? extends IProductComponent> getLink(String linkName, IProductComponent target)
IProductComponentIProductComponentLink for the association with the given role name
to the given product component or null if no such association exists.getLink in interface IProductComponentpublic List<IProductComponentLink<? extends IProductComponent>> getLinks()
IProductComponentList of all the IProductComponentLinks from this product
component generation to other product components.getLinks in interface IProductComponentprotected void writeReferencesToXml(Element element)
Element is the element
representing this ProductComponentGeneration.element - the element all table usages should be added toCopyright © 2014. All rights reserved.