Package com.webmethods.portal.bizPolicy
Interface IContextProvider
- All Superinterfaces:
IComponent
,IComponentProvider
,IInitializable
,IURIResolver
Manages
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface com.webmethods.portal.system.IComponentProvider
ATTR_APP_NAME, ATTR_BEG_QUERY, ATTR_END_QUERY, ATTR_MID_QUERY, BIZPOLICY_MANAGER, CACHE_PROVIDER, COMMAND_PROVIDER, COMPONENTS_QUERY, INSTALL_PROVIDER, MECH_PROVIDER, METACONTEXT_PROVIDER, PHASE_PROVIDER, POLICY_PROVIDER, SEARCH_PROVIDER
-
Method Summary
Modifier and TypeMethodDescriptionCreates a new sysadmin contextacquireAdminContext
(boolean createUserFolders) Creates a new sysadmin contextacquireContext
(boolean shouldCreate) Factory to acquire a context from the local threadacquireContext
(String userID) Creates a new context for a given userIDacquireContext
(String userID, boolean createUserFolders) Creates a new context for a given userIDacquireContext
(String userID, boolean createUserFolders, boolean initialize) Creates a new context for a given userIDacquireContext
(Map<?, ?> properties) Factory for obtaining a context from the propertiesacquireContext
(HttpServletRequest request) Factory for obtaining a context on the httpServletRequestacquireContext
(HttpSession httpSession) Factory for obtaining a context on the httpSessionacquireContextByAlias
(String userAlias, boolean createUserFolders, boolean initialize) Creates a new context for a given user aliasacquireContextByDN
(String userDN, boolean createUserFolders, boolean initialize) Creates a new context for a given user DNcreateTraits
(int traits) Factory to create an ITraits instanceGet all the active contextsReturn the context for the current thread.Get one of the shared singleton traits objects These are shared ITraits that anyone can use but not modify.IContext[]
lookupContext
(IThingID userID) Find all the current contexts for a given uservoid
postInit()
Post initvoid
releaseContext
(IContext context) Releases previously acquired context and removes it from list of context.void
setCurrentContext
(IContext context) Set current context for the thread.Methods inherited from interface com.webmethods.portal.system.IComponent
getComponentData, getComponentName, getComponentProvider, getURI, isInitialized, setComponentData, setComponentProvider
Methods inherited from interface com.webmethods.portal.system.IComponentProvider
exists, getComponent, getComponent, getComponent, getComponentQueryString, getComponents, getDefaultComponent, getLogger, initDeferredWebAppComponents, lookup, registerComponent, reloadComponent, reloadComponent, unregisterComponent, upgradeComponentDataFromBootstrapComponentData
Methods inherited from interface com.webmethods.portal.system.init.IInitializable
init, shutdown
Methods inherited from interface com.webmethods.portal.system.IURIResolver
acquireURI, acquireURI
-
Method Details
-
acquireContext
Factory for obtaining a context on the httpServletRequest- Parameters:
request
-- Returns:
- Throws:
PortalException
-
acquireContext
Factory for obtaining a context on the httpSession- Parameters:
httpSession
-- Returns:
- Throws:
PortalException
-
acquireContext
Factory for obtaining a context from the properties- Parameters:
properties
-- Returns:
- Throws:
PortalException
-
acquireContext
Factory to acquire a context from the local thread- Parameters:
shouldCreate
- whether it should be created- Returns:
- Throws:
PortalException
-
acquireAdminContext
Creates a new sysadmin context- Throws:
PortalException
-
acquireAdminContext
Creates a new sysadmin context- Parameters:
createUserFolders
- true to create user folders if they don't already exist- Throws:
PortalException
-
acquireContextByDN
IContext acquireContextByDN(String userDN, boolean createUserFolders, boolean initialize) throws PortalException Creates a new context for a given user DN- Parameters:
userDN
-- Throws:
PortalException
-
acquireContextByAlias
IContext acquireContextByAlias(String userAlias, boolean createUserFolders, boolean initialize) throws PortalException Creates a new context for a given user alias- Parameters:
userAlias
-- Throws:
PortalException
-
acquireContext
Creates a new context for a given userID- Parameters:
userID
-- Throws:
PortalException
-
acquireContext
Creates a new context for a given userID- Parameters:
userID
-- Throws:
PortalException
-
acquireContext
IContext acquireContext(String userID, boolean createUserFolders, boolean initialize) throws PortalException Creates a new context for a given userID- Parameters:
userID
-- Throws:
PortalException
-
releaseContext
Releases previously acquired context and removes it from list of context. This is usually called when session containing context gets invalidated- Parameters:
context
-
-
setCurrentContext
Set current context for the thread. This has lower priority that context available on the request, but if there is no request then current context will be used. If there is no current context assigned, new Admin context will be created- Parameters:
context
-- Throws:
PortalException
-
getCurrentContextForThread
Return the context for the current thread.- Returns:
- context for the current thread
- Throws:
PortalException
-
lookupContext
Find all the current contexts for a given user- Parameters:
userID
-- Returns:
- Throws:
PortalException
-
getContexts
Get all the active contexts- Returns:
- Throws:
PortalException
-
postInit
void postInit()Post init -
createTraits
Factory to create an ITraits instance- Parameters:
traits
- the bitset of traits to create- Returns:
- a new traits object
- Throws:
PortalException
-
getSingletonTraits
Get one of the shared singleton traits objects These are shared ITraits that anyone can use but not modify.- Parameters:
type
- the type of traits to retrieve- Returns:
- the shared singleton traits object, or null if it could not be found
-