Package wt.vc.views

Interface ViewService

All Known Implementing Classes:
StandardViewService

@RemoteInterface public interface ViewService
This service interface provides the general APIs needed to work with View and ViewManageable objects and manage them with the ViewService; Views can be placed in hierarchies using ViewAssociation links.
  • Cookie: None
  • Helper: ViewHelper has helper methods
  • Service implementation: StandardViewService has no listeners
  • ServiceEvent: None
  • ServiceException: ViewException


Supported API: true

Extendable: false
  • 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 the wt.properties entry wt.vc.views.newViewVersionClassicBehavior to false, 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:
      WTPropertyVetoException
      WTException
      ViewException
    • 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 the wt.properties entry wt.vc.views.newViewVersionClassicBehavior to false, 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:
      WTPropertyVetoException
      WTException
      ViewException
    • 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 the wt.properties entry wt.vc.views.newViewVersionClassicBehavior to false, 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:
      WTPropertyVetoException
      WTException
      ViewException
    • 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:
      WTPropertyVetoException
      WTException
      ViewException
    • 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:
      WTPropertyVetoException
      WTException
      ViewException
    • 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:
      WTPropertyVetoException
      WTException
      ViewException
    • getView

      View getView(String viewName) throws WTException, ViewException
      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:
      WTException
      ViewException
    • 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:
      WTException
      ViewException
    • getParent

      View getParent(View view) throws WTException, ViewException
      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:
      WTException
      ViewException
    • getAllParents

      View[] getAllParents(View view) throws WTException, ViewException
      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:
      WTException
      ViewException
    • isParentOf

      boolean isParentOf(View view, View viewToCheck) throws WTException, ViewException
      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:
      WTException
      ViewException
    • getChildren

      View[] getChildren(View view) throws WTException, ViewException
      Returns the immediate children of this view.

      Supported API: true
      Parameters:
      view - View to get children of; it must exist.
      Returns:
      View[]
      Throws:
      WTException
      ViewException
    • getAllChildren

      View[] getAllChildren(View view) throws WTException, ViewException
      Returns all the children of this view.

      Supported API: true
      Parameters:
      view - View to get all children of; it must exist.
      Returns:
      View[]
      Throws:
      WTException
      ViewException
    • isChildOf

      boolean isChildOf(View view, View viewToCheck) throws WTException, ViewException
      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:
      WTException
      ViewException
    • isMemberOf

      boolean isMemberOf(View view, View viewToCheck) throws WTException, ViewException
      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:
      WTException
      ViewException
    • getAllViews

      View[] getAllViews() throws WTException, ViewException
      Return all defined views.

      Supported API: true
      Returns:
      View[]
      Throws:
      WTException
      ViewException
    • getAllRootViews

      View[] getAllRootViews() throws WTException, ViewException
      Return all root views, that is all views with no parent views.

      Supported API: true
      Returns:
      View[]
      Throws:
      WTException
      ViewException
    • insert

      void insert(View parent, View child, View viewToInsert) throws WTException, ViewException
      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:
      WTException
      ViewException
    • getEligibleViews

      View[] getEligibleViews(ViewManageable viewManageable) throws WTException, ViewException
      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:
      WTException
      ViewException
    • 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:
      WTPropertyVetoException
      WTException
      ViewException
    • getViewLevel

      int getViewLevel(View view) throws ViewException, WTException
      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:
      ViewException
      WTException