org.alfresco.opencmis.dictionary.CMISDictionaryService Java Examples
The following examples show how to use
org.alfresco.opencmis.dictionary.CMISDictionaryService.
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: AlfrescoSolrDataModel.java From SearchServices with GNU Lesser General Public License v3.0 | 5 votes |
public org.alfresco.repo.search.impl.querymodel.Query parseCMISQueryToAlfrescoAbstractQuery(CMISQueryMode mode, SearchParameters searchParameters, SolrQueryRequest req, String alternativeDictionary, CmisVersion cmisVersion) { // convert search parameters to cmis query options // TODO: how to handle store ref CMISQueryOptions options = new CMISQueryOptions(searchParameters.getQuery(), StoreRef.STORE_REF_WORKSPACE_SPACESSTORE); options.setQueryMode(CMISQueryMode.CMS_WITH_ALFRESCO_EXTENSIONS); options.setDefaultFieldName(searchParameters.getDefaultFieldName()); // TODO: options.setDefaultFTSConnective() // TODO: options.setDefaultFTSFieldConnective() options.setIncludeInTransactionData(!searchParameters.excludeDataInTheCurrentTransaction()); options.setLocales(searchParameters.getLocales()); options.setMlAnalaysisMode(searchParameters.getMlAnalaysisMode()); options.setQueryParameterDefinitions(searchParameters.getQueryParameterDefinitions()); for(String name : searchParameters.getQueryTemplates().keySet()) { String template = searchParameters.getQueryTemplates().get(name); options.addQueryTemplate(name, template); } // parse cmis syntax CapabilityJoin joinSupport = (mode == CMISQueryMode.CMS_STRICT) ? CapabilityJoin.NONE : CapabilityJoin.INNERANDOUTER; CmisFunctionEvaluationContext functionContext = getCMISFunctionEvaluationContext(mode, cmisVersion, alternativeDictionary); CMISDictionaryService cmisDictionary = getCMISDictionary(alternativeDictionary, cmisVersion); CMISQueryParser parser = new CMISQueryParser(options, cmisDictionary, joinSupport); org.alfresco.repo.search.impl.querymodel.Query queryModelQuery = parser.parse(new LuceneQueryModelFactory<Query, Sort, SyntaxError>(), functionContext); if (queryModelQuery.getSource() != null) { List<Set<String>> selectorGroups = queryModelQuery.getSource().getSelectorGroups(functionContext); if (selectorGroups.size() == 0) { throw new UnsupportedOperationException("No selectors"); } } return queryModelQuery; }
Example #2
Source File: CMISQueryParser.java From alfresco-data-model with GNU Lesser General Public License v3.0 | 5 votes |
public CMISQueryParser(CMISQueryOptions options, CMISDictionaryService cmisDictionaryService, CapabilityJoin joinSupport) { this.options = options; this.cmisDictionaryService = cmisDictionaryService; this.joinSupport = joinSupport; this.validScopes = (options.getQueryMode() == CMISQueryMode.CMS_STRICT) ? CmisFunctionEvaluationContext.STRICT_SCOPES : CmisFunctionEvaluationContext.ALFRESCO_SCOPES; }
Example #3
Source File: CMISTest.java From alfresco-repository with GNU Lesser General Public License v3.0 | 5 votes |
@Before public void before() { this.actionService = (ActionService)ctx.getBean("actionService"); this.ruleService = (RuleService)ctx.getBean("ruleService"); this.fileFolderService = (FileFolderService)ctx.getBean("FileFolderService"); this.transactionService = (TransactionService)ctx.getBean("transactionService"); this.nodeService = (NodeService)ctx.getBean("NodeService"); this.contentService = (ContentService)ctx.getBean("ContentService"); this.versionService = (VersionService) ctx.getBean("versionService"); this.lockService = (LockService) ctx.getBean("lockService"); this.taggingService = (TaggingService) ctx.getBean("TaggingService"); this.namespaceService = (NamespaceService) ctx.getBean("namespaceService"); this.repositoryHelper = (Repository)ctx.getBean("repositoryHelper"); this.factory = (AlfrescoCmisServiceFactory)ctx.getBean("CMISServiceFactory"); this.versionService = (VersionService) ctx.getBean("versionService"); this.cmisConnector = (CMISConnector) ctx.getBean("CMISConnector"); this.nodeDAO = (NodeDAO) ctx.getBean("nodeDAO"); this.authorityService = (AuthorityService)ctx.getBean("AuthorityService"); this.auditSubsystem = (AuditModelRegistryImpl) ctx.getBean("Audit"); this.permissionService = (PermissionService) ctx.getBean("permissionService"); this.dictionaryDAO = (DictionaryDAO)ctx.getBean("dictionaryDAO"); this.cmisDictionaryService = (CMISDictionaryService)ctx.getBean("OpenCMISDictionaryService1.1"); this.auditDAO = (AuditDAO) ctx.getBean("auditDAO"); this.nodeArchiveService = (NodeArchiveService) ctx.getBean("nodeArchiveService"); this.dictionaryService = (DictionaryService) ctx.getBean("dictionaryService"); this.workflowService = (WorkflowService) ctx.getBean("WorkflowService"); this.workflowAdminService = (WorkflowAdminService) ctx.getBean("workflowAdminService"); this.authenticationContext = (AuthenticationContext) ctx.getBean("authenticationContext"); this.tenantAdminService = (TenantAdminService) ctx.getBean("tenantAdminService"); this.tenantService = (TenantService) ctx.getBean("tenantService"); this.searchService = (SearchService) ctx.getBean("SearchService"); this.auditComponent = (AuditComponentImpl) ctx.getBean("auditComponent"); this.globalProperties = (java.util.Properties) ctx.getBean("global-properties"); this.globalProperties.setProperty(VersionableAspectTest.AUTO_VERSION_PROPS_KEY, "true"); }
Example #4
Source File: CMISResultSet.java From alfresco-repository with GNU Lesser General Public License v3.0 | 5 votes |
public CMISResultSet(Map<String, ResultSet> wrapped, CMISQueryOptions options, LimitBy limitBy, NodeService nodeService, Query query, CMISDictionaryService cmisDictionaryService, DictionaryService alfrescoDictionaryService) { this.wrapped = wrapped; this.options = options; this.limitBy = limitBy; this.nodeService = nodeService; this.query = query; this.cmisDictionaryService = cmisDictionaryService; this.alfrescoDictionaryService = alfrescoDictionaryService; this.nodeInfos = new HashMap<NodeRef, CMISNodeInfo>(); }
Example #5
Source File: CMISResultSetRow.java From alfresco-repository with GNU Lesser General Public License v3.0 | 5 votes |
public CMISResultSetRow(CMISResultSet resultSet, int index, Map<String, Float> scores, NodeService nodeService, Map<String, NodeRef> nodeRefs, Map<NodeRef, CMISNodeInfo> nodeInfos, Query query, CMISDictionaryService cmisDictionaryService) { this.resultSet = resultSet; this.index = index; this.scores = scores; this.nodeService = nodeService; this.nodeRefs = nodeRefs; this.query = query; this.cmisDictionaryService = cmisDictionaryService; this.nodeInfos = nodeInfos; }
Example #6
Source File: CMISConnector.java From alfresco-repository with GNU Lesser General Public License v3.0 | 5 votes |
public CMISDictionaryService getOpenCMISDictionaryService() { CmisVersion cmisVersion = getRequestCmisVersion(); if(cmisVersion.equals(CmisVersion.CMIS_1_0)) { return cmisDictionaryService; } else { return cmisDictionaryService11; } }
Example #7
Source File: CMISConnector.java From alfresco-repository with GNU Lesser General Public License v3.0 | 4 votes |
public void setOpenCMISDictionaryService11(CMISDictionaryService cmisDictionaryService) { this.cmisDictionaryService11 = cmisDictionaryService; }
Example #8
Source File: CmisFunctionEvaluationContext.java From alfresco-data-model with GNU Lesser General Public License v3.0 | 4 votes |
/** * @param cmisDictionaryService * the cmisDictionaryService to set */ public void setCmisDictionaryService(CMISDictionaryService cmisDictionaryService) { this.cmisDictionaryService = cmisDictionaryService; }
Example #9
Source File: RuntimePropertyLuceneBuilderMapping.java From alfresco-data-model with GNU Lesser General Public License v3.0 | 4 votes |
/** * @param cmisDictionaryService cmisDictionaryService */ public void setCmisDictionaryService(CMISDictionaryService cmisDictionaryService) { this.cmisDictionaryService = cmisDictionaryService; }
Example #10
Source File: BaseTypeIdLuceneBuilder.java From alfresco-data-model with GNU Lesser General Public License v3.0 | 4 votes |
/** * Construct */ public BaseTypeIdLuceneBuilder(CMISDictionaryService dictionaryService) { this.dictionaryService = dictionaryService; }
Example #11
Source File: BaseCMISTest.java From alfresco-repository with GNU Lesser General Public License v3.0 | 4 votes |
public void setUp() throws Exception { ctx = ApplicationContextHelper.getApplicationContext(); serviceRegistry = (ServiceRegistry) ctx.getBean("ServiceRegistry"); cmisDictionaryService = (CMISDictionaryService) ctx.getBean("OpenCMISDictionaryService"); cmisMapping = (CMISMapping) ctx.getBean("OpenCMISMapping"); cmisQueryService = (CMISQueryService) ctx.getBean("OpenCMISQueryService"); cmisConnector = (CMISConnector) ctx.getBean("CMISConnector"); dictionaryService = (DictionaryService) ctx.getBean("dictionaryService"); nodeService = (NodeService) ctx.getBean("nodeService"); fileFolderService = (FileFolderService) ctx.getBean("fileFolderService"); namespaceService = (NamespaceService) ctx.getBean("namespaceService"); transactionService = (TransactionService) ctx.getBean("transactionComponent"); authenticationComponent = (AuthenticationComponent) ctx.getBean("authenticationComponent"); searchService = (SearchService) ctx.getBean("searchService"); contentService = (ContentService) ctx.getBean("contentService"); permissionService = (PermissionService) ctx.getBean("permissionService"); versionService = (VersionService) ctx.getBean("versionService"); authenticationService = (MutableAuthenticationService) ctx.getBean("authenticationService"); authenticationDAO = (MutableAuthenticationDao) ctx.getBean("authenticationDao"); thumbnailService = (ThumbnailService) ctx.getBean("thumbnailService"); permissionModelDao = (ModelDAO) ctx.getBean("permissionsModelDAO"); dictionaryDAO = (DictionaryDAO) ctx.getBean("dictionaryDAO"); namespaceDao = (NamespaceDAO) ctx.getBean("namespaceDAO"); testTX = transactionService.getUserTransaction(); testTX.begin(); // Authenticate as the admin user AuthenticationUtil.setFullyAuthenticatedUser(AuthenticationUtil.getAdminUserName()); String storeName = "CMISTest-" + getStoreName() + "-" + (new Date().getTime()); this.storeRef = nodeService.createStore(StoreRef.PROTOCOL_WORKSPACE, storeName); rootNodeRef = nodeService.getRootNode(storeRef); if(authenticationDAO.userExists("cmis")) { authenticationService.deleteAuthentication("cmis"); } authenticationService.createAuthentication("cmis", "cmis".toCharArray()); }
Example #12
Source File: MockedTestServiceRegistry.java From alfresco-repository with GNU Lesser General Public License v3.0 | 4 votes |
@Override public CMISDictionaryService getCMISDictionaryService() { // A mock response return null; }
Example #13
Source File: DbCmisQueryLanguage.java From alfresco-repository with GNU Lesser General Public License v3.0 | 4 votes |
/** * @param cmisDictionaryService the cmisDictionaryService to set */ public void setCmisDictionaryService(CMISDictionaryService cmisDictionaryService) { this.cmisDictionaryService = cmisDictionaryService; }
Example #14
Source File: CMISConnector.java From alfresco-repository with GNU Lesser General Public License v3.0 | 4 votes |
public void setOpenCMISDictionaryService(CMISDictionaryService cmisDictionaryService) { this.cmisDictionaryService = cmisDictionaryService; }
Example #15
Source File: CMISQueryServiceImpl.java From alfresco-repository with GNU Lesser General Public License v3.0 | 4 votes |
public void setOpenCMISDictionaryService(CMISDictionaryService cmisDictionaryService) { this.cmisDictionaryService = cmisDictionaryService; }
Example #16
Source File: CMISChangeLogDataExtractor.java From alfresco-repository with GNU Lesser General Public License v3.0 | 4 votes |
public void setOpenCMISDictionaryService(CMISDictionaryService cmisDictionaryService) { this.cmisDictionaryService = cmisDictionaryService; }
Example #17
Source File: RuntimePropertyAccessorMapping.java From alfresco-repository with GNU Lesser General Public License v3.0 | 4 votes |
/** * @param cmisDictionaryService CMISDictionaryService */ public void setCmisDictionaryService(CMISDictionaryService cmisDictionaryService) { this.cmisDictionaryService = cmisDictionaryService; }
Example #18
Source File: ServiceDescriptorRegistry.java From alfresco-repository with GNU Lesser General Public License v3.0 | 4 votes |
@Override public CMISDictionaryService getCMISDictionaryService() { return (CMISDictionaryService)getService(CMIS_DICTIONARY_SERVICE); }
Example #19
Source File: SolrOpenCMISQueryServiceImpl.java From alfresco-repository with GNU Lesser General Public License v3.0 | 4 votes |
public void setCmisDictionaryService(CMISDictionaryService cmisDictionaryService) { this.cmisDictionaryService = cmisDictionaryService; }
Example #20
Source File: ObjectTypeIdProperty.java From alfresco-repository with GNU Lesser General Public License v3.0 | 2 votes |
/** * Construct * * @param serviceRegistry ServiceRegistry * @param connector CMISConnector * @param dictionaryService CMISDictionaryService */ public ObjectTypeIdProperty(ServiceRegistry serviceRegistry, CMISConnector connector, CMISDictionaryService dictionaryService) { super(serviceRegistry, connector, PropertyIds.OBJECT_TYPE_ID); }
Example #21
Source File: ObjectTypeIdLuceneBuilder.java From alfresco-data-model with GNU Lesser General Public License v3.0 | 2 votes |
/** * Construct * * @param cmisDictionaryService CMISDictionaryService */ public ObjectTypeIdLuceneBuilder(CMISDictionaryService cmisDictionaryService) { this.cmisDictionaryService = cmisDictionaryService; }
Example #22
Source File: ServiceRegistry.java From alfresco-repository with GNU Lesser General Public License v3.0 | 2 votes |
/** * Get the CMIS Dictionary service (or null if one is not provided) * @return the CMIS Dictionary service * @deprecated This method has been deprecated as it would return a service that is not part of the public API. * The service itself is not deprecated, but access to it via the ServiceRegistry will be removed in the future. */ @NotAuditable CMISDictionaryService getCMISDictionaryService();