001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: */
017: package org.apache.wicket.settings;
018:
019: import java.util.List;
020:
021: import org.apache.wicket.markup.html.WebPage;
022: import org.apache.wicket.markup.resolver.AutoComponentResolver;
023: import org.apache.wicket.markup.resolver.IComponentResolver;
024:
025: /**
026: * Interface for page related settings.
027: *
028: * @author Igor Vaynberg (ivaynberg)
029: * @author Eelco Hillenius
030: */
031: public interface IPageSettings {
032: /**
033: * Adds a component resolver to the list.
034: *
035: * @param resolver
036: * The {@link IComponentResolver} that is added
037: */
038: void addComponentResolver(IComponentResolver resolver);
039:
040: /**
041: * Get the (modifiable) list of IComponentResolvers.
042: *
043: * @see AutoComponentResolver for an example
044: * @return List of ComponentResolvers
045: */
046: List getComponentResolvers();
047:
048: /**
049: * Gets whether Wicket should try to support opening multiple windows for
050: * the same session transparently. If this is true - the default setting -,
051: * Wicket tries to detect whether a new window was opened by a user (e.g. in
052: * Internet Explorer by pressing ctrl+n or ctrl+click on a link), and if it
053: * detects that, it creates a new page map for that window on the fly. As a
054: * page map represents the 'history' of one window, each window will then
055: * have their own history. If two windows would share the same page map, the
056: * non-bookmarkable links on one window could refer to stale state after
057: * working a while in the other window.
058: * <p>
059: * <strong> Currently, Wicket trying to do this is a best effort that is not
060: * completely fail safe. When the client does not support cookies, support
061: * gets tricky and incomplete. See {@link WebPage}'s internals for the
062: * implementation. </strong>
063: * </p>
064: *
065: * @return Whether Wicket should try to support multiple windows
066: * transparently
067: */
068: boolean getAutomaticMultiWindowSupport();
069:
070: /**
071: * @return Returns the pagesVersionedByDefault.
072: */
073: boolean getVersionPagesByDefault();
074:
075: /**
076: * @param pagesVersionedByDefault
077: * The pagesVersionedByDefault to set.
078: */
079: void setVersionPagesByDefault(boolean pagesVersionedByDefault);
080:
081: /**
082: * Sets whether Wicket should try to support opening multiple windows for
083: * the same session transparently. If this is true - the default setting -,
084: * Wicket tries to detect whether a new window was opened by a user (e.g. in
085: * Internet Explorer by pressing ctrl+n or ctrl+click on a link), and if it
086: * detects that, it creates a new page map for that window on the fly. As a
087: * page map represents the 'history' of one window, each window will then
088: * have their own history. If two windows would share the same page map, the
089: * non-bookmarkable links on one window could refer to stale state after
090: * working a while in the other window.
091: * <p>
092: * <strong> Currently, Wicket trying to do this is a best effort that is not
093: * completely fail safe. When the client does not support cookies, support
094: * gets tricky and incomplete. See {@link WebPage}'s internals for the
095: * implementation. </strong>
096: * </p>
097: *
098: * @param automaticMultiWindowSupport
099: * Whether Wicket should try to support multiple windows
100: * transparently
101: */
102: void setAutomaticMultiWindowSupport(
103: boolean automaticMultiWindowSupport);
104: }
|