de.uplanet.lucy.server.auxiliaries
Class ObjectFactory

java.lang.Object
  extended by de.uplanet.lucy.server.auxiliaries.ObjectFactory

@VelocityCallable(value="singleton")
public final class ObjectFactory
extends java.lang.Object

This class is solely intended to create or access objects without having them preallocated in the Velocity context.

NOTE: Database connections and session objects are intentionally required in the methods' parameter lists to make their usage explicit in the Velocity script files.

Version:
$Revision: 76927 $

Constructor Summary
ObjectFactory()
          Default constructor.
 
Method Summary
 IFilter<?> createFilter(java.lang.String p_strFilterClass)
          Create a filter.
 IFilter<?> createFilter(java.lang.String p_strFilterClass, java.lang.Object p_param)
          Create a filter with a single construction parameter.
 AuthProxy getAuthProxy()
          Create an AuthProxy instance.
 GoogleGadgetTransformer getGoogleGadgetTransformer()
          Get a Google gadget transformer.
 MainPortalManager getMainPortalManager()
          MainPortalManager
 NewsAgentProxy getNewsAgent(de.uplanet.jdbc.JdbcConnection p_conn)
           
 PortletManager getPortletManager(de.uplanet.jdbc.JdbcConnection p_conn)
           
 IUser getUserFromGuid(de.uplanet.jdbc.JdbcConnection p_conn, java.lang.String p_strGuid)
          Get a user from the database.
 IUser getUserFromId(de.uplanet.jdbc.JdbcConnection p_conn, int p_iUserId)
          Get a user from the database.
 IUser getUserFromLoginName(de.uplanet.jdbc.JdbcConnection p_conn, java.lang.String p_strLoginName, java.lang.String p_strLoginDomain)
          Get a user from the database.
 IUser getUserFromQualifiedLoginName(de.uplanet.jdbc.JdbcConnection p_conn, java.lang.String p_strQualifiedLoginName)
          Get a user from the database.
 UserProfile getUserProfile(de.uplanet.jdbc.JdbcConnection p_conn, java.lang.String p_strUserId, int p_iCacheUsage)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectFactory

public ObjectFactory()
Default constructor.

Method Detail

createFilter

public IFilter<?> createFilter(java.lang.String p_strFilterClass)
                        throws java.lang.Exception
Create a filter.

Parameters:
p_strFilterClass - The fully qualified name of a class that implements IFilter, and has a public default constructor.
Returns:
A new filter object.
Throws:
java.lang.Exception - If an error occurred.

createFilter

public IFilter<?> createFilter(java.lang.String p_strFilterClass,
                               java.lang.Object p_param)
                        throws java.lang.Exception
Create a filter with a single construction parameter.

Parameters:
p_strFilterClass - The fully qualified name of a class that implements IFilter, and has a public default constructor.
p_param - a construction parameter for the filter.
Returns:
A new filter object.
Throws:
java.lang.Exception - If an error occurred.

getUserProfile

public UserProfile getUserProfile(de.uplanet.jdbc.JdbcConnection p_conn,
                                  java.lang.String p_strUserId,
                                  int p_iCacheUsage)
See Also:
UserProfile

getPortletManager

public PortletManager getPortletManager(de.uplanet.jdbc.JdbcConnection p_conn)
Returns:
A portlet manager.
See Also:
PortletManager

getMainPortalManager

public MainPortalManager getMainPortalManager()
MainPortalManager

Returns:
A m ain portal manager.

getNewsAgent

public NewsAgentProxy getNewsAgent(de.uplanet.jdbc.JdbcConnection p_conn)
Returns:
A news agent (proxy) instance.
See Also:
NewsAgentProxy

getAuthProxy

public AuthProxy getAuthProxy()
Create an AuthProxy instance.

Returns:
The authentication proxy.

getUserFromId

public IUser getUserFromId(de.uplanet.jdbc.JdbcConnection p_conn,
                           int p_iUserId)
Get a user from the database.

Returns:
The user with the specified integer id, or null if the user was not found in the database.

getUserFromGuid

public IUser getUserFromGuid(de.uplanet.jdbc.JdbcConnection p_conn,
                             java.lang.String p_strGuid)
Get a user from the database.

Returns:
The user with the specified unique identifier, or null if the user was not found in the database.

getUserFromLoginName

public IUser getUserFromLoginName(de.uplanet.jdbc.JdbcConnection p_conn,
                                  java.lang.String p_strLoginName,
                                  java.lang.String p_strLoginDomain)
Get a user from the database.

Returns:
The user with the specified login name and domain, or null if the user was not found in the database.

getUserFromQualifiedLoginName

public IUser getUserFromQualifiedLoginName(de.uplanet.jdbc.JdbcConnection p_conn,
                                           java.lang.String p_strQualifiedLoginName)
Get a user from the database.

Returns:
The user with the specified qualified login name, or null if the user was not found in the database.

getGoogleGadgetTransformer

public GoogleGadgetTransformer getGoogleGadgetTransformer()
Get a Google gadget transformer.

Returns:
The transformer.


Last updated: 2011-01-27
Copyright 2000-2010 United Planet. All Rights Reserved.