private Collection<QName> getAllowedPackageResourceTypes() { // look for content nodes or links to content // NOTE: folders within workflow packages are ignored for now Collection<QName> allowedTypes = dictionaryService.getSubTypes(ContentModel.TYPE_CONTENT, true); allowedTypes.addAll(dictionaryService.getSubTypes(ApplicationModel.TYPE_FILELINK, true)); return allowedTypes; }
private Collection<QName> getAllowedPackageResourceTypes() { // look for content nodes or links to content // NOTE: folders within workflow packages are ignored for now Collection<QName> allowedTypes = dictionaryService.getSubTypes(ContentModel.TYPE_CONTENT, true); allowedTypes.addAll(dictionaryService.getSubTypes(ApplicationModel.TYPE_FILELINK, true)); return allowedTypes; }
private Set<QName> buildFileTypes() { Set<QName> fileTypeQNames = new HashSet<QName>(50); // Build a list of file types Collection<QName> qnames = dictionaryService.getSubTypes(ContentModel.TYPE_CONTENT, true); fileTypeQNames.addAll(qnames); fileTypeQNames.add(ContentModel.TYPE_CONTENT); qnames = dictionaryService.getSubTypes(ContentModel.TYPE_LINK, true); fileTypeQNames.addAll(qnames); fileTypeQNames.add(ContentModel.TYPE_LINK); return fileTypeQNames; }
private Set<QName> buildFileTypes() { Set<QName> fileTypeQNames = new HashSet<QName>(50); // Build a list of file types Collection<QName> qnames = dictionaryService.getSubTypes(ContentModel.TYPE_CONTENT, true); fileTypeQNames.addAll(qnames); fileTypeQNames.add(ContentModel.TYPE_CONTENT); qnames = dictionaryService.getSubTypes(ContentModel.TYPE_LINK, true); fileTypeQNames.addAll(qnames); fileTypeQNames.add(ContentModel.TYPE_LINK); return fileTypeQNames; }
private Set<QName> buildFolderTypes() { Set<QName> folderTypeQNames = new HashSet<QName>(50); // Build a list of folder types Collection<QName> qnames = dictionaryService.getSubTypes(ContentModel.TYPE_FOLDER, true); folderTypeQNames.addAll(qnames); folderTypeQNames.add(ContentModel.TYPE_FOLDER); // Remove 'system' folders qnames = dictionaryService.getSubTypes(ContentModel.TYPE_SYSTEM_FOLDER, true); folderTypeQNames.removeAll(qnames); folderTypeQNames.remove(ContentModel.TYPE_SYSTEM_FOLDER); return folderTypeQNames; }
private Set<QName> buildFolderTypes() { Set<QName> folderTypeQNames = new HashSet<QName>(50); // Build a list of folder types Collection<QName> qnames = dictionaryService.getSubTypes(ContentModel.TYPE_FOLDER, true); folderTypeQNames.addAll(qnames); folderTypeQNames.add(ContentModel.TYPE_FOLDER); // Remove 'system' folders qnames = dictionaryService.getSubTypes(ContentModel.TYPE_SYSTEM_FOLDER, true); folderTypeQNames.removeAll(qnames); folderTypeQNames.remove(ContentModel.TYPE_SYSTEM_FOLDER); return folderTypeQNames; }
ImapSubFolderFilter(ImapViewMode imapViewMode) { this.imapViewMode = imapViewMode; this.typesToExclude = ImapServiceImpl.this.serviceRegistry.getDictionaryService().getSubTypes(SiteModel.TYPE_SITE, true); this.favs = getFavouriteSites(getCurrentUser()); }
ImapSubFolderFilter(ImapViewMode imapViewMode) { this.imapViewMode = imapViewMode; this.typesToExclude = ImapServiceImpl.this.serviceRegistry.getDictionaryService().getSubTypes(SiteModel.TYPE_SITE, true); this.favs = getFavouriteSites(getCurrentUser()); }
/** * Update number of documents with appropriate locking */ private boolean updateDocuments(boolean reset) { Long documentCount = 0L; if (!reset) { // Count documents Set<QName> searchTypeQNames = new HashSet<QName>(11); Collection<QName> qnames = dictionaryService.getSubTypes(ContentModel.TYPE_CONTENT, true); searchTypeQNames.addAll(qnames); searchTypeQNames.add(ContentModel.TYPE_CONTENT); qnames = dictionaryService.getSubTypes(ContentModel.TYPE_LINK, true); searchTypeQNames.addAll(qnames); searchTypeQNames.add(ContentModel.TYPE_LINK); Set<Long> searchTypeQNameIds = qnameDAO.convertQNamesToIds(searchTypeQNames, false); IdsEntity idsParam = new IdsEntity(); idsParam.setIds(new ArrayList<Long>(searchTypeQNameIds)); documentCount = cannedQueryDAO.executeCountQuery(QUERY_NS, QUERY_SELECT_COUNT_DOCUMENTS, idsParam); } attributeService.setAttribute( new Long(System.currentTimeMillis()), KEY_USAGE_ROOT, KEY_USAGE_CURRENT, KEY_USAGE_LAST_UPDATE_DOCUMENTS); attributeService.setAttribute( documentCount, KEY_USAGE_ROOT, KEY_USAGE_CURRENT, KEY_USAGE_DOCUMENTS); // Success return true; }
/** * Update number of documents with appropriate locking */ private boolean updateDocuments(boolean reset) { Long documentCount = 0L; if (!reset) { // Count documents Set<QName> searchTypeQNames = new HashSet<QName>(11); Collection<QName> qnames = dictionaryService.getSubTypes(ContentModel.TYPE_CONTENT, true); searchTypeQNames.addAll(qnames); searchTypeQNames.add(ContentModel.TYPE_CONTENT); qnames = dictionaryService.getSubTypes(ContentModel.TYPE_LINK, true); searchTypeQNames.addAll(qnames); searchTypeQNames.add(ContentModel.TYPE_LINK); Set<Long> searchTypeQNameIds = qnameDAO.convertQNamesToIds(searchTypeQNames, false); IdsEntity idsParam = new IdsEntity(); idsParam.setIds(new ArrayList<Long>(searchTypeQNameIds)); documentCount = cannedQueryDAO.executeCountQuery(QUERY_NS, QUERY_SELECT_COUNT_DOCUMENTS, idsParam); } attributeService.setAttribute( new Long(System.currentTimeMillis()), KEY_USAGE_ROOT, KEY_USAGE_CURRENT, KEY_USAGE_LAST_UPDATE_DOCUMENTS); attributeService.setAttribute( documentCount, KEY_USAGE_ROOT, KEY_USAGE_CURRENT, KEY_USAGE_DOCUMENTS); // Success return true; }
if (!directOnly) types.addAll(dictionaryService.getSubTypes(contentClass, true));
if (!directOnly) types.addAll(dictionaryService.getSubTypes(contentClass, true));
public Map<String, Document> parseXMLDocuments(final String typeName, NodeRef rootNode, String repoPath) throws IOException, SAXException { final Map<String, Document> result = new TreeMap<String, Document>(); String[] pathElements = breakDownPath(repoPath); try { FileInfo file = fileService.resolveNamePath(rootNode, Arrays.asList(pathElements)); if (file.isFolder()) { QName typeQName = QName.createQName(typeName, namespaceService); Set<QName> types = new HashSet<QName>(dictionaryService.getSubTypes(typeQName, true)); types.add(typeQName); List<ChildAssociationRef> children = nodeService.getChildAssocs(file.getNodeRef(), types); for (ChildAssociationRef child : children) { String name = (String) nodeService.getProperty(child.getChildRef(), ContentModel.PROP_NAME); Document doc = XMLUtil.parse(child.getChildRef(), contentService); result.put(name, doc); } } } catch (Exception ex) { log.warn("Unexpected exception caught in call to parseXMLDocuments", ex); } return result; }
public Map<String, Document> parseXMLDocuments(final String typeName, NodeRef rootNode, String repoPath) throws IOException, SAXException { final Map<String, Document> result = new TreeMap<String, Document>(); String[] pathElements = breakDownPath(repoPath); try { FileInfo file = fileService.resolveNamePath(rootNode, Arrays.asList(pathElements)); if (file.isFolder()) { QName typeQName = QName.createQName(typeName, namespaceService); Set<QName> types = new HashSet<QName>(dictionaryService.getSubTypes(typeQName, true)); types.add(typeQName); List<ChildAssociationRef> children = nodeService.getChildAssocs(file.getNodeRef(), types); for (ChildAssociationRef child : children) { String name = (String) nodeService.getProperty(child.getChildRef(), ContentModel.PROP_NAME); Document doc = XMLUtil.parse(child.getChildRef(), contentService); result.put(name, doc); } } } catch (Exception ex) { log.warn("Unexpected exception caught in call to parseXMLDocuments", ex); } return result; }
searchTypeQNames.add(SiteModel.TYPE_SITE); searchTypeQNames.addAll(dictionaryService.getSubTypes(SiteModel.TYPE_SITE, true));
searchTypeQNames.add(SiteModel.TYPE_SITE); searchTypeQNames.addAll(dictionaryService.getSubTypes(SiteModel.TYPE_SITE, true));
Collection<QName> subclasses = dictionaryService.getSubTypes(target.getName(), true); for (QName qname : subclasses)
Collection<QName> subclasses = dictionaryService.getSubTypes(target.getName(), true); for (QName qname : subclasses)
Collection<QName> subclasses = dictionaryService.getSubTypes(classDef.getName(), true); for (QName qname : subclasses)
Collection<QName> subclasses = dictionaryService.getSubTypes(classDef.getName(), true); for (QName qname : subclasses)