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 classVelocityRtCache.FilterTypeSwitchclassVelocityRtCache.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 booleanexistsApplication(String p_strGuid)Check if the application with the given unique identifier exists.booleanexistsControl(String p_strGuid)Check if the control with the given unique identifier exists.booleanexistsDataGroup(String p_strGuid)Check if the data group with the given unique identifier exists.booleanexistsField(String p_strGuid)Check if the field with the given unique identifier exists.booleanexistsPage(String p_strGuid)Check if the page with the given unique identifier exists.booleanexistsReference(String p_strGuid)Check if the reference with the given unique identifier exists.ApplicationInfogetApplication(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.ControlInfogetControl(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 allControlInfoobjects that are accepted by the given filter.DataGroupInfogetDataGroup(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.FieldInfogetField(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 allFieldInfoobjects that are accepted by the given filter.VelocityRtCache.FilterTypeSwitchgetFilter()Get an object to create different types of filters.ApplicationInfogetFirstApplication(IFilter<ApplicationInfo> p_filter)Get first application that matches a given filter.ControlInfogetFirstControl(IFilter<ControlInfo> p_filter)Get the firstControlInfoobject that is accepted by the given filter.DataGroupInfogetFirstDataGroup(IFilter<DataGroupInfo> p_filter)Get first data group that matchesIFilter.FieldInfogetFirstField(IFilter<FieldInfo> p_filter)Get the firstFieldInfoobject that is accepted by the given filter.PageInfogetFirstPage(IFilter<PageInfo> p_filter)Get the firstPageInfoobject that is accepted by the given filter.ReferenceInfogetFirstReference(IFilter<ReferenceInfo> p_filter)Get the firstReferenceInfoobject that is accepted by the given filter.VelocityRtCache.OrderTypeSwitchgetOrder()Get an object to create different types of comparators.PageInfogetPage(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 allPageInfoobjects that are accepted by the given filter.ReferenceInfogetReference(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 allReferenceInfoobjects 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:
trueif the application exists, orfalseotherwise.
-
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
nullif 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:
ApplicationInfolist 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:
ApplicationInfolist 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:
trueif the data group exists, orfalseotherwise.
-
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
nullif 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:
DataGroupInfolist 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:
DataGroupInfolist 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:
trueif the field exists, orfalseotherwise.
-
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
nullif it was not found.
-
getFirstField
public FieldInfo getFirstField(IFilter<FieldInfo> p_filter)
Get the firstFieldInfoobject 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
FieldInfoobject, ornullif no match was found.
-
getFields
public List<FieldInfo> getFields(IFilter<FieldInfo> p_filter)
Get allFieldInfoobjects 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
FieldInfoobjects 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:
trueif the page exists, orfalseotherwise.
-
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
nullif it was not found.
-
getFirstPage
public PageInfo getFirstPage(IFilter<PageInfo> p_filter)
Get the firstPageInfoobject 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
PageInfoobject, ornullif no match was found.
-
getPages
public List<PageInfo> getPages(IFilter<PageInfo> p_filter)
Get allPageInfoobjects 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
PageInfoobjects 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:
trueif the control exists, orfalseotherwise.
-
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
nullif it was not found.
-
getFirstControl
public ControlInfo getFirstControl(IFilter<ControlInfo> p_filter)
Get the firstControlInfoobject 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
ControlInfoobject, ornullif no match was found.
-
getControls
public List<ControlInfo> getControls(IFilter<ControlInfo> p_filter)
Get allControlInfoobjects 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
ControlInfoobjects 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:
trueif the reference exists, orfalseotherwise.
-
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
nullif it was not found.
-
getFirstReference
public ReferenceInfo getFirstReference(IFilter<ReferenceInfo> p_filter)
Get the firstReferenceInfoobject 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
ReferenceInfoobject, ornullif no match was found.
-
getReferences
public List<ReferenceInfo> getReferences(IFilter<ReferenceInfo> p_filter)
Get allReferenceInfoobjects 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
ReferenceInfoobjects that are accepted by the given filter.
-
-