Class BusinessContextManager
- java.lang.Object
-
- lumis.portal.businesscontext.internal.BusinessContextManager
-
- All Implemented Interfaces:
IBusinessContextManagerSPI
public class BusinessContextManager extends java.lang.Object implements IBusinessContextManagerSPI
Business context manager implementation.- Since:
- 7.0.0
- Version:
- $Revision$ $Date$
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
BUSINESS_CONTEXT_PROPERTY_BAG_ID
The business context property bag identifier.static java.lang.String
STRING_RESOURCE_PATH
-
Constructor Summary
Constructors Constructor Description BusinessContextManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IBusinessContextSPI
buildBusinessContext(StructureElement structureElement, javax.servlet.http.HttpServletRequest request)
Builds a businessContext with data from database.void
clearCache()
Clears the business context cache.IBusinessContextSPI
getBusinessContext(javax.servlet.http.HttpServletRequest request)
Get a businessContext previously built.IBusinessContextSPI
getBusinessContext(IServiceInterfaceRequest request)
Get a businessContext previously built.BusinessContextUsage
getLocalContexts(ChannelConfig channel)
Returns thebusiness context usage
for the given channel.BusinessContextUsage
getLocalContexts(PageConfig page)
Returns thebusiness context usage
for the given page.void
register(java.lang.String id, java.lang.String name, java.lang.String xml)
Registers a new contextvoid
unregister(java.lang.String id)
Deletes a selected context.void
updateLocalBusinessContextUsage(java.lang.String propertyBagId, BusinessContextUsage usage)
Updates thebusiness context usage
for the property bag with the given identifier.void
updateLocalBusinessContextUsage(ChannelConfig channel, BusinessContextUsage usage)
Updates thebusiness context usage
for the given channel.void
updateLocalBusinessContextUsage(PageConfig page, BusinessContextUsage usage)
Updates thebusiness context usage
for the given page.void
updateRegistration(java.lang.String id, java.lang.String name, java.lang.String xml)
Updates a selected context.
-
-
-
Field Detail
-
STRING_RESOURCE_PATH
public static final java.lang.String STRING_RESOURCE_PATH
- See Also:
- Constant Field Values
-
BUSINESS_CONTEXT_PROPERTY_BAG_ID
public static final java.lang.String BUSINESS_CONTEXT_PROPERTY_BAG_ID
The business context property bag identifier.- Since:
- 7.0.0
- See Also:
- Constant Field Values
-
-
Method Detail
-
register
public void register(java.lang.String id, java.lang.String name, java.lang.String xml) throws PortalObjectAlreadyExistsException, PortalException
Description copied from interface:IBusinessContextManagerSPI
Registers a new context- Specified by:
register
in interfaceIBusinessContextManagerSPI
- Parameters:
id
- context id.name
- context name.xml
- xml content.- Throws:
PortalObjectAlreadyExistsException
- if some context already exists with the same id.PortalException
-
updateRegistration
public void updateRegistration(java.lang.String id, java.lang.String name, java.lang.String xml) throws PortalObjectNotFoundException, PortalException
Description copied from interface:IBusinessContextManagerSPI
Updates a selected context.- Specified by:
updateRegistration
in interfaceIBusinessContextManagerSPI
- Parameters:
id
- context id.name
- context name.xml
- xml content.- Throws:
PortalObjectNotFoundException
- if the context was not found.PortalException
-
unregister
public void unregister(java.lang.String id) throws PortalObjectNotFoundException, PortalException
Description copied from interface:IBusinessContextManagerSPI
Deletes a selected context.- Specified by:
unregister
in interfaceIBusinessContextManagerSPI
- Parameters:
id
- context id.- Throws:
PortalObjectNotFoundException
- if the context was not found.PortalException
-
buildBusinessContext
public IBusinessContextSPI buildBusinessContext(StructureElement structureElement, javax.servlet.http.HttpServletRequest request)
Builds a businessContext with data from database.- Parameters:
structureElement
- the structure element configuration of the business contextrequest
- the request. If null, there will be no support for reading the context values and the context won't be saved to the request.- Returns:
- the built business context.
- Since:
- 10.2.0
-
getBusinessContext
public IBusinessContextSPI getBusinessContext(javax.servlet.http.HttpServletRequest request)
Description copied from interface:IBusinessContextManagerSPI
Get a businessContext previously built.- Specified by:
getBusinessContext
in interfaceIBusinessContextManagerSPI
- Returns:
- the previously built business context.
-
getBusinessContext
public IBusinessContextSPI getBusinessContext(IServiceInterfaceRequest request)
Description copied from interface:IBusinessContextManagerSPI
Get a businessContext previously built.- Specified by:
getBusinessContext
in interfaceIBusinessContextManagerSPI
- Returns:
- the previously built business context.
-
updateLocalBusinessContextUsage
public void updateLocalBusinessContextUsage(PageConfig page, BusinessContextUsage usage) throws PortalException
Updates thebusiness context usage
for the given page.- Parameters:
page
- the page.usage
- the business context usage.- Throws:
PortalException
- Since:
- 7.0.0
-
updateLocalBusinessContextUsage
public void updateLocalBusinessContextUsage(ChannelConfig channel, BusinessContextUsage usage) throws PortalException
Updates thebusiness context usage
for the given channel.- Parameters:
channel
- the channel.usage
- the business context usage.- Throws:
PortalException
- Since:
- 7.0.0
-
updateLocalBusinessContextUsage
public void updateLocalBusinessContextUsage(java.lang.String propertyBagId, BusinessContextUsage usage) throws PortalException
Updates thebusiness context usage
for the property bag with the given identifier.- Parameters:
propertyBagId
- the property bag identifier.usage
- the business context usage.- Throws:
PortalException
- Since:
- 7.0.0
-
getLocalContexts
public BusinessContextUsage getLocalContexts(PageConfig page) throws PortalException
Returns thebusiness context usage
for the given page.- Parameters:
page
- the page.- Returns:
- the
business context usage
for the given page. - Throws:
PortalException
- Since:
- 7.0.0
-
getLocalContexts
public BusinessContextUsage getLocalContexts(ChannelConfig channel) throws PortalException
Returns thebusiness context usage
for the given channel.- Parameters:
channel
- the channel.- Returns:
- the
business context usage
for the given channel. - Throws:
PortalException
- Since:
- 7.0.0
-
clearCache
public void clearCache() throws PortalException
Clears the business context cache.- Throws:
PortalException
- Since:
- 10.2.0
-
-