Package wt.recent
Interface RecentlyVisitedService
- All Known Implementing Classes:
StandardRecentlyVisitedService
Service for accessing recently visited objects.
Supported API: true
Extendable: false
Supported API: true
Extendable: false
-
Method Summary
Modifier and TypeMethodDescriptionvoidAdd the given container as the most recently accessed one for the corresponding type.voidaddRecentlyVisitedContainer(WTContainer wtc, String type) Add the given container as the most recently accessed one for the given type.voidAdd the container corresponding to given ObjectIdentifier as the most recently accessed one for the corresponding type.voidAdd the given object as the most recently accessed one.voidAdd the object corresponding to given ObjectIdentifier as the most recently accessed one.voidaddRecentlyVisitedWorkspace(EPMWorkspace workspace) Add the given Workspace, as the most recently accessed one, to the workspace stack.Gets all the recently accessed Contexts (Workspace, Containers) objects from across the workspace and container stacks.Determines if recently visited object tracking is currently suspended (bypassed) or not.Returns the most recently accessed container.Gets the most recently accessed container for given type.Gets all the most recently accessed containers for given type.intReturns the setting for maximum number of conainers as part of stack of recently visited containers of given type.Returns the most recently accessed object.Gets all the most recently accessed objects currently in the preference.intReturns the setting for maximum number of objects as part of stack of recently visited objects.Gets all the most recently accessed Workspace objects from the workspace stack.voidsetBypassRecentList(Boolean bypass) Suspends (bypasses) or resumes recently visited object tracking.voidSets the given container as the most recently accessed container.voidsetRecentlyVisitedContainerStackSize(int i, String type) Sets the maximum number of containers as part of stack of recently visited containers for given type.voidSets the maximum number of objects as part of stack of recently visited objects.
-
Method Details
-
addRecentlyVisitedContainer
Add the given container as the most recently accessed one for the corresponding type.
Supported API: true- Parameters:
wtc-- Throws:
WTException
-
addRecentlyVisitedContainer
Add the given container as the most recently accessed one for the given type.
Supported API: true- Parameters:
wtc-type-- Throws:
WTException
-
addRecentlyVisitedObject
Add the given object as the most recently accessed one.
Supported API: true- Parameters:
a-- Throws:
WTException
-
getLastVisitedContainer
Returns the most recently accessed container.
Supported API: true- Returns:
- ObjectVisitedInfo
- Throws:
WTException
-
getRecentlyVisitedContainer
Gets the most recently accessed container for given type.
Supported API: true- Parameters:
type-- Returns:
- ObjectVisitedInfo
- Throws:
WTException
-
getRecentlyVisitedContainerStack
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
Returns the most recently accessed object.
Supported API: true- Returns:
- ObjectVisitedInfo
- Throws:
WTException
-
getRecentlyVisitedObjectStack
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
Sets the given container as the most recently accessed container.
Supported API: true- Parameters:
wtc-- Throws:
WTException
-
setRecentlyVisitedContainerStackSize
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
Sets the maximum number of objects as part of stack of recently visited objects.
Supported API: true- Parameters:
i-- Throws:
WTException
-
getRecentlyVisitedContainerStackSize
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
Returns the setting for maximum number of objects as part of stack of recently visited objects.
Supported API: true- Returns:
- int
- Throws:
WTException
-
setBypassRecentList
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
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
Add the object corresponding to given ObjectIdentifier as the most recently accessed one.
Supported API: true- Parameters:
oid-- Throws:
WTException
-
addRecentlyVisitedContainerByOid
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
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
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
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
-