Package wt.mpm.coproduce
Interface CoProduceService
public interface CoProduceService
An interface for CoProduce related operations
Supported API: true
Extendable: false
Supported API: true
Extendable: false
-
Method Summary
Modifier and TypeMethodDescriptionassignMadeFromSet(WTPart coProduce, CoProduceMgmtLink link, UpdateCoProduceParams params)
Supported API: true Service for managing updating Made From Set information on the CoProduceLink or CoProduceMemberLink.createCoProduce(WTPart primary, Collection<WTPart> secondaries, CreateCoProduceParams coProduceParams)
Supported API: true Creates new Co-produce object along with it's related links association.createCoProduceUsages(WTPart coProduce, Collection<WTPart> usageParts, CoProduceUsageParams coProduceUsageParams)
Supported API: true Service to add CoProduce Usages for given Co-produce.getCoProduce(Set<WTPart> parts, PopulateCoProduceParams params) Service to collect coProduce parts and populate all the coProduce information within CoProduce bean for the given finished parts: Following information will be populated.getCoProduceFamilyDetails(Set<Persistable> seeds) Deprecated.getCoProduceFamilyDetails(Set<Persistable> seeds, NavigationCriteria nc) Deprecated.getPrimaryPartForCoProduce(Set<Persistable> seeds) Takes a Set of seeds and returns a map where the keyset is a collection of the CoProduce objects passed into the method.getPrimaryPartForCoProduce(Set<Persistable> seeds, NavigationCriteria nc) Takes a Set of seeds and navigation criteria and returns a map where the keyset is a collection of the CoProduce objects passed into the method.Takes a Set of seeds and returns a map where the keyset is a collection of the CoProduce objects passed into the method.Takes a Set of seeds and navigation criteria and returns a map where the keyset is a collection of the CoProduce objects passed into the method.populateCoProduce(Set<WTPart> coProduce, PopulateCoProduceParams params) Service to populate all the information related to coProduce part within CoProduce bean.removeUsageMembers(WTPart coProduce, Set<WTPart> usageParts, NavigationCriteria navigationCriteria)
Supported API: true Service to remove CoProduce usages.updateCoProduce(WTPart coProduce, Set<WTPart> secondaries, UpdateCoProduceParams params)
Supported API: true Service for managing add or remove of Secondary members for a given Co-produce.updateStructure(WTPart coProduce, UpdateCoProduceParams params)
Supported API: true Service for dynamically re-generate structure for given Co-produce.
-
Method Details
-
createCoProduce
CoProduce createCoProduce(WTPart primary, Collection<WTPart> secondaries, CreateCoProduceParams coProduceParams) throws WTException
Supported API: true Creates new Co-produce object along with it's related links association. CreateCoProduceParams can hold reference to already persisted Co-produce object with IBA info populated and same would be used for creating related links. If no Co-produce is provided then new Co-produce object would be created from scratch.- Parameters:
primary- - Primary Part for Co-produce association.secondary- - Secondary Parts in the Co-produce association.coProduceParams- - CreateCoProduceParams for providing inputs during Co-produce and links creation.Provide the alternateLinks info for using specific Made From Set under the primary & secondaries for usage structure generation.- Returns:
- CoProduce - returns Co-produce bean with information of the associations created.
- Throws:
WTException
-
updateCoProduce
CoProduce updateCoProduce(WTPart coProduce, Set<WTPart> secondaries, UpdateCoProduceParams params) throws WTException
Supported API: true Service for managing add or remove of Secondary members for a given Co-produce.- Parameters:
coProduce- -Co-produce part under which secondary members are to be added/removed.secondaries- - Secondary parts to be added/removed.params- - Provide coProduceAction in UpdateCoProduceParams .If CoProduceAction.ADD, then would add the given secondary information under the Co-produce. If CoProduceAction.REMOVE, then would remove the secondaries from Co-produce structure. Provide the alternateLinks info for using specific Made From Set under the primary & secondaries for usage structure generation- Returns:
- - returns Co-produce bean with information of the associations after doing an update. The UpdateCoProduceParams holds flag populateCoProduce (default true) which populates the information in Co-produce after update is completed.
- Throws:
WTException
-
getPrimaryPartForCoProduce
Takes a Set of seeds and returns a map where the keyset is a collection of the CoProduce objects passed into the method. The value in the map is primary object of the CoProduce seed. The primary parts will be returned based on latest config Spec.
Supported API: true- Parameters:
seeds- for which primary object need to be obtained- Returns:
- Map of seeds vs primary object
- Throws:
WTException
-
getSecondaryPartsForCoProduce
Takes a Set of seeds and returns a map where the keyset is a collection of the CoProduce objects passed into the method. The value in the map is list of secondary objects of the CoProduce seed. The secondary parts will be returned based on latest config Spec.
Supported API: true- Parameters:
seeds- for which secondary object need to be obtained- Returns:
- Map of seeds vs list of secondary objects
- Throws:
WTException
-
getCoProduceFamilyDetails
Deprecated.Takes a Set of seeds and returns a map where the keyset is a collection of the CoProduce objects passed into the method. The value in the map is CoProduce bean that contain primary and secondary objects of the CoProduce along with inflated primary and secondary links. The CoProduce objects will be returned based on latest config spec. Note: The CoProduceUsage links are not inflated in the CoProduce bean.- Parameters:
seeds- for which CoProduce Family details need to be obtained.- Returns:
- Map of seeds vs CoProduce bean
- Throws:
WTException
-
populateCoProduce
Collection<CoProduce> populateCoProduce(Set<WTPart> coProduce, PopulateCoProduceParams params) throws WTException Service to populate all the information related to coProduce part within CoProduce bean. Following information populated in CoProduce bean for the given set of Coproduce parts : - Coproduce part - Primary Part - Secondaries - All the children - Primary link(CoProduceLink) - Secondary links(CoproduceMemebr links) - Usage Links(CoProduceUsage links)
Supported API: true- Parameters:
coProduce- Co-produce parts for which CoProduce information will be populated.params- PopulateCoProduceParams- Returns:
- Collection of populated CoProduce objects.
- Throws:
WTException- wt.util.WTException
-
getCoProduce
Map<WTPart,Collection<CoProduce>> getCoProduce(Set<WTPart> parts, PopulateCoProduceParams params) throws WTException Service to collect coProduce parts and populate all the coProduce information within CoProduce bean for the given finished parts: Following information will be populated. - Coproduce part - Primary Part - Secondaries - All the children - Primary link(CoProduceLink) - Secondary links(CoproduceMemebr links) - Usage Links(CoProduceUsage links)
Supported API: true- Parameters:
parts- : Set of parts for which coProduce parts and CoProduce information needs to be populated.params- : PopulateCoProduceParams.- Returns:
- : Map of input parts and collection of CoProduce bean object where input part has been used as a primary or secondary.
- Throws:
WTException
-
updateStructure
Supported API: true Service for dynamically re-generate structure for given Co-produce. The service will update/synch changes to coproduce structure for i. the structure changes done to the primary and secondary members. ii. Quantity changes on the child usages under primary and secondary members.- Parameters:
params- - Provide coProduceAction as CoProduceAction.UPDATE_STRUCTURE in UpdateCoProduceParams. *- Returns:
- - returns Co-produce bean with information of the associations after doing an update. The UpdateCoProduceParams holds flag populateCoProduce (default true) which populates the information in Co-produce after update is completed.
- Throws:
WTException
-
assignMadeFromSet
CoProduce assignMadeFromSet(WTPart coProduce, CoProduceMgmtLink link, UpdateCoProduceParams params) throws WTException
Supported API: true Service for managing updating Made From Set information on the CoProduceLink or CoProduceMemberLink.- Parameters:
coProduce- - Co-produce part under which the information is to be updated.link- - Valid link types are CoProduceLink/CoProduceMemberLink for updating made from set information. Note that CoProduceUsageLink as input is not supported.params- - Provide coProduceAction(CoProduceAction.ASSIGN_MADE_FROM_SET) in UpdateCoProduceParams. If CoProduceAction.ASSIGN_MADE_FROM_SET,then would assign the new made from set information. It is expected to set the old and new RMLAlternateLinks during building param(alternateLinks). If no new made from set was assigned earlier and new is to be assigned then provide the new link information in the param. Note that new link information is expected in params else the assignment would not be supported.- Returns:
- Returns Co-produce bean with information of the associations after doing an update. The UpdateCoProduceParams holds flag populateCoProduce (default true) which populates the information in Co-produce after assignment is completed.
- Throws:
WTException
-
createCoProduceUsages
CoProduce createCoProduceUsages(WTPart coProduce, Collection<WTPart> usageParts, CoProduceUsageParams coProduceUsageParams) throws WTException
Supported API: true Service to add CoProduce Usages for given Co-produce.- Parameters:
coProduce- - Co-produce part under which the information is to be updated.usageParts- - Usages which are to be added under Co-producecoProduceUsageParams-- Returns:
- Throws:
WTException
-
populateCoProduce(Set, PopulateCoProduceParams)Supported API: true