|
Oracle Fusion Middleware Java API for Oracle WebLogic Portal 10g Release 3 (10.3.2) E14255-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
com.bea.netuix.application.manager.CustomizationContext
public class CustomizationContext
A client-specific context containing customization properties the database APIs use to personalize the request. Specifically, a preferred Locale
is used to internationalize the titles and descriptions and the HttpServletRequest
is used to perform entitlement checking on request attributes.
When an object is retrieved from the database with this context, the system will try to find a LocalizationResource, which consists of a title and a description, for the database object. The system will process the locales in the context in order; for each locale, it will determine whether there is a LocalizationResource for the same language as that locale. If so, it will use the LocalizationResource that matches best for that locale. If not, it moves on to the next locale in the context. Finally, the default locale (Locale.getDefault) is checked. If there is still no match, then the behavior depends on the retrieveResultsIfNoLocale
value. If this flag is true (the default), then the record will be retrieved with an empty localization resource. Otherwise the record will not be retrieved.
Field Summary | |
---|---|
static int |
DISASSEMBLER_ACCEPT_DB When disassembling a portal file into a desktop, accept the objects (Books and Pages) in the database if there is a collision with the database object vs the template objects. |
static int |
DISASSEMBLER_ACCEPT_DB_UPDATE_MARKUP When disassembling a portal file into a desktop, accept the objects (Books and Pages) in the database if there is a collision with the database object vs the template objects. |
static int |
DISASSEMBLER_ACCEPT_TEMPLATE When disassembling a portal file into a desktop, accept the objects (Books & Pages)in the template if there is a collision with the database object vs the template objects. |
static int |
DISASSEMBLER_PROPAGATE_EXCEPTION When disassembling a portal file into a desktop, propagate the exception (DuplicateDefinitionException) if there is a collision between the template and the database. |
static String |
PORTAL_ENTITLEMENT_REQUEST An http request attribute key name for the EntitlementRequest. |
static short |
PROLIFERATE_ASYNC Do not propagate changes to instances asynchronously. |
static short |
PROLIFERATE_IN_PROGRESS Internal used to indicate proliferation is in progess |
static short |
PROLIFERATE_OFF |
static short |
PROLIFERATE_SYNC Do not propagate changes to instances synchronously, as part of the same transaction as the update. |
Constructor Summary | |
---|---|
CustomizationContext(ArrayList locales, javax.servlet.http.HttpServletRequest request) Create a CustomizationContext with a list of preferred locales to use in locale matching. |
|
CustomizationContext(ArrayList locales, String webapp) Create a CustomizationContext with a list of preferred locales to use in locale matching. |
|
CustomizationContext(Locale locale, javax.servlet.http.HttpServletRequest request) <p/>Create a minimal customization context consisting of one preferred locale. |
|
CustomizationContext(Locale locale, String webapp) <p/>Create a minimal customization context consisting of one preferred locale. |
Method Summary | |
---|---|
void |
addLocale(Locale locale) Add a locale to the end of the preferred locale list. |
static CustomizationContext |
clone(CustomizationContext that) |
String[] |
getDaCapabilities() Capabilities to check DA against when calling paginated methods. |
int |
getDisassemblerTemplateAction() The action that should be performed if there are collisions between the template and the database during an update. |
Locale[] |
getLocales() Getter for retrieving the ordered list of preferred locales. |
short |
getProliferationMode() Typically all changes that are made to library artifacts are cascaded down to the admin's desktop and subsequently cascaded down to the visitor's view. |
String |
getResourcePrefix() Resource taxonomy prefix of given book/page/portlet instance. |
boolean |
isRetrieveResultsIfNoLocale() This flag applies to methods returning PagedResults only. |
boolean |
isVisitorMode() Is the API being called in visitor mode? The Portal customization API is used in both the Admin Portal as well as the Visitor Tools. |
void |
setDaCapabilities(String[] daCapabilities) Capabilities to check DA against when calling paginated methods. |
void |
setDisassemblerTemplateAction(int disassemblerTemplateAction) Set the action that should be performed if there are collisions between the template and the database. |
void |
setProliferationMode(short proliferationMode) Typically all changes that are made to library artifacts are cascaded down to the admin's desktop and subsequently cascaded down to the visitor's view. |
void |
setRequest(javax.servlet.http.HttpServletRequest request) Load the HttpServletRequest . |
void |
setRequest(String webapp) The EntitlementRequest is created from the webapp name. |
void |
setResourcePrefix(String resourcePrefix) Resource taxonomy prefix of given book/page/portlet instance. |
void |
setRetrieveResultsIfNoLocale(boolean retrieveResultsIfNoLocale) This flag applies to methods returning PagedResults only. |
void |
setVisitorMode(boolean visitorMode) Set whether API call is to be made in visitor or admin mode. The Portal customization API is used in both the Admin Portal as well as the Visitor Tools. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String PORTAL_ENTITLEMENT_REQUEST
EntitlementRequest
, Constants Summarypublic static final int DISASSEMBLER_ACCEPT_DB
public static final int DISASSEMBLER_ACCEPT_TEMPLATE
public static final int DISASSEMBLER_PROPAGATE_EXCEPTION
DuplicateDefinitionException
, Constants Summarypublic static final int DISASSEMBLER_ACCEPT_DB_UPDATE_MARKUP
public static final short PROLIFERATE_IN_PROGRESS
public static final short PROLIFERATE_OFF
public static final short PROLIFERATE_SYNC
public static final short PROLIFERATE_ASYNC
Constructor Detail |
---|
public CustomizationContext(Locale locale, javax.servlet.http.HttpServletRequest request) throws com.bea.p13n.entitlements.common.EntitlementsException
locale
- used to localize titles and descriptions.request
- HttpServletRequest
used for entitlementscom.bea.p13n.entitlements.common.EntitlementsException
public CustomizationContext(ArrayList locales, javax.servlet.http.HttpServletRequest request) throws com.bea.p13n.entitlements.common.EntitlementsException
locales
- list of (Locale) in order of preference.request
- HttpServletRequest
com.bea.p13n.entitlements.common.EntitlementsException
- if an error occurs during creation of an EntitlementRequest
.public CustomizationContext(Locale locale, String webapp)
locale
- used to localize titles and descriptions.webapp
- the name of the webapp this request is scoped to.public CustomizationContext(ArrayList locales, String webapp)
locales
- list of (Locale) in order of preference.webapp
- the name of the webapp this request is scoped to.Method Detail |
---|
public void addLocale(Locale locale)
Add a locale to the end of the preferred locale list. The locales in this list are used to search against the database to perform a best match.
locale
- a reference to another preferred locale.public Locale[] getLocales()
Getter for retrieving the ordered list of preferred locales.
public void setRequest(javax.servlet.http.HttpServletRequest request) throws com.bea.p13n.entitlements.common.EntitlementsException
Load the HttpServletRequest
. An EntitlementRequest
is created from this request and put in the HttpServletRequest
as an attribute under the key PORTAL_ENTITLEMENT_REQUEST
.
request
- regular HttpServletRequest.com.bea.p13n.entitlements.common.EntitlementsException
- if an error occurs during creation of an EntitlementRequest
.public void setRequest(String webapp)
The EntitlementRequest
is created from the webapp name. Only to be used when HttpServletRequest is not available.
webapp
- the web app namepublic int getDisassemblerTemplateAction()
The action that should be performed if there are collisions between the template and the database during an update.
public void setDisassemblerTemplateAction(int disassemblerTemplateAction)
Set the action that should be performed if there are collisions between the template and the database.
Possible values:disassemblerTemplateAction
-IllegalArgumentException
- if disassemblerTemplateAction is not one of the three valid values.DuplicateDefinitionException
public boolean isVisitorMode()
Is the API being called in visitor mode? The Portal customization API is used in both the Admin Portal as well as the Visitor Tools. The flag indicates at what level you what to customize. If this flag is set to false (default) then the changes made through the API affect the admin instance as well as all user instances, so all users will see the change. If this flag is set to true then only the user calling it will see the changes.
com.bea.netuix.application.manager.persistence.jdbc.PortalCustomizationManagerImpl
public void setVisitorMode(boolean visitorMode)
Set whether API call is to be made in visitor or admin mode.
The Portal customization API is used in both the Admin Portal as well as the Visitor Tools. The flag indicates at what level you what to customize. If this flag is set to false (default) then the changes made through the API affect the admin instance as well as all user instances, so all users will see the change. If this flag is set to true then only the user calling it will see the changes.
Note: you need to be in an ADMIN role in order to set visitor mode == false. Otherwise any user could affect the entire portal.
visitorMode
- if true, only affect the visitor calling this method.com.bea.netuix.application.manager.persistence.jdbc.PortalCustomizationManagerImpl
public boolean isRetrieveResultsIfNoLocale()
public void setRetrieveResultsIfNoLocale(boolean retrieveResultsIfNoLocale)
public String[] getDaCapabilities()
public void setDaCapabilities(String[] daCapabilities)
public String getResourcePrefix()
public void setResourcePrefix(String resourcePrefix)
public short getProliferationMode()
Typically all changes that are made to library artifacts are cascaded down to the admin's desktop and subsequently cascaded down to the visitor's view. If this property is set to "SYNC" then these changes will occur synchronously as part of this transaction. If this property is set to "ASYNC" then changes will be queued on a persistent JMS queue and each user's proliferation will occur in its own separate transaction in the background. If this property is set to "OFF" then changes will not get cascaded for the artifacts which have been modified. (NOTE: For books, pages and portlets that have not been modified at the admin or visitor level, then these will always receive the changes as they point to the default).
public void setProliferationMode(short proliferationMode)
Typically all changes that are made to library artifacts are cascaded down to the admin's desktop and subsequently cascaded down to the visitor's view. If this property is set to "SYNC" then these changes will occur synchronously as part of this transaction. If this property is set to "ASYNC" then changes will be queued on a persistent JMS queue and each user's proliferation will occur in its own separate transaction in the background. If this property is set to "OFF" then changes will not get cascaded for the artifacts which have been modified. (NOTE: For books, pages and portlets that have not been modified at the admin or visitor level, then these will always receive the changes as they point to the default).
proliferationMode
- Possible values:public static CustomizationContext clone(CustomizationContext that)
|
Oracle Fusion Middleware Java API for Oracle WebLogic Portal 10g Release 3 (10.3.2) E14255-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2010, Oracle. All rights reserved.