wt.vc.views
Class ViewServiceFwd

java.lang.Object
  extended bywt.vc.views.ViewServiceFwd
All Implemented Interfaces:
RemoteAccess, Serializable, ViewService

public class ViewServiceFwd
extends Object
implements RemoteAccess, ViewService, Serializable

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.



Supported API: false

Extendable: false

See Also:
Serialized Form

Field Summary
private static String CLASSNAME
           
private static String FC_RESOURCE
           
(package private) static boolean SERVER
           
 
Fields inherited from interface wt.method.RemoteAccess
versionID
 
Constructor Summary
ViewServiceFwd()
           
 
Method Summary
 View[] getAllChildren(View view)
          Returns all the children of this view.
 View[] getAllParents(View view)
          Returns all the parents of the view, if any.
 View[] getAllRootViews()
          Return all root views, that is all views with no parent views.
 View[] getAllViews()
          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.
private static Manager getManager()
           
 View getParent(View view)
          Gets the immediate parent of this view, if one exists.
 View getView(ObjectIdentifier objId)
          Returns the view object for this view identifier, if one exists.
 View getView(String viewName)
          Returns the view object for this view name, if it exists.
 void insert(View parent, View child, View viewToInsert)
          Inserts a view between other associated views.
 boolean isChildOf(View view, View viewToCheck)
          Returns true if the viewToCheck is a child of the view, false otherwise.
 boolean isMemberOf(View view, View viewToCheck)
          Returns true if the viewToCheck is contained in the same view association as the view, false otherwise.
 boolean isParentOf(View view, View viewToCheck)
          Returns true if the viewToCheck is a parent of the view, false otherwise.
 ViewManageable newBranchForView(ViewManageable version, ObjectIdentifier viewId)
          Creates a new version from the original version and assigns it to the specified view.
 ViewManageable newBranchForView(ViewManageable version, String viewName)
          Creates a new version from the original version and assigns it to the specified view.
 ViewManageable newBranchForView(ViewManageable version, View view)
          Creates a new version from the original version and assigns it to the specified view.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SERVER

static final boolean SERVER

FC_RESOURCE

private static final String FC_RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME
Constructor Detail

ViewServiceFwd

public ViewServiceFwd()
Method Detail

getManager

private static Manager getManager()
                           throws WTException
Returns:
Manager
Throws:
WTException

newBranchForView

public ViewManageable newBranchForView(ViewManageable version,
                                       String viewName)
                                throws WTPropertyVetoException,
                                       WTException,
                                       ViewException
Creates a new version from the original version and assigns it to the specified view. The original version must not be null, and the view must be a child view of the view the original was assigned to. The classic behavior of newViewVersion 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: false

Specified by:
newBranchForView in interface ViewService
Parameters:
version - The version the new version is to be derived from.
viewName - The view name of the view to assign the new version to.
Returns:
ViewManageable
Throws:
WTPropertyVetoException
WTException
ViewException

newBranchForView

public ViewManageable newBranchForView(ViewManageable version,
                                       View view)
                                throws WTPropertyVetoException,
                                       WTException,
                                       ViewException
Creates a new version from the original version and assigns it to the specified view. The original version must not be null, and the view must be a child view of the view the original was assigned to. The classic behavior of newViewVersion 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: false

Specified by:
newBranchForView in interface ViewService
Parameters:
version - The version the new version is to be derived from.
view - The view to assign the new version to.
Returns:
ViewManageable
Throws:
WTPropertyVetoException
WTException
ViewException

newBranchForView

public ViewManageable newBranchForView(ViewManageable version,
                                       ObjectIdentifier viewId)
                                throws WTPropertyVetoException,
                                       WTException,
                                       ViewException
Creates a new version from the original version and assigns it to the specified view. The original version must not be null, and the view must be a child view of the view the original was assigned to. The classic behavior of newViewVersion 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: false

Specified by:
newBranchForView in interface ViewService
Parameters:
version - The version the new version will be derived from.
viewId - The Id of the view to assign the version from.
Returns:
ViewManageable
Throws:
WTPropertyVetoException
WTException
ViewException

getView

public 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: false

Specified by:
getView in interface ViewService
Parameters:
viewName -
Returns:
View
Throws:
WTException
ViewException

getView

public View getView(ObjectIdentifier objId)
             throws WTException,
                    ViewException
Returns the view object for this view identifier, if one exists. If no views match this identifier, a ViewException is thrown.

Supported API: false

Specified by:
getView in interface ViewService
Parameters:
objId -
Returns:
View
Throws:
WTException
ViewException

getParent

public View getParent(View view)
               throws WTException,
                      ViewException
Gets the immediate parent of this view, if one exists.

Supported API: false

Specified by:
getParent in interface ViewService
Parameters:
view - The view to get the parent of; it must exist
Returns:
View
Throws:
WTException
ViewException

getAllParents

public View[] getAllParents(View view)
                     throws WTException,
                            ViewException
Returns all the parents of the view, if any.

Supported API: false

Specified by:
getAllParents in interface ViewService
Parameters:
view - The view to get the parents of; it must exist
Returns:
View[]
Throws:
WTException
ViewException

isParentOf

public 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: false

Specified by:
isParentOf in interface ViewService
Parameters:
view -
viewToCheck -
Returns:
boolean
Throws:
WTException
ViewException

getChildren

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

Supported API: false

Specified by:
getChildren in interface ViewService
Parameters:
view - View to get children of; it must exist.
Returns:
View[]
Throws:
WTException
ViewException

getAllChildren

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

Supported API: false

Specified by:
getAllChildren in interface ViewService
Parameters:
view - View to get all children of; it must exist.
Returns:
View[]
Throws:
WTException
ViewException

isChildOf

public 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: false

Specified by:
isChildOf in interface ViewService
Parameters:
view -
viewToCheck -
Returns:
boolean
Throws:
WTException
ViewException

isMemberOf

public 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: false

Specified by:
isMemberOf in interface ViewService
Parameters:
view -
viewToCheck -
Returns:
boolean
Throws:
WTException
ViewException

getAllViews

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

Supported API: false

Specified by:
getAllViews in interface ViewService
Returns:
View[]
Throws:
WTException
ViewException

getAllRootViews

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

Supported API: false

Specified by:
getAllRootViews in interface ViewService
Returns:
View[]
Throws:
WTException
ViewException

insert

public 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: false

Specified by:
insert in interface ViewService
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

public 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: false

Specified by:
getEligibleViews in interface ViewService
Parameters:
viewManageable -
Returns:
View[]
Throws:
WTException
ViewException