Package wt.epm.modelitems
Interface ModelItemManager
- All Known Implementing Classes:
StandardModelItemManager
Supported API: true
Extendable: false
-
Method Summary
Modifier and TypeMethodDescriptiongetAuthoringApplications(WTCollection modelItems) Returns the authoring application of each model item in the given collection.getModelItemContainers(ModelItem modelItem) Returns the set of model item containers that the given model item belongs to.getModelItemLinks(ModelItem modelItem) Returns the set of model item links that belong to the given model item.getModelItemLinks(WTCollection modelItems) Finds the model item links that belong to each model item in the given collection.getModelItems(ModelItemContainer container) Returns the set of model items that belong to the given model item container.getModelItems(WTCollection containers) Finds the model items that belong to each model item container in the given collection.makeWorkable(ModelItemContainer context, WTSet modelItems) Replaces each model item in the given set, with a new workable copy that can be modified in the context of the given model item container.makeWorkable(WTValuedMap modelItemToContext) For each entry in the given map, this method replaces the model item in its corresponding model item container with a workable copy that can be modified in the context of that container.makeWorkableAndStore(WTValuedMap modelItemToContext, Set<ModelItemLink> modelItemLinks) For each entry in the modelItemToContext map, this method replaces the model item in its corresponding model item container with a workable copy that can be modified in the context of that container.voidremoveModelItems(ModelItemContainer container, WTSet modelItems) Removes each model item in the given set from the specified model item container.voidremoveModelItems(WTValuedMap modelItemToContainer) Removes the model item from its corresponding model item container in the given map.restoreOriginal(WTSet modelItems) Deletes each workable model item in the given collection and replaces it with the one from the original copy of its checked-out model item container.
-
Method Details
-
makeWorkable
Replaces each model item in the given set, with a new workable copy that can be modified in the context of the given model item container. It returns a WTValuedMap where the keys are the original model items and the values are their corresponding workable copies. The given model item container must be a working copy that the user has permission to modify and all of the model items in the given set must belong to it.
Supported API: true- Parameters:
context- model item container in which the workable copies of the given model items can be modifiedmodelItems- model items to create workable copies of (i.e. copies that can be modified in the context of the given model item container)- Returns:
- WTValuedMap
- Throws:
WTException
-
makeWorkable
For each entry in the given map, this method replaces the model item in its corresponding model item container with a workable copy that can be modified in the context of that container. It returns a WTValuedMap where the keys are the original model items and the values are their corresponding workable copies. Each model item container must be a working copy that the user has permission to modify and each model item must belong to its corresponding model item container.
Supported API: true- Parameters:
modelItemToContext- a WTValuedMap where each key is a model item and its corresponding value is the model item container in which its workable copy can be modified- Returns:
- WTValuedMap
- Throws:
WTException
-
makeWorkableAndStore
WTValuedMap makeWorkableAndStore(WTValuedMap modelItemToContext, Set<ModelItemLink> modelItemLinks) throws WTException For each entry in the modelItemToContext map, this method replaces the model item in its corresponding model item container with a workable copy that can be modified in the context of that container. The new model item will have be identical, including the IBAs to the in-memory existing model item. In addition the model item links passed in modelItemLinks will be duplicated from memory (including their IBAs), and will have as parent the new model item that replaces the original. Each model item container must be a working copy that the user has permission to modify and each model item must belong to its corresponding model item container.
Supported API: true- Parameters:
modelItemToContext- a WTValuedMap where each key is a model item and its corresponding value is the model item container in which its workable copy can be modifiedmodelItemLinks- the Set of model item links that belong to the model items that need to be updated- Throws:
WTException
-
restoreOriginal
Deletes each workable model item in the given collection and replaces it with the one from the original copy of its checked-out model item container. All of the model items in the given set must be marked as workable and the user must have permission to modify the model item container that each belongs to.
Supported API: true- Parameters:
modelItems- set of workable model items to restore- Returns:
- WTSet
- Throws:
WTException
-
removeModelItems
Removes each model item in the given set from the specified model item container. The user must have permission to modify the given model item container and all of the model items in the given set must belong to it.
Supported API: true- Parameters:
container- model item container to remove the given model items frommodelItems- model items to remove from the given model item container- Throws:
WTException
-
removeModelItems
Removes the model item from its corresponding model item container in the given map. The user must have permission to modify each model item container in the map and each model item must belong to its corresponding model item container.
Supported API: true- Parameters:
modelItemToContainer- a WTValuedMap where each key is a model item and its corresponding value is the model item container from which it will be removed- Throws:
WTException
-
getModelItems
Returns the set of model items that belong to the given model item container.
Supported API: true- Parameters:
container- model item container- Returns:
- WTSet
- Throws:
WTException
-
getModelItems
Finds the model items that belong to each model item container in the given collection. Returns a WTKeyedMap where each key is a model item container and its corresponding value is a WTSet of the model items that belong to that container. This method does not create an entry in the map for a model item container unless it has at least one model item.
Supported API: true- Parameters:
containers- model item containers- Returns:
- WTKeyedMap
- Throws:
WTException
-
getModelItemLinks
Returns the set of model item links that belong to the given model item.
Supported API: true- Parameters:
modelItem- model item- Returns:
- WTSet
- Throws:
WTException
-
getModelItemLinks
Finds the model item links that belong to each model item in the given collection. Returns a WTKeyedMap where each key is a model item and its corresponding value is a WTSet of the model item links that belong to that model item. This method does not create an entry in the map for a model item unless it has at least one model item link.
Supported API: true- Parameters:
modelItems- model items- Returns:
- WTKeyedMap
- Throws:
WTException
-
getModelItemContainers
Returns the set of model item containers that the given model item belongs to.
Supported API: true- Parameters:
modelItem- model item- Returns:
- WTSet
- Throws:
WTException
-
getAuthoringApplications
Returns the authoring application of each model item in the given collection. Returns a WTKeyedMap where each key is a model item and its corresponding value is its authoring application.
Supported API: true- Parameters:
modelItems- model items- Returns:
- WTKeyedMap
- Throws:
WTException
-