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
Class UserLayoutStoreFactory

    java.lang.Object
      org.jasig.portal.layout.UserLayoutStoreFactory

    public final class UserLayoutStoreFactory

extends java.lang.Object

Produces and manages a static singleton instance of IUserLayoutStore. The `IUserLayoutStore` implementation that we use is that named by the portal.properties property "org.jasig.portal.layout.UserLayoutStoreFactory.implementation". In the case where that property is not set or the IUserLayoutStore it names cannot be instantiated, we fall back on the `AggregatedUserLayoutStore` as the default. Prior to uPortal 2.5, this class existed in the package org.jasig.portal. It has been moved to its present package to express that it is part of the user layout infrastructure. This class is final because it is not designed to be subclassed.

Version:
  $Revision: 1.3 $ $Date: 2005/05/18 18:27:43 $
Author:
  Ken Weiner, kweiner@unicon.net, Michael Ivanov, mvi@immagic.com

Field Summary
`private static java.lang.Class` | `DEFAULT_LAYOUT_STORE` The default IUserLayoutStore implementation we will fall back upon in the case where our property is not set or we cannot instantiate the IUserLayoutStore named by our property.
`static java.lang.String` | `LAYOUT_STORE_IMPL_PROPERTY` The name of the portal.properties property the value of which is the name of the IUserLayoutStore implementation we should use.
`private static org.apache.commons.logging.Log` | `LOG` Commons Logging log instance.
`private static IUserLayoutStore` | `userLayoutStoreImpl` Static singleton instance of userLayoutStoreImpl.

Constructor Summary
`UserLayoutStoreFactory()`

Method Summary
`static IUserLayoutStore` | `getUserLayoutStoreImpl()` Returns the singleton IUserLayoutStore instance, which will be that specified in portal.properties, an instance of the default IUserLayoutStore, or null, in that order.

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

Field Detail

### LAYOUT_STORE_IMPL_PROPERTY

    public static final java.lang.String LAYOUT_STORE_IMPL_PROPERTY

  The name of the portal.properties property the value of which is the name of the IUserLayoutStore implementation we should use.

  See Also:
    Constant Field Values

### LOG

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

  Commons Logging log instance.

### userLayoutStoreImpl

    private static IUserLayoutStore userLayoutStoreImpl

  Static singleton instance of userLayoutStoreImpl.

### DEFAULT_LAYOUT_STORE

    private static final java.lang.Class DEFAULT_LAYOUT_STORE

  The default IUserLayoutStore implementation we will fall back upon in the case where our property is not set or we cannot instantiate the IUserLayoutStore named by our property. This field is default scoped so that our testcase can access it. It is not intended to be part of the public API of this factory.

Constructor Detail

### UserLayoutStoreFactory

    public UserLayoutStoreFactory()

Method Detail

### getUserLayoutStoreImpl

    public static IUserLayoutStore getUserLayoutStoreImpl()

  Returns the singleton IUserLayoutStore instance, which will be that specified in portal.properties, an instance of the default IUserLayoutStore, or null, in that order. That is, we return a static singleton IUserLayoutStore instance when possible, prefering to return an instance of the IUserLayoutStore implementation named in our portal.properties property. If that property is not set or that implementation cannot be successfully instantiated, we will return an instance of the default IUserLayoutStore implementation. If we cannot instantiate that default IUserLayoutStore we will return null. This method is synchronized to ensure a consistent return value, resolving a double checked locking problem. By synchronizing, we ensure that when we write to the userLayoutStoreImpl static field, that write will be available to other threads when they obtain the lock and enter this method.

  Returns:
    the configured or default IUserLayoutStore implementation, or null

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