Class VelocityRtCache
- java.lang.Object
-
- de.uplanet.lucy.server.rtcache.scripting.velocity.VelocityRtCache
-
@VelocityVariable("RtCache") @VelocityCallable("instance") public final class VelocityRtCache extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
VelocityRtCache.FilterTypeSwitch
class
VelocityRtCache.OrderTypeSwitch
-
Constructor Summary
Constructors Constructor Description VelocityRtCache(de.uplanet.lucy.server.rtcache.IRtCacheProvider p_rtCacheProvider, de.uplanet.lucy.server.i18n.ILanguageConstantsProvider p_languageConstantsProvider, String p_strDefaultLanguage)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
existsApplication(String p_strGuid)
Check if the application with the given unique identifier exists.boolean
existsControl(String p_strGuid)
Check if the control with the given unique identifier exists.boolean
existsDataGroup(String p_strGuid)
Check if the data group with the given unique identifier exists.boolean
existsField(String p_strGuid)
Check if the field with the given unique identifier exists.boolean
existsPage(String p_strGuid)
Check if the page with the given unique identifier exists.boolean
existsReference(String p_strGuid)
Check if the reference with the given unique identifier exists.ApplicationInfo
getApplication(String p_strGuid)
Get the application with the given unique identifier.Map<String,ApplicationInfo>
getApplications()
Get all applications.List<ApplicationInfo>
getApplications(IFilter<ApplicationInfo> p_filter)
Get applications that match a given filter.ControlInfo
getControl(String p_strGuid)
Get the control with the given unique identifier.Map<String,ControlInfo>
getControls()
Get all controls.List<ControlInfo>
getControls(IFilter<ControlInfo> p_filter)
Get allControlInfo
objects that are accepted by the given filter.DataGroupInfo
getDataGroup(String p_strGuid)
Get the data group with the given unique identifier.Map<String,DataGroupInfo>
getDataGroups()
Get all data groups.List<DataGroupInfo>
getDataGroups(IFilter<DataGroupInfo> p_filter)
Get data groups that match a given filter.FieldInfo
getField(String p_strGuid)
Get the field with the given unique identifier.Map<String,FieldInfo>
getFields()
Get all fields.List<FieldInfo>
getFields(IFilter<FieldInfo> p_filter)
Get allFieldInfo
objects that are accepted by the given filter.VelocityRtCache.FilterTypeSwitch
getFilter()
Get an object to create different types of filters.ApplicationInfo
getFirstApplication(IFilter<ApplicationInfo> p_filter)
Get first application that matches a given filter.ControlInfo
getFirstControl(IFilter<ControlInfo> p_filter)
Get the firstControlInfo
object that is accepted by the given filter.DataGroupInfo
getFirstDataGroup(IFilter<DataGroupInfo> p_filter)
Get first data group that matchesIFilter
.FieldInfo
getFirstField(IFilter<FieldInfo> p_filter)
Get the firstFieldInfo
object that is accepted by the given filter.PageInfo
getFirstPage(IFilter<PageInfo> p_filter)
Get the firstPageInfo
object that is accepted by the given filter.ReferenceInfo
getFirstReference(IFilter<ReferenceInfo> p_filter)
Get the firstReferenceInfo
object that is accepted by the given filter.VelocityRtCache.OrderTypeSwitch
getOrder()
Get an object to create different types of comparators.PageInfo
getPage(String p_strGuid)
Get the page with the given unique identifier.Map<String,PageInfo>
getPages()
Get all pages.List<PageInfo>
getPages(IFilter<PageInfo> p_filter)
Get allPageInfo
objects that are accepted by the given filter.ReferenceInfo
getReference(String p_strGuid)
Get the reference with the given unique identifier.Map<String,ReferenceInfo>
getReferences()
Get all references.List<ReferenceInfo>
getReferences(IFilter<ReferenceInfo> p_filter)
Get allReferenceInfo
objects that are accepted by the given filter.
-
-
-
Constructor Detail
-
VelocityRtCache
public VelocityRtCache(de.uplanet.lucy.server.rtcache.IRtCacheProvider p_rtCacheProvider, de.uplanet.lucy.server.i18n.ILanguageConstantsProvider p_languageConstantsProvider, String p_strDefaultLanguage)
-
-
Method Detail
-
getFilter
public VelocityRtCache.FilterTypeSwitch getFilter()
Get an object to create different types of filters.Example
$RtCache.filter.application.getAccessible() $RtCache.filter.page.getByApplication("<app-guid>")
- Returns:
- An object to create filters.
-
getOrder
public VelocityRtCache.OrderTypeSwitch getOrder()
Get an object to create different types of comparators.Example
$RtCache.order.titled.getAscending("de")
- Returns:
- An object to create comparators.
-
getApplications
public Map<String,ApplicationInfo> getApplications()
Get all applications.- Returns:
- A map that contains all applications.
-
existsApplication
public boolean existsApplication(String p_strGuid)
Check if the application with the given unique identifier exists.- Parameters:
p_strGuid
- The application's unique identifier.- Returns:
true
if the application exists, orfalse
otherwise.
-
getApplication
public ApplicationInfo getApplication(String p_strGuid)
Get the application with the given unique identifier.- Parameters:
p_strGuid
- The application's unique identifier.- Returns:
- The requested application, or
null
if it was not found.
-
getFirstApplication
public ApplicationInfo getFirstApplication(IFilter<ApplicationInfo> p_filter)
Get first application that matches a given filter.- Parameters:
p_filter
- The filter to be applied (seede.uplanet.lucy.server.auxiliaries.ObjectFactory#createFilter(String)
).- Returns:
ApplicationInfo
list from first matching application.
-
getApplications
public List<ApplicationInfo> getApplications(IFilter<ApplicationInfo> p_filter)
Get applications that match a given filter.- Parameters:
p_filter
- The filter to be applied (seede.uplanet.lucy.server.auxiliaries.ObjectFactory#createFilter(String)
).- Returns:
ApplicationInfo
list of applications that matched the filter.
-
getDataGroups
public Map<String,DataGroupInfo> getDataGroups()
Get all data groups.- Returns:
- a map of all data groups.
-
existsDataGroup
public boolean existsDataGroup(String p_strGuid)
Check if the data group with the given unique identifier exists.- Parameters:
p_strGuid
- The data group's unique identifier.- Returns:
true
if the data group exists, orfalse
otherwise.
-
getDataGroup
public DataGroupInfo getDataGroup(String p_strGuid)
Get the data group with the given unique identifier.- Parameters:
p_strGuid
- The data group's unique identifier.- Returns:
- The requested data group, or
null
if it was not found.
-
getFirstDataGroup
public DataGroupInfo getFirstDataGroup(IFilter<DataGroupInfo> p_filter)
Get first data group that matchesIFilter
.- Parameters:
p_filter
- The filter to be applied (seede.uplanet.lucy.server.auxiliaries.ObjectFactory#createFilter(String)
).- Returns:
DataGroupInfo
list of first matching data group.
-
getDataGroups
public List<DataGroupInfo> getDataGroups(IFilter<DataGroupInfo> p_filter)
Get data groups that match a given filter.- Parameters:
p_filter
- The filter to be applied (seede.uplanet.lucy.server.auxiliaries.ObjectFactory#createFilter(String)
).- Returns:
DataGroupInfo
list of data groups that matched the filter.
-
existsField
public boolean existsField(String p_strGuid)
Check if the field with the given unique identifier exists.- Parameters:
p_strGuid
- The field's unique identifier.- Returns:
true
if the field exists, orfalse
otherwise.
-
getField
public FieldInfo getField(String p_strGuid)
Get the field with the given unique identifier.- Parameters:
p_strGuid
- The field's unique identifier.- Returns:
- The requested field, or
null
if it was not found.
-
getFirstField
public FieldInfo getFirstField(IFilter<FieldInfo> p_filter)
Get the firstFieldInfo
object that is accepted by the given filter.- Parameters:
p_filter
- The filter to be applied (seede.uplanet.lucy.server.auxiliaries.ObjectFactory#createFilter(String)
).- Returns:
- A matching
FieldInfo
object, ornull
if no match was found.
-
getFields
public List<FieldInfo> getFields(IFilter<FieldInfo> p_filter)
Get allFieldInfo
objects that are accepted by the given filter.- Parameters:
p_filter
- The filter to be applied (seede.uplanet.lucy.server.auxiliaries.ObjectFactory#createFilter(String)
).- Returns:
- The
FieldInfo
objects that are accepted by the given filter.
-
existsPage
public boolean existsPage(String p_strGuid)
Check if the page with the given unique identifier exists.- Parameters:
p_strGuid
- The unique identifier of the page.- Returns:
true
if the page exists, orfalse
otherwise.
-
getPage
public PageInfo getPage(String p_strGuid)
Get the page with the given unique identifier.- Parameters:
p_strGuid
- The page's unique identifier.- Returns:
- The requested page, or
null
if it was not found.
-
getFirstPage
public PageInfo getFirstPage(IFilter<PageInfo> p_filter)
Get the firstPageInfo
object that is accepted by the given filter.- Parameters:
p_filter
- The filter to be applied (seede.uplanet.lucy.server.auxiliaries.ObjectFactory#createFilter(String)
).- Returns:
- A matching
PageInfo
object, ornull
if no match was found.
-
getPages
public List<PageInfo> getPages(IFilter<PageInfo> p_filter)
Get allPageInfo
objects that are accepted by the given filter.- Parameters:
p_filter
- The filter to be applied (seede.uplanet.lucy.server.auxiliaries.ObjectFactory#createFilter(String)
).- Returns:
- The
PageInfo
objects that are accepted by the given filter.
-
getControls
public Map<String,ControlInfo> getControls()
Get all controls.- Returns:
- A map of all controls.
-
existsControl
public boolean existsControl(String p_strGuid)
Check if the control with the given unique identifier exists.- Parameters:
p_strGuid
- The unique identifier of the control.- Returns:
true
if the control exists, orfalse
otherwise.
-
getControl
public ControlInfo getControl(String p_strGuid)
Get the control with the given unique identifier.- Parameters:
p_strGuid
- The control's unique identifier.- Returns:
- The requested control, or
null
if it was not found.
-
getFirstControl
public ControlInfo getFirstControl(IFilter<ControlInfo> p_filter)
Get the firstControlInfo
object that is accepted by the given filter.- Parameters:
p_filter
- The filter to be applied (seede.uplanet.lucy.server.auxiliaries.ObjectFactory#createFilter(String)
).- Returns:
- A matching
ControlInfo
object, ornull
if no match was found.
-
getControls
public List<ControlInfo> getControls(IFilter<ControlInfo> p_filter)
Get allControlInfo
objects that are accepted by the given filter.- Parameters:
p_filter
- The filter to be applied (seede.uplanet.lucy.server.auxiliaries.ObjectFactory#createFilter(String)
).- Returns:
- The
ControlInfo
objects that are accepted by the given filter.
-
getReferences
public Map<String,ReferenceInfo> getReferences()
Get all references.- Returns:
- A map of all refernces.
-
existsReference
public boolean existsReference(String p_strGuid)
Check if the reference with the given unique identifier exists.- Parameters:
p_strGuid
- The unique identifier of the reference.- Returns:
true
if the reference exists, orfalse
otherwise.
-
getReference
public ReferenceInfo getReference(String p_strGuid)
Get the reference with the given unique identifier.- Parameters:
p_strGuid
- The reference's unique identifier.- Returns:
- The requested reference, or
null
if it was not found.
-
getFirstReference
public ReferenceInfo getFirstReference(IFilter<ReferenceInfo> p_filter)
Get the firstReferenceInfo
object that is accepted by the given filter.- Parameters:
p_filter
- The filter to be applied (seede.uplanet.lucy.server.auxiliaries.ObjectFactory#createFilter(String)
).- Returns:
- A matching
ReferenceInfo
object, ornull
if no match was found.
-
getReferences
public List<ReferenceInfo> getReferences(IFilter<ReferenceInfo> p_filter)
Get allReferenceInfo
objects that are accepted by the given filter.- Parameters:
p_filter
- The filter to be applied (seede.uplanet.lucy.server.auxiliaries.ObjectFactory#createFilter(String)
).- Returns:
- The
ReferenceInfo
objects that are accepted by the given filter.
-
-