Class ObjectFactory
java.lang.Object
de.uplanet.lucy.server.auxiliaries.ObjectFactory
@VelocityVariable("Factory")
@VelocityCallable("instance")
public final class ObjectFactory
extends 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.
-
Constructor Summary
ConstructorDescriptionObjectFactory
(de.uplanet.lucy.server.scripting.velocity.callables.IInternalObjectFactory p_internalObjectFactory) -
Method Summary
Modifier and TypeMethodDescriptionIFilter
<?> 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.AuthProxy
Deprecated.de.uplanet.lucy.server.auxiliaries.AuthProxy
getAuthProxy
(de.uplanet.jdbc.JdbcConnection p_conn) Create anAuthProxy
instance.de.uplanet.lucy.server.auxiliaries.net.HttpRequest
Create aHttpRequest
instance.Get the license util callable.de.uplanet.lucy.server.kahab.NagResult
For internal use only.de.uplanet.lucy.server.auxiliaries.NewsAgentProxy
getNewsAgent
(de.uplanet.jdbc.JdbcConnection p_conn) getNumberByDateAggregator
(String p_strMode, TimeZone p_tz) Create a helper object for aggregating time values.Create a helper object for aggregating floating point numbers.Create a helper object for aggregating integer numbers.getNumberByStringAggregator
(String p_strMode) Create a helper object for aggregating strings.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.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.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.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.de.uplanet.lucy.server.auxiliaries.portlet.VelocityPortlets
Get the portlet util callable.Returns release track from server.getUserFromGuid
(de.uplanet.jdbc.JdbcConnection p_conn, String p_strGuid) Get a user from the database.getUserFromId
(de.uplanet.jdbc.JdbcConnection p_conn, int p_iUserId) Get a user from the database.getUserFromLoginName
(de.uplanet.jdbc.JdbcConnection p_conn, String p_strLoginName, String p_strLoginDomain) Get a user from the database.getUserFromQualifiedLoginName
(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQualifiedLoginName) Get a user from the database.de.uplanet.lucy.server.profile.IUserProfile
getUserProfile
(de.uplanet.jdbc.JdbcConnection p_conn, String p_strUserId, int p_iCacheUsage) boolean
hasPortalAdminPermission
(de.uplanet.lucy.server.engine.http.IWebProcessingContext p_ctx, de.uplanet.lucy.server.businesslogic.rtappservices.IWebDataCollection p_dataCollection, String p_strGridId)
-
Constructor Details
-
ObjectFactory
public ObjectFactory(de.uplanet.lucy.server.scripting.velocity.callables.IInternalObjectFactory p_internalObjectFactory)
-
-
Method Details
-
createFilter
Create a filter. -
createFilter
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:
-
getPortletUtil
public de.uplanet.lucy.server.auxiliaries.portlet.VelocityPortlets getPortletUtil()Get the portlet util callable.- Returns:
- The portlet util callable.
-
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:
-
getAuthProxy
public de.uplanet.lucy.server.auxiliaries.AuthProxy getAuthProxy(de.uplanet.jdbc.JdbcConnection p_conn) Create anAuthProxy
instance.- Returns:
- The authentication proxy.
-
getAuthProxy
Deprecated.UsegetAuthProxy(JdbcConnection)
instead. -
getHttpRequest
public de.uplanet.lucy.server.auxiliaries.net.HttpRequest getHttpRequest()Create aHttpRequest
instance.- Returns:
- A HTTP request object.
-
getRFC5545Util
- Returns:
- A RFC 5545 utility.
- Since:
- Intrexx version 5.2.
-
getUserFromId
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
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, String p_strLoginName, 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, 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.
-
getNumberByStringAggregator
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
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
Create a helper object for aggregating integer numbers.- Returns:
- An aggregator object.
-
getNumberByDoubleAggregator
Create a helper object for aggregating floating point numbers.- Returns:
- An aggregator object.
-
getReleaseTrack
Returns release track from server.- Returns:
- silent or steady
-
getAuthProxy(JdbcConnection)
instead.