protected NodeRef getNode(NodeRef rootNodeRef, String path) { RepositoryLocation repositoryLocation = new RepositoryLocation(rootNodeRef.getStoreRef(), path, RepositoryLocation.LANGUAGE_PATH); String[] pathElements = repositoryLocation.getPathElements(); NodeRef nodeRef = rootNodeRef; if (pathElements.length > 0) { nodeRef = resolveQNamePath(rootNodeRef, pathElements); } return nodeRef; }
StoreRef storeRef = repoWorkflowDefsLocation.getStoreRef(); NodeRef rootNode = nodeService.getRootNode(storeRef); List<NodeRef> nodeRefs = searchService.selectNodes( rootNode, repoWorkflowDefsLocation.getPath(), null, namespaceService, " found for workflow location: "+repoWorkflowDefsLocation.getPath());
/** * Constructor * * @param storeRef the store reference (e.g. 'workspace://SpacesStore' ) * @param path the path (e.g. '/app:company_home/app:dictionary/app:models' ) * @param queryLanguage the query language (e.g. 'xpath' or 'lucence') */ public RepositoryLocation(StoreRef storeRef, String path, String queryLanguage) { this.storeProtocol = storeRef.getProtocol(); this.storeId = storeRef.getIdentifier(); this.path = path; setQueryLanguage(queryLanguage); }
protected String getEmailTemplateRef() String locationType = feedEmailTemplateLocation.getQueryLanguage(); StoreRef store = feedEmailTemplateLocation.getStoreRef(); String xpath = feedEmailTemplateLocation.getPath(); if (!feedEmailTemplateLocation.getQueryLanguage().equals(SearchService.LANGUAGE_XPATH)) logger.error("Cannot find the activities email template - repository location query language is not 'xpath': " + feedEmailTemplateLocation.getQueryLanguage()); return null; return feedEmailTemplateLocation.getPath();
StoreRef storeRef = repositoryLocation.getStoreRef(); if (repositoryLocation.getQueryLanguage().equals(RepositoryLocation.LANGUAGE_PATH)) logger.error("Unsupported query language for messages location: " + repositoryLocation.getQueryLanguage());
/** * Bootstraps the model from default store */ private void revertBootstrap() { bootstrap.destroy(); RepositoryLocation location = new RepositoryLocation(); location.setStoreProtocol(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE.getProtocol()); location.setStoreId(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE.getIdentifier()); location.setQueryLanguage(RepositoryLocation.LANGUAGE_PATH); // NOTE: we are not setting the path for now .. in doing so we are searching the root node only List<RepositoryLocation> locations = new ArrayList<RepositoryLocation>(); locations.add(location); bootstrap.setRepositoryModelsLocations(locations); // register with dictionary service bootstrap.register(); }
RepositoryLocation loc = new RepositoryLocation("//Repo/path/process"); Process process = new RepositoryProcessLocation(loc).load(null);
@Override public NodeRef getModelNodeRef(String modelName) { ParameterCheck.mandatoryString("modelName", modelName); StringBuilder builder = new StringBuilder(120); builder.append(repoModelsLocation.getPath()).append("//.[@cm:name='").append(modelName).append("' and ") .append(RepoAdminServiceImpl.defaultSubtypeOfDictionaryModel).append(']'); List<NodeRef> nodeRefs = searchService.selectNodes(getRootNode(), builder.toString(), null, namespaceDAO, false); if (nodeRefs.size() == 0) { return null; } else if (nodeRefs.size() > 1) { // unexpected: should not find multiple nodes with same name throw new CustomModelException(MSG_MULTIPLE_MODELS, new Object[] { modelName }); } return nodeRefs.get(0); }
private NodeRef getRootNode() { StoreRef storeRef = repoModelsLocation.getStoreRef(); return nodeService.getRootNode(storeRef); }
String[] pathElements = repositoryLocation.getPathElements();
/** * Bootstraps the model from custom store */ private void setUpBootstrap() { bootstrap = new DictionaryRepositoryBootstrap(); bootstrap.setContentService(CONTENT_SERVICE); bootstrap.setDictionaryDAO(DICTIONARY_DAO); bootstrap.setTransactionService(TRANSACTION_SERVICE); bootstrap.setTenantAdminService(TENANT_ADMIN_SERVICE); bootstrap.setNodeService(NODE_SERVICE); bootstrap.setNamespaceService(NAMESPACE_SERVICE); bootstrap.setMessageService(MESSAGE_SERVICE); bootstrap.setPolicyComponent(POLICY_COMPONENT); RepositoryLocation location = new RepositoryLocation(); location.setStoreProtocol(storeRef.getProtocol()); location.setStoreId(storeRef.getIdentifier()); location.setQueryLanguage(RepositoryLocation.LANGUAGE_PATH); // NOTE: we are not setting the path for now .. in doing so we are searching the root node only List<RepositoryLocation> locations = new ArrayList<RepositoryLocation>(); locations.add(location); bootstrap.setRepositoryModelsLocations(locations); // register with dictionary service bootstrap.register(); }
protected String getEmailTemplateRef() String locationType = feedEmailTemplateLocation.getQueryLanguage(); StoreRef store = feedEmailTemplateLocation.getStoreRef(); String xpath = feedEmailTemplateLocation.getPath(); if (!feedEmailTemplateLocation.getQueryLanguage().equals(SearchService.LANGUAGE_XPATH)) logger.error("Cannot find the activities email template - repository location query language is not 'xpath': " + feedEmailTemplateLocation.getQueryLanguage()); return null; return feedEmailTemplateLocation.getPath();
StoreRef storeRef = repositoryLocation.getStoreRef(); if (repositoryLocation.getQueryLanguage().equals(RepositoryLocation.LANGUAGE_PATH)) logger.error("Unsupported query language for messages location: " + repositoryLocation.getQueryLanguage());
RapidMiner.setExecutionMode(ExecutionMode.COMMAND_LINE); RapidMiner.init(); location = new RepositoryLocation("//RapidMinerRepository/PlotterTest"); Entry entry = location.locateEntry(); if (entry instanceof ProcessEntry) {
@Override public NodeRef getModelNodeRef(String modelName) { ParameterCheck.mandatoryString("modelName", modelName); StringBuilder builder = new StringBuilder(120); builder.append(repoModelsLocation.getPath()).append("//.[@cm:name='").append(modelName).append("' and ") .append(RepoAdminServiceImpl.defaultSubtypeOfDictionaryModel).append(']'); List<NodeRef> nodeRefs = searchService.selectNodes(getRootNode(), builder.toString(), null, namespaceDAO, false); if (nodeRefs.size() == 0) { return null; } else if (nodeRefs.size() > 1) { // unexpected: should not find multiple nodes with same name throw new CustomModelException(MSG_MULTIPLE_MODELS, new Object[] { modelName }); } return nodeRefs.get(0); }
private NodeRef getRootNode() { StoreRef storeRef = repoModelsLocation.getStoreRef(); return nodeService.getRootNode(storeRef); }
String[] pathElements = repositoryLocation.getPathElements();
StoreRef storeRef = repoWorkflowDefsLocation.getStoreRef(); NodeRef rootNode = nodeService.getRootNode(storeRef); List<NodeRef> nodeRefs = searchService.selectNodes( rootNode, repoWorkflowDefsLocation.getPath(), null, namespaceService, " found for workflow location: "+repoWorkflowDefsLocation.getPath());
bootstrap.setPolicyComponent(policyComponent); RepositoryLocation location = new RepositoryLocation(); location.setStoreProtocol(this.storeRef.getProtocol()); location.setStoreId(this.storeRef.getIdentifier()); location.setQueryLanguage(RepositoryLocation.LANGUAGE_PATH);
String locationType = followingEmailTemplateLocation.getQueryLanguage(); StoreRef store = followingEmailTemplateLocation.getStoreRef(); String xpath = followingEmailTemplateLocation.getPath(); return followingEmailTemplateLocation.getPath();