Package com.ptc.windchill.esi.rnd
Interface VdbBuilder
- All Known Implementing Classes:
VdbBuilderImpl
public interface VdbBuilder
Declares the APIs for VDB builder.
Supported API: true
Extendable: false
Supported API: true
Extendable: false
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddElement(String groupName, com.infoengine.object.factory.Element element, Persistable persistable, Collection targets) Adds an Element to a collection of elements.voidaddElement(String groupName, com.infoengine.object.factory.Element element, Persistable persistable, Persistable[] dependents, Collection targets) Adds an Element to a collection of elements.voidaddElement(String groupName, com.infoengine.object.factory.Element element, Persistable persistable, Persistable[] dependents, Map<MPMPartMgmtLink, String> linksToSnapshot, Collection targets) Creates a VdbElement containing an I*E Element and a Persistable.voidaddElement(String groupName, Persistable persistable, com.infoengine.object.factory.Element element, Map<MPMPartMgmtLink, String> linksToSnapshot, Collection targets) Creates a VdbElement containing an I*E Element and a Persistable.voidaddElements(String groupName, com.infoengine.object.factory.Element element, Persistable persistable, Map<Persistable, Optional<String>> dependentsInfo, Collection targets) Creates a VdbElement containing an I*E Element and a Persistable.voidaddGroupAndElement(String groupName, boolean isUnchanged, String elementName, ESITarget target) Checks if a group with the given name already exists in the current VDB builder instance.booleanaddWarning(String warning) Collect warnings across the transaction.com.infoengine.object.IeCollectionasVDB()Return the results of the calculations that were performed on the elements passed into addElement().Returns a handle to the primary business object in the given release..Returns the set of targets processed by a given instance VdbBuilder for the ESI Transaction.Return the value of the transaction number that was passed to the initialize() method.Ruturns the collection of warning messages collected during rendering process for the transaction in-process.voidinitialize(String transactionNumber) Make sure the object is ready for requests.booleanisEmpty()Returns a boolean response based on if groups are empty in the IeCollection.booleanisEmpty(boolean enforceChanges) Lets the caller know whether or not all the groups in the associated VdbContainer are empty.
-
Method Details
-
getPrimaryBusinessObject
Releasable getPrimaryBusinessObject()Returns a handle to the primary business object in the given release..
Supported API: true- Returns:
- A Releasable object that represents the primary business object in the given release.
-
initialize
Make sure the object is ready for requests. It is assumed that the implementation class will have a transactionID and methods that use the transaction ID.
Supported API: true- Parameters:
transactionNumber-
-
getTransactionNumber
String getTransactionNumber()Return the value of the transaction number that was passed to the initialize() method.
Supported API: true- Returns:
- String
-
addElement
void addElement(String groupName, com.infoengine.object.factory.Element element, Persistable persistable, Collection targets) throws ESIRendererException Adds an Element to a collection of elements. The collection is logically identified by the groupName argument.
Supported API: true- Parameters:
groupName- The logical group to which the element argument is to be added.element- The I*E element that is to be added to the group.persistable- The persistable, of which the element is a representation. May be null.targets- Collection of ESITarget objects.- Throws:
ESIRendererException
-
addElement
void addElement(String groupName, com.infoengine.object.factory.Element element, Persistable persistable, Persistable[] dependents, Collection targets) throws ESIRendererException Adds an Element to a collection of elements. The collection is logically identified by the groupName argument.
Supported API: true- Parameters:
groupName- The logical group to which the element argument is to be added.element- The I*E element that is to be added to the group.persistable- The persistable, of which the element is a representation. May be null.dependents- Dependent persistables, also of which the element is a representation. May be null.targets- Collection of ESITarget objects.- Throws:
ESIRendererException
-
addElement
void addElement(String groupName, com.infoengine.object.factory.Element element, Persistable persistable, Persistable[] dependents, Map<MPMPartMgmtLink, String> linksToSnapshot, Collection targets) throws ESIRendererExceptionCreates a VdbElement containing an I*E Element and a Persistable. Adds the VdbElement to a VdbGroup. The VdbGroup is logically identified by the groupName argument and by the currently processed ESITarget object.
Supported API: true- Parameters:
groupName- The logical group to which the element argument is to be added.element- The I*E element that is to be added to the group.persistable- The persistable, of which the element is a representation.dependents- Dependent persistables, also of which the element is a representation.linksToSnapshot- - Dependent links for which snapshot object is to be created and release class, of which the element is a representation.targets- Collection of ESITarget objects. This will be a singleton collection containing the currently processed target.- Throws:
ESIRendererException
-
addElement
void addElement(String groupName, Persistable persistable, com.infoengine.object.factory.Element element, Map<MPMPartMgmtLink, String> linksToSnapshot, Collection targets) throws ESIRendererExceptionCreates a VdbElement containing an I*E Element and a Persistable. Adds the VdbElement to a VdbGroup. The VdbGroup is logically identified by the groupName argument and by the currently processed ESITarget object.
Supported API: true- Parameters:
groupName- - The logical group to which the element argument is to be added.persistable- - The persistable, of which the element is a representation.element- - The I*E element that is to be added to the group.linksToSnapshot- - Dependent links for which snapshot object is to be created and release class, of which the element is a representation.targets- - Collection of ESITarget objects.- Throws:
ESIRendererException
-
asVDB
Return the results of the calculations that were performed on the elements passed into addElement().
Supported API: true- Returns:
- IeCollection
- Throws:
WTException
-
isEmpty
Returns a boolean response based on if groups are empty in the IeCollection.
Supported API: true- Returns:
- boolean
- Throws:
ESIRendererException
-
isEmpty
Lets the caller know whether or not all the groups in the associated VdbContainer are empty. This overloaded version differs from the other version in that it takes into account the value of the input argument while performing the check.
Supported API: true- Parameters:
enforceChanges- Specifies whether or not changes are to be enforced; this is typically the value of the preference "Enforce Changes".- Returns:
- boolean true, if all the groups in the associated VdbContainer are empty; false, otherwise.
- Throws:
ESIRendererException
-
addGroupAndElement
void addGroupAndElement(String groupName, boolean isUnchanged, String elementName, ESITarget target) throws MissingParameterException Checks if a group with the given name already exists in the current VDB builder instance. If one doesn't exist, the method creates a new group with the given name and adds it to the current VDB builder instance. Additionally, it checks if an element with the given name exists in the group indicated by the given group name. If one doesn't exist, it creates a new element with the given name and adds it to the group. This method should be invoked only after the VDB builder instance is updated for a target using the methodupdate(ESITarget).
Supported API: true- Parameters:
groupName- - Name of the group to be created and added to the VDB builder instance. This argument should not be null or empty.isUnchanged- - Specifies whether or not the input group would hold unchanged objects in the ESI response.elementName- - Name of the element to be added to the group indicated by the input argument "groupName".target- - ESITarget object for which the group and the element need to be added.- Throws:
MissingParameterException- If the input group name is either null or empty.
-
addElements
void addElements(String groupName, com.infoengine.object.factory.Element element, Persistable persistable, Map<Persistable, Optional<String>> dependentsInfo, Collection targets) throws ESIRendererExceptionCreates a VdbElement containing an I*E Element and a Persistable. Adds the VdbElement to a VdbGroup. The VdbGroup is logically identified by the groupName argument and by the currently processed ESITarget object.
Supported API: true- Parameters:
groupName- - The logical group to which the element argument is to be added.element- - The I*E element that is to be added to the group.persistable- - The persistable, of which the element is a representation. May be null.dependentsInfo- - Dependent objects information Map containing persistables as key and Optional release class key, of which the element is a representation. May be null.targets- - Collection of ESITarget objects. This will be a singleton collection containing the currently processed target.- Throws:
ESIRendererException
-
getTransactionWarnings
Collection<String> getTransactionWarnings()Ruturns the collection of warning messages collected during rendering process for the transaction in-process.
Supported API: true- Returns:
- - The collection of warnings generated during the transaction
-
addWarning
Collect warnings across the transaction. These warnings can be notified to user collectively.
Supported API: true- Parameters:
warning- - The warning message to be added for transaction- Returns:
- - 'true' when successfully adds warning message in collection otherwise 'false'.
-
getProcessedTargets
Returns the set of targets processed by a given instance VdbBuilder for the ESI Transaction.
Supported API: true- Returns:
- - The set of targets processed by a given instance VdbBuilder for the ESI Transaction.
-