Class ObjectFactory
- java.lang.Object
-
- de.uplanet.lucy.server.auxiliaries.ObjectFactory
-
@VelocityVariable("Factory") @VelocityCallable("instance") public final class ObjectFactory extends ObjectThis 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.
-
-
Constructor Summary
Constructors Constructor Description ObjectFactory(de.uplanet.lucy.server.scripting.velocity.callables.IInternalObjectFactory p_internalObjectFactory)ObjectFactory(de.uplanet.lucy.server.scripting.velocity.callables.IInternalObjectFactory p_internalObjectFactory, de.uplanet.lucy.server.portlet.dao.IMainPortalDaoFactory p_mainPortalDaoFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description IFilter<?>createFilter(String p_strFilterClass)Create a filter.IFilter<?>createFilter(String p_strFilterClass, Object p_param)Create a filter with a single construction parameter.de.uplanet.lucy.server.auxiliaries.AuthProxygetAuthProxy()Deprecated.UsegetAuthProxy(JdbcConnection)instead.de.uplanet.lucy.server.auxiliaries.AuthProxygetAuthProxy(de.uplanet.jdbc.JdbcConnection p_conn)Create anAuthProxyinstance.de.uplanet.lucy.server.auxiliaries.net.HttpRequestgetHttpRequest()Create aHttpRequestinstance.LicUtilgetLicUtil()Get the license util callable.de.uplanet.lucy.server.kahab.NagResultgetNag(de.uplanet.lucy.server.engine.http.IWebProcessingContext p_ctx, String p_strLang)For internal use only.de.uplanet.lucy.server.auxiliaries.NewsAgentProxygetNewsAgent(de.uplanet.jdbc.JdbcConnection p_conn)NumberByDateAggregatorgetNumberByDateAggregator(String p_strMode, TimeZone p_tz)Create a helper object for aggregating time values.NumberByDoubleAggregatorgetNumberByDoubleAggregator()Create a helper object for aggregating floating point numbers.NumberByLongAggregatorgetNumberByLongAggregator()Create a helper object for aggregating integer numbers.NumberByStringAggregatorgetNumberByStringAggregator(String p_strMode)Create a helper object for aggregating strings.de.uplanet.lucy.server.auxiliaries.portlet.VelocityPortletGridManagergetPortletGridManager(de.uplanet.jdbc.JdbcConnection p_conn, String p_strGridId, String p_strUserGuid, String p_strLang)Get a portlet grid manager for the given user.de.uplanet.lucy.server.auxiliaries.portlet.VelocityPortletGridManagergetPortletGridManagerForDefaultUser(de.uplanet.jdbc.JdbcConnection p_conn, String p_strGridId, String p_strLang)Get a portlet grid manager for the default user.de.uplanet.lucy.server.auxiliaries.portlet.VelocityPortletManagergetPortletManager(de.uplanet.lucy.server.engine.http.IWebProcessingContext p_ctx, de.uplanet.lucy.server.businesslogic.rtappservices.IWebDataCollection p_dataCollection, String p_strGridId, String p_strUserGuid, String p_strLang)Get a portlet manager for the given user.de.uplanet.lucy.server.auxiliaries.portlet.VelocityPortletManagergetPortletManagerForDefaultUser(de.uplanet.lucy.server.engine.http.IWebProcessingContext p_ctx, de.uplanet.lucy.server.businesslogic.rtappservices.IWebDataCollection p_dataCollection, String p_strGridId, String p_strLang)Get a portlet manager for the default user.de.uplanet.lucy.server.auxiliaries.portlet.VelocityPortletsgetPortletUtil()Get the portlet util callable.RFC5545UtilgetRFC5545Util()IUsergetUserFromGuid(de.uplanet.jdbc.JdbcConnection p_conn, String p_strGuid)Get a user from the database.IUsergetUserFromId(de.uplanet.jdbc.JdbcConnection p_conn, int p_iUserId)Get a user from the database.IUsergetUserFromLoginName(de.uplanet.jdbc.JdbcConnection p_conn, String p_strLoginName, String p_strLoginDomain)Get a user from the database.IUsergetUserFromQualifiedLoginName(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQualifiedLoginName)Get a user from the database.de.uplanet.lucy.server.profile.IUserProfilegetUserProfile(de.uplanet.jdbc.JdbcConnection p_conn, String p_strUserId, int p_iCacheUsage)booleanhasPortalAdminPermission(de.uplanet.lucy.server.engine.http.IWebProcessingContext p_ctx, de.uplanet.lucy.server.businesslogic.rtappservices.IWebDataCollection p_dataCollection, String p_strGridId)
-
-
-
Constructor Detail
-
ObjectFactory
public ObjectFactory(de.uplanet.lucy.server.scripting.velocity.callables.IInternalObjectFactory p_internalObjectFactory)
-
ObjectFactory
public ObjectFactory(de.uplanet.lucy.server.scripting.velocity.callables.IInternalObjectFactory p_internalObjectFactory, de.uplanet.lucy.server.portlet.dao.IMainPortalDaoFactory p_mainPortalDaoFactory)
-
-
Method Detail
-
createFilter
public IFilter<?> createFilter(String p_strFilterClass) throws Exception
Create a filter.
-
createFilter
public IFilter<?> createFilter(String p_strFilterClass, Object p_param) throws Exception
Create a filter with a single construction parameter.
-
getUserProfile
public de.uplanet.lucy.server.profile.IUserProfile getUserProfile(de.uplanet.jdbc.JdbcConnection p_conn, String p_strUserId, int p_iCacheUsage)- See Also:
UserProfile
-
getPortletUtil
public de.uplanet.lucy.server.auxiliaries.portlet.VelocityPortlets getPortletUtil()
Get the portlet util callable.- Returns:
- The portlet util callable.
-
getLicUtil
public LicUtil getLicUtil()
Get the license util callable.- Returns:
- The license util callable.
-
getNag
public de.uplanet.lucy.server.kahab.NagResult getNag(de.uplanet.lucy.server.engine.http.IWebProcessingContext p_ctx, String p_strLang)For internal use only.- Parameters:
p_ctx- The current processing context.p_strLang- The language identifier.- Returns:
- The nag result.
-
getPortletManagerForDefaultUser
public de.uplanet.lucy.server.auxiliaries.portlet.VelocityPortletManager getPortletManagerForDefaultUser(de.uplanet.lucy.server.engine.http.IWebProcessingContext p_ctx, de.uplanet.lucy.server.businesslogic.rtappservices.IWebDataCollection p_dataCollection, String p_strGridId, String p_strLang)Get a portlet manager for the default user.- Parameters:
p_ctx- The current processing context.p_strGridId- The grid-ID/portlet container-GUID.p_strLang- The language identifier.- Returns:
- A portlet manager.
-
getPortletManager
public de.uplanet.lucy.server.auxiliaries.portlet.VelocityPortletManager getPortletManager(de.uplanet.lucy.server.engine.http.IWebProcessingContext p_ctx, de.uplanet.lucy.server.businesslogic.rtappservices.IWebDataCollection p_dataCollection, String p_strGridId, String p_strUserGuid, String p_strLang)Get a portlet manager for the given user.- Parameters:
p_ctx- The current processing context.p_strGridId- The grid-ID/portlet container-GUID.p_strUserGuid- The user for whom the portlet manager should be created.p_strLang- The language identifier.- Returns:
- A portlet manager.
-
hasPortalAdminPermission
public boolean hasPortalAdminPermission(de.uplanet.lucy.server.engine.http.IWebProcessingContext p_ctx, de.uplanet.lucy.server.businesslogic.rtappservices.IWebDataCollection p_dataCollection, String p_strGridId)
-
getPortletGridManagerForDefaultUser
public de.uplanet.lucy.server.auxiliaries.portlet.VelocityPortletGridManager getPortletGridManagerForDefaultUser(de.uplanet.jdbc.JdbcConnection p_conn, String p_strGridId, String p_strLang)Get a portlet grid manager for the default user.- Parameters:
p_conn- The database connection to be used.p_strGridId- The grid-ID/portal container-GUID.p_strLang- The language identifier.- Returns:
- A portlet grid manager.
-
getPortletGridManager
public de.uplanet.lucy.server.auxiliaries.portlet.VelocityPortletGridManager getPortletGridManager(de.uplanet.jdbc.JdbcConnection p_conn, String p_strGridId, String p_strUserGuid, String p_strLang)Get a portlet grid manager for the given user.- Parameters:
p_conn- The database connection to be used.p_strGridId- The grid-ID/portal container-GUID.p_strUserGuid- The user for whom the portlet grid manager should be created.p_strLang- The language identifier.- Returns:
- A portlet grid manager.
-
getNewsAgent
public de.uplanet.lucy.server.auxiliaries.NewsAgentProxy getNewsAgent(de.uplanet.jdbc.JdbcConnection p_conn)
- Returns:
- A news agent (proxy) instance.
- See Also:
NewsAgentProxy
-
getAuthProxy
public de.uplanet.lucy.server.auxiliaries.AuthProxy getAuthProxy(de.uplanet.jdbc.JdbcConnection p_conn)
Create anAuthProxyinstance.- Returns:
- The authentication proxy.
-
getAuthProxy
@Deprecated public de.uplanet.lucy.server.auxiliaries.AuthProxy getAuthProxy()
Deprecated.UsegetAuthProxy(JdbcConnection)instead.
-
getHttpRequest
public de.uplanet.lucy.server.auxiliaries.net.HttpRequest getHttpRequest()
Create aHttpRequestinstance.- Returns:
- A HTTP request object.
-
getRFC5545Util
public RFC5545Util getRFC5545Util()
- Returns:
- A RFC 5545 utility.
- Since:
- Intrexx version 5.2.
-
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
nullif the user was not found in the database.
-
getUserFromGuid
public IUser getUserFromGuid(de.uplanet.jdbc.JdbcConnection p_conn, String p_strGuid)
Get a user from the database.- Returns:
- The user with the specified unique identifier, or
nullif the user was not found in the database.
-
getUserFromLoginName
public IUser getUserFromLoginName(de.uplanet.jdbc.JdbcConnection p_conn, String p_strLoginName, String p_strLoginDomain)
Get a user from the database.- Returns:
- The user with the specified login name and domain, or
nullif the user was not found in the database.
-
getUserFromQualifiedLoginName
public IUser getUserFromQualifiedLoginName(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQualifiedLoginName)
Get a user from the database.- Returns:
- The user with the specified qualified login name, or
nullif the user was not found in the database.
-
getNumberByStringAggregator
public NumberByStringAggregator getNumberByStringAggregator(String p_strMode)
Create a helper object for aggregating strings.The following aggregation modes are supported:
caseSensitiveCategory: categories are treated case-sensitivecaseInsensitiveCategory: categories are treated case-insensitive
- Parameters:
p_strMode- The mode used for aggregation.- Returns:
- An aggregator object.
-
getNumberByDateAggregator
public NumberByDateAggregator getNumberByDateAggregator(String p_strMode, TimeZone p_tz)
Create a helper object for aggregating time values.The following aggregation modes are supported:
year: by yearmonth: by monthday: by dayhour: by hourminute: by minutesecond: by secondmillisecond: (should normally not be used)quarter: by quarterweek: by start of the week
- Parameters:
p_strMode- The mode used for aggregation.p_tz- The time zone.- Returns:
- An aggregator object.
-
getNumberByLongAggregator
public NumberByLongAggregator getNumberByLongAggregator()
Create a helper object for aggregating integer numbers.- Returns:
- An aggregator object.
-
getNumberByDoubleAggregator
public NumberByDoubleAggregator getNumberByDoubleAggregator()
Create a helper object for aggregating floating point numbers.- Returns:
- An aggregator object.
-
-