Class ESIResourceUtility
java.lang.Object
com.ptc.windchill.esi.mpml.resource.ESIResourceUtility
Utility class for resource renderer.
Supported API: true
Extendable: false
Supported API: true
Extendable: false
-
Method Summary
Modifier and TypeMethodDescriptionstatic Collection<ESITargetAssociation> findAddedResource(Collection<ESITargetAssociation> previousResources, Collection<ESITargetAssociation> currentResources) Returns a collection of ESITargetAssociation.static Map<MPMResource, ESITargetAssociation> findAddedResourceTargetAssociation(Collection<ESITargetAssociation> previousResources, Collection<ESITargetAssociation> currentResources) Returns a collection of ESITargetAssociation.static Collection[]findChangedResource(Collection<ESITargetAssociation> currAssoc, Collection<ESITargetAssociation> previousAssoc, ESIEffectivityHandler effHandler) Deprecated.static Collection<ESITargetAssociation>[]findChangedResource(Collection<ESITargetAssociation> currAssoc, Collection<ESITargetAssociation> previousAssoc, ESIEffectivityHandler effHandler, Map<MPMResource, MPMResource> currentAndPreviousResources) Deprecated.Use {findChangedResource(Collection, Collection, ESIEffectivityHandler, Map, NCServerHolder)instead of this.static Collection<ESITargetAssociation>[]findChangedResource(Collection<ESITargetAssociation> currAssoc, Collection<ESITargetAssociation> previousAssoc, ESIEffectivityHandler effHandler, Map<MPMResource, MPMResource> currentAndPreviousResources, NCServerHolder ncServerHolder) Returns an array of collection of ESITargetAssociation.static Collection<ESITargetAssociation>[]findChangedResource(Collection<ESITargetAssociation> currAssoc, Collection<ESITargetAssociation> previousAssoc, ESIEffectivityHandler effHandler, Map<MPMResource, MPMResource> currentAndPreviousResources, NCServerHolder ncServerHolder, String groupName) Returns an array of collection of ESITargetAssociation.static Collection<ESITarget> getTargets(Collection<ESITargetAssociation> targetAssociations, MPMResource resource) Fetches ESITargets from the ESITargetAssociations for the given resource.
-
Method Details
-
findAddedResource
public static Collection<ESITargetAssociation> findAddedResource(Collection<ESITargetAssociation> previousResources, Collection<ESITargetAssociation> currentResources) Returns a collection of ESITargetAssociation. These associations are corresponding to those targets to which the resource is being published the first time.
Supported API: true- Parameters:
previousResources- - Targets associated with the previous version of the resourcecurrentResources- - Targets associated with the current version of the resource- Returns:
- Collection Returns a collection of ESITargetAssociation.
-
findAddedResourceTargetAssociation
public static Map<MPMResource,ESITargetAssociation> findAddedResourceTargetAssociation(Collection<ESITargetAssociation> previousResources, Collection<ESITargetAssociation> currentResources) Returns a collection of ESITargetAssociation. These associations are corresponding to those targets to which the resource is being published the first time.
Supported API: true- Parameters:
previousResources- - Targets associated with the previous version of the resourcecurrentResources- - Targets associated with the current version of the resource- Returns:
- Collection Returns a collection of ESITargetAssociation.
-
findChangedResource
public static Collection[] findChangedResource(Collection<ESITargetAssociation> currAssoc, Collection<ESITargetAssociation> previousAssoc, ESIEffectivityHandler effHandler) throws WTException Deprecated.Use {findChangedResource(Collection, Collection, ESIEffectivityHandler, Map)instead of this.
Supported API: trueReturns an array of collection of ESITargetAssociation. The index 0 of the array contains associations which corresponds to those targets to which the resource's previous version is already published indicating a changed resource. The index 1 contains the unchanged resource-target associations.- Parameters:
currAssoc- - Targets associated with the current version of the resourcepreviousAssoc- - Targets associated with the previous version of the resourceeffHandler- - instance of the ESIEffectivityHandler- Returns:
- Collection[] returns an array of collection of ESITargetAssociation.
- Throws:
WTException- if any of the invoked methods throws this exception.
-
findChangedResource
public static Collection<ESITargetAssociation>[] findChangedResource(Collection<ESITargetAssociation> currAssoc, Collection<ESITargetAssociation> previousAssoc, ESIEffectivityHandler effHandler, Map<MPMResource, MPMResource> currentAndPreviousResources) throws WTExceptionDeprecated.Use {findChangedResource(Collection, Collection, ESIEffectivityHandler, Map, NCServerHolder)instead of this.
Supported API: trueReturns an array of collection of ESITargetAssociation. The index 0 of the array contains associations which corresponds to those targets to which the resource's previous version is already published indicating a changed resource. The index 1 contains the unchanged resource-target associations.- Parameters:
currAssoc- - Targets associated with the current version of the resourcepreviousAssoc- - Targets associated with the previous version of the resourceeffHandler- - instance of the ESIEffectivityHandlercurrentAndPreviousResources- - The map containing current and previous resources in case of changed resources. Map contains current resource as key and previous resource as value.- Returns:
- Collection<ESITargetAssociation>[] returns an array of collection of ESITargetAssociation.
- Throws:
WTException- if any of the invoked methods throws this exception.
-
findChangedResource
public static Collection<ESITargetAssociation>[] findChangedResource(Collection<ESITargetAssociation> currAssoc, Collection<ESITargetAssociation> previousAssoc, ESIEffectivityHandler effHandler, Map<MPMResource, MPMResource> currentAndPreviousResources, NCServerHolder ncServerHolder) throws WTExceptionReturns an array of collection of ESITargetAssociation. The index 0 of the array contains associations which corresponds to those targets to which the resource's previous version is already published indicating a changed resource. The index 1 contains the unchanged resource-target associations.
Supported API: true- Parameters:
currAssoc- - Targets associated with the current version of the resourcepreviousAssoc- - Targets associated with the previous version of the resourceeffHandler- - instance of the ESIEffectivityHandlercurrentAndPreviousResources- - The map containing current and previous resources in case of changed resources. Map contains current resource as key and previous resource as value.ncServerHolder- - The ncServerHolder holds navigation criteria- Returns:
- Collection<ESITargetAssociation>[] returns an array of collection of ESITargetAssociation.
- Throws:
WTException- if any of the invoked methods throws this exception.
-
findChangedResource
public static Collection<ESITargetAssociation>[] findChangedResource(Collection<ESITargetAssociation> currAssoc, Collection<ESITargetAssociation> previousAssoc, ESIEffectivityHandler effHandler, Map<MPMResource, MPMResource> currentAndPreviousResources, NCServerHolder ncServerHolder, String groupName) throws WTExceptionReturns an array of collection of ESITargetAssociation. The index 0 of the array contains associations which corresponds to those targets to which the resource's previous version is already published indicating a changed resource. The index 1 contains the unchanged resource-target associations.
Supported API: true- Parameters:
currAssoc- - Targets associated with the current version of the resourcepreviousAssoc- - Targets associated with the previous version of the resourceeffHandler- - instance of the ESIEffectivityHandlercurrentAndPreviousResources- - The map containing current and previous resources in case of changed resources. Map contains current resource as key and previous resource as value.ncServerHolder- - The ncServerHolder holds navigation criteriagroupname- - added group name to fetch information from response meta info map- Returns:
- Collection<ESITargetAssociation>[] returns an array of collection of ESITargetAssociation.
- Throws:
WTException- if any of the invoked methods throws this exception.
-
getTargets
public static Collection<ESITarget> getTargets(Collection<ESITargetAssociation> targetAssociations, MPMResource resource) Fetches ESITargets from the ESITargetAssociations for the given resource.
Supported API: true- Parameters:
targetAssociations- - the input Collection of ESITargetAssociations.resource- - the resource for which to fetch the ESITargets.- Returns:
- Collection of ESITarget objects that are associated to the input resource and that figure in the input ESITargetAssociations.
-
findChangedResource(Collection, Collection, ESIEffectivityHandler, Map)instead of this.