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 org.apache.wicket.application.IClassResolver;
020: import org.apache.wicket.markup.html.form.Form;
021: import org.apache.wicket.util.lang.Bytes;
022:
023: /**
024: * Settings interface for application settings.
025: * <p>
026: * <i>internalErrorPage </i>- You can override this with your own page class to
027: * display internal errors in a different way.
028: * <p>
029: * <i>pageExpiredErrorPage </i>- You can override this with your own
030: * bookmarkable page class to display expired page errors in a different way.
031: * You can set property homePageRenderStrategy to choose from different ways the
032: * home page url shows up in your browser.
033: * <p>
034: * <b>A Converter Factory </b>- By overriding getConverterFactory(), you can
035: * provide your own factory which creates locale sensitive Converter instances.
036: *
037: * @author Jonathan Locke
038: */
039: public interface IApplicationSettings {
040: /**
041: * Gets the access denied page class.
042: *
043: * @return Returns the accessDeniedPage.
044: * @see IApplicationSettings#setAccessDeniedPage(Class)
045: */
046: Class getAccessDeniedPage();
047:
048: /**
049: * Gets the default resolver to use when finding classes
050: *
051: * @return Default class resolver
052: */
053: IClassResolver getClassResolver();
054:
055: /**
056: * Gets the default maximum size for uploads. This is used by
057: * {@link Form#getMaxSize()} if no value is explicitly set through
058: * {@link Form#setMaxSize(Bytes)}.
059: *
060: * @return the default maximum size for uploads
061: */
062: Bytes getDefaultMaximumUploadSize();
063:
064: /**
065: * Gets internal error page class.
066: *
067: * @return Returns the internalErrorPage.
068: * @see IApplicationSettings#setInternalErrorPage(Class)
069: */
070: Class getInternalErrorPage();
071:
072: /**
073: * Gets the page expired page class.
074: *
075: * @return Returns the pageExpiredErrorPage.
076: * @see IApplicationSettings#setPageExpiredErrorPage(Class)
077: */
078: Class getPageExpiredErrorPage();
079:
080: /**
081: * Sets the access denied page class. The class must be bookmarkable and
082: * must extend Page.
083: *
084: * @param accessDeniedPage
085: * The accessDeniedPage to set.
086: */
087: void setAccessDeniedPage(final Class accessDeniedPage);
088:
089: /**
090: * Sets the default class resolver to use when finding classes.
091: *
092: * @param defaultClassResolver
093: * The default class resolver
094: */
095: void setClassResolver(final IClassResolver defaultClassResolver);
096:
097: /**
098: * Sets the default maximum size for uploads. This is used by
099: * {@link Form#getMaxSize()} if no value is explicitly set through
100: * {@link Form#setMaxSize(Bytes)}.
101: *
102: * @param defaultUploadSize
103: * the default maximum size for uploads
104: */
105: void setDefaultMaximumUploadSize(Bytes defaultUploadSize);
106:
107: /**
108: * Sets internal error page class. The class must be bookmarkable and must
109: * extend Page.
110: *
111: * @param internalErrorPage
112: * The internalErrorPage to set.
113: */
114: void setInternalErrorPage(final Class internalErrorPage);
115:
116: /**
117: * Sets the page expired page class. The class must be bookmarkable and must
118: * extend Page.
119: *
120: * @param pageExpiredErrorPage
121: * The pageExpiredErrorPage to set.
122: */
123: void setPageExpiredErrorPage(final Class pageExpiredErrorPage);
124: }
|