Overview | Package | Class | Tree | Deprecated | Index | Help
| © 2005 BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.netuix.application.manager
Class CustomizationContext

    java.lang.Object
      com.bea.netuix.application.manager.CustomizationContext

All Implemented Interfaces:
  Serializable

public class CustomizationContext
extends Object
implements Serializable

A client specific context containing customization properties the APIs use to personalize the request. Specifically, a preferred `Locale` is used to internationalize the titles and descriptions and a `HttpServletRequest` to perform entitlement checking on request attributes.

See Also:
  Serialized Form

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.

Constructor Summary
`CustomizationContext()` A null construtor.
`CustomizationContext(ArrayList locales)` A more complex contructor containing an in ordered list of preferred locales.
`CustomizationContext(ArrayList locales, HttpServletRequest request)` A more complex contructor containing an in order list of preferred locales and a reference to the users dekstop instance id.
`CustomizationContext(HttpServletRequest request)` Create a minimial customization context consisting of a `HttpServletRequest`.
`CustomizationContext(Locale locale)` Create a minimal customization context consisting of one preferred locale.
`CustomizationContext(Locale locale, HttpServletRequest request)` 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.
`int` | `getDisassemblerTemplateAction()` The action that should be performed if there are collisions between the template and the database dusing disassembly.
`Locale[]` | `getLocales()` Getter for retrieving the ordered list of preferred locales.
`com.bea.p13n.entitlements.common.EntitlementRequest` | `getRequest()` Return the EntitlementRequest, this method is used internally and has little use for developers.
`boolean` | `isAdminBookCustomizations()`
`boolean` | `isAdminPageCustomizations()`
`boolean` | `isUserBookCustomizations()`
`boolean` | `isUserPageCustomizations()`
`boolean` | `isVisitorMode()` Is the API being called in visitor mode (default false).
`void` | `setAdminBookCustomizations(boolean adminBookCustomizations)`
`void` | `setAdminPageCustomizations(boolean adminPageCustomizations)`
`void` | `setDisassemblerTemplateAction(int disassemblerTemplateAction)` Set the action that should be performed if there are collisions between the template and the database.
`void` | `setRequest(HttpServletRequest request)` Load the `HttpServletRequest`.
`void` | `setUserBookCustomizations(boolean userBookCustomizations)`
`void` | `setUserPageCustomizations(boolean userPageCustomizations)`
`void` | `setVisitorMode(boolean visitorMode)` Set how the API is being called.
`String` | `toString()` Dumps the contents of this customization context, little use except for debugging

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### DISASSEMBLER_ACCEPT_DB

    public static final 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. In other words the database objects take precedence. This option is more commonly used in production as to preserve customizations.

  See Also:
    Constant Field Values

### DISASSEMBLER_ACCEPT_DB_UPDATE_MARKUP

    public static final 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. However, update the XML (markup) from the .portal file. This will allow for updates on properties like: backingFile, rolloverImage, activeImage, ...

  See Also:
    Constant Field Values

### DISASSEMBLER_ACCEPT_TEMPLATE

    public static final 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. In other words the tempalte objects take precedence. This option is more commonly used in development as to install new Books and Pages.

  See Also:
    Constant Field Values

### DISASSEMBLER_PROPAGATE_EXCEPTION

    public static final 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. Note: This is the default option.

  See Also:
    `DuplicateDefinitionException`, Constant Field Values

### PORTAL_ENTITLEMENT_REQUEST

    public static final String PORTAL_ENTITLEMENT_REQUEST

  An http request attribute key name for the EntitlementRequest.

  See Also:
    `EntitlementRequest`, Constant Field Values

Constructor Detail

### CustomizationContext

    public CustomizationContext()

  A null construtor. This constructor can not stand by itself, all methods requesting a customizationContext require a locale and HttpRequest.

### CustomizationContext

    public CustomizationContext(ArrayList locales)

  A more complex contructor containing an in ordered list of preferred locales. This contructor is usually called by the framework system and not to be used by the typical developer.

### CustomizationContext

    public CustomizationContext(ArrayList locales,
                                HttpServletRequest request)
                         throws com.bea.p13n.entitlements.common.EntitlementsException

  A more complex contructor containing an in order list of preferred locales and a reference to the users dekstop instance id. This contructor is usually called by the framework system and not to be used by the average developer.

Throws:
  `com.bea.p13n.entitlements.common.EntitlementsException` - if an error occurrs during creation of an `AdviceRequest`.

### CustomizationContext

    public CustomizationContext(HttpServletRequest request)
                         throws com.bea.p13n.entitlements.common.EntitlementsException

  Create a minimial customization context consisting of a `HttpServletRequest`.

Throws:
  `com.bea.p13n.entitlements.common.EntitlementsException`

### CustomizationContext

    public CustomizationContext(Locale locale)

  Create a minimal customization context consisting of one preferred locale. The locale is used to localize/internationalize each request. Different locales will result in different titles and descriptions being returned for the model objects.

### CustomizationContext

    public CustomizationContext(Locale locale,
                                HttpServletRequest request)
                         throws com.bea.p13n.entitlements.common.EntitlementsException

  Create a minimal customization context consisting of one preferred locale. This is the most common constructor used by developers as it contains the required preferred `Locale` and `HttpServletRequest`

Throws:
  `com.bea.p13n.entitlements.common.EntitlementsException`

Method Detail

### addLocale

    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.

  Parameters:
    `locale` - a reference to another preferred locale.

### getDisassemblerTemplateAction

    public int getDisassemblerTemplateAction()

  The action that should be performed if there are collisions between the template and the database dusing disassembly.

  Returns:
    action Possible values: DISASSEMBLER_ACCEPT_DB, DISASSEMBLER_ACCEPT_TEMPLATE, DISASSEMBLER_PROPAGATE_EXCEPTION, DISASSEMBLER_ACCEPT_DB_UPDATE_MARKUP

### getLocales

    public Locale[] getLocales()

  Getter for retrieving the ordered list of preferred locales.

  Returns:
    an ordered list of preferred locales. If no Locales are represent a non null zero length array will be returned.

### getRequest

    public com.bea.p13n.entitlements.common.EntitlementRequest getRequest()

  Return the EntitlementRequest, this method is used internally and has little use for developers.

  Returns:
    the entitlement HttpRequest.

### isAdminBookCustomizations

    public boolean isAdminBookCustomizations()

### isAdminPageCustomizations

    public boolean isAdminPageCustomizations()

### isUserBookCustomizations

    public boolean isUserBookCustomizations()

### isUserPageCustomizations

    public boolean isUserPageCustomizations()

### isVisitorMode

    public boolean isVisitorMode()

  Is the API being called in visitor mode (default false). The same API namely `PortalCustomizationManager` is used in 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 effect 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.

  Returns:
    visitor mode
  See Also:
    `PortalCustomizationManagerImpl`

### setAdminBookCustomizations

    public void setAdminBookCustomizations(boolean adminBookCustomizations)

### setAdminPageCustomizations

    public void setAdminPageCustomizations(boolean adminPageCustomizations)

### setDisassemblerTemplateAction

    public void setDisassemblerTemplateAction(int disassemblerTemplateAction)

  Set the action that should be performed if there are collisions between the template and the database.

  Possible values:
  - CustomizationContext.DISASSEMBLER_ACCEPT_DB
  - CustomizationContext.DISASSEMBLER_ACCEPT_TEMPLATE
  - CustomizationContext.DISASSEMBLER_PROPAGATE_EXCEPTION
  - CustomizationContext.DISASSEMBLER_ACCEPT_DB_UPDATE_MARKUP

  Parameters:
    `disassemblerTemplateAction` -
  Throws:
    `IllegalArgumentException` - if disassemblerTemplateAction is not one of the three valid values.
  See Also:
    `DuplicateDefinitionException`

### setRequest

    public void setRequest(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`.

  Parameters:
    `request` - regular HttpServletRequest.
  Throws:
    `com.bea.p13n.entitlements.common.EntitlementsException` - if an error occurrs during creation of an `AdviceRequest`.

### setUserBookCustomizations

    public void setUserBookCustomizations(boolean userBookCustomizations)

### setUserPageCustomizations

    public void setUserPageCustomizations(boolean userPageCustomizations)

### setVisitorMode

    public void setVisitorMode(boolean visitorMode)

  Set how the API is being called. (defaults to false)
  The same API namely `PortalCustomizationManager` is used in 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 effect 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.

  Parameters:
    `visitorMode` - true == only effect the visitor calling this method.
  See Also:
    `PortalCustomizationManagerImpl`

### toString

    public String toString()

  Dumps the contents of this customization context, little use except for debugging

  Returns:
    a debugging string

Overview | Package | Class | Tree | Deprecated | Index | Help
| © 2005 BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005 BEA Systems, Inc. All Rights Reserved