Package wt.vc.views
Interface ViewService
- All Known Implementing Classes:
StandardViewService
This service interface provides the general APIs needed to work with
Supported API: true
Extendable: false
View and ViewManageable objects and manage them with
the ViewService; Views can be placed in hierarchies
using ViewAssociation links.
- Cookie: None
- Helper:
ViewHelperhas helper methods - Service implementation:
StandardViewServicehas no listeners - ServiceEvent: None
- ServiceException:
ViewException
Supported API: true
Extendable: false
-
Method Summary
Modifier and TypeMethodDescriptionView[]getAllChildren(View view) Returns all the children of this view.View[]getAllParents(View view) Returns all the parents of the view, if any.View[]Return all root views, that is all views with no parent views.View[]Return all defined views.View[]getChildren(View view) Returns the immediate children of this view.View[]getEligibleViews(ViewManageable viewManageable) For a particular version, returns all the valid views the version may be branched into.Gets the immediate parent of this view, if one exists.Returns the view object for this view name, if it exists.getView(ObjectIdentifier objId) Returns the view object for this view identifier, if one exists.intgetViewLevel(View view) Get the view level (root views are level zero).voidInserts a view between other associated views.booleanReturns true if the viewToCheck is a child of the view, false otherwise.booleanisMemberOf(View view, View viewToCheck) Returns true if the viewToCheck is contained in the same view association as the view, false otherwise.booleanisParentOf(View view, View viewToCheck) Returns true if the viewToCheck is a parent of the view, false otherwise.newBranchForView(ViewManageable viewManageable, String newViewName) Creates a new view manageable from the given original view manageable and assigns it to the specified new view.newBranchForView(ViewManageable viewManageable, ObjectIdentifier newViewId) Creates a new view manageable from the given original view manageable and assigns it to the specified new view.newBranchForView(ViewManageable viewManageable, View newView) Creates a new view manageable from the given original view manageable and assigns it to the specified new view.newBranchForViewAndVariations(ViewManageable viewManageable, String newViewName, Variation1 newVariation1, Variation2 newVariation2) Creates a new view manageable from the given original view manageable and assigns it to the specified new view, new variation1 and new variation2.newBranchForViewAndVariations(ViewManageable viewManageable, ObjectIdentifier newViewId, Variation1 newVariation1, Variation2 newVariation2) Creates a new view manageable from the given original view manageable and assigns it to the specified new view, new variation1 and new variation2.newBranchForViewAndVariations(ViewManageable viewManageable, View newView, Variation1 newVariation1, Variation2 newVariation2) Creates a new view manageable from the given original view manageable and assigns it to the specified new view, new variation1 and new variation2.voidupdateVariations(ViewManageable viewManageable, Variation1 newVariation1, Variation2 newVariation2) Updates all iterations of the ViewManageable in the same view, variation1 and variation2 to the specified newVariation1 and newVariation2.
-
Method Details
-
newBranchForView
ViewManageable newBranchForView(ViewManageable viewManageable, String newViewName) throws WTPropertyVetoException, WTException, ViewException Creates a new view manageable from the given original view manageable and assigns it to the specified new view. The original view manageable must not be null, and the new view must be a child view of the view the original was assigned to. The classic behavior of newBranchForView is to branch from the upstream node. If we have a part with versions Rev A (Eng), Rev A.A (Mfg) (branched from Rev A (Eng)), and Rev B (Eng) (revised from Rev A (Eng)), new view version of Rev B (Eng) would result in a B.A (Mfg) branched from Rev B (Eng). This preserves all the changes from Rev A (Eng) to Rev B (Eng), but loses the changes (restructuring, etc.) made to A.A (Mfg). By setting thewt.propertiesentrywt.vc.views.newViewVersionClassicBehaviortofalse, you can change this behavior: rather than creating B.A (Mfg) from B (Eng), the new version will be created from A.A (Mfg). The result will still be B.A (Mfg), but the Mfg changes will be preserved.
Supported API: true- Parameters:
viewManageable- The view manageable the new view manageable will be derived from.newViewName- The name of the view to assign the the new view manageable to.- Returns:
- ViewManageable
- Throws:
WTPropertyVetoExceptionWTExceptionViewException
-
newBranchForView
ViewManageable newBranchForView(ViewManageable viewManageable, ObjectIdentifier newViewId) throws WTPropertyVetoException, WTException, ViewException Creates a new view manageable from the given original view manageable and assigns it to the specified new view. The original view manageable must not be null, and the new view must be a child view of the view the original was assigned to. The classic behavior of newBranchForView is to branch from the upstream node. If we have a part with versions Rev A (Eng), Rev A.A (Mfg) (branched from Rev A (Eng)), and Rev B (Eng) (revised from Rev A (Eng)), new view version of Rev B (Eng) would result in a B.A (Mfg) branched from Rev B (Eng). This preserves all the changes from Rev A (Eng) to Rev B (Eng), but loses the changes (restructuring, etc.) made to A.A (Mfg). By setting thewt.propertiesentrywt.vc.views.newViewVersionClassicBehaviortofalse, you can change this behavior: rather than creating B.A (Mfg) from B (Eng), the new version will be created from A.A (Mfg). The result will still be B.A (Mfg), but the Mfg changes will be preserved.
Supported API: true- Parameters:
viewManageable- The view manageable the new view manageable will be derived from.newViewId- The id of the view to assign the the new view manageable to.- Returns:
- ViewManageable
- Throws:
WTPropertyVetoExceptionWTExceptionViewException
-
newBranchForView
ViewManageable newBranchForView(ViewManageable viewManageable, View newView) throws WTPropertyVetoException, WTException, ViewException Creates a new view manageable from the given original view manageable and assigns it to the specified new view. The original view manageable must not be null, and the new view must be a child view of the view the original was assigned to. The classic behavior of newBranchForView is to branch from the upstream node. If we have a part with versions Rev A (Eng), Rev A.A (Mfg) (branched from Rev A (Eng)), and Rev B (Eng) (revised from Rev A (Eng)), new view version of Rev B (Eng) would result in a B.A (Mfg) branched from Rev B (Eng). This preserves all the changes from Rev A (Eng) to Rev B (Eng), but loses the changes (restructuring, etc.) made to A.A (Mfg). By setting thewt.propertiesentrywt.vc.views.newViewVersionClassicBehaviortofalse, you can change this behavior: rather than creating B.A (Mfg) from B (Eng), the new version will be created from A.A (Mfg). The result will still be B.A (Mfg), but the Mfg changes will be preserved.
Supported API: true- Parameters:
viewManageable- The view manageable the new view manageable will be derived from.newView- The view to assign the the new view manageable to.- Returns:
- ViewManageable
- Throws:
WTPropertyVetoExceptionWTExceptionViewException
-
newBranchForViewAndVariations
ViewManageable newBranchForViewAndVariations(ViewManageable viewManageable, String newViewName, Variation1 newVariation1, Variation2 newVariation2) throws WTPropertyVetoException, WTException, ViewException Creates a new view manageable from the given original view manageable and assigns it to the specified new view, new variation1 and new variation2. The original view manageable must not be null and the new view must be the same as, a sibling view of, or a child view of the view the original was assigned to. The combination of new view, new variation1 and new variation2 must be unique.
Supported API: true- Parameters:
viewManageable- The view manageable the new view manageable will be derived from.newViewName- The name of the view to assign the the new view manageable to.newVariation1- The variation1 to assign the new view manageable to.newVariation2- The variation2 to assign the new view manageable to.- Returns:
- ViewManageable
- Throws:
WTPropertyVetoExceptionWTExceptionViewException
-
newBranchForViewAndVariations
ViewManageable newBranchForViewAndVariations(ViewManageable viewManageable, ObjectIdentifier newViewId, Variation1 newVariation1, Variation2 newVariation2) throws WTPropertyVetoException, WTException, ViewException Creates a new view manageable from the given original view manageable and assigns it to the specified new view, new variation1 and new variation2. The original view manageable must not be null and the new view must be the same as, a sibling view of, or a child view of the view the original was assigned to. The combination of new view, new variation1 and new variation2 must be unique.
Supported API: true- Parameters:
viewManageable- The view manageable the new view manageable will be derived from.newViewId- The id of the view to assign the the new view manageable to.newVariation1- The variation1 to assign the new view manageable to.newVariation2- The variation2 to assign the new view manageable to.- Returns:
- ViewManageable
- Throws:
WTPropertyVetoExceptionWTExceptionViewException
-
newBranchForViewAndVariations
ViewManageable newBranchForViewAndVariations(ViewManageable viewManageable, View newView, Variation1 newVariation1, Variation2 newVariation2) throws WTPropertyVetoException, WTException, ViewException Creates a new view manageable from the given original view manageable and assigns it to the specified new view, new variation1 and new variation2. The original view manageable must not be null and the new view must be the same as, a sibling view of, or a child view of the view the original was assigned to. The combination of new view, new variation1 and new variation2 must be unique.
Supported API: true- Parameters:
viewManageable- The view manageable the new view manageable will be derived from.newView- The view to assign the the new view manageable to.newVariation1- The variation1 to assign the new view manageable to.newVariation2- The variation2 to assign the new view manageable to.- Returns:
- ViewManageable
- Throws:
WTPropertyVetoExceptionWTExceptionViewException
-
getView
Returns the view object for this view name, if it exists. If no view matches this name, a ViewException is thrown.
Supported API: true- Parameters:
viewName-- Returns:
- View
- Throws:
WTExceptionViewException
-
getView
Returns the view object for this view identifier, if one exists. If no views match this identifier, a ViewException is thrown.
Supported API: true- Parameters:
objId-- Returns:
- View
- Throws:
WTExceptionViewException
-
getParent
Gets the immediate parent of this view, if one exists.
Supported API: true- Parameters:
view- The view to get the parent of; it must exist- Returns:
- View
- Throws:
WTExceptionViewException
-
getAllParents
Returns all the parents of the view, if any.
Supported API: true- Parameters:
view- The view to get the parents of; it must exist- Returns:
- View[]
- Throws:
WTExceptionViewException
-
isParentOf
Returns true if the viewToCheck is a parent of the view, false otherwise. Both views need to exist (or a ViewException will be thrown).
Supported API: true- Parameters:
view-viewToCheck-- Returns:
- boolean
- Throws:
WTExceptionViewException
-
getChildren
Returns the immediate children of this view.
Supported API: true- Parameters:
view- View to get children of; it must exist.- Returns:
- View[]
- Throws:
WTExceptionViewException
-
getAllChildren
Returns all the children of this view.
Supported API: true- Parameters:
view- View to get all children of; it must exist.- Returns:
- View[]
- Throws:
WTExceptionViewException
-
isChildOf
Returns true if the viewToCheck is a child of the view, false otherwise. Both views need to exist (or a ViewException will be thrown).
Supported API: true- Parameters:
view-viewToCheck-- Returns:
- boolean
- Throws:
WTExceptionViewException
-
isMemberOf
Returns true if the viewToCheck is contained in the same view association as the view, false otherwise. Both views need to exist (or a ViewException will be thrown).
Supported API: true- Parameters:
view-viewToCheck-- Returns:
- boolean
- Throws:
WTExceptionViewException
-
getAllViews
Return all defined views.
Supported API: true- Returns:
- View[]
- Throws:
WTExceptionViewException
-
getAllRootViews
Return all root views, that is all views with no parent views.
Supported API: true- Returns:
- View[]
- Throws:
WTExceptionViewException
-
insert
Inserts a view between other associated views. If the child is not null, the child must be a child of the parent; the viewToInsert is inserted between the parent and the child. If the child is null, the viewToInsert becomes a child of the parent and all the parent's children become children of the viewToInsert.
Supported API: true- Parameters:
parent- The parent view in a ViewAssociation.child- A child of the parent. May be null, in which case the viewToInsert is inserted above all the parent's children.viewToInsert- The view to insert.- Throws:
WTExceptionViewException
-
getEligibleViews
For a particular version, returns all the valid views the version may be branched into. If the version is view-independent (or is assigned to a leaf view), returns an empty array.
Supported API: true- Parameters:
viewManageable-- Returns:
- View[]
- Throws:
WTExceptionViewException
-
updateVariations
void updateVariations(ViewManageable viewManageable, Variation1 newVariation1, Variation2 newVariation2) throws WTPropertyVetoException, WTException, ViewException Updates all iterations of the ViewManageable in the same view, variation1 and variation2 to the specified newVariation1 and newVariation2. The combination of view, and the new variations must be unique.
Supported API: true- Parameters:
viewManageable- The version the new version will be derived from.newVariation1-newVariation2-- Throws:
WTPropertyVetoExceptionWTExceptionViewException
-
getViewLevel
Get the view level (root views are level zero).
Supported API: true- Parameters:
view- The view to get the level of; it must exist.- Returns:
- int
- Throws:
ViewExceptionWTException
-