⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 configuration.java

📁 ZK 基础介绍 功能操作 模块 结合数据库操作
💻 JAVA
📖 第 1 页 / 共 4 页
字号:
		synchronized (this) {			if (_disThemeURIs == null)				_disThemeURIs = Collections.synchronizedSet(new HashSet(4));		}		_disThemeURIs.add(uri);	}	/** Returns a set of the theme URIs that are disabled (never null).	 *	 * @since 3.0.0	 * @see #addDisabledThemeURI	 */	public Set getDisabledThemeURIs() {		return _disThemeURIs != null ? _disThemeURIs: Collections.EMPTY_SET;	}	/** Returns the theme provider for the current execution,	 * or null if not available.	 *	 * <p>Default: null.	 *	 * <p>Note: if specified, the final theme URIs is decided by	 * the provider. The URIs specified in {@link #getThemeURIs} are	 * passed to provider, and it has no effect if the provider decides	 * to ignore them.	 * @since 3.0.0	 * @see #getThemeURIs	 * @see #getDisabledThemeURIs	 */	public ThemeProvider getThemeProvider() {		return _themeProvider;	}	/** Sets the theme provider for the current execution,	 * or null if not available.	 *	 * @param provider the theme provide. If null, the default theme URIs	 * will be used.	 * @see #getThemeProvider	 * @since 3.0.0	 */	public void setThemeProvider(ThemeProvider provider) {		_themeProvider = provider;	}	/**	 * @deprecated As of release 2.4.0, replaced by {@link Devices#setTimeoutURI}.	 */	public void setTimeoutURI(String uri) {		Devices.setTimeoutURI("ajax", uri);	}	/**	 * @deprecated As of release 2.4.0, replaced by {@link Devices#getTimeoutURI}.	 */	public String getTimeoutURI() {		return Devices.getTimeoutURI("ajax");	}	/** Sets the class that implements {@link UiEngine}, or null to	 * use the default.	 */	public void setUiEngineClass(Class cls) {		if (cls != null && !UiEngine.class.isAssignableFrom(cls))			throw new IllegalArgumentException("UiEngine not implemented: "+cls);		_uiengcls = cls;	}	/** Returns the class that implements {@link UiEngine}, or null if default is used.	 */	public Class getUiEngineClass() {		return _uiengcls;	}	/** Sets the class that implements {@link WebApp} and	 * {@link WebAppCtrl}, or null to use the default.	 *	 * <p>Note: you have to set the class before {@link WebApp} is created.	 * Otherwise, it won't have any effect.	 */	public void setWebAppClass(Class cls) {		if (cls != null && (!WebApp.class.isAssignableFrom(cls)		|| !WebAppCtrl.class.isAssignableFrom(cls)))			throw new IllegalArgumentException("WebApp or WebAppCtrl not implemented: "+cls);		_wappcls = cls;	}	/** Returns the class that implements {@link WebApp} and	 * {@link WebAppCtrl}, or null if default is used.	 */	public Class getWebAppClass() {		return _wappcls;	}	/** Sets the class that implements {@link DesktopCacheProvider}, or null to	 * use the default.	 *	 * <p>Note: you have to set the class before {@link WebApp} is created.	 * Otherwise, it won't have any effect.	 */	public void setDesktopCacheProviderClass(Class cls) {		if (cls != null && !DesktopCacheProvider.class.isAssignableFrom(cls))			throw new IllegalArgumentException("DesktopCacheProvider not implemented: "+cls);		_dcpcls = cls;	}	/** Returns the class that implements the UI engine, or null if default is used.	 */	public Class getDesktopCacheProviderClass() {		return _dcpcls;	}	/** Sets the class that implements {@link UiFactory}, or null to	 * use the default.	 *	 * <p>Note: you have to set the class before {@link WebApp} is created.	 * Otherwise, it won't have any effect.	 */	public void setUiFactoryClass(Class cls) {		if (cls != null && !UiFactory.class.isAssignableFrom(cls))			throw new IllegalArgumentException("UiFactory not implemented: "+cls);		_uiftycls = cls;	}	/** Returns the class that implements the UI engine, or null if default is used.	 */	public Class getUiFactoryClass() {		return _uiftycls;	}	/** Sets the class that implements {@link FailoverManager}, or null if	 * no custom failover mechanism.	 *	 * <p>Note: you have to set the class before {@link WebApp} is created.	 * Otherwise, it won't have any effect.	 */	public void setFailoverManagerClass(Class cls) {		if (cls != null && !FailoverManager.class.isAssignableFrom(cls))			throw new IllegalArgumentException("FailoverManager not implemented: "+cls);		_failmancls = cls;	}	/** Returns the class that implements the failover manger,	 * or null if no custom failover mechanism.	 */	public Class getFailoverManagerClass() {		return _failmancls;	}	/** Sets the class that implements {@link IdGenerator}, or null to	 * use the default.	 *	 * <p>Note: you have to set the class before {@link WebApp} is created.	 * Otherwise, it won't have any effect.	 * @since 2.4.1	 */	public void setIdGeneratorClass(Class cls) {		if (cls != null && !IdGenerator.class.isAssignableFrom(cls))			throw new IllegalArgumentException("IdGenerator not implemented: "+cls);		_idgencls = cls;	}	/** Returns the class that implements {@link IdGenerator},	 * or null if default is used.	 * @since 2.4.1	 */	public Class getIdGeneratorClass() {		return _idgencls;	}	/** Specifies the maximal allowed time to process events, in miliseconds.	 * ZK will keep processing the requests sent from	 * the client until all requests are processed, or the maximal allowed	 * time expires.	 *	 * <p>Default: 3000.	 *	 * @param time the maximal allowed time to process events.	 * It must be positive.	 */	public void setMaxProcessTime(int time) {		_maxProcTime = time;	}	/** Returns the maximal allowed time to process events, in miliseconds.	 * It is always positive	 */	public int getMaxProcessTime() {		return _maxProcTime;	}	/** Specifies the maximal allowed upload size, in kilobytes.	 *	 * <p>Default: 5120.	 *	 * @param sz the maximal allowed upload size.	 * A negative value indicates therre is no limit.	 */	public void setMaxUploadSize(int sz) {		_maxUploadSize = sz;	}	/** Returns the maximal allowed upload size, in kilobytes, or 	 * a negative value if no limit.	 */	public int getMaxUploadSize() {		return _maxUploadSize;	}	/** Returns the charset used to encode the uploaded text file	 * (never null).	 *	 * <p>Default: UTF-8.	 * @see #getUploadCharsetFinder	 */	public String getUploadCharset() {		return _charsetUpload;	}	/** Sets the charset used to encode the upload text file.	 *	 * <p>Note: {@link #setUploadCharsetFinder} has the higher priority.	 *	 * @param charset the charset to use.	 * If null or empty, UTF-8 is assumed.	 * @see #setUploadCharsetFinder	 */	public void setUploadCharset(String charset) {		_charsetUpload = charset != null && charset.length() > 0 ? charset: "UTF-8";	}	/** Returns the finder that is used to decide the character set	 * for the uploaded text filie(s), or null if not available.	 *	 * <p>Default: null	 * @since 3.0.0	 * @see #getUploadCharset	 */	public CharsetFinder getUploadCharsetFinder() {		return _charsetFinderUpload;	}	/** Sets the finder that is used to decide the character set	 * for the uploaded text filie(s), or null if not available.	 *	 * <p>It has the higher priority than {@link #setUploadCharset}.	 * In other words, {@link #getUploadCharset} is used only if	 * this method returns null or {@link CharsetFinder#getCharset}	 * returns null.	 *	 * @since 3.0.0	 * @see #setUploadCharset	 */	public void setUploadCharsetFinder(CharsetFinder finder) {		_charsetFinderUpload = finder;	}	/** Specifies the time, in seconds, between client requests	 * before ZK will invalidate the desktop.	 *	 * <p>Default: 3600 (1 hour).	 *	 * <p>A negative value indicates the desktop should never timeout.	 */	public void setDesktopMaxInactiveInterval(int secs) {		_dtTimeout = secs;	}	/** Returns the time, in seconds, between client requests	 * before ZK will invalidate the desktop.	 *	 * <p>A negative value indicates the desktop should never timeout.	 */	public int getDesktopMaxInactiveInterval() {		return _dtTimeout;	}	/** Specifies the time, in milliseconds, before ZK Client Engine shows	 * a dialog to prompt users that the request is in processming.	 *	 * <p>Default: 900	 */	public void setProcessingPromptDelay(int minisecs) {		_promptDelay = minisecs;	}	/** Returns the time, in milliseconds, before ZK Client Engine shows	 * a dialog to prompt users that the request is in processming.	 */	public int getProcessingPromptDelay() {		return _promptDelay;	}	/** Specifies the time, in milliseconds, before ZK Client Engine shows	 * the tooltip when a user moves the mouse over particual UI components.	 *	 * <p>Default: 800	 */	public void setTooltipDelay(int minisecs) {		_tooltipDelay = minisecs;	}	/** Returns the time, in milliseconds, before ZK Client Engine shows	 * the tooltip when a user moves the mouse over particual UI components.	 */	public int getTooltipDelay() {		return _tooltipDelay;	}	/** Adds the URI to redirect to, when ZK Client Engine receives	 * an error.	 *	 * @param errCode the error code.	 * @param uri the URI to redirect to. It cannot be null.	 * If empty, the client will reload the same page again.	 * If null, it is the same as {@link #removeClientErrorReload}	 * @return the previous URI associated with the specified error code	 * @since 3.0.0	 */	public String addClientErrorReload(int errCode, String uri) {		if (uri == null)			return removeClientErrorReload(errCode);		return (String)_errURIs.put(new Integer(errCode), uri);	}	/** Removes the URI to redirect to, when ZK Client Engine receives	 * an error.	 *	 * @param errCode the error code.	 * @return the previous URI associated with the specified error code	 * @since 3.0.0	 */	public String removeClientErrorReload(int errCode) {		return (String)_errURIs.remove(new Integer(errCode));	}	/** Returns the URI that is associated with the specified error code,	 * or null if no URI is associated.	 * @since 3.0.0	 */	public String getClientErrorReload(int errCode) {		return (String)_errURIs.get(new Integer(errCode));	}	/** Returns a readonly array of all error codes that are associated	 * with URI to redirect to.	 *	 * <p>Default: 302, 401 and 403 are associated with an empty URI.	 * @since 3.0.0	 */	public int[] getClientErrorReloadCodes() {		final Set ks = _errURIs.keySet();		final int[] cers = new int[ks.size()];		int j = 0;		for (Iterator it = ks.iterator(); j < cers.length && it.hasNext();) {			cers[j++] = ((Integer)it.next()).intValue();		}		return cers;	}	/**  Specifies the time, in seconds, between client requests	 * before ZK will invalidate the session.	 *	 * <p>Default: 0 (means the system default).	 *	 * @see #setTimerKeepAlive	 * @see Session#setMaxInactiveInterval	 */	public void setSessionMaxInactiveInterval(int secs) {		_sessTimeout = secs;	}	/** Returns the time, in seconds, between client requests	 * before ZK will invalidate the session.	 *	 * <p>Default: 0 (means the system default).	 *	 * <p>A negative value indicates that there is no limit.	 * Zero means to use the system default (usually defined in web.xml).	 *	 * @see #isTimerKeepAlive	 * @see Session#getMaxInactiveInterval	 */	public int getSessionMaxInactiveInterval() {		return _sessTimeout;	}	/** Specifies the maximal allowed number of desktop	 * per session.	 *	 * <p>Defafult: 10.	 *	 * <p>A negative value indicates there is no limit.	 */	public void setMaxDesktops(int max) {		_dtMax = max;	}	/** Returns the maximal allowed number of desktop per session.	 *	 * <p>A negative value indicates there is no limit.	 */	public int getMaxDesktops() {		return _dtMax;	}	/** Specifies the maximal allowed number of the spare pool for	 * queuing the event processing threads (per Web application).	 *	 * <p>Default: 100.	 *	 * <p>A negative value indicates there is no limit.	 *	 * <p>ZK uses a thread pool to keep the idle event processing threads.	 * It speeds up the service of an event by reusing the thread queued	 * in this pool.	 *	 * @see #setMaxSuspendedThreads	 * @see #isEventThreadEnabled	 */	public void setMaxSpareThreads(int max) {		_sparThdMax = max;	}	/** Returns the maximal allowed number of the spare pool for	 * queuing event processing threads (per Web application).	 * @see #isEventThreadEnabled	 */	public int getMaxSpareThreads() {		return _sparThdMax;	}	/** Specifies the maximal allowed number of suspended event	 * processing threads (per Web application).	 *	 * <p>Default: -1 (no limit).	 *	 * <p>A negative value indicates there is no limit.	 *	 * <p>It is ignored if the use of the event processing thread	 * is disable ({@link #isEventThreadEnabled}.	 */	public void setMaxSuspendedThreads(int max) {		_suspThdMax = max;	}	/** Returns the maximal allowed number of suspended event	 * processing threads (per Web application).	 *	 * <p>It is ignored if the use of the event processing thread	 * is disable ({@link #isEventThreadEnabled}.	 * @see #isEventThreadEnabled	 */	public int getMaxSuspendedThreads() {		return _suspThdMax;	}	/** Sets whether to use the event processing thread.	 *	 * <p>Default: enabled.	 *	 * @exception IllegalStateException if there is suspended thread	 * and use is false.	 */	public void enableEventThread(boolean enable) {		if (!enable && _wapp != null) {			final UiEngine engine = ((WebAppCtrl)_wapp).getUiEngine();			if (engine != null) {				if (engine.hasSuspendedThread())					throw new IllegalStateException("Unable to disable due to suspended threads");			}		}		_useEvtThd = enable;	}	/** Returns whether to use the event processing thread.	 */	public boolean isEventThreadEnabled() {		return _useEvtThd;	}	/** Returns whether to disable the components that don't belong to	 * the active modal window.	 *	 * <p>Default: true.	 * @since 2.4.1	 */	public boolean isDisableBehindModalEnabled() {		return _disableBehindModal;	}	/** Sets whether to disable the components that don't belong to	 * the active modal window.	 *	 * <p>Default: true.	 * @since 2.4.1	 */	public void enableDisableBehindModal(boolean enable) {		_disableBehindModal = enable;	}	/** Returns the monitor for this application, or null if not set.	 */	public Monitor getMonitor() {		return _monitor;	}	/** Sets the monitor for this application, or null to disable it.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -