|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.endeca.portal.data.CollectionManager
public class CollectionManager
This class provides helper static methods to fetch Collection information
from Endeca Server and translate that raw metadata into Studio's CollectionBaseView
model objects.
Field Summary | |
---|---|
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_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 Summary | |
---|---|
CollectionManager()
|
Method Summary | |
---|---|
static void |
clearCollectionCache(MDEXState state)
Clears the collection cache, causing subsequent reads to reload the cache from Endeca Server. |
protected static void |
deleteBaseView(MDEXState state,
RequestIds requestIds,
CollectionBaseView collection,
java.util.List<com.endeca.mdex.sconfig._2010.types.FilterRule> filterRules,
java.util.Locale locale,
java.lang.String outerTransactionId)
Deleting a collection includes: 1. |
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. |
static java.util.Set<java.lang.String> |
getAttributeLanguages(java.util.Collection<CollectionBaseView> collections,
javax.portlet.PortletRequest request)
Returns all language codes associated with the provided collections. |
protected static java.util.Map<java.lang.String,CollectionBaseView> |
getOrLoadCollectionCache(MDEXState state,
RequestIds requestIds,
java.util.Locale locale)
Retrieves collection cache from MDEXState or (re-)builds this
cache if it has been cleared. |
static Attribute |
getUniqueAttribute(CollectionBaseView collection)
Find out the attribute that is marked unique. |
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. |
static Attribute |
translateAttributeModel(Attribute in,
java.util.Locale locale)
|
static Group |
translateGroupModel(Group in)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
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 UNKNOWN_LANGUAGE
Constructor Detail |
---|
public CollectionManager()
Method Detail |
---|
protected static java.util.Map<java.lang.String,CollectionBaseView> getOrLoadCollectionCache(MDEXState state, RequestIds requestIds, java.util.Locale locale) 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
com.endeca.portal.data.DataSource#getCollection(String)
or
com.endeca.portal.data.DataSource#getAllCollections()
for caching
benefits.
state
- MDEXState object providing service ports for the backend
metadata querieslocale
- user Locale to use for localized elements of the collection
(e.g. attribute display names)
DataSourceException
- if some kind of query error occurred while fetching
collection metadatapublic static void clearCollectionCache(MDEXState state)
state
- MDEXState
whose cache should be clearedprotected 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 Server
DataSourceException
protected static void deleteBaseView(MDEXState state, RequestIds requestIds, CollectionBaseView collection, java.util.List<com.endeca.mdex.sconfig._2010.types.FilterRule> filterRules, java.util.Locale locale, java.lang.String outerTransactionId) throws java.lang.UnsupportedOperationException, DataSourceException
state
- requestIds
- viewKey
- locale
-
DataSourceException
java.lang.UnsupportedOperationException
public static Attribute getUniqueAttribute(CollectionBaseView collection)
collection
- - the collection to search the attribute within
public static Attribute translateAttributeModel(Attribute in, java.util.Locale locale)
public static Group translateGroupModel(Group in)
public static java.util.Collection<CollectionBaseView> findCollectionsContainingAttribute(java.util.Collection<CollectionBaseView> collections, java.lang.String attributeKey)
collections
- Collections to scanattributeKey
- key sought
public static java.util.Set<java.lang.String> getAttributeLanguages(java.util.Collection<CollectionBaseView> collections, javax.portlet.PortletRequest request)
collections
- request
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |