public class BusinessContextManager extends Object implements IBusinessContextManagerSPI
Modifier and Type | Field and Description |
---|---|
static String |
BUSINESS_CONTEXT_PROPERTY_BAG_ID
The business context property bag identifier.
|
static String |
STRING_RESOURCE_PATH |
Constructor and Description |
---|
BusinessContextManager() |
Modifier and Type | Method and Description |
---|---|
IBusinessContextSPI |
buildBusinessContext(StructureElement structureElement,
HttpServletRequest request)
Builds a businessContext with data from database.
|
void |
clearCache()
Clears the business context cache.
|
IBusinessContextSPI |
getBusinessContext(HttpServletRequest request)
Get a businessContext previously built.
|
IBusinessContextSPI |
getBusinessContext(IServiceInterfaceRequest request)
Get a businessContext previously built.
|
BusinessContextUsage |
getLocalContexts(ChannelConfig channel)
Returns the
business context usage for the
given channel. |
BusinessContextUsage |
getLocalContexts(PageConfig page)
Returns the
business context usage for the
given page. |
void |
register(String id,
String name,
String xml)
Registers a new context
|
void |
unregister(String id)
Deletes a selected context.
|
void |
updateLocalBusinessContextUsage(ChannelConfig channel,
BusinessContextUsage usage)
Updates the
business context usage for the
given channel. |
void |
updateLocalBusinessContextUsage(PageConfig page,
BusinessContextUsage usage)
Updates the
business context usage for the
given page. |
void |
updateLocalBusinessContextUsage(String propertyBagId,
BusinessContextUsage usage)
Updates the
business context usage for the
property bag with the given identifier. |
void |
updateRegistration(String id,
String name,
String xml)
Updates a selected context.
|
public static final String STRING_RESOURCE_PATH
public static final String BUSINESS_CONTEXT_PROPERTY_BAG_ID
public void register(String id, String name, String xml) throws PortalObjectAlreadyExistsException, PortalException
IBusinessContextManagerSPI
register
in interface IBusinessContextManagerSPI
id
- context id.name
- context name.xml
- xml content.PortalObjectAlreadyExistsException
- if some context already exists with the same id.PortalException
public void updateRegistration(String id, String name, String xml) throws PortalObjectNotFoundException, PortalException
IBusinessContextManagerSPI
updateRegistration
in interface IBusinessContextManagerSPI
id
- context id.name
- context name.xml
- xml content.PortalObjectNotFoundException
- if the context was not found.PortalException
public void unregister(String id) throws PortalObjectNotFoundException, PortalException
IBusinessContextManagerSPI
unregister
in interface IBusinessContextManagerSPI
id
- context id.PortalObjectNotFoundException
- if the context was not found.PortalException
public IBusinessContextSPI buildBusinessContext(StructureElement structureElement, HttpServletRequest request)
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.public IBusinessContextSPI getBusinessContext(HttpServletRequest request)
IBusinessContextManagerSPI
getBusinessContext
in interface IBusinessContextManagerSPI
public IBusinessContextSPI getBusinessContext(IServiceInterfaceRequest request)
IBusinessContextManagerSPI
getBusinessContext
in interface IBusinessContextManagerSPI
public void updateLocalBusinessContextUsage(PageConfig page, BusinessContextUsage usage) throws PortalException
business context usage
for the
given page.page
- the page.usage
- the business context usage.PortalException
public void updateLocalBusinessContextUsage(ChannelConfig channel, BusinessContextUsage usage) throws PortalException
business context usage
for the
given channel.channel
- the channel.usage
- the business context usage.PortalException
public void updateLocalBusinessContextUsage(String propertyBagId, BusinessContextUsage usage) throws PortalException
business context usage
for the
property bag with the given identifier.propertyBagId
- the property bag identifier.usage
- the business context usage.PortalException
public BusinessContextUsage getLocalContexts(PageConfig page) throws PortalException
business context usage
for the
given page.page
- the page.business context usage
for the
given page.PortalException
public BusinessContextUsage getLocalContexts(ChannelConfig channel) throws PortalException
business context usage
for the
given channel.channel
- the channel.business context usage
for the
given channel.PortalException
public void clearCache() throws PortalException
PortalException
LumisXP 12.3.0.200408 - Copyright © 2006–2020 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.