|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.services.StandardManager
wt.recent.StandardRecentlyVisitedService
Service implementation for recently accessed objects/containers.
Use the newStandardRecentlyVisitedService
static factory
method(s), not the StandardRecentlyVisitedService
constructor,
to construct instances of this class. Instances must be constructed
using the static factory(s), in order to ensure proper initialization
of the instance.
Supported API: true
Extendable: false
Field Summary | |
private static String |
BYPASS_RECENT_SERVICE
|
private static int |
capacityObjectDefault
|
private static int |
CHUNK_SIZE
|
private static String |
CLASS_TYPE_SEPARATOR
|
private static Hashtable |
classAndType
|
private static String |
CLASSNAME
|
private static String |
CONTAINER_ROOT
|
private static boolean |
EXECUTE_QUEUES
|
private static String |
LAST_VISITED_CONTAINER_KEY
|
private static String |
LAST_VISITED_CUSTOMSTACK_KEY
|
private static String |
LAST_VISITED_OBJECTS_KEY
|
private static String |
LAST_VISITED_TYPED_CONTAINERS_PREFIX
|
private static boolean |
loaded
|
private static String |
OBJECTSTACKSIZE
|
private static String |
QUEUE_NAME
|
private static String |
RECENT_LIST_ADDED
|
private static String |
RECENT_LIST_CONTAINER_NAME
|
private static String |
RECENT_LIST_CUSTOM_NAME
|
private static RecentUpdateCache |
recentUpdateCache
|
private static String |
RESOURCE
|
private static boolean |
VERBOSE
|
Fields inherited from class wt.services.StandardManager |
|
Fields inherited from interface wt.services.Manager |
MANAGER_SERVICE, STARTUP_AUTOMATIC, STARTUP_MANUAL, STATUS_EMERGENCY_SHUTDOWN, STATUS_EMERGENCY_SHUTTING_DOWN, STATUS_SHUTDOWN, STATUS_SHUTDOWN_ERRORS, STATUS_SHUTDOWN_FAILURE, STATUS_SHUTTING_DOWN, STATUS_STARTED, STATUS_STARTED_ERRORS, STATUS_STARTING_UP, STATUS_STARTUP_FAILURE |
Constructor Summary | |
StandardRecentlyVisitedService()
|
Method Summary | |
void |
addCustomStackObject(WTObject a,
String customStackName)
Add the given object to the given custom stack as the most recently accessed one. |
Vector |
addCustomStackObject(WTObject a,
String customStackName,
boolean returnStack)
Add the given object to the given custom stack as the most recently accessed one and return the stack. |
void |
addCustomStackObjectByOid(ObjectIdentifier oid,
String customStackName)
Add the object corresponding to given ObjectIdentifier to the given custom stack as the most recently accessed one. |
Vector |
addCustomStackObjectByOid(ObjectIdentifier oid,
String customStackName,
boolean returnStack)
Add the object corresponding to given ObjectIdentifier to the given custom stack as the most recently accessed one and return the stack. |
private void |
addMCToDBList(String listName,
boolean isContainer)
This method appends the value string in the method context for the given listname to the value string from database preference entry. |
private void |
addMethodCtxListener()
|
protected static void |
addQueueEntry()
|
void |
addRecentlyVisitedContainer(WTContainer wtc)
Add the given container as the most recently accessed one for the corresponding type. |
Vector |
addRecentlyVisitedContainer(WTContainer wtc,
boolean returnStack)
Add the given container as the most recently accessed one for the corresponding type and return the stack. |
void |
addRecentlyVisitedContainer(WTContainer wtc,
String type)
Add the given container as the most recently accessed one for the given type. |
void |
addRecentlyVisitedContainerByOid(ObjectIdentifier oid)
Add the container corresponding to given ObjectIdentifier as the most recently accessed one for the corresponding type. |
Vector |
addRecentlyVisitedContainerByOid(ObjectIdentifier oid,
boolean returnStack)
Add the container corresponding to given ObjectIdentifier as the most recently accessed one for the corresponding type and return the stack. |
void |
addRecentlyVisitedObject(WTObject a)
Add the given object as the most recently accessed one. |
Vector |
addRecentlyVisitedObject(WTObject a,
boolean returnStack)
Add the given object as the most recently accessed one and return the stack. |
void |
addRecentlyVisitedObjectByOid(ObjectIdentifier oid)
Add the object corresponding to given ObjectIdentifier as the most recently accessed one. |
Vector |
addRecentlyVisitedObjectByOid(ObjectIdentifier oid,
boolean returnStack)
Add the object corresponding to given ObjectIdentifier as the most recently accessed one and return the stack. |
private void |
addToRecentDBLists()
This will update strings stored in MethodContext against the listNames to the corresponding database preference. |
private void |
addToRecentMCLists(Persistable a,
String listName,
boolean isContainer)
This method will add strings to MethodContext. |
private static boolean |
checkExistsQueueEntry()
|
private ObjectVisitedInfo |
checkMCTopStack(String prefName)
|
static void |
cleanupOldestFromList(String message)
|
private boolean |
containsIn(RecentUpdate y,
ArrayList listObjects)
|
private Vector |
filterClassname(Vector recentObjVec,
String classname)
|
private RecentUpdate |
findInQR(RecentUpdate x,
QueryResult qr)
|
private String[] |
getBusinessObjectRefs(WTCollection coll)
|
Boolean |
getBypassRecentList()
Supported API: false |
private String |
getCacheKey(String listName,
String princName)
|
private String[] |
getChunkedBORs(String[] BORArray,
int n_chunks,
int i)
|
String |
getConceptualClassname()
Deprecated. |
private Persistable |
getContainerFromOID(ObjectIdentifier oid)
Get the Container from ObjectIdentifier using the cached containers. |
Vector |
getCustomStack(String customStackName)
Gets all the most recently accessed objects currently in the given custom stack preference. |
Vector |
getCustomStack(String classname,
String customStackName)
Gets all the most recently accessed objects belonging to the classname currently in the given Custom Stack preference. |
Vector |
getFromDB(String prefName)
Deprecated. |
private static Timestamp |
getFutureTime()
This will run every midnight. |
ObjectVisitedInfo |
getLastVisitedContainer()
Returns the most recently accessed container. |
ObjectVisitedInfo |
getLatestCustomStackObject(String customStackName)
Returns the most recently accessed object from given Custom Stack. |
private QueryResult |
getMasterByID(Persistable x)
|
private Persistable |
getObjectFromOID(ObjectIdentifier oid)
Get the Persistable from ObjectIdentifier using Object Reference. |
private QuerySpec |
getObjectQuerySpec(String[] chunkedBORs,
String listName)
|
ObjectVisitedInfo |
getRecentlyVisitedContainer(String type)
Gets the most recently accessed container for given type. |
Vector |
getRecentlyVisitedContainerStack(String type)
Gets all the most recently accessed containers for given type. |
int |
getRecentlyVisitedContainerStackSize(String type)
Returns the setting for maximum number of conainers as part of stack of recently visited containers of given type. |
ObjectVisitedInfo |
getRecentlyVisitedObject()
Returns the most recently accessed object. |
Vector |
getRecentlyVisitedObjectStack()
Gets all the most recently accessed objects currently in the preference. |
Vector |
getRecentlyVisitedObjectStack(String classname)
Gets all the most recently accessed objects belonging to the classname currently in the preference. |
int |
getRecentlyVisitedObjectStackSize()
Returns the setting for maximum number of objects as part of stack of recently visited objects. |
private RecentUpdateCache |
getRecentUpdateCache()
|
private QueryResult |
getRecentUpdateChunk(String[] BORArray)
|
private QuerySpec |
getStackQuerySpec(String listName)
|
private QueryResult |
getTargetObjectsByID(Persistable x)
|
private QueryResult |
getTargetObjectsByID(WTCollection coll)
|
String |
getTypeForClass(String cName)
|
private WTCollection |
getValidObjects(WTCollection objCollection)
|
private Vector |
getVectorOfOVs(QueryResult qr)
|
Vector |
listCustomStacks()
Get all custom stack names as Vector. |
private static void |
loadContainerTypes()
load names of container types each of which has recently visited list of the corresponding container type. |
private WTPreferences |
myPrefsGet(boolean onlyUserCtx)
Get the preference context for the given user to read preference values. |
private WTPreferences |
myPrefsPut()
Get the preference context for the given user to edit preference values. |
static StandardRecentlyVisitedService |
newStandardRecentlyVisitedService()
Default factory for the class. |
protected void |
performStartupProcess()
Dummy method to be overridden by subclasses. |
private void |
pushObjectsFromMC(Vector listObjects,
String prefName)
|
private void |
removeFromRecentList(Persistable x)
|
private void |
removeFromRecentList(WTCollection coll)
|
private void |
renameRecentUpdate(Persistable x)
|
void |
setBypassRecentList(Boolean bypass)
Supported API: false |
void |
setLastVisitedContainer(WTContainer wtc)
Sets the given container as the most recently accessed container. |
void |
setRecentlyVisitedContainerStackSize(int i,
String type)
Sets the maximum number of containers as part of stack of recently visited containers for given type. |
void |
setRecentlyVisitedObjectStackSize(int i)
Sets the maximum number of objects as part of stack of recently visited objects. |
private Vector |
sizedVector(Vector recentObjVec)
|
private Vector |
stackAfterAddObject(Object a,
boolean isContainer,
String stackName)
|
private void |
updateCache(RecentUpdate ru)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private static final String RESOURCE
private static final String CLASSNAME
private static boolean VERBOSE
private static boolean loaded
private static final Hashtable classAndType
private static final String CONTAINER_ROOT
private static final String LAST_VISITED_CONTAINER_KEY
private static final String LAST_VISITED_TYPED_CONTAINERS_PREFIX
private static final String LAST_VISITED_OBJECTS_KEY
private static final String LAST_VISITED_CUSTOMSTACK_KEY
private static final String OBJECTSTACKSIZE
private static final String CLASS_TYPE_SEPARATOR
private static final String BYPASS_RECENT_SERVICE
private static final String RECENT_LIST_CUSTOM_NAME
private static final String RECENT_LIST_CONTAINER_NAME
private static final String RECENT_LIST_ADDED
private static RecentUpdateCache recentUpdateCache
private static boolean EXECUTE_QUEUES
private static final int CHUNK_SIZE
private static final String QUEUE_NAME
private static int capacityObjectDefault
Constructor Detail |
public StandardRecentlyVisitedService()
Method Detail |
public String getConceptualClassname()
getConceptualClassname
in interface NetFactor
getConceptualClassname
in class StandardManager
protected void performStartupProcess() throws ManagerException
performStartupProcess
in class StandardManager
ManagerException
public static StandardRecentlyVisitedService newStandardRecentlyVisitedService() throws WTException
WTException
public void addRecentlyVisitedContainer(WTContainer wtc) throws WTException
addRecentlyVisitedContainer
in interface RecentlyVisitedService
wtc
-
WTException
public void addRecentlyVisitedContainer(WTContainer wtc, String type) throws WTException
addRecentlyVisitedContainer
in interface RecentlyVisitedService
wtc
- type
-
WTException
public void addRecentlyVisitedObject(WTObject a) throws WTException
addRecentlyVisitedObject
in interface RecentlyVisitedService
a
-
WTException
public ObjectVisitedInfo getLastVisitedContainer() throws WTException
getLastVisitedContainer
in interface RecentlyVisitedService
WTException
public ObjectVisitedInfo getRecentlyVisitedContainer(String type) throws WTException
getRecentlyVisitedContainer
in interface RecentlyVisitedService
type
-
WTException
public Vector getRecentlyVisitedContainerStack(String type) throws WTException
getRecentlyVisitedContainerStack
in interface RecentlyVisitedService
type
-
WTException
public ObjectVisitedInfo getRecentlyVisitedObject() throws WTException
getRecentlyVisitedObject
in interface RecentlyVisitedService
WTException
public Vector getRecentlyVisitedObjectStack() throws WTException
getRecentlyVisitedObjectStack
in interface RecentlyVisitedService
WTException
public void setLastVisitedContainer(WTContainer wtc) throws WTException
setLastVisitedContainer
in interface RecentlyVisitedService
wtc
-
WTException
public void setRecentlyVisitedContainerStackSize(int i, String type) throws WTException
setRecentlyVisitedContainerStackSize
in interface RecentlyVisitedService
i
- type
-
WTException
public void setRecentlyVisitedObjectStackSize(int i) throws WTException
setRecentlyVisitedObjectStackSize
in interface RecentlyVisitedService
i
-
WTException
public int getRecentlyVisitedContainerStackSize(String type) throws WTException
getRecentlyVisitedContainerStackSize
in interface RecentlyVisitedService
type
-
WTException
public int getRecentlyVisitedObjectStackSize() throws WTException
getRecentlyVisitedObjectStackSize
in interface RecentlyVisitedService
WTException
public void addCustomStackObject(WTObject a, String customStackName) throws WTException
addCustomStackObject
in interface RecentlyVisitedService
a
- customStackName
-
WTException
public ObjectVisitedInfo getLatestCustomStackObject(String customStackName) throws WTException
getLatestCustomStackObject
in interface RecentlyVisitedService
customStackName
-
WTException
public Vector getCustomStack(String customStackName) throws WTException
getCustomStack
in interface RecentlyVisitedService
customStackName
-
WTException
public Vector listCustomStacks() throws WTException
listCustomStacks
in interface RecentlyVisitedService
WTException
public Vector getCustomStack(String classname, String customStackName) throws WTException
getCustomStack
in interface RecentlyVisitedService
classname
- customStackName
-
WTException
public Vector getRecentlyVisitedObjectStack(String classname) throws WTException
getRecentlyVisitedObjectStack
in interface RecentlyVisitedService
classname
-
WTException
public void setBypassRecentList(Boolean bypass) throws WTException
setBypassRecentList
in interface RecentlyVisitedService
bypass
-
WTException
public Boolean getBypassRecentList() throws WTException
getBypassRecentList
in interface RecentlyVisitedService
WTException
public void addRecentlyVisitedObjectByOid(ObjectIdentifier oid) throws WTException
addRecentlyVisitedObjectByOid
in interface RecentlyVisitedService
oid
-
WTException
public void addRecentlyVisitedContainerByOid(ObjectIdentifier oid) throws WTException
addRecentlyVisitedContainerByOid
in interface RecentlyVisitedService
oid
-
WTException
public void addCustomStackObjectByOid(ObjectIdentifier oid, String customStackName) throws WTException
addCustomStackObjectByOid
in interface RecentlyVisitedService
oid
- customStackName
-
WTException
public Vector addRecentlyVisitedObjectByOid(ObjectIdentifier oid, boolean returnStack) throws WTException
addRecentlyVisitedObjectByOid
in interface RecentlyVisitedService
oid
- returnStack
-
WTException
public Vector addRecentlyVisitedContainer(WTContainer wtc, boolean returnStack) throws WTException
addRecentlyVisitedContainer
in interface RecentlyVisitedService
wtc
- returnStack
-
WTException
public Vector addCustomStackObjectByOid(ObjectIdentifier oid, String customStackName, boolean returnStack) throws WTException
addCustomStackObjectByOid
in interface RecentlyVisitedService
oid
- customStackName
- returnStack
-
WTException
public Vector addRecentlyVisitedContainerByOid(ObjectIdentifier oid, boolean returnStack) throws WTException
addRecentlyVisitedContainerByOid
in interface RecentlyVisitedService
oid
- returnStack
-
WTException
public Vector addRecentlyVisitedObject(WTObject a, boolean returnStack) throws WTException
addRecentlyVisitedObject
in interface RecentlyVisitedService
a
- returnStack
-
WTException
public Vector addCustomStackObject(WTObject a, String customStackName, boolean returnStack) throws WTException
addCustomStackObject
in interface RecentlyVisitedService
a
- customStackName
- returnStack
-
WTException
public Vector getFromDB(String prefName) throws WTException
getFromDB
in interface RecentlyVisitedService
prefName
-
WTException
private Vector stackAfterAddObject(Object a, boolean isContainer, String stackName) throws WTException
WTException
private void pushObjectsFromMC(Vector listObjects, String prefName) throws WTException
WTException
private ObjectVisitedInfo checkMCTopStack(String prefName) throws WTException
WTException
private WTPreferences myPrefsGet(boolean onlyUserCtx) throws WTException
WTException
private WTPreferences myPrefsPut() throws WTException
WTException
private static void loadContainerTypes() throws WTException
WTException
private WTCollection getValidObjects(WTCollection objCollection) throws WTException
WTException
public String getTypeForClass(String cName)
private void addMethodCtxListener()
private void addToRecentMCLists(Persistable a, String listName, boolean isContainer)
private void addToRecentDBLists() throws WTException
WTException
private void addMCToDBList(String listName, boolean isContainer) throws WTException
WTException
private boolean containsIn(RecentUpdate y, ArrayList listObjects)
private Persistable getObjectFromOID(ObjectIdentifier oid) throws WTException
WTException
private Persistable getContainerFromOID(ObjectIdentifier oid) throws WTException
WTException
private QuerySpec getStackQuerySpec(String listName) throws WTException
WTException
private Vector getVectorOfOVs(QueryResult qr) throws WTException
WTException
private QuerySpec getObjectQuerySpec(String[] chunkedBORs, String listName) throws WTException
WTException
private RecentUpdateCache getRecentUpdateCache()
private RecentUpdate findInQR(RecentUpdate x, QueryResult qr)
private QueryResult getMasterByID(Persistable x) throws WTException
WTException
private QueryResult getTargetObjectsByID(Persistable x) throws WTException
WTException
private void renameRecentUpdate(Persistable x) throws WTException
WTException
private void removeFromRecentList(Persistable x) throws WTException
WTException
private void removeFromRecentList(WTCollection coll) throws WTException
WTException
private void updateCache(RecentUpdate ru) throws WTException
WTException
private QueryResult getTargetObjectsByID(WTCollection coll) throws WTException
WTException
private String[] getChunkedBORs(String[] BORArray, int n_chunks, int i)
private String[] getBusinessObjectRefs(WTCollection coll) throws WTException
WTException
private QueryResult getRecentUpdateChunk(String[] BORArray) throws WTException
WTException
private String getCacheKey(String listName, String princName)
private Vector filterClassname(Vector recentObjVec, String classname)
private Vector sizedVector(Vector recentObjVec) throws WTException
WTException
protected static void addQueueEntry() throws WTException
WTException
private static Timestamp getFutureTime()
private static boolean checkExistsQueueEntry() throws WTException
WTException
public static void cleanupOldestFromList(String message) throws WTException
WTException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |