public class CollectionManager
extends java.lang.Object
CollectionBaseView model objects.| Modifier and Type | Field and Description |
|---|---|
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 java.lang.String |
getProjectDataSetKey(long projectId,
java.lang.String dataSetKey)
Appends the project's namespace to the end of the data set key
Example: default_edp_2ea7941a-70c1-4b20-97fb-cf4a391bfc27
returns default_edp_2ea7941a-70c1-4b20-97fb-cf4a391bfc27_10601
or default_edp_2ea7941a-70c1-4b20-97fb-cf4a391bfc27_namespacePrefix_10601
|
static java.lang.String |
getProjectDataSetKey(javax.portlet.PortletRequest request,
java.lang.String dataSetKey)
Appends the current project's namespace to the end of the data set key
Example: default_edp_2ea7941a-70c1-4b20-97fb-cf4a391bfc27
returns default_edp_2ea7941a-70c1-4b20-97fb-cf4a391bfc27_10601
or default_edp_2ea7941a-70c1-4b20-97fb-cf4a391bfc27_namespacePrefix_10601
|
static java.lang.String |
getProjectDataSetKeyWithoutCheck(long projectId,
java.lang.String dataSetKey)
Get the project dataset key without checking if the dataset is existing in dataset inventory
|
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 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 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 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 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 metadatapublic static void refreshCollectionCache(javax.portlet.PortletRequest request,
MDEXState state,
long groupId,
RequestIds requestIds)
throws 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 metadatapublic static boolean isCatalogCollection(java.lang.String collectionKey)
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 ServerDataSourceExceptionprotected static void addCollectionData(javax.portlet.PortletRequest request,
MDEXState state,
RequestIds requestIds,
CollectionBaseView collection,
java.util.List<Record> recordList)
throws DataSourceException
DataSourceExceptionprotected static void updateCollectionData(javax.portlet.PortletRequest request,
MDEXState state,
RequestIds requestIds,
CollectionBaseView collection,
java.util.List<Record> recordList)
throws DataSourceException
DataSourceExceptionpublic 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
DataSourceExceptionpublic static java.util.List<DataSetSearchInfo> getDataSetSearchInfo(javax.portlet.PortletRequest request) throws java.lang.Exception
DataSourceExceptionjava.lang.Exceptionpublic 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.DataSourceExceptionpublic 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 com.liferay.portal.SystemException, com.liferay.portal.PortalException, DataSourceException
contextualGroupId - Group representing a Studio Project. The returned BindableDataSets will indicate if they are already bound to this group.com.liferay.portal.PortalExceptionDataSourceExceptioncom.liferay.portal.SystemExceptionpublic static java.lang.String getProjectDataSetKey(javax.portlet.PortletRequest request,
java.lang.String dataSetKey)
request - dataSetKey - public static java.lang.String getProjectDataSetKey(long projectId,
java.lang.String dataSetKey)
projectId - dataSetKey - public static java.lang.String getProjectDataSetKeyWithoutCheck(long projectId,
java.lang.String dataSetKey)
projectId - dataSetKey - public static boolean useApproximateAggr(javax.portlet.PortletRequest request)
baseView - Copyright 2003, 2014, Oracle and/or its affiliates. All rights reserved.