public class CollectionManager
extends java.lang.Object
CollectionBaseView
model objects.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
HIDDEN_PRIMARY_KEY |
static java.lang.String |
HIDDEN_REGION_ID |
static java.lang.String |
HIDDEN_SUBREGIONID |
static java.lang.String |
SYSTEM_DS_BASE_FILTER |
static java.lang.String |
SYSTEM_DS_CREATION_DATE |
static java.lang.String |
SYSTEM_DS_DATA_SCOPE |
static java.lang.String |
SYSTEM_DS_LAST_LOAD_DATE |
static java.lang.String |
SYSTEM_DS_LINKED_AGGREGATIONS |
static java.lang.String |
SYSTEM_DS_LINKS |
static java.lang.String |
SYSTEM_DS_PS_WORKFLOW_ID |
static java.lang.String |
SYSTEM_DS_RECORD_LIMIT_STATUS |
static java.lang.String |
SYSTEM_DS_SOURCE_DETAILS |
static java.lang.String |
SYSTEM_LOCALIZED_DESCRIPTION |
static java.lang.String |
SYSTEM_LOCALIZED_DISPLAY_NAME |
static java.lang.String |
UNKNOWN_LANGUAGE |
Constructor and Description |
---|
CollectionManager() |
Modifier and Type | Method and Description |
---|---|
protected static void |
addCollectionData(javax.portlet.PortletRequest request,
MDEXState state,
RequestIds requestIds,
CollectionBaseView collection,
java.util.List<Record> recordList) |
static boolean |
containHiddenAttributeKey(java.lang.String attrKey) |
static java.util.Collection<CollectionBaseView> |
findCollectionsContainingAttribute(java.util.Collection<CollectionBaseView> collections,
java.lang.String attributeKey)
Scans multiple collections for an attribute matching a given key.
|
protected static com.endeca.endeca_server.sconfig.types.Property |
generateSConfigProperty(java.lang.String key,
java.lang.Object value)
Create an instance of an SConfig property for decorating semantic entities and their attributes and groups, for example.
|
static java.util.Set<java.lang.String> |
getAttributeLanguages(java.util.Collection<CollectionBaseView> collections)
Gathers the list of distinct language codes used across all attributes in the provided collections.
|
static java.util.List<BindableDataSet> |
getBindableDataSets(com.liferay.portal.model.Group contextualGroup,
java.util.List<BindableDataSet> bindableDataSets)
Gets the full list of data sets available for binding to a Project and indicates which are already bound to specified Group.
|
static java.util.List<BindableDataSet> |
getBindableDataSets(javax.portlet.PortletRequest request)
Queries the data set inventory for the list of data sets available for binding to a Project.
|
static java.util.List<BindableDataSet> |
getBindableDataSets(javax.portlet.PortletRequest request,
com.liferay.portal.model.Group contextualGroup)
Gets the full list of data sets available for binding to a Project and indicates which are already bound to specified Group.
|
static java.util.List<BindableDataSet> |
getBindableDataSets(javax.portlet.PortletRequest request,
long contextualGroupId)
Gets the full list of data sets available for binding to a Project and indicates which are already bound to specified Group.
|
static java.util.List<DataSetSearchInfo> |
getDataSetSearchInfo(javax.portlet.PortletRequest request)
Queries the data set inventory for the list of data sets available for dataset search.
|
protected static ViewCache<CollectionBaseView> |
getOrLoadCollectionCache(javax.portlet.PortletRequest request,
MDEXState state,
long groupId,
RequestIds requestIds)
Retrieves collection cache from
MDEXState or (re-)builds this cache if it has been cleared. |
static void |
invalidateCollectionCache(MDEXState state)
Marks a specific application's collection cache as invalid, causing subsequent reads to reload the cache from Endeca Server.
|
static boolean |
isCatalogCollection(java.lang.String collectionKey) |
static boolean |
isCatalogCollectionId(java.lang.String collectionId) |
static void |
refreshCollectionCache(javax.portlet.PortletRequest request,
MDEXState state,
long groupId,
RequestIds requestIds)
Refresh collection cache immediately
|
protected static void |
saveBaseView(MDEXState state,
RequestIds requestIds,
CollectionBaseView baseView,
javax.portlet.PortletRequest request)
Saves to the Endeca Server modifiable elements of a collection base view, like attribute and group metadata.
|
protected static void |
saveBaseView(MDEXState state,
RequestIds requestIds,
CollectionBaseView baseView,
javax.portlet.PortletRequest request,
long groupId) |
protected static com.endeca.endeca_server.sconfig.types.BaseEntity |
serializeBaseView(CollectionBaseView baseView,
java.util.Locale locale) |
protected static <T extends com.endeca.endeca_server.sconfig.types.BaseEntity> |
serializeView(SemanticView view,
java.util.Locale locale,
T entity)
Serialize view metadata onto an entity (could be a BaseEntity or SemanticEntity).
|
protected static void |
updateCollectionData(javax.portlet.PortletRequest request,
MDEXState state,
RequestIds requestIds,
CollectionBaseView collection,
java.util.List<Record> recordList) |
static boolean |
useApproximateAggr(javax.portlet.PortletRequest request)
Determine if the dataset using approximate aggregator.
|
public static final java.lang.String HIDDEN_PRIMARY_KEY
public static final java.lang.String HIDDEN_REGION_ID
public static final java.lang.String HIDDEN_SUBREGIONID
public static final java.lang.String SYSTEM_DS_SOURCE_DETAILS
public static final java.lang.String SYSTEM_LOCALIZED_DISPLAY_NAME
public static final java.lang.String SYSTEM_LOCALIZED_DESCRIPTION
public static final java.lang.String SYSTEM_DS_CREATION_DATE
public static final java.lang.String SYSTEM_DS_LAST_LOAD_DATE
public static final java.lang.String SYSTEM_DS_BASE_FILTER
public static final java.lang.String SYSTEM_DS_DATA_SCOPE
public static final java.lang.String SYSTEM_DS_RECORD_LIMIT_STATUS
public static final java.lang.String SYSTEM_DS_PS_WORKFLOW_ID
public static final java.lang.String SYSTEM_DS_LINKS
public static final java.lang.String SYSTEM_DS_LINKED_AGGREGATIONS
public static final java.lang.String UNKNOWN_LANGUAGE
protected static ViewCache<CollectionBaseView> getOrLoadCollectionCache(javax.portlet.PortletRequest request, MDEXState state, long groupId, RequestIds requestIds) throws DataSourceAccessException, DataSourceException
MDEXState
or (re-)builds this cache if it has been cleared. This method should only be used by
framework classes. Components should use DataSource.getCollection(String)
or
DataSource.getAllCollections()
for caching benefits.request
- state
- MDEXState object providing service ports for the backend metadata queriesDataSourceException
- if some kind of query error occurred while fetching collection metadataDataSourceAccessException
public static void refreshCollectionCache(javax.portlet.PortletRequest request, MDEXState state, long groupId, RequestIds requestIds) throws DataSourceAccessException, DataSourceException
request
- state
- MDEXState object providing service ports for the backend metadata queriesgroupId
- requestIds
- DataSourceException
- if some kind of query error occurred while fetching collection metadataDataSourceAccessException
public static boolean isCatalogCollection(java.lang.String collectionKey)
public static boolean isCatalogCollectionId(java.lang.String collectionId)
public static boolean containHiddenAttributeKey(java.lang.String attrKey)
public static void invalidateCollectionCache(MDEXState state)
state
- MDEXState
whose cache should be clearedprotected static com.endeca.endeca_server.sconfig.types.BaseEntity serializeBaseView(CollectionBaseView baseView, java.util.Locale locale)
protected static <T extends com.endeca.endeca_server.sconfig.types.BaseEntity> T serializeView(SemanticView view, java.util.Locale locale, T entity)
protected static com.endeca.endeca_server.sconfig.types.Property generateSConfigProperty(java.lang.String key, java.lang.Object value)
key
- value
- protected static void saveBaseView(MDEXState state, RequestIds requestIds, CollectionBaseView baseView, javax.portlet.PortletRequest request) throws DataSourceException
state
- the MDEXState associated with the Endeca Server to updaterequestIds
- RequestIds associated with this updatebaseView
- modified CollectionBaseView to persist to Endeca ServerDataSourceException
protected static void saveBaseView(MDEXState state, RequestIds requestIds, CollectionBaseView baseView, javax.portlet.PortletRequest request, long groupId) throws DataSourceException
DataSourceException
protected static void addCollectionData(javax.portlet.PortletRequest request, MDEXState state, RequestIds requestIds, CollectionBaseView collection, java.util.List<Record> recordList) throws DataSourceException
DataSourceException
protected static void updateCollectionData(javax.portlet.PortletRequest request, MDEXState state, RequestIds requestIds, CollectionBaseView collection, java.util.List<Record> recordList) throws DataSourceException
DataSourceException
public static java.util.Collection<CollectionBaseView> findCollectionsContainingAttribute(java.util.Collection<CollectionBaseView> collections, java.lang.String attributeKey)
collections
- Collections to scanattributeKey
- key soughtpublic static java.util.Set<java.lang.String> getAttributeLanguages(java.util.Collection<CollectionBaseView> collections)
collections
- request
- public static java.util.List<BindableDataSet> getBindableDataSets(javax.portlet.PortletRequest request) throws DataSourceException
DataSourceException
public static java.util.List<DataSetSearchInfo> getDataSetSearchInfo(javax.portlet.PortletRequest request) throws java.lang.Exception
DataSourceException
java.lang.Exception
public static java.util.List<BindableDataSet> getBindableDataSets(javax.portlet.PortletRequest request, com.liferay.portal.model.Group contextualGroup) throws DataSourceException
contextualGroup
- Group representing a Studio Project. The returned BindableDataSets will indicate if they are already bound to this group.DataSourceException
public static java.util.List<BindableDataSet> getBindableDataSets(com.liferay.portal.model.Group contextualGroup, java.util.List<BindableDataSet> bindableDataSets)
contextualGroup
- contextualGroup representing a Studio ProjectbindableDataSets
- List of can be binded datasetpublic static java.util.List<BindableDataSet> getBindableDataSets(javax.portlet.PortletRequest request, long contextualGroupId) throws DataSourceException
contextualGroupId
- Group representing a Studio Project. The returned BindableDataSets will indicate if they are already bound to this group.DataSourceException
public static boolean useApproximateAggr(javax.portlet.PortletRequest request)
baseView
- Copyright 2003, 2014, Oracle and/or its affiliates. All rights reserved.