@Test public void testTransientKeywordGroups() throws Exception { Group foo = new Group("foo", "foo.*"); Group bar = new Group("bar", "bar.*"); Configuration cfg = new Configuration(); cfg.addGroup(foo); foo.addGroup(bar); cfg.addGroup(bar); ByteArrayOutputStream out = new ByteArrayOutputStream(); try (XMLEncoder enc = new XMLEncoder(out)) { enc.writeObject(cfg); } try (ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray())) { SAXParserFactory factory = SAXParserFactory.newInstance(); SAXParser saxParser = factory.newSAXParser(); saxParser.setProperty(XMLConstants.ACCESS_EXTERNAL_DTD, ""); saxParser.setProperty(XMLConstants.ACCESS_EXTERNAL_SCHEMA, ""); Handler handler = new Handler(); saxParser.parse(new BufferedInputStream(in), handler); } }
public void addGroup(Group group) throws IOException { if (!groups.add(group)) { throw new IOException( String.format("Duplicate group name '%s' in configuration.", group.getName())); } }
Configuration { public void addGroup(Group group) throws IOException { if (!groups.add(group)) { throw new IOException( String.format("Duplicate group name '%s' in configuration.", group.getName())); } } }
Configuration { public void addGroup(Group group) throws IOException { if (!groups.add(group)) { throw new IOException( String.format("Duplicate group name '%s' in configuration.", group.getName())); } } Configuration(); }
Configuration { public void addGroup(Group group) throws IOException { if (!groups.add(group)) { throw new IOException( String.format("Duplicate group name '%s' in configuration.", group.getName())); } } Configuration(); int getTabSize(); void setTabSize(int tabSize); int getScanningDepth(); void setScanningDepth(int scanningDepth); int getNestingMaximum(); void setNestingMaximum(int nestingMaximum); int getIndexerCommandTimeout(); void setIndexerCommandTimeout(int timeout); int getRestfulCommandTimeout(); void setRestfulCommandTimeout(int timeout); int getWebappStartCommandTimeout(); void setWebappStartCommandTimeout(int timeout); int getInteractiveCommandTimeout(); void setInteractiveCommandTimeout(int timeout); long getCtagsTimeout(); void setCtagsTimeout(long timeout); boolean isLastEditedDisplayMode(); void setLastEditedDisplayMode(boolean lastEditedDisplayMode); int getGroupsCollapseThreshold(); void setGroupsCollapseThreshold(int groupsCollapseThreshold); String getRepoCmd(String clazzName); String setRepoCmd(String clazzName, String cmd); Map<String, String> getCmds(); int getMessageLimit(); void setMessageLimit(int messageLimit); String getPluginDirectory(); void setPluginDirectory(String pluginDirectory); boolean isAuthorizationWatchdogEnabled(); void setAuthorizationWatchdogEnabled(boolean authorizationWatchdogEnabled); AuthorizationStack getPluginStack(); void setPluginStack(AuthorizationStack pluginStack); void setCmds(Map<String, String> cmds); String getCtags(); void setCtags(String ctags); String getMandoc(); void setMandoc(String value); short getContextLimit(); void setContextLimit(short value); short getContextSurround(); void setContextSurround(short value); int getCachePages(); void setCachePages(int cachePages); int getHitsPerPage(); void setHitsPerPage(int hitsPerPage); boolean isHistoryEnabled(); void setHistoryEnabled(boolean flag); boolean isHistoryCache(); void setHistoryCache(boolean historyCache); int getHistoryCacheTime(); void setHistoryCacheTime(int historyCacheTime); boolean isFetchHistoryWhenNotInCache(); void setFetchHistoryWhenNotInCache(boolean nofetch); boolean isHandleHistoryOfRenamedFiles(); void setHandleHistoryOfRenamedFiles(boolean enable); boolean isNavigateWindowEnabled(); void setNavigateWindowEnabled(boolean navigateWindowEnabled); Map<String, Project> getProjects(); void setProjects(Map<String, Project> projects); void addGroup(Group group); Set<Group> getGroups(); void setGroups(Set<Group> groups); String getSourceRoot(); void setSourceRoot(String sourceRoot); String getDataRoot(); void setDataRoot(String dataRoot); String getIncludeRoot(); void setIncludeRoot(String newRoot); List<RepositoryInfo> getRepositories(); void setRepositories(List<RepositoryInfo> repositories); void addRepositories(List<RepositoryInfo> repositories); void setGenerateHtml(boolean generateHtml); boolean isGenerateHtml(); void setDefaultProjects(Set<Project> defaultProjects); Set<Project> getDefaultProjects(); double getRamBufferSize(); void setRamBufferSize(double ramBufferSize); boolean isPrintProgress(); void setPrintProgress(boolean printProgress); void setAllowLeadingWildcard(boolean allowLeadingWildcard); boolean isAllowLeadingWildcard(); boolean isQuickContextScan(); void setQuickContextScan(boolean quickContextScan); void setIgnoredNames(IgnoredNames ignoredNames); IgnoredNames getIgnoredNames(); void setIncludedNames(Filter includedNames); Filter getIncludedNames(); void setUserPage(String userPage); String getUserPage(); void setUserPageSuffix(String userPageSuffix); String getUserPageSuffix(); void setBugPage(String bugPage); String getBugPage(); void setBugPattern(String bugPattern); String getBugPattern(); String getReviewPage(); void setReviewPage(String reviewPage); String getReviewPattern(); void setReviewPattern(String reviewPattern); String getWebappLAF(); void setWebappLAF(String webappLAF); boolean isWebappCtags(); void setWebappCtags(boolean value); RemoteSCM getRemoteScmSupported(); void setRemoteScmSupported(RemoteSCM remoteScmSupported); boolean isOptimizeDatabase(); void setOptimizeDatabase(boolean optimizeDatabase); LuceneLockName getLuceneLocking(); void setLuceneLocking(LuceneLockName value); void setCompressXref(boolean compressXref); boolean isCompressXref(); boolean isIndexVersionedFilesOnly(); void setIndexVersionedFilesOnly(boolean indexVersionedFilesOnly); int getIndexingParallelism(); void setIndexingParallelism(int value); int getHistoryParallelism(); void setHistoryParallelism(int value); int getHistoryRenamedParallelism(); void setHistoryRenamedParallelism(int value); boolean isTagsEnabled(); void setTagsEnabled(boolean tagsEnabled); void setRevisionMessageCollapseThreshold(int threshold); int getRevisionMessageCollapseThreshold(); int getCurrentIndexedCollapseThreshold(); void setCurrentIndexedCollapseThreshold(int currentIndexedCollapseThreshold); boolean getDisplayRepositories(); void setDisplayRepositories(boolean flag); boolean getListDirsFirst(); void setListDirsFirst(boolean flag); Path getDtagsEftarPath(); String getCTagsExtraOptionsFile(); void setCTagsExtraOptionsFile(String filename); Set<String> getAllowedSymlinks(); void setAllowedSymlinks(Set<String> allowedSymlinks); Set<String> getCanonicalRoots(); void setCanonicalRoots(Set<String> canonicalRoots); boolean isObfuscatingEMailAddresses(); void setObfuscatingEMailAddresses(boolean obfuscate); boolean isChattyStatusPage(); void setChattyStatusPage(boolean chattyStatusPage); boolean isScopesEnabled(); void setScopesEnabled(boolean scopesEnabled); boolean isFoldingEnabled(); void setFoldingEnabled(boolean foldingEnabled); int getMaxSearchThreadCount(); void setMaxSearchThreadCount(int count); int getMaxRevisionThreadCount(); void setMaxRevisionThreadCount(int count); boolean isProjectsEnabled(); void setProjectsEnabled(boolean flag); SuggesterConfig getSuggesterConfig(); void setSuggesterConfig(final SuggesterConfig config); Set<String> getDisabledRepositories(); void setDisabledRepositories(Set<String> disabledRepositories); void write(File file); String getXMLRepresentationAsString(); void encodeObject(OutputStream out); static Configuration read(File file); static Configuration makeXMLStringAsConfiguration(String xmlconfig); }
Configuration { public void addGroup(Group group) throws IOException { if (!groups.add(group)) { throw new IOException( String.format("Duplicate group name '%s' in configuration.", group.getName())); } } Configuration(); int getTabSize(); void setTabSize(int tabSize); int getScanningDepth(); void setScanningDepth(int scanningDepth); int getNestingMaximum(); void setNestingMaximum(int nestingMaximum); int getIndexerCommandTimeout(); void setIndexerCommandTimeout(int timeout); int getRestfulCommandTimeout(); void setRestfulCommandTimeout(int timeout); int getWebappStartCommandTimeout(); void setWebappStartCommandTimeout(int timeout); int getInteractiveCommandTimeout(); void setInteractiveCommandTimeout(int timeout); long getCtagsTimeout(); void setCtagsTimeout(long timeout); boolean isLastEditedDisplayMode(); void setLastEditedDisplayMode(boolean lastEditedDisplayMode); int getGroupsCollapseThreshold(); void setGroupsCollapseThreshold(int groupsCollapseThreshold); String getRepoCmd(String clazzName); String setRepoCmd(String clazzName, String cmd); Map<String, String> getCmds(); int getMessageLimit(); void setMessageLimit(int messageLimit); String getPluginDirectory(); void setPluginDirectory(String pluginDirectory); boolean isAuthorizationWatchdogEnabled(); void setAuthorizationWatchdogEnabled(boolean authorizationWatchdogEnabled); AuthorizationStack getPluginStack(); void setPluginStack(AuthorizationStack pluginStack); void setCmds(Map<String, String> cmds); String getCtags(); void setCtags(String ctags); String getMandoc(); void setMandoc(String value); short getContextLimit(); void setContextLimit(short value); short getContextSurround(); void setContextSurround(short value); int getCachePages(); void setCachePages(int cachePages); int getHitsPerPage(); void setHitsPerPage(int hitsPerPage); boolean isHistoryEnabled(); void setHistoryEnabled(boolean flag); boolean isHistoryCache(); void setHistoryCache(boolean historyCache); int getHistoryCacheTime(); void setHistoryCacheTime(int historyCacheTime); boolean isFetchHistoryWhenNotInCache(); void setFetchHistoryWhenNotInCache(boolean nofetch); boolean isHandleHistoryOfRenamedFiles(); void setHandleHistoryOfRenamedFiles(boolean enable); boolean isNavigateWindowEnabled(); void setNavigateWindowEnabled(boolean navigateWindowEnabled); Map<String, Project> getProjects(); void setProjects(Map<String, Project> projects); void addGroup(Group group); Set<Group> getGroups(); void setGroups(Set<Group> groups); String getSourceRoot(); void setSourceRoot(String sourceRoot); String getDataRoot(); void setDataRoot(String dataRoot); String getIncludeRoot(); void setIncludeRoot(String newRoot); List<RepositoryInfo> getRepositories(); void setRepositories(List<RepositoryInfo> repositories); void addRepositories(List<RepositoryInfo> repositories); void setGenerateHtml(boolean generateHtml); boolean isGenerateHtml(); void setDefaultProjects(Set<Project> defaultProjects); Set<Project> getDefaultProjects(); double getRamBufferSize(); void setRamBufferSize(double ramBufferSize); boolean isPrintProgress(); void setPrintProgress(boolean printProgress); void setAllowLeadingWildcard(boolean allowLeadingWildcard); boolean isAllowLeadingWildcard(); boolean isQuickContextScan(); void setQuickContextScan(boolean quickContextScan); void setIgnoredNames(IgnoredNames ignoredNames); IgnoredNames getIgnoredNames(); void setIncludedNames(Filter includedNames); Filter getIncludedNames(); void setUserPage(String userPage); String getUserPage(); void setUserPageSuffix(String userPageSuffix); String getUserPageSuffix(); void setBugPage(String bugPage); String getBugPage(); void setBugPattern(String bugPattern); String getBugPattern(); String getReviewPage(); void setReviewPage(String reviewPage); String getReviewPattern(); void setReviewPattern(String reviewPattern); String getWebappLAF(); void setWebappLAF(String webappLAF); boolean isWebappCtags(); void setWebappCtags(boolean value); RemoteSCM getRemoteScmSupported(); void setRemoteScmSupported(RemoteSCM remoteScmSupported); boolean isOptimizeDatabase(); void setOptimizeDatabase(boolean optimizeDatabase); LuceneLockName getLuceneLocking(); void setLuceneLocking(LuceneLockName value); void setCompressXref(boolean compressXref); boolean isCompressXref(); boolean isIndexVersionedFilesOnly(); void setIndexVersionedFilesOnly(boolean indexVersionedFilesOnly); int getIndexingParallelism(); void setIndexingParallelism(int value); int getHistoryParallelism(); void setHistoryParallelism(int value); int getHistoryRenamedParallelism(); void setHistoryRenamedParallelism(int value); boolean isTagsEnabled(); void setTagsEnabled(boolean tagsEnabled); void setRevisionMessageCollapseThreshold(int threshold); int getRevisionMessageCollapseThreshold(); int getCurrentIndexedCollapseThreshold(); void setCurrentIndexedCollapseThreshold(int currentIndexedCollapseThreshold); boolean getDisplayRepositories(); void setDisplayRepositories(boolean flag); boolean getListDirsFirst(); void setListDirsFirst(boolean flag); Path getDtagsEftarPath(); String getCTagsExtraOptionsFile(); void setCTagsExtraOptionsFile(String filename); Set<String> getAllowedSymlinks(); void setAllowedSymlinks(Set<String> allowedSymlinks); Set<String> getCanonicalRoots(); void setCanonicalRoots(Set<String> canonicalRoots); boolean isObfuscatingEMailAddresses(); void setObfuscatingEMailAddresses(boolean obfuscate); boolean isChattyStatusPage(); void setChattyStatusPage(boolean chattyStatusPage); boolean isScopesEnabled(); void setScopesEnabled(boolean scopesEnabled); boolean isFoldingEnabled(); void setFoldingEnabled(boolean foldingEnabled); int getMaxSearchThreadCount(); void setMaxSearchThreadCount(int count); int getMaxRevisionThreadCount(); void setMaxRevisionThreadCount(int count); boolean isProjectsEnabled(); void setProjectsEnabled(boolean flag); SuggesterConfig getSuggesterConfig(); void setSuggesterConfig(final SuggesterConfig config); Set<String> getDisabledRepositories(); void setDisabledRepositories(Set<String> disabledRepositories); void write(File file); String getXMLRepresentationAsString(); void encodeObject(OutputStream out); static Configuration read(File file); static Configuration makeXMLStringAsConfiguration(String xmlconfig); static final String PLUGIN_DIRECTORY_DEFAULT; static final double defaultRamBufferSize; static final int defaultScanningDepth; static final String EFTAR_DTAGS_NAME; static final String FOOTER_INCLUDE_FILE; static final String HEADER_INCLUDE_FILE; static final String BODY_INCLUDE_FILE; static final String E_FORBIDDEN_INCLUDE_FILE; static final String HTTP_HEADER_INCLUDE_FILE; }