Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jasig.portal.layout.dlm
Class FragmentActivator

    java.lang.Object
      org.jasig.portal.layout.dlm.FragmentActivator

    public class FragmentActivator

extends java.lang.Object

Since:
  uPortal 2.5
Version:
  $Revision: 1.7 $ $Date: 2005/05/25 07:48:01 $

Field Summary
`private static int` | `CHANNELS`
`private RDBMDistributedLayoutStore` | `dls`
`private static int` | `FOLDERS`
`private FragmentDefinition[]` | `fragments`
`private IUserIdentityStore` | `identityStore`
`private static org.apache.commons.logging.Log` | `LOG`
`private IRoleUpdater` | `mRoleUpdater`
`static java.lang.String` | `RCS_ID`

Constructor Summary
`FragmentActivator(RDBMDistributedLayoutStore dls, FragmentDefinition[] fragments)`

Method Summary
`(package private) void` | `activateFragments()`
`private IPerson` | `bindToOwner(FragmentDefinition fragment)`
`private int` | `createOwner(IPerson owner, FragmentDefinition fragment)`
`private void` | `fragmentizeIds(java.lang.String labelBase, DistributedUserPreferences up, int which)` Changes user preference ids of folders or channels from the uPortal default of sXX for folders and nXX for channels to a globally safe value containing the user id and layout id from which the node came.
`(package private) void` | `fragmentizeLayout(UserView view, FragmentDefinition fragment)` Removes all top level folders that are hidden, header, or footer and then changes all node ids to their globally safe incorporated version.
`(package private) void` | `fragmentizeSSUP(UserView view, FragmentDefinition fragment)` Changes channel and folder ids on the structure stylesheet user preference object to the globally safe version containing user id and layout id from which they came.
`(package private) void` | `fragmentizeTSUP(UserView view, FragmentDefinition fragment)` Changes channel ids on the theme stylesheet user preference object to the globally safe version containing user id and layout id from which they came.
`private void` | `loadLayout(UserView view, FragmentDefinition fragment, IPerson owner)`
`private void` | `loadPreferences(UserView view, FragmentDefinition fragment)`
`private void` | `saveLayout(UserView view, IPerson owner)` Saves the loaded layout in the database for the user and profile.
`private void` | `setIdsAndAttribs(org.w3c.dom.Element parent, java.lang.String labelBase, java.lang.String index, java.lang.String precedence)` Recursive method that passes through a layout tree and changes all ids from the regular format of sXX or nXX to the globally safe incorporated id of form uXlXsXX or uXlXnXX indicating the user id and layout id from which this node came.
`private void` | `updateOwnerRoles(FragmentDefinition definition)` Makes sure that the fragment owner has the roles specified and no others.

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

Field Detail

### RCS_ID

    public static final java.lang.String RCS_ID

See Also:
  Constant Field Values

### LOG

    private static org.apache.commons.logging.Log LOG

### fragments

    private FragmentDefinition[] fragments

### identityStore

    private IUserIdentityStore identityStore

### dls

    private RDBMDistributedLayoutStore dls

### mRoleUpdater

    private IRoleUpdater mRoleUpdater

### CHANNELS

    private static final int CHANNELS

See Also:
  Constant Field Values

### FOLDERS

    private static final int FOLDERS

See Also:
  Constant Field Values

Constructor Detail

### FragmentActivator

    public FragmentActivator(RDBMDistributedLayoutStore dls,
                             FragmentDefinition[] fragments)

Method Detail

### activateFragments

    void activateFragments()

### saveLayout

    private void saveLayout(UserView view,
                            IPerson owner)
                     throws java.lang.Exception

  Saves the loaded layout in the database for the user and profile.

  Parameters:
    `view` -
    `owner` -
  Throws:
    `java.lang.Exception`

### updateOwnerRoles

    private void updateOwnerRoles(FragmentDefinition definition)

  Makes sure that the fragment owner has the roles specified and no others.

  Parameters:
    `definition` - The frament definition

### bindToOwner

    private IPerson bindToOwner(FragmentDefinition fragment)

### createOwner

    private int createOwner(IPerson owner,
                            FragmentDefinition fragment)

### loadLayout

    private void loadLayout(UserView view,
                            FragmentDefinition fragment,
                            IPerson owner)

### loadPreferences

    private void loadPreferences(UserView view,
                                 FragmentDefinition fragment)

### fragmentizeSSUP

    void fragmentizeSSUP(UserView view,
                         FragmentDefinition fragment)

  Changes channel and folder ids on the structure stylesheet user preference object to the globally safe version containing user id and layout id from which they came. This is done prior to these preferences being available for incorporation into a regular user's preferences from an incorporated layout.

### fragmentizeTSUP

    void fragmentizeTSUP(UserView view,
                         FragmentDefinition fragment)

  Changes channel ids on the theme stylesheet user preference object to the globally safe version containing user id and layout id from which they came. This is done prior to these preferences being available for incorporation into a regular user's preferences from an incorporated layout.

### fragmentizeIds

    private void fragmentizeIds(java.lang.String labelBase,
                                DistributedUserPreferences up,
                                int which)

  Changes user preference ids of folders or channels from the uPortal default of sXX for folders and nXX for channels to a globally safe value containing the user id and layout id from which the node came.

### fragmentizeLayout

    void fragmentizeLayout(UserView view,
                           FragmentDefinition fragment)

  Removes all top level folders that are hidden, header, or footer and then changes all node ids to their globally safe incorporated version.

### setIdsAndAttribs

    private void setIdsAndAttribs(org.w3c.dom.Element parent,
                                  java.lang.String labelBase,
                                  java.lang.String index,
                                  java.lang.String precedence)

  Recursive method that passes through a layout tree and changes all ids from the regular format of sXX or nXX to the globally safe incorporated id of form uXlXsXX or uXlXnXX indicating the user id and layout id from which this node came.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD