org.alfresco.opencmis.dictionary.QNameFilter Java Examples

The following examples show how to use org.alfresco.opencmis.dictionary.QNameFilter. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TestCMIS.java    From alfresco-remote-api with GNU Lesser General Public License v3.0 6 votes vote down vote up
@Before
  public void before() throws Exception
  {
      ctx = getTestFixture().getApplicationContext();
      this.dictionaryDAO = (DictionaryDAO)ctx.getBean("dictionaryDAO");
      this.lockService = (LockService) ctx.getBean("lockService");
      this.tenantService = (TenantService)ctx.getBean("tenantService");
      this.cmisDictionary = (CMISStrictDictionaryService)ctx.getBean("OpenCMISDictionaryService");
      this.cmisTypeExclusions = (QNameFilter)ctx.getBean("cmisTypeExclusions");
this.nodeService = (NodeService) ctx.getBean("NodeService");
      this.fileFolderService = (FileFolderService) ctx.getBean("FileFolderService");
  	this.contentService = (ContentService)applicationContext.getBean("ContentService");
this.permissionService = (PermissionService) ctx.getBean("permissionService");
      
this.globalProperties = (Properties) ctx.getBean("global-properties");
this.globalProperties.setProperty(VersionableAspectTest.AUTO_VERSION_PROPS_KEY, "true");
  }
 
Example #2
Source File: AlfrescoClientDataModelServicesFactory.java    From SearchServices with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 * Constructs a dictionary by default.
 * 
 * @param qnameFilter QNameFilter
 * @param namespaceDAO NamespaceDAO
 * @param dictionaryService DictionaryComponent
 * @param dictionaryDAO DictionaryDAO
 * @return Map
 */
public static Map<DictionaryKey,CMISAbstractDictionaryService> constructDictionaries(QNameFilter qnameFilter, NamespaceDAO namespaceDAO,
		DictionaryComponent dictionaryService, DictionaryDAO dictionaryDAO) 
{
    DictionaryNamespaceComponent namespaceService = new DictionaryNamespaceComponent();
    namespaceService.setNamespaceDAO(namespaceDAO);

    CMISMapping cmisMapping = new CMISMapping();
    cmisMapping.setCmisVersion(CmisVersion.CMIS_1_0);
    cmisMapping.setFilter(qnameFilter);
    cmisMapping.setNamespaceService(namespaceService);
    cmisMapping.setDictionaryService(dictionaryService);
    cmisMapping.afterPropertiesSet();

    CMISMapping cmisMapping11 = new CMISMapping();
    cmisMapping11.setCmisVersion(CmisVersion.CMIS_1_1);
    cmisMapping11.setFilter(qnameFilter);
    cmisMapping11.setNamespaceService(namespaceService);
    cmisMapping11.setDictionaryService(dictionaryService);
    cmisMapping11.afterPropertiesSet();

    Map<DictionaryKey,CMISAbstractDictionaryService> dictionaries = new HashMap<DictionaryKey,CMISAbstractDictionaryService>();

    DictionaryKey key = new DictionaryKey(CmisVersion.CMIS_1_0, CMISStrictDictionaryService.DEFAULT);
    dictionaries.put(key, newInstance(cmisMapping, dictionaryService, dictionaryDAO));
    CMISMapping mappingWithExclusions = newInstanceOfExcludedCMISMapping(cmisMapping, qnameFilter);
    key = new DictionaryKey(CmisVersion.CMIS_1_0, DICTIONARY_FILTERED_WITH_EXCLUSIONS);
    dictionaries.put(key, newInstance(mappingWithExclusions, dictionaryService, dictionaryDAO));
    
    key = new DictionaryKey(CmisVersion.CMIS_1_1, CMISStrictDictionaryService.DEFAULT);
    dictionaries.put(key, newInstance(cmisMapping11, dictionaryService, dictionaryDAO));
    CMISMapping mappingWithExclusions11 = newInstanceOfExcludedCMISMapping(cmisMapping11, qnameFilter);
    key = new DictionaryKey(CmisVersion.CMIS_1_1, DICTIONARY_FILTERED_WITH_EXCLUSIONS);
    dictionaries.put(key, newInstance(mappingWithExclusions11, dictionaryService, dictionaryDAO));

    return dictionaries;
}
 
Example #3
Source File: AlfrescoClientDataModelServicesFactory.java    From SearchServices with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 * Constructs a dictionary by default.
 * 
 * @param qnameFilter QNameFilter
 * @param dictionaryDAO DictionaryDAOImpl
 * @return Map
 */
public static Map<String, DictionaryComponent> constructDictionaryServices(QNameFilter qnameFilter, DictionaryDAOImpl dictionaryDAO)
{
    Map<String,DictionaryComponent> dictionaries = new HashMap<String,DictionaryComponent>();
    DictionaryComponent compo = new DictionaryComponent();
    compo.setDictionaryDAO(dictionaryDAO);
    dictionaries.put(CMISStrictDictionaryService.DEFAULT, compo);
    FilteredDictionaryComponent fdc  = new FilteredDictionaryComponent();
    fdc.setDictionaryDAO(dictionaryDAO);
    fdc.setFilter(qnameFilter);
    dictionaries.put(DICTIONARY_FILTERED_WITH_EXCLUSIONS, fdc);
    return dictionaries;
    
}
 
Example #4
Source File: AlfrescoClientDataModelServicesFactory.java    From SearchServices with GNU Lesser General Public License v3.0 5 votes vote down vote up
private static CMISMapping newInstanceOfExcludedCMISMapping(CMISMapping cmisMapping, QNameFilter filter)
{
    CMISMapping cmisMappingWithExcl = new CMISMapping();
    cmisMappingWithExcl.setNamespaceService(cmisMapping.getNamespaceService());
    cmisMappingWithExcl.setDictionaryService(cmisMapping.getDictionaryService());
    cmisMappingWithExcl.setFilter(filter);
    cmisMappingWithExcl.setCmisVersion(cmisMapping.getCmisVersion());
    cmisMappingWithExcl.afterPropertiesSet();
    return cmisMappingWithExcl;
}
 
Example #5
Source File: CMISMapping.java    From alfresco-data-model with GNU Lesser General Public License v3.0 4 votes vote down vote up
public void setFilter(QNameFilter filter)
{
    this.filter = filter;
}
 
Example #6
Source File: ExcludedTypes.java    From alfresco-remote-api with GNU Lesser General Public License v3.0 4 votes vote down vote up
public void setExcludedTypes(QNameFilter excludedTypes)
   {
	this.excludedTypes = excludedTypes;
}