Package wt.recent

Interface RecentlyVisitedService

All Known Implementing Classes:
StandardRecentlyVisitedService

@RemoteInterface public interface RecentlyVisitedService
Service for accessing recently visited objects.

Supported API: true

Extendable: false
  • Method Details

    • addRecentlyVisitedContainer

      void addRecentlyVisitedContainer(WTContainer wtc) throws WTException
      Add the given container as the most recently accessed one for the corresponding type.

      Supported API: true
      Parameters:
      wtc -
      Throws:
      WTException
    • addRecentlyVisitedContainer

      void addRecentlyVisitedContainer(WTContainer wtc, String type) throws WTException
      Add the given container as the most recently accessed one for the given type.

      Supported API: true
      Parameters:
      wtc -
      type -
      Throws:
      WTException
    • addRecentlyVisitedObject

      void addRecentlyVisitedObject(WTObject a) throws WTException
      Add the given object as the most recently accessed one.

      Supported API: true
      Parameters:
      a -
      Throws:
      WTException
    • getLastVisitedContainer

      ObjectVisitedInfo getLastVisitedContainer() throws WTException
      Returns the most recently accessed container.

      Supported API: true
      Returns:
      ObjectVisitedInfo
      Throws:
      WTException
    • getRecentlyVisitedContainer

      ObjectVisitedInfo getRecentlyVisitedContainer(String type) throws WTException
      Gets the most recently accessed container for given type.

      Supported API: true
      Parameters:
      type -
      Returns:
      ObjectVisitedInfo
      Throws:
      WTException
    • getRecentlyVisitedContainerStack

      Vector getRecentlyVisitedContainerStack(String type) throws WTException
      Gets all the most recently accessed containers for given type. The first object in the returned Vector would be the latest accessed container & so on.

      Supported API: true
      Parameters:
      type -
      Returns:
      Vector
      Throws:
      WTException
    • getRecentlyVisitedObject

      ObjectVisitedInfo getRecentlyVisitedObject() throws WTException
      Returns the most recently accessed object.

      Supported API: true
      Returns:
      ObjectVisitedInfo
      Throws:
      WTException
    • getRecentlyVisitedObjectStack

      Vector getRecentlyVisitedObjectStack() throws WTException
      Gets all the most recently accessed objects currently in the preference. The first object in the returned Vector would be the most recently accessed object & so on.

      Supported API: true
      Returns:
      Vector
      Throws:
      WTException
    • setLastVisitedContainer

      void setLastVisitedContainer(WTContainer wtc) throws WTException
      Sets the given container as the most recently accessed container.

      Supported API: true
      Parameters:
      wtc -
      Throws:
      WTException
    • setRecentlyVisitedContainerStackSize

      void setRecentlyVisitedContainerStackSize(int i, String type) throws WTException
      Sets the maximum number of containers as part of stack of recently visited containers for given type.

      Supported API: true
      Parameters:
      i -
      type -
      Throws:
      WTException
    • setRecentlyVisitedObjectStackSize

      void setRecentlyVisitedObjectStackSize(int i) throws WTException
      Sets the maximum number of objects as part of stack of recently visited objects.

      Supported API: true
      Parameters:
      i -
      Throws:
      WTException
    • getRecentlyVisitedContainerStackSize

      int getRecentlyVisitedContainerStackSize(String type) throws WTException
      Returns the setting for maximum number of conainers as part of stack of recently visited containers of given type.

      Supported API: true
      Parameters:
      type -
      Returns:
      int
      Throws:
      WTException
    • getRecentlyVisitedObjectStackSize

      int getRecentlyVisitedObjectStackSize() throws WTException
      Returns the setting for maximum number of objects as part of stack of recently visited objects.

      Supported API: true
      Returns:
      int
      Throws:
      WTException
    • setBypassRecentList

      void setBypassRecentList(Boolean bypass) throws WTException
      Suspends (bypasses) or resumes recently visited object tracking.

      This API is intended for use during bulk data manipulation when, for performance reasons, tracking of recently visited objects needs to be temporarily suspended. This takes effect within the scope of the current method context. When tracking is suspended, RecentUpdate records are not created or updated in the database when business objects are accessed.

      It is important to note that RecentUpdate objects are the basis for various object lists displayed within Windchill such as Recently Accessed, Recent Updates, and Favorites. Suspending tracking prevents these lists from displaying the latest information. Therefore, suspension of tracking should only be done temporarily. By default, the system operates with recently visited object tracking turned on.

      To properly suspend tracking, this method should be used with a try/finally block, in which the tracking is suspended in the try block and restored in the finally block. For example:

       boolean bypassRecentList = RecentlyVisitedHelper.service.getBypassRecentList();
       try {
          if (!bypassRecentList) RecentlyVisitedHelper.service.setBypassRecentList(Boolean.TRUE);
          // Do performance-intensive operation
       } catch (...) {
       } finally {
          if (!bypassRecentList) RecentlyVisitedHelper.service.setBypassRecentList(Boolean.FALSE);
       }


      Supported API: true
      Parameters:
      bypass - Flag to specify suspend or resume action. If the argument is true, the recently visited object tracking is suspended (bypassed). Otherwise it is resumed.
      Throws:
      WTException - Exception raised in the event of an unexpected error

      See Also:
    • getBypassRecentList

      Boolean getBypassRecentList() throws WTException
      Determines if recently visited object tracking is currently suspended (bypassed) or not. By default, the system operates with recently visited object tracking turned on.

      Supported API: true
      Returns:
      Boolean Flag to indicate current recently visited object tracking state. If the value is true, recently visited object tracking is currently suspended (bypassed). Otherwise, it is not.
      Throws:
      WTException -

      See Also:
    • addRecentlyVisitedObjectByOid

      void addRecentlyVisitedObjectByOid(ObjectIdentifier oid) throws WTException
      Add the object corresponding to given ObjectIdentifier as the most recently accessed one.

      Supported API: true
      Parameters:
      oid -
      Throws:
      WTException
    • addRecentlyVisitedContainerByOid

      void addRecentlyVisitedContainerByOid(ObjectIdentifier oid) throws WTException
      Add the container corresponding to given ObjectIdentifier as the most recently accessed one for the corresponding type.

      Supported API: true
      Parameters:
      oid -
      Throws:
      WTException
    • addRecentlyVisitedWorkspace

      void addRecentlyVisitedWorkspace(EPMWorkspace workspace) throws WTException
      Add the given Workspace, as the most recently accessed one, to the workspace stack.

      Supported API: true
      Parameters:
      EPMWorkspace - to add to the workspace stack
      Throws:
      WTException
    • getRecentlyVisitedWorkspaceStack

      Vector<ObjectVisitedInfo> getRecentlyVisitedWorkspaceStack() throws WTException
      Gets all the most recently accessed Workspace objects from the workspace stack. The first object in the returned Vector would be the latest accessed one & so on.

      Supported API: true
      Returns:
      Vector of ObjectVisitedInfo
      Throws:
      WTException
    • getAllRecentlyVisitedContexts

      Vector<ObjectVisitedInfo> getAllRecentlyVisitedContexts() throws WTException
      Gets all the recently accessed Contexts (Workspace, Containers) objects from across the workspace and container stacks. However, Org Containers and Site Containers are not included in this listing. The objects returned are primarily ordered by type (Workspace, Product, Library, Project, Program). For each type, the first object in the returned Vector is the latest accessed one & so on. The number of objects from each type is determined by a separate preference.

      Supported API: true
      Returns:
      Vector of ObjectVisitedInfo
      Throws:
      WTException