Search in sources :

Example 1 with DictionaryKey

use of org.alfresco.solr.AlfrescoClientDataModelServicesFactory.DictionaryKey in project SearchServices by Alfresco.

the class AlfrescoSolrDataModel method getCMISDictionary.

/**
 * Gets the CMISDictionaryService, if an Alternative dictionary is specified it tries to get that.
 * It will attempt to get the DEFAULT dictionary service if null is specified or it can't find
 * a dictionary with the name of "alternativeDictionary"
 * @param alternativeDictionary - can be null;
 * @return CMISDictionaryService
 */
public CMISDictionaryService getCMISDictionary(String alternativeDictionary, CmisVersion cmisVersion) {
    CMISDictionaryService cmisDictionary = null;
    if (alternativeDictionary != null && !alternativeDictionary.trim().isEmpty()) {
        DictionaryKey key = new DictionaryKey(cmisVersion, alternativeDictionary);
        cmisDictionary = cmisDictionaryServices.get(key);
    }
    if (cmisDictionary == null) {
        DictionaryKey key = new DictionaryKey(cmisVersion, CMISStrictDictionaryService.DEFAULT);
        cmisDictionary = cmisDictionaryServices.get(key);
    }
    return cmisDictionary;
}
Also used : DictionaryKey(org.alfresco.solr.AlfrescoClientDataModelServicesFactory.DictionaryKey) CMISDictionaryService(org.alfresco.opencmis.dictionary.CMISDictionaryService)

Aggregations

CMISDictionaryService (org.alfresco.opencmis.dictionary.CMISDictionaryService)1 DictionaryKey (org.alfresco.solr.AlfrescoClientDataModelServicesFactory.DictionaryKey)1